Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp55144ybk; Tue, 19 May 2020 15:21:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4oyo/honSSiTfhB0LtOjOzxyNVHdZNpshn3ss3Zcj0M4MlikiM13w01ble4S5HeXokK6o X-Received: by 2002:a50:eacb:: with SMTP id u11mr822359edp.162.1589926910335; Tue, 19 May 2020 15:21:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589926910; cv=none; d=google.com; s=arc-20160816; b=WZ9WwzMooJVuXwWaY7RsaGzMP06kZPD4ntRL9go0jpoJztdKf4TsH1ILdWIbHGhjBQ jQFV+Q5a2YUbjiTx/LzLvefdYGF3hw0aVf4kJXypC97hD0BY8jBaDvTTZ0rE7bXP4yRZ hAoPInrrMMp/BpWvwDYP7lddpDaCS2pPcOE/oNH5vDHsCalQFC4Krj5liRmrkRAfyjYH nPQhqeIdQoNqAg91jWyraJbOvT6AJkl1tDpNsfF+U3ZJIH2EIWENFFOIjsFdXMxTVM2u f/BgZc5N2zM0zspaoWXWyc0dN4TVJI06Wr4opKIXQGPge4YisILT/9Pn9dUCRNiwYIaq Sk8A== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=c1gNUTsHB3gfgkX/gTaB62tQSNuCVzXqjEsmpqFZNow=; b=FGg7kiuH9Nf4JXqMLsU3yW+Mava6+R37MFFHNCmwI/1+bsA50uc1ae5J4vf17A8bra 2jeflpElsG7CODX+0AQEG+jvOFXeEP14ow3Z1KmK86l2dzS4qV1wRwFv61eER0coyNdC Pns9zNuu9pnHLqDVkwVSg9mXnAF17Zwda+GaC4PvxjnFSjYFeSsKCbkup+NOv3TPOM+L CCU8O6zjQBuR2i8Bp6MlUE6u7eL5d3j/IdwWyjTCQVyCD3qIis+PgF2PVqm8/2ZZ6A87 LtyfnXc7JSb7dJclw6EnUTk+Lv3TqikuHtCchPWgTmLWKEkDDpFgG3DauNvPzXR6Nr3L 73/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=EVzxb79a; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si400820edx.419.2020.05.19.15.21.25; Tue, 19 May 2020 15:21:50 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=EVzxb79a; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727072AbgESWTF (ORCPT + 99 others); Tue, 19 May 2020 18:19:05 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:52924 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbgESWTE (ORCPT ); Tue, 19 May 2020 18:19:04 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 04JMIqOf057744; Tue, 19 May 2020 17:18:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1589926732; bh=c1gNUTsHB3gfgkX/gTaB62tQSNuCVzXqjEsmpqFZNow=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=EVzxb79ac+E5BSzuU90j/JF6T/OBf/3ArGRe7NoRfuaOqdbtZHPjFEE8wun3fZ20t ZmU5QtpMoV31HWGLoXF6GGexouZIT56jAJMqz0O6fdspUPRQq9y/PEzzJgoKJqhCQi o+6JZyuZa5dCqiLH9kGS5LvrQu+l3EiyN5BRTg14= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 04JMIqFx072467 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 May 2020 17:18:52 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 19 May 2020 17:18:51 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) 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; Tue, 19 May 2020 17:18:51 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 04JMIpPZ086866; Tue, 19 May 2020 17:18:51 -0500 Date: Tue, 19 May 2020 17:18:51 -0500 From: Bin Liu To: Oleksij Rempel CC: Michael Grzeschik , , , Pengutronix Kernel Team , Greg Kroah-Hartman , , , Subject: Re: [PATCH v1] usb: musb: dsps: set MUSB_DA8XX quirk for AM335x Message-ID: <20200519221851.GA15845@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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200327053849.5348-1-o.rempel@pengutronix.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(). Do you understand what exactly caused the issue? The kernel trace above doesn't provide enuough information. -Bin.