Hello, Holger Macht wrote: > On Wed 12. Mar - 14:24:43, Tejun Heo wrote: >> Improve ACPI hotplug handling such that dock event is handled properly. >> >> * Register handlers for dock events. >> >> * Directly detach device on EJECT_REQUEST instead of signaling hotplug >> event. This prevents libata from accessing severed controller >> and/or device. >> >> * While at it, use named constants for ACPI events and move uevent >> signaling inside host lock. >> >> Original patch and testing by Holger Macht. > > Grrrr, unfortunately, the patch still seems to be not perfect: > http://marc.info/?l=linux-acpi&m=120543202908662&w=2 > > Are you sure access to the device (/dev/srX) is locked before > ata_acpi_dev_notify() returns? Sorry about the delay. I'm fairly sure /dev/srX goes away before ata_acpi_handle_hotplug() returns. ata_port_wait_eh() waits for EH to complete and the EH run triggered by ata_port_schedule_eh() above disables the device, so any command issued after that will be aborted with BAD_TARGET. Can you capture kernel log of such lock up? If so, it would be very helpful to sprinkle some printks around and see what actually goes on. Thanks. -- tejun -- 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