Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-14 Thread Holger Macht
On Mon 11. Feb - 22:11:32, Tejun Heo wrote: > Holger Macht wrote: > >> It should be called via ata_acpi_{ap|dev}_notify() callbacks installed > >> via acpi_install_notify_handler(). Can you add dump_stack() in the > >> function and verify that it actually is being called? It could be that > >> th

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Tejun Heo
Holger Macht wrote: > On a related note, shouldn't ata_acpi_handle_hotplug delete the device > like what is done when doing > > echo 1 > /sys/devices/.../block/sr0/device/delete Yeap, when the ata_acpi_handle_hotplug() was added, the focus was supporting hotplug when the controller itself doesn

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Holger Macht
On Mon 11. Feb - 22:11:32, Tejun Heo wrote: > Holger Macht wrote: > >> It should be called via ata_acpi_{ap|dev}_notify() callbacks installed > >> via acpi_install_notify_handler(). Can you add dump_stack() in the > >> function and verify that it actually is being called? It could be that > >> th

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Tejun Heo
Holger Macht wrote: >> It should be called via ata_acpi_{ap|dev}_notify() callbacks installed >> via acpi_install_notify_handler(). Can you add dump_stack() in the >> function and verify that it actually is being called? It could be that >> the method is called too late or libata takes too long t

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Alan Cox
> In the above example, even the reset sequence itself can cause hang if > the hardware is implemented slightly differently. The reason why > set_piomode() locks up but reset sequence doesn't is simple dumb luck. > I think the proper fix is to tell libata to detach the cdrom before > undocking. J

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Alan Cox
On Mon, Feb 11, 2008 at 11:29:07AM +0100, Holger Macht wrote: > > In the above example, even the reset sequence itself can cause hang if > > the hardware is implemented slightly differently. The reason why > > set_piomode() locks up but reset sequence doesn't is simple dumb luck. > > Another thin

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Holger Macht
On Mon 11. Feb - 20:16:38, Tejun Heo wrote: > Hello, > > Holger Macht wrote: > >> In the above example, even the reset sequence itself can cause hang if > >> the hardware is implemented slightly differently. The reason why > >> set_piomode() locks up but reset sequence doesn't is simple dumb luck

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Alan Cox
On Mon, Feb 11, 2008 at 11:04:46AM +0100, Holger Macht wrote: > Wouldn't the proper fix be to call ata_acpi_handle_hotplug _somewhere_? > (which is currently called nowhere AFAICS) I think so. The T61 at least generated ACPI dock and undock messages for IDE master/slaves and we can use those. --

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Tejun Heo
Hello, Holger Macht wrote: >> In the above example, even the reset sequence itself can cause hang if >> the hardware is implemented slightly differently. The reason why >> set_piomode() locks up but reset sequence doesn't is simple dumb luck. >> I think the proper fix is to tell libata to detach

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Tejun Heo
Hello, Holger Macht wrote: >> In the above example, even the reset sequence itself can cause hang if >> the hardware is implemented slightly differently. The reason why >> set_piomode() locks up but reset sequence doesn't is simple dumb luck. > > Another thing, whether it's poor luck or not, it

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Holger Macht
On Mon 11. Feb - 11:37:15, Tejun Heo wrote: > Hello, > > Holger Macht wrote: > > Calling ap->ops->set_piomode(ap, dev) on a device/controller which got > > already removed, locks the system hard. Reproducibly on an X60 attached to > > a dock station containing a cdrom device with doing > > > >

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-11 Thread Holger Macht
On Mon 11. Feb - 11:37:15, Tejun Heo wrote: > Hello, > > Holger Macht wrote: > > Calling ap->ops->set_piomode(ap, dev) on a device/controller which got > > already removed, locks the system hard. Reproducibly on an X60 attached to > > a dock station containing a cdrom device with doing > > > >

Re: [PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-10 Thread Tejun Heo
Hello, Holger Macht wrote: > Calling ap->ops->set_piomode(ap, dev) on a device/controller which got > already removed, locks the system hard. Reproducibly on an X60 attached to > a dock station containing a cdrom device with doing > > $ echo 1 > /sys/devices/platform/dock.0/undock && echo 123 >

[PATCH] libata: Forcing PIO0 mode on reset must not freeze system

2008-02-10 Thread Holger Macht
Calling ap->ops->set_piomode(ap, dev) on a device/controller which got already removed, locks the system hard. Reproducibly on an X60 attached to a dock station containing a cdrom device with doing $ echo 1 > /sys/devices/platform/dock.0/undock && echo 123 > /dev/sr0 This calls ata_eh_reset(...