From patchwork Mon Mar 14 14:33:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yegor Yefremov X-Patchwork-Id: 8579691 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AAF81C0553 for ; Mon, 14 Mar 2016 14:34:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0F1C20384 for ; Mon, 14 Mar 2016 14:34:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3234A20398 for ; Mon, 14 Mar 2016 14:34:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932705AbcCNOeN (ORCPT ); Mon, 14 Mar 2016 10:34:13 -0400 Received: from mail-vk0-f45.google.com ([209.85.213.45]:34409 "EHLO mail-vk0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934446AbcCNOeM (ORCPT ); Mon, 14 Mar 2016 10:34:12 -0400 Received: by mail-vk0-f45.google.com with SMTP id e185so210473575vkb.1 for ; Mon, 14 Mar 2016 07:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DdkOexSWFJQZlZdADGz8EKybCqn2d5BbIdiPFsU5Xkk=; b=xi4O9OpO8p1/Cvqp/eDsTiwsr0sLf4s9OPHYkLLr3UwwW9B5qFGLewxmsfhj+Wibwk IWE6VeRvCTA99QXVwhx88OdmCVAC6dKcBbEkVtgp4x+ESn6ckRUuYG5ta27G7UxR54AT hW4SaTSCXl8nWrpdpGzE/UzXVa1f5sPH+qA/m1xc8taGCsUxgHL97wP5UUOiNJWw4Je2 HhqJJ1WHa7WsVNwWccT3ZCheo75Pawf8Hth1Nl+6FaEOxqftAgE7Ou2obIIu8NW4PQGG 370aEiZBszlpNEX0HcvSMhi5iKtPnxpXdK8rP/INxKFT57VD00apw5cVLi5R3rC/hem9 7E/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DdkOexSWFJQZlZdADGz8EKybCqn2d5BbIdiPFsU5Xkk=; b=WZkyXc0Im+1Yspunv8Otcix/v/r08yV09BjrSVjetm9J4ugRW0aar/5sZ/f1l9SfyU gitFnUyb218VqMyM50oRVILvaFTib/xjlaQjo7NWR0MXwqJ0sa5NcR2DvznFSC2OLY6l KZuAa9YPFUsSAOuiWPpYt1Z/VdlkJoNbyBPHiXBx7xQ+UtgGx9pCqRKiy77m5id2LdqJ XKlKSHkGffvuHoHJK8j/jWQfKaa9lO2hpe+EI36vGqLXJChN1S/z8m3PdWM/Dwpe6MpQ gvXqQVXmK4B8iRdIQpxPIf4v9edFJOQ89iS8rZ9aeyi/f2TJHqUsEfNM2oYdj7mbhVCr Iwzg== X-Gm-Message-State: AD7BkJLecxYu3mZJNOUWngHaA4Qn4PRz7/ViRNRnAC3zQ1WeCiP1GCktWfCHz15cvHPst7EB7fnkF7HKlBBjEA== X-Received: by 10.31.8.68 with SMTP id 65mr25267664vki.150.1457966051281; Mon, 14 Mar 2016 07:34:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.190.196 with HTTP; Mon, 14 Mar 2016 07:33:51 -0700 (PDT) In-Reply-To: <20160314140118.GC17579@uda0271908> References: <20151013234712.GA23406@localhost.localdomain> <8760zgj9im.fsf@ti.com> <20160127100104.GA4725@localhost.localdomain> <20160314121119.GA2897@localhost.localdomain> <20160314140118.GC17579@uda0271908> From: Yegor Yefremov Date: Mon, 14 Mar 2016 15:33:51 +0100 Message-ID: Subject: Re: Linux 4.2.0-rc5: am335x: musb warnings To: Bin Liu Cc: Ladislav Michl , "linux-omap@vger.kernel.org" , Felipe Balbi Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Mon, Mar 14, 2016 at 3:01 PM, Bin Liu wrote: > Hi Yegor, > > On Mon, Mar 14, 2016 at 02:40:34PM +0100, Yegor Yefremov wrote: >> On Mon, Mar 14, 2016 at 1:11 PM, Ladislav Michl wrote: >> > On Mon, Mar 14, 2016 at 11:25:59AM +0100, Yegor Yefremov wrote: >> > >> > Hi Yegor, >> > >> >> Hi Bin, >> >> >> >> On Wed, Jan 27, 2016 at 11:01 AM, Ladislav Michl wrote: >> >> > Any chance it will actually happen? MUSB is still unusable for me and >> >> > doesn't work properly since TI's 2.6.37 kernel (oldest one I have >> >> > tried)... >> >> >> >> The issue with musb_h_tx_flush_fifo still persists. Kernel 4.5.0-rc6. >> >> Just activating SImCOM SIM7100E produces following error: >> >> >> >> # usb 1-1.3: new high-speed USB device number 6 using musb-hdrc >> >> usbcore: registered new interface driver option >> >> usbserial: USB Serial support registered for GSM modem (1-port) >> >> option 1-1.3:1.0: GSM modem (1-port) converter detected >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB4 >> >> option 1-1.3:1.1: GSM modem (1-port) converter detected >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB5 >> >> option 1-1.3:1.2: GSM modem (1-port) converter detected >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB6 >> >> option 1-1.3:1.3: GSM modem (1-port) converter detected >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB7 >> >> option 1-1.3:1.4: GSM modem (1-port) converter detected >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB8 >> >> qmi_wwan 1-1.3:1.5: cdc-wdm0: USB WDM device >> >> qmi_wwan 1-1.3:1.5 wwan0: register 'qmi_wwan' at >> >> usb-musb-hdrc.0.auto-1.3, WWAN/QMI device, b2:67:d8:31:8f:b6 >> >> usbcore: registered new interface driver qmi_wwan >> >> ------------[ cut here ]------------ >> >> WARNING: CPU: 0 PID: 868 at drivers/usb/musb/musb_host.c:139 >> >> musb_h_tx_flush_fifo+0xc4/0xe4() >> >> musb-hdrc musb-hdrc.0.auto: Could not flush host TX2 fifo: csr: 2403 >> >> Modules linked in: qmi_wwan option usb_wwan ftdi_sio usbserial >> >> musb_dsps musb_am335x >> >> CPU: 0 PID: 868 Comm: ModemManager Not tainted 4.5.0-rc6 #47 >> >> Hardware name: Generic AM33XX (Flattened Device Tree) >> >> [] (unwind_backtrace) from [] (show_stack+0x10/0x14) >> >> [] (show_stack) from [] (dump_stack+0xb0/0xe4) >> >> [] (dump_stack) from [] (warn_slowpath_common+0x7c/0xb8) >> >> [] (warn_slowpath_common) from [] >> >> (warn_slowpath_fmt+0x30/0x40) >> >> [] (warn_slowpath_fmt) from [] >> >> (musb_h_tx_flush_fifo+0xc4/0xe4) >> >> [] (musb_h_tx_flush_fifo) from [] >> >> (musb_cleanup_urb+0xbc/0x130) >> >> [] (musb_cleanup_urb) from [] (musb_urb_dequeue+0xf0/0x128) >> >> [] (musb_urb_dequeue) from [] (usb_hcd_unlink_urb+0x50/0x84) >> >> [] (usb_hcd_unlink_urb) from [] (usb_kill_urb+0x4c/0xc4) >> >> [] (usb_kill_urb) from [] >> >> (usb_wwan_close+0xbc/0xf0 [usb_wwan]) >> >> [] (usb_wwan_close [usb_wwan]) from [] >> >> (tty_port_shutdown+0x90/0x9c) >> >> [] (tty_port_shutdown) from [] (tty_port_close+0x24/0x4c) >> >> [] (tty_port_close) from [] (tty_release+0xec/0x478) >> >> [] (tty_release) from [] (__fput+0x80/0x1d0) >> >> [] (__fput) from [] (task_work_run+0x90/0xc4) >> >> [] (task_work_run) from [] (do_work_pending+0x8c/0xb4) >> >> [] (do_work_pending) from [] (slow_work_pending+0xc/0x20) >> >> ---[ end trace fb2fc0420e2c4594 ]--- >> >> >> >> Could you please take a look at this? >> >> >> >> Yegor >> > >> > I cannot reproduce it anymore, as commits >> > 4c2ba0c67394514f3f75c660c9f5d02e66a7efd4 >> > bba40e6948b94cba71965285fbac31bd078c024a >> > fixed issue for me (using Inventra DMA on DM3730) - but those two are part >> > of 4.5.0-rc6 ... >> >> You are lucky! I've tried 4.5.0 and I still have this issue, though >> I'm on am335x and not on DM3730: > > How do you trigger the issue? Plug the modem then unplug it? > Can you please try the way in [1] to increase the loops to see if the > fifo could be flushed in a longer time? > > Regards, > -Bin. > > [1] http://www.spinics.net/lists/linux-usb/msg137242.html Do you mean something like this? No, it doesn't help. I'm triggering this issue via enabling it, i.e. our hardware can power on/off mPCIe slot via GPIO pin. When the system starts mPCI slot is disabled. The I enable it after booting into user space and the produces the error. It also happens if I insert USB modem as a dongle, where usb_modeswitch first has to switch it from CD-ROM mode into modem mode. Yegor --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 58487a4..f6d6822 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -112,7 +112,7 @@ static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep) struct musb *musb = ep->musb; void __iomem *epio = ep->regs; u16 csr; - int retries = 1000; + int retries = 10000; csr = musb_readw(epio, MUSB_TXCSR); while (csr & MUSB_TXCSR_FIFONOTEMPTY) {