Re: [RFC 9/9] UAS: Free streams during USB disconnect.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2 Dec 2011, Sarah Sharp wrote:

> > > Make the UAS disconnect method go through the same process as the
> > > pre_reset method to quiesce all command submission, wait for all URBs to
> > > be killed, and free the stream rings.
> > 
> > Not the same method at all.  You have to call scsi_remove_host() first,
> > so that the SCSI layer can clean up after itself.
> 
> Ok, gotcha.
> 
> > Once that's done,
> > it's okay to go through the pre_reset procedue.  (If the SCSI layer
> > behaves properly, it shouldn't have any active commands after
> > scsi_remove_host() returns, anyway, so pre_reset won't have anything 
> > to do.)
> 
> There still might be commands waiting in the UAS workqueue.  Unless the
> SCSI layer will call the abort handler for all pending commands when
> scsi_remove_host() is called?

The SCSI layer doesn't do anything much; this is handled by the block
layer.  I don't know exactly what it does.  It might cancel outstanding
requests or wait for them to complete.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux