Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367551
b: refs/heads/master
c: 882fd12
h: refs/heads/master
i:
  367549: 9450afb
  367547: 252a25b
  367543: 4482110
  367535: 808c71a
  367519: 09e8716
  367487: 9186cc3
v: v3
  • Loading branch information
Toshi Kani authored and Rafael J. Wysocki committed Mar 24, 2013
1 parent 5ef804b commit d49d9d8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea6a4581ce11bd1a5dca421c01b11d1ff2867c2f
refs/heads/master: 882fd12e641b612bcf31620f9b1b7bb03f8e9ab5
18 changes: 17 additions & 1 deletion trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ static int acpi_scan_hot_remove(struct acpi_device *device)
struct acpi_object_list arg_list;
union acpi_object arg;
acpi_status status;
unsigned long long sta;

/* If there is no handle, the device node has been unregistered. */
if (!handle) {
Expand Down Expand Up @@ -164,10 +165,25 @@ static int acpi_scan_hot_remove(struct acpi_device *device)
if (status == AE_NOT_FOUND) {
return -ENODEV;
} else {
acpi_handle_warn(handle, "Eject failed\n");
acpi_handle_warn(handle, "Eject failed (0x%x)\n",
status);
return -EIO;
}
}

/*
* Verify if eject was indeed successful. If not, log an error
* message. No need to call _OST since _EJ0 call was made OK.
*/
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status)) {
acpi_handle_warn(handle,
"Status check after eject failed (0x%x)\n", status);
} else if (sta & ACPI_STA_DEVICE_ENABLED) {
acpi_handle_warn(handle,
"Eject incomplete - status 0x%llx\n", sta);
}

return 0;
}

Expand Down

0 comments on commit d49d9d8

Please sign in to comment.