Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbbDAR3Q (ORCPT ); Wed, 1 Apr 2015 13:29:16 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:38424 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753101AbbDAR3O (ORCPT ); Wed, 1 Apr 2015 13:29:14 -0400 Message-ID: <551C2AE1.9000608@mentor.com> Date: Wed, 1 Apr 2015 18:29:05 +0100 From: "Baxter, Jim" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Robert Baldyga CC: "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "Zapolskiy, Vladimir" , "balbi@ti.com" Subject: Re: usb: gadget: f_fs: O_NONBLOCK waits MAX_SCHEDULE_TIMEOUT References: <551AED33.2040206@mentor.com> <551BA70B.1090706@samsung.com> In-Reply-To: <551BA70B.1090706@samsung.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [137.202.0.76] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 862 Lines: 26 > > 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. I guess it should suspend and drop the connections if there is no traffic for more than 10ms? Thanks. Jim Baxter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/