Re: [PATCH] usb/uas: make sure data urb is gone if we receive status before that

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

 



On Thu, 26 Jan 2012, Sebastian Andrzej Siewior wrote:

> On 01/25/2012 04:35 PM, Alan Stern wrote:
> >> In the diagram in UASP_rev1.0 in "5.4.3 Data-in transfer" the deviceis
> >> waiting for in-ack (DATA-in). So I think the device has to wait until
> >> the data is sent to the host. So that might be enough buffer to avoid
> >> the race you were talking about.
> >
> > You should not depend on this.  However, the uas driver should not
> > consider an unlinked data URB to indicate an error -- even if
> > actual_length is 0.
> 
> The UAS driver sets the scsi status to whatever the device set it in
> its status/sense reply. So you might receive no error and no data
> according to the race mentioned by Sarah.

Why would you receive no data?  All the data sent by the device should 
be received and stored in the host's buffers by the time the status is 
received, even if the status URB completes before the data URB.

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