RE: g_mass_storage bug ?

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

 



> From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx]
> Sent: Thursday, September 25, 2014 11:08 AM
> 
> On Thu, 25 Sep 2014, Paul Zimmerman wrote:
> 
> > That's why I don't understand how this can happen for IN. AFAIK, a STALL
> > is only sent in response to something the host sent in the CBW. At that
> > point, there shouldn't be any IN transfers active.
> 
> The gadget may send a partial response to the CBW.  The end of the
> response is marked with a STALL.  The mass-storage gadget driver
> submits the partial response and then calls usb_ep_set_halt() without
> waiting for the IN data to be delivered.  It relies on the UDC driver
> returning -EAGAIN if any data is still pending.

I guess you're referring to the code under the DATA_DIR_TO_HOST case
in finish_reply().

Felipe, in our vendor driver, the ep_set_halt() and ep_set_wedge()
functions check the request queue for the endpoint, and if it is not
empty, they return -EAGAIN.

I see your patch for the dwc3 driver does add that, in addition to the
FIFO empty check. Does it still work OK if you remove the FIFO empty
check portion?

-- 
Paul

--
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