Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp256873ybk; Tue, 19 May 2020 21:54:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiIZJ6I0s1eXbjHIUZYYmD6R9zgy2H+iD+Q5dderZusS4b6mVi/v3F7a16eV9TseVCP+9S X-Received: by 2002:a17:906:4dc3:: with SMTP id f3mr2169182ejw.323.1589950451389; Tue, 19 May 2020 21:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589950451; cv=none; d=google.com; s=arc-20160816; b=nL+YgSJE/iQqDMiWUSjR153g6pkCmwzzQ2i3wWM/wjFRk4INrKs+VB75/0UuFS7JVI 0A4uaKpG3uDgRofVMz839ficoi25ZsC4wkRyw+BeZaoCuvQ+X3uROJywct8zvQAhBE0r vj8qolr+kWLVIHVBwLo7q3Ll9SIp7Rj7SAMIVMqo0ZevRviiaiu59nb+w0RcnVplUv3q aM7ez409+DbIAsV+wYSCbY3ZHiOmm0c7SbM17vm4xKJPXkU41Wky/SsobA3kTt1lCepN p/35TIA7T6Qydt1gP0VpH/7e8OUlLbP7ipj703/irAFp16wIEMlbLxZCws1CsUZlL81X Nl2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=A5dO5VKIm86pGWpI+LwqzwNveWqT2cN2Hl8DXGIJ7r8=; b=kSjIcZDiGtat79u94/6W4FJhXvWn1S9tVNjWyE6YZmKwtBkILQWZZxIz5NKM/DAUx9 XmOm70CgpwYUOFw7IxysFVz89K2x3AhJ0SdBRljdVo1oHQq1vQXecT3aQBOLNtsH62Ix s7rxjZNJoOQlDS6iW9f3BH9PZbKfItGM/q5zAAfYybRmOCt+crk0a6hfervW6RsxjKUn M2dypKlzdw9iduv+FCnWVqAnZzZWSqwlloSQ+K+xFI9c/TOMuvw8xrih5dkZhllcCkrm 3gYTiN4RBIt/Zl1vNbedJvRpbXKLXOKVnpjnpHz19souKenfsFv9a1Vs+X47akGKRPcI y0Yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si1144199ejb.668.2020.05.19.21.53.48; Tue, 19 May 2020 21:54:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726836AbgETEts (ORCPT + 99 others); Wed, 20 May 2020 00:49:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbgETEtq (ORCPT ); Wed, 20 May 2020 00:49:46 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCD40C061A0F for ; Tue, 19 May 2020 21:49:45 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbGfg-00066a-Fr; Wed, 20 May 2020 06:49:36 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1jbGfe-00020E-9b; Wed, 20 May 2020 06:49:34 +0200 Date: Wed, 20 May 2020 06:49:34 +0200 From: Oleksij Rempel To: Bin Liu , 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 Subject: Re: [PATCH v1] usb: musb: dsps: set MUSB_DA8XX quirk for AM335x Message-ID: <20200520044934.hyngdg774ibqai46@pengutronix.de> References: <20200327053849.5348-1-o.rempel@pengutronix.de> <20200519221851.GA15845@iaqt7> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2lnvkb6fzyg3lzwg" Content-Disposition: inline In-Reply-To: <20200519221851.GA15845@iaqt7> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 06:31:46 up 186 days, 19:50, 180 users, load average: 0.20, 0.13, 0.06 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2lnvkb6fzyg3lzwg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 19, 2020 at 05:18:51PM -0500, Bin Liu wrote: > Hi, >=20 > 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=3Dy. This issue is reproducible with > > ath9k-htc driver (ar9271 based wifi usb controller): > >=20 > > 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 (overlap= s 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/0x1= 74) > > [] (__alloc_skb) from [] (ath9k_wmi_cmd+0x50/0x184 = [ath9k_htc]) > > [] (ath9k_wmi_cmd [ath9k_htc]) from [] (ath9k_regwr= ite_multi+0x54/0x84 [ath9k_htc]) > > [] (ath9k_regwrite_multi [ath9k_htc]) from [] (ath9= k_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 [] (ath9= k_hw_reset+0x270/0x1458 [ath9k_hw]) > > [] (ath9k_hw_reset [ath9k_hw]) from [] (ath9k_htc_s= tart+0xb0/0x22c [ath9k_htc]) > > [] (ath9k_htc_start [ath9k_htc]) from [] (drv_start= +0x4c/0x1e8 [mac80211]) > > [] (drv_start [mac80211]) from [] (ieee80211_do_ope= n+0x480/0x954 [mac80211]) > > [] (ieee80211_do_open [mac80211]) from [] (__dev_op= en+0xdc/0x160) > > [] (__dev_open) from [] (__dev_change_flags+0x1a4/0= x204) > > [] (__dev_change_flags) from [] (dev_change_flags+0= x20/0x50) > > [] (dev_change_flags) from [] (do_setlink+0x2ac/0x9= 78) > >=20 > > After applying this patch, the system is running in monitor mode without > > noticeable issues. > >=20 > > Suggested-by: Michael Grzeschik > > Signed-off-by: Oleksij Rempel > > --- > > drivers/usb/musb/musb_dsps.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > 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 */ > > =20 > > static struct musb_platform_ops dsps_ops =3D { > > - .quirks =3D MUSB_DMA_CPPI41 | MUSB_INDEXED_EP, > > + .quirks =3D MUSB_DMA_CPPI41 | MUSB_INDEXED_EP | MUSB_DA8XX, >=20 > 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 sympt= oms. I can workaround it by disabling CPU Freq governor, or setting it to perfor= mance. > 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?=20 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. Regards, Oleksij --=20 Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --2lnvkb6fzyg3lzwg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEERBNZvwSgvmcMY/T74omh9DUaUbMFAl7EttkACgkQ4omh9DUa UbPN6A/+NEoLiqEpSJSwhbJJZtm3Id6TZVhx45kidQFEpsUBKr2DrpvKL1QhSXDf 6qgL976h7vHDKvEFi2CO8OrGeetNp9339/x9jxn8o7d2B3mWMUIN8peklF3rvZEk a4oZoHPRWXcGrg9U7vpotOvVO4OTriBma8/EUHLkup6N10sXgi6l1KFqNHn4DsVA cIMp+gGwKBw3CaRXG1UJt+XbrPIPWGbVrW8v72neibXYGDXfGAgMeuV3TEXfHi1l XWGycKvMCi0heMfmwaGUdS+vKCf+4Ozhc4vSg1w3OwH2Bkr9+6QWHOOVWLt04Hc3 5OkoYdYanGrDHmcaFpe+n+a5A8KFMeWrDM7X+Z4W5/Cn5XNr2KsZLOWDazhzQVTn 39foAps4y4cYY69e/N6Qzu9pNIf9awTC9b585hBOnMbazECOkitMPTMMS2G+eMOa jyZjEqPuvpn/5uYTpSep+sXwfKxvECL3MreOvYgamH9MinT70nndT0j3+k7FgLIi mHUbyJe9fM0QG9QbkgrabpYHFWyXFMPYEmIhYTjprTwtmtj9L3P4Bj1ZSCvDZQ/7 gousGwmAgXjSTPzfeZgXs8kIgfcv1a3TlAYbclcKnx8jsYOmiYdn39ll+FKCsSp+ 4USHimXsK9HKZOO6gAwMvljmKZF+uUYh1smdOpbF2dF5wQlLaqI= =YE6Q -----END PGP SIGNATURE----- --2lnvkb6fzyg3lzwg--