Subject: Re: problems in scsipi detach code.
To: None <tech-kern@netbsd.org>
From: Michael van Elst <mlelstv@serpens.de>
List: tech-kern
Date: 08/05/2004 06:13:10
bouyer@antioche.eu.org (Manuel Bouyer) writes:
>Note that I didn't test this yet, as I don't have a USB device in hands,
>and my SCSI test box is hung, probably in the scsi_kill_pending() loop,
>and I can't get into debugger remotely.
It fails as described. You could easily observe this with ehci-devices
some weeks ago before Charles fixed the ehci code. When the USB transfer
fails there are some slow retries, unplugging the device in that state
will freeze the system.
scsipi_done() tries to abort a pending command by running the completion
thread.
One thing is that this may take some time and effectively busy-waiting
for it in scsi_kill_pending() isn't a good idea.
The other is that, at least when I tested this with USB and Firewire,
the underlying xfer code didn't handle a XS_DRIVER_STUFFUP. In fact,
with the device gone, it didn't do anything. This part might have
changed.
--
--
Michael van Elst
Internet: mlelstv@serpens.de
"A potential Snark may lurk in every tree."