Re: usb: gadget: f_fs: O_NONBLOCK waits MAX_SCHEDULE_TIMEOUT

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

 



On Wed, Apr 01, 2015 at 06:29:05PM +0100, Baxter, Jim wrote:
> > 
> > FunctionFS is very specific, because read/write operations are directly
> > translated into USB requests, which are asynchronous, so you cannot use
> > O_NONBLOCK.
> > 
> > If you need non-blocking API you can use Asynchronous I/O (AIO). You can
> > find some examples in kernel sources (tools/usb/ffs-aio-example/).
> > 
> > Br,
> > Robert Baldyga
> > 
> 
> Thank you, that sounds like the best approach.
> In this case I think perhaps the long wait without any data is an
> problem with the imx6 Chipidea USB controller.

What's the possible problem?

> 
> I guess it should suspend and drop the connections if there is no
> traffic for more than 10ms?
> 

If the Device side NAK host's IN/OUT token continually, the pipe will 
not be stopped, the host will send token continually until the application
cancel this request.

-- 

Best Regards,
Peter Chen
--
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