• Alan Stern's avatar
    [PATCH] USB Storage: Notify the SCSI layer about device resets · 27ea252f
    Alan Stern authored
    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
    27ea252f
scsiglue.c 12.5 KB