]> git.hungrycats.org Git - linux/commit
[PATCH] USB Storage: Notify the SCSI layer about device resets
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 20 Jan 2004 08:02:47 +0000 (00:02 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 20 Jan 2004 08:02:47 +0000 (00:02 -0800)
commit27ea252f4f5cb9e15dc5a549f315407ab978ffe0
tree4e2d9dc445fc2f5e815e83e76d99797da79cf6e0
parentf3c64148c78dd4dece18315cac7df5fc82cbd76d
[PATCH] USB Storage: Notify the SCSI layer about device resets

According to James Bottomley, we need to notify the SCSI midlayer whenever
we issue a driver-initiated device reset.  That can happen in several
places, most notably following a transport error.  This patch adds
code to the reset routine to take care of it.  (Notifying about resets
requested by the midlayer itself is unnecessary but harmless.)

Alan Stern

On 15 Dec 2003, James Bottomley wrote:

> It looks like the driver sent a reset to the device on its own without
> reporting it to the mid-layer.
>
> There's an expecting_cc_ua flag in the scsi_device.  It gets set on
> error recovery actions, or if the device does something to detect or
> trigger a reset (that's the scsi_report_device_reset() and
> scsi_report_bus_reset() API's).
>
> James
drivers/usb/storage/scsiglue.c
drivers/usb/storage/scsiglue.h
drivers/usb/storage/transport.c