From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17B32C433E0 for ; Wed, 20 May 2020 14:55:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4AAB2072C for ; Wed, 20 May 2020 14:55:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uICT1Pgw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="xuJe0Zw/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4AAB2072C Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0I94Oopal8ogCbJby1p3R4wKP86by9DZiN/bhXHJdcc=; b=uICT1PgwSUwEkj kAbcINErk/OXlHyAhtyC+vq8iJBafDZGDYZYbwzTmizoiZWbRadDKyuK3H5SD1q/DgI3RzffKRiHY R+v0b+O2h7NnDsztT55BFpGrIb9ppz34tDNxHzmXuBCDlFYRyv64qxLzXfOCdOEz8+Jcdo1GOwejk lu7MMh54XTXkCYA45MwHw8o91lmW+sc0IBf2KSGmLJx48KwsH1sPIcP5tfxlh8tt3zrlqHwcHRYjD 675fW7sUeKWXcL83WOIiA6zNpH54Srj1tQ1KYvB0S45pe1E3QAzWalBZNfASLyKmhlkz9KERFyQOR 8asWakBAG3YataT29dcQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jbQ7n-0000eo-Qd; Wed, 20 May 2020 14:55:15 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jbQ7i-0008E4-Lk for linux-arm-kernel@lists.infradead.org; Wed, 20 May 2020 14:55:13 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 04KEt56t020122; Wed, 20 May 2020 09:55:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1589986505; bh=uJ0Vb5JIqEbT+TGiMoMQolR3yOEu9tZTebuogh5jPAo=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=xuJe0Zw/zFQOXCbcSMXGjCSeSmOUmVLI/NbPQ87oDS3XnASIpv/BgAL4sMY+84Axm tRVqM98LZce2N81zbzOjsdBoXlhC3fQPgm8hy//EimncRw3EOJqT4a4OO9pkuQAMcx ZC0IRN5z2x+vFaI4+UYPgBkEVWP6RDS67VPvvafU= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 04KEt5nq037164 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 May 2020 09:55:05 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 20 May 2020 09:55:05 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 20 May 2020 09:55:05 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 04KEt5Jw096887; Wed, 20 May 2020 09:55:05 -0500 Date: Wed, 20 May 2020 09:55:05 -0500 From: Bin Liu To: Oleksij Rempel Subject: Re: [PATCH v1] usb: musb: dsps: set MUSB_DA8XX quirk for AM335x Message-ID: <20200520145505.GC15845@iaqt7> Mail-Followup-To: Bin Liu , Oleksij Rempel , Michael Grzeschik , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team , Greg Kroah-Hartman , linux-usb@vger.kernel.org, russell@personaltelco.net, fercerpav@gmail.com References: <20200327053849.5348-1-o.rempel@pengutronix.de> <20200519221851.GA15845@iaqt7> <20200520044934.hyngdg774ibqai46@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200520044934.hyngdg774ibqai46@pengutronix.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200520_075511_045931_4BC19F05 X-CRM114-Status: GOOD ( 29.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Grzeschik , fercerpav@gmail.com, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, russell@personaltelco.net, Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 20, 2020 at 06:49:34AM +0200, Oleksij Rempel wrote: > On Tue, May 19, 2020 at 05:18:51PM -0500, Bin Liu wrote: > > Hi, > > > > On Fri, Mar 27, 2020 at 06:38:49AM +0100, Oleksij Rempel wrote: > > > Beagle Bone Black has different memory corruptions if kernel is > > > configured with USB_TI_CPPI41_DMA=y. This issue is reproducible with > > > ath9k-htc driver (ar9271 based wifi usb controller): > > > > > > root@AccessBox:~ iw dev wlan0 set monitor fcsfail otherbss > > > root@AccessBox:~ ip l s dev wlan0 up > > > kmemleak: Cannot insert 0xda577e40 into the object search tree (overlaps existing) > > > CPU: 0 PID: 176 Comm: ip Not tainted 5.5.0 #7 > > > Hardware name: Generic AM33XX (Flattened Device Tree) > > > [] (unwind_backtrace) from [] (show_stack+0x18/0x1c) > > > [] (show_stack) from [] (dump_stack+0x84/0x98) > > > [] (dump_stack) from [] (create_object+0x2f8/0x324) > > > [] (create_object) from [] (kmem_cache_alloc+0x1a8/0x39c) > > > [] (kmem_cache_alloc) from [] (__alloc_skb+0x60/0x174) > > > [] (__alloc_skb) from [] (ath9k_wmi_cmd+0x50/0x184 [ath9k_htc]) > > > [] (ath9k_wmi_cmd [ath9k_htc]) from [] (ath9k_regwrite_multi+0x54/0x84 [ath9k_htc]) > > > [] (ath9k_regwrite_multi [ath9k_htc]) from [] (ath9k_regwrite+0xf0/0xfc [ath9k_htc]) > > > [] (ath9k_regwrite [ath9k_htc]) from [] (ar5008_hw_process_ini+0x280/0x6c0 [ath9k_hw]) > > > [] (ar5008_hw_process_ini [ath9k_hw]) from [] (ath9k_hw_reset+0x270/0x1458 [ath9k_hw]) > > > [] (ath9k_hw_reset [ath9k_hw]) from [] (ath9k_htc_start+0xb0/0x22c [ath9k_htc]) > > > [] (ath9k_htc_start [ath9k_htc]) from [] (drv_start+0x4c/0x1e8 [mac80211]) > > > [] (drv_start [mac80211]) from [] (ieee80211_do_open+0x480/0x954 [mac80211]) > > > [] (ieee80211_do_open [mac80211]) from [] (__dev_open+0xdc/0x160) > > > [] (__dev_open) from [] (__dev_change_flags+0x1a4/0x204) > > > [] (__dev_change_flags) from [] (dev_change_flags+0x20/0x50) > > > [] (dev_change_flags) from [] (do_setlink+0x2ac/0x978) > > > > > > After applying this patch, the system is running in monitor mode without > > > noticeable issues. > > > > > > Suggested-by: Michael Grzeschik > > > Signed-off-by: Oleksij Rempel > > > --- > > > drivers/usb/musb/musb_dsps.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c > > > index 88923175f71e..c01f9e9e69f5 100644 > > > --- a/drivers/usb/musb/musb_dsps.c > > > +++ b/drivers/usb/musb/musb_dsps.c > > > @@ -690,7 +690,7 @@ static void dsps_dma_controller_resume(struct dsps_glue *glue) {} > > > #endif /* CONFIG_USB_TI_CPPI41_DMA */ > > > > > > static struct musb_platform_ops dsps_ops = { > > > - .quirks = MUSB_DMA_CPPI41 | MUSB_INDEXED_EP, > > > + .quirks = MUSB_DMA_CPPI41 | MUSB_INDEXED_EP | MUSB_DA8XX, > > > > The MUSB_DA8XX flag cannot be simply applied to MUSB_DSPS, at least the > > teardown and autoreq register offsets are different as show in > > cppi41_dma_controller_create(). > > ok > > > Do you understand what exactly caused the issue? > > No. > > Disabling DMA support "solve" this issue as well. > > Beside, with DMA support, there remains one more crash with different symptoms. > I can workaround it by disabling CPU Freq governor, or setting it to performance. > > > The kernel trace above doesn't provide enuough information. > > Do you have any suggestions how to instrument the kernel to get needed > information? Or, should I try to capture USB traffic before the crash? First can you please try the following patch instead? diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index 7fbb8a307145..26c996f8b2bd 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -614,7 +614,6 @@ static int cppi41_dma_channel_abort(struct dma_channel *channel) } /* DA8xx Advisory 2.3.27: wait 250 ms before to start the teardown */ - if (musb->ops->quirks & MUSB_DA8XX) mdelay(250); tdbit = 1 << cppi41_channel->port_num; > > If it helps, ath9k_htc is a usb wifi adapter. It generates a lot of > USB traffic on multiple endpoints. Bulk with data packets and Interrupt > with register accesses, LED blinking... etc. Do you have a link to the picture or description of the adapter? I'd like to see if I can buy the same to take a look. -Bin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel