From patchwork Tue Jul 16 08:22:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 2828009 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E9766C0AB2 for ; Tue, 16 Jul 2013 08:26:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AAC702018A for ; Tue, 16 Jul 2013 08:26:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B99E20189 for ; Tue, 16 Jul 2013 08:26:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753470Ab3GPIXa (ORCPT ); Tue, 16 Jul 2013 04:23:30 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:54488 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753190Ab3GPIXZ (ORCPT ); Tue, 16 Jul 2013 04:23:25 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r6G8NEhE024519; Tue, 16 Jul 2013 03:23:14 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r6G8NE7K003859; Tue, 16 Jul 2013 03:23:14 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Tue, 16 Jul 2013 03:23:14 -0500 Received: from localhost (h78-9.vpn.ti.com [172.24.78.9]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r6G8NDhb004274; Tue, 16 Jul 2013 03:23:13 -0500 Date: Tue, 16 Jul 2013 11:22:47 +0300 From: Felipe Balbi To: Felipe Balbi CC: Kishon Vijay Abraham I , Daniel Mack , Aaro Koskinen , Greg Kroah-Hartman , , , Subject: Re: v3.11-rc1 USB regressions Message-ID: <20130716082247.GD8880@arwen.pp.htv.fi> Reply-To: References: <20130715225647.GE3296@blackmetal.musicnaut.iki.fi> <51E4E922.2040707@gmail.com> <51E4EF70.3040502@ti.com> <20130716080836.GC8880@arwen.pp.htv.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130716080836.GC8880@arwen.pp.htv.fi> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jul 16, 2013 at 11:08:36AM +0300, Felipe Balbi wrote: > Hi, > > On Tue, Jul 16, 2013 at 12:30:00PM +0530, Kishon Vijay Abraham I wrote: > > On Tuesday 16 July 2013 12:03 PM, Daniel Mack wrote: > > > Hi Aaro, > > > > > > On 16.07.2013 00:56, Aaro Koskinen wrote: > > >> Hi, > > >> > > >> I think USB tree introduced regressions in v3.11-rc1, at least for some > > >> OMAP devices using legacy boot. > > > > > > Thanks for checking the tree so early. > > > > > >> I have only bisected these; I have no > > >> idea what the real fixes are but the following reverts make Nokia OMAP2+ > > >> boards again usable for kernel development work (they need working USB > > >> connection for interacting with the device): > > >> > > >> 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 > > >> (USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three > > >> commits: > > >> > > >> 09fc7d22b024692b2fe8a943b246de1af307132b > > >> usb: musb: fix incorrect usage of resource pointer > > >> (Reverting this fixes the g_ether probe failure "couldn't find > > >> an available UDC") > > > > I've posted a patch fixing the issue > > http://comments.gmane.org/gmane.linux.usb.general/89541 > > There were some comments on it. I'll be posting a new version for it. > > hmm, n8x0 used tusb6010, so perhaps a similar patch needs to be cooked > for that too. Right now, let's to the minimum fix, which is just to > increment the array size to 3 and for v3.12 we do the changes that I > suggested. this should solve the problem on n900 and n8x0, it's pretty much kishon's original patch, so I guess it deserves his authorship: diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 6708a3b..f44e8b5 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -481,7 +481,7 @@ static u64 omap2430_dmamask = DMA_BIT_MASK(32); static int omap2430_probe(struct platform_device *pdev) { - struct resource musb_resources[2]; + struct resource musb_resources[3]; struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; struct omap_musb_board_data *data; struct platform_device *musb; @@ -581,6 +581,11 @@ static int omap2430_probe(struct platform_device *pdev) musb_resources[1].end = pdev->resource[1].end; musb_resources[1].flags = pdev->resource[1].flags; + musb_resources[2].name = pdev->resource[2].name; + musb_resources[2].start = pdev->resource[2].start; + musb_resources[2].end = pdev->resource[2].end; + musb_resources[2].flags = pdev->resource[2].flags; + ret = platform_device_add_resources(musb, musb_resources, ARRAY_SIZE(musb_resources)); if (ret) { diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 2c06a89..6f8a9ca 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -1156,7 +1156,7 @@ static u64 tusb_dmamask = DMA_BIT_MASK(32); static int tusb_probe(struct platform_device *pdev) { - struct resource musb_resources[2]; + struct resource musb_resources[3]; struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; struct platform_device *musb; struct tusb6010_glue *glue; @@ -1199,6 +1199,11 @@ static int tusb_probe(struct platform_device *pdev) musb_resources[1].end = pdev->resource[1].end; musb_resources[1].flags = pdev->resource[1].flags; + musb_resources[2].name = pdev->resource[2].name; + musb_resources[2].start = pdev->resource[2].start; + musb_resources[2].end = pdev->resource[2].end; + musb_resources[2].flags = pdev->resource[2].flags; + ret = platform_device_add_resources(musb, musb_resources, ARRAY_SIZE(musb_resources)); if (ret) {