On Thu 12. Jun - 09:23:48, Shaohua Li wrote: > On Wed, 2008-06-11 at 14:52 +0200, Holger Macht wrote: > > On Wed 11. Jun - 11:23:41, Shaohua Li wrote: > > > On Tue, 2008-06-10 at 18:43 +0200, Holger Macht wrote: > > > > On Tue 10. Jun - 16:27:32, Shaohua Li wrote: > > > > > On Tue, 2008-06-10 at 10:15 +0200, Holger Macht wrote: > > > > > > On Tue 10. Jun - 09:34:36, Shaohua Li wrote: > > > > > > > On Mon, 2008-06-09 at 02:37 +0100, Matthew Garrett wrote: > > > > > > > > On Fri, Jun 06, 2008 at 01:23:08PM +0800, Shaohua Li wrote: > > > > > > > > > > > > > > > > > case ACPI_NOTIFY_EJECT_REQUEST: > > > > > > > > > ata_ehi_push_desc(ehi, "ACPI event"); > > > > > > > > > - > > > > > > > > > - if (!is_dock_event) > > > > > > > > > - break; > > > > > > > > > - > > > > > > > > > - /* undock event - immediate unplug */ > > > > > > > > > ata_acpi_detach_device(ap, dev); > > > > > > > > > > > > > > > > Ok, just to check that I've understood the other patches - this will > > > > > > > > only be called if the device has actually been removed, and not if you > > > > > > > > merely get an EJECT_REQUEST, right? An EJECT_REQUEST from a bay device > > > > > > > > should always just signal userspace, and never actually cause the device > > > > > > > > to be deleted. I don't really like the way that you're remapping event > > > > > > > > types inside the dock driver - it'd be cleaner if the per-driver > > > > > > > > handlers received ADD_DEVICE or REMOVE_DEVICE or something. > > > > > > > It's not forcely ejected. This patch adds a check in dock.c, if eject > > > > > > > request is for an ata bay, we just signal userspace. Latter if a > > > > > > > device/bus check invoked, dock driver will check status, and doing force > > > > > > > eject. At this time, ata's EJECT_REQUEST handler will be called. > > > > > > > Remapping event is to make per-driver handlers easy. complex is all in > > > > > > > dock driver. > > > > > > > > > > > > I still don't get a uevent signalled to userspace for a bay device in my > > > > > > dock station when pressing the lever on the bay device. I think I'll get > > > > > > to debug this by the end of the week or the weekend if you like... > > > > > can you send me the acpidump output, so I can have a quick check first? > > > Looks my patch didn't handle bay device in a dock station correctly. Can > > > you please try below patch? > > > > Now I get the uevent, however, when trying with init=/bin/bash, the device > > never comes back once ejected. > > > > Furthermore, the must be a race somewhere, when docking, the system > > freezes sporadically. First dock worked, second time didn't. > Double checked a T61 here, can't reproduce, please help do some > debug. Does this work without my patches? Yes, it does. I think the main difference between those devices in the system and those in the dock station itself, is that for the separate device in the dock, no ACPI_DEVICE_CHECK is emitted when the device is replugged. After an APCI_NOTIFY_EJECT_REQUEST, if I do 'echo 1 > /sys/devices/platform/dock.2/undock', the device is properly ejected and comes back when replugging. When doing 'echo 1 > /sys/class/scsi_device/.../delete', or doing nothing the device never comes back (except undocking/redocking). Further debugging when I find some time... Regards, Holger -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html