From patchwork Tue Jul 16 06:33:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 2827900 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB1CD9F967 for ; Tue, 16 Jul 2013 06:33:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1AF87201CE for ; Tue, 16 Jul 2013 06:33:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34806201CB for ; Tue, 16 Jul 2013 06:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752848Ab3GPGck (ORCPT ); Tue, 16 Jul 2013 02:32:40 -0400 Received: from mail-ea0-f169.google.com ([209.85.215.169]:48685 "EHLO mail-ea0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752161Ab3GPGci (ORCPT ); Tue, 16 Jul 2013 02:32:38 -0400 Received: by mail-ea0-f169.google.com with SMTP id h15so136304eak.28 for ; Mon, 15 Jul 2013 23:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; bh=LUpBmsP7oh/BqZJSGWFIWHyTi31L+vTGm8rB+k1cxKw=; b=0zkRUQJhtYTha4xMV+BKOoVb+CsRGtm+AIOuq96o+FFZcl77eYrA3Xp7M54XHolFuh ApP4fGIZW0AKq/RhgmtG+nWOUh5mR81tLPknbY3r86gToha1rHo7R10j6kjwDYhSyPJ8 scXlxN1qr8NV8/NI94vRr38l1qZ+NFrYZeyRmv96A68d+EKe8Ny9Qlsl+STXx8X/7O+5 cWFzUf5u7HiFm1n+tsIFD7SBXOc/1gqDf9hR6pSvVvRjxOVL14MhIOXrY22F7Lz28Xa3 9TFwEs1SEgmxhZQzgv7Dre8kLQUoNNhd0bDqlTuJulIhORJFkeL6cpVUdoPHzdgbiruw 8U9A== X-Received: by 10.14.204.137 with SMTP id h9mr78562eeo.13.1373956355780; Mon, 15 Jul 2013 23:32:35 -0700 (PDT) Received: from ?IPv6:2001:4dd0:ff00:9394:5473:8a6f:722f:1ad8? ([2001:4dd0:ff00:9394:5473:8a6f:722f:1ad8]) by mx.google.com with ESMTPSA id n5sm37471eed.9.2013.07.15.23.32.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Jul 2013 23:32:34 -0700 (PDT) Message-ID: <51E4E922.2040707@gmail.com> Date: Tue, 16 Jul 2013 08:33:06 +0200 From: Daniel Mack User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Aaro Koskinen CC: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: v3.11-rc1 USB regressions References: <20130715225647.GE3296@blackmetal.musicnaut.iki.fi> In-Reply-To: <20130715225647.GE3296@blackmetal.musicnaut.iki.fi> X-Enigmail-Version: 1.5.1 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.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 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") Can't say much about this one, but I'd like you to only keep this one reverted and sort out the regressions in the musb core first. > fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 > usb: musb: gadget: remove hcd initialization > (Reverting this fixes error "cdc_ether: probe of 4-1:1.0 failed > with error -110" seen on the host side.) Which role does your musb-based hardware have in this case, and which MUSB_* config symbols do you set? You should have USB_MUSB_GADGET. > 8b125df5b24cfb0ec7fa1971e343cc0badc1827d > usb: musb: eliminate musb_to_hcd > (Reverting this fixes compilation error cause by the previous > revert.) > > 2) USB peripheral mode (g_ether) is broken also on Nokia N800 and N810 > (USB_MUSB_TUSB6010). In addition to the above, I need to also revert > the following: > > b7e2e75a8c6062afe1dd88b0b299938e5d36dff8 > usb: gadget: drop unused USB_GADGET_MUSB_HDRC > > (This commit is clearly incorrect - code checking for this still > remain in the tree (see e.g. N8x0 board file), so it's not "unused".) Good catch, I didn't expect board files to depend on config symbols that have no effect on the driver itself. Please check the attached patch and let me know if it helps. Thanks, Daniel From 5f33d42f2dffb82d22b83a030f14fe2331a935b7 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Tue, 16 Jul 2013 08:19:49 +0200 Subject: [PATCH] ARM: omap2: fix musb usage for n8x0 Commit b7e2e75a8c ("usb: gadget: drop unused USB_GADGET_MUSB_HDRC") dropped a config symbol that was unused by the musb core, but it turns out that board support code still had references to it. As the core now handles both dual role and host-only modes, we can just pass MUSB_OTG as mode from board files. Signed-off-by: Daniel Mack --- arch/arm/mach-omap2/board-n8x0.c | 4 ---- arch/arm/mach-omap2/usb-musb.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index f6eeb87..827d150 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -122,11 +122,7 @@ static struct musb_hdrc_config musb_config = { }; static struct musb_hdrc_platform_data tusb_data = { -#ifdef CONFIG_USB_GADGET_MUSB_HDRC .mode = MUSB_OTG, -#else - .mode = MUSB_HOST, -#endif .set_power = tusb_set_power, .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */ .power = 100, /* Max 100 mA VBUS for host mode */ diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 8c4de27..bc89723 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -38,11 +38,8 @@ static struct musb_hdrc_config musb_config = { }; static struct musb_hdrc_platform_data musb_plat = { -#ifdef CONFIG_USB_GADGET_MUSB_HDRC .mode = MUSB_OTG, -#else - .mode = MUSB_HOST, -#endif + /* .clock is set dynamically */ .config = &musb_config, -- 1.8.1.4