Jeff Garzik wrote:
Matthew Garrett wrote:
Modern laptops with hotswap bays still tend to utilise a PATA
interface on a SATA bridge, generally with the host controller in some
legacy emulation mode rather than AHCI. This means that the existing
hotplug code in libata is unable to work. The ACPI specification
states that these devices can send notifications when hotswapped,
which avoids the need to obtain notification from the controller. This
patch uses the existing libata-acpi code and simply registers a
notification in order to trigger a rescan whenever the firmware
signals an event.
Signed-off-by: Matthew Garrett
<mjg59@xxxxxxxxxxxxx>
---
This incorporates Jeff's feedback. sdev is checked for NULL, and
different notifications are registered for ap-level and dev-level
handlers. The core code is split out into a helper function called by
both of these. The other change is the removal of the extraneous
newline from the end of the notification event, to match the upstream
change in the bay driver.
applied
Come on, dude! This doesn't even build:
UPD include/linux/compile.h
drivers/ata/libata-acpi.c: In function ‘ata_acpi_handle_hotplug’:
drivers/ata/libata-acpi.c:104: error: ‘struct ata_port’ has no member
named ‘eh_info’
drivers/ata/libata-acpi.c: In function ‘ata_acpi_dev_notify’:
drivers/ata/libata-acpi.c:130: error: ‘struct ata_device’ has no member
named ‘ap’
drivers/ata/libata-acpi.c: In function ‘ata_acpi_associate’:
drivers/ata/libata-acpi.c:178: error: implicit declaration of function
‘ata_port_max_devices’
drivers/ata/libata-acpi.c:179: error: ‘struct ata_port’ has no member
named ‘device’
make[2]: *** [drivers/ata/libata-acpi.o] Error 1
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html