From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 2/2] usb: musb: Size 1 dma in transfers won't complete with cpp41 Date: Thu, 19 Jan 2017 08:15:45 -0800 Message-ID: <20170119161545.GU7403@atomide.com> References: <20170119022959.30793-1-tony@atomide.com> <20170119022959.30793-3-tony@atomide.com> <20170119034130.GA22265@uda0271908> <20170119150457.GS7403@atomide.com> <20170119151346.GB22265@uda0271908> <20170119154544.GT7403@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20170119154544.GT7403-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Bin Liu , Alexandre Bailon , Andreas Kemnade , Boris Brezillon , Felipe Balbi , Greg Kroah-Hartman , Grygorii Strashko , Kishon Vijay Abraham I , Ivaylo Dimitrov , Johan Hovold , Ladislav Michl , Laurent Pinchart , Sergei Shtylyov , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-omap@vger.kernel.org * Tony Lindgren [170119 07:57]: > * Bin Liu [170119 07:14]: > > On Thu, Jan 19, 2017 at 07:04:57AM -0800, Tony Lindgren wrote: > > > * Bin Liu [170118 19:42]: > > > > On Wed, Jan 18, 2017 at 06:29:59PM -0800, Tony Lindgren wrote: > > > > > At least with the cppi41 dma, size 1 in dma transfers will just wait > > > > > > > > In which case do you see the size 1 transfer? using testusb? > > > > > > > > > until the device is disconnected. This causes timeouts in cppi41 dma > > > > > runtime PM. > > > > > > > > > > Also the initial size 8 transfers take about 200ms to complete when > > > > > plugging a USB mass storage device to a hub. But we probably want to > > > > > keep those to avoid using PIO. > > > > > > > > > > Fix the issue by adding a quirk for cppi41 and skip size 1 in dma if > > > > > set. > > > > > > > > It is fine to bypass dma for size 1 transfers, due to the dma setup > > > > overhead. But I'd like to know the test case to understand why it hangs. > > > > > > The test case is the same old connect a USB mass storage device to a hub. > > > There we see the initial size 1 transfer in the beginning. That transfer > > > seems to never complete with cppi41 and the transfer will stay active > > > until the device is disconnected. Currently we don't seem to have any > > > timeout mechanism in cppi41 for that. > > > > Ok, I will take a look maybe sometime next week to understand the > > traffic. > > > > BTY, it seems you missed my comment at the end which is about limiting > > the transfer size. > > Oops sorry yeah you're right, -ENOTENOUGHCOFFEEYET. Oh and testing that fix made me notice that this patch 2/2 problem is now gone with my current cppi41 dma fixes. So let's drop this patch 2/2, it seems to be just a workaround for a runtime PM autosuspend delay getting timed out for the dma transfer. Patch 1/2 of this series should be still applied for the -rc cycle. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html