Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753838AbcJ0Fny (ORCPT ); Thu, 27 Oct 2016 01:43:54 -0400 Received: from mail-he1eur01on0084.outbound.protection.outlook.com ([104.47.0.84]:62176 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750971AbcJ0Fnw (ORCPT ); Thu, 27 Oct 2016 01:43:52 -0400 From: Sriram Dash To: Arnd Bergmann CC: "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "mathias.nyman@intel.com" , "gregkh@linuxfoundation.org" , Suresh Gupta , "felipe.balbi@linux.intel.com" , "stern@rowland.harvard.edu" , "pku.leo@gmail.com" Subject: RE: [PATCH 2/3] usb: dwc3: host: Do not use dma_set_coherent_mask Thread-Topic: [PATCH 2/3] usb: dwc3: host: Do not use dma_set_coherent_mask Thread-Index: AQHSLq6IcaxCFxj1TEe3ep6cZpxB3aC5ozcAgAIlbrA= Date: Thu, 27 Oct 2016 05:29:26 +0000 Message-ID: References: <1477392988-7253-1-git-send-email-sriram.dash@nxp.com> <1477392988-7253-3-git-send-email-sriram.dash@nxp.com> <3451589.MhzIjWDHep@wuerfel> In-Reply-To: <3451589.MhzIjWDHep@wuerfel> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sriram.dash@nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: bf01a938-62b4-45fd-36c0-08d3fe2a37d0 x-microsoft-exchange-diagnostics: 1;VI1PR04MB1357;7:84Slpk1NJdbTf5YwSSKOYjySzygabjeDjjvDybEfd12bpVHyl4RkiwI9+qt73muFooGzhTAqvRXGUIqIzg+iC5tRhGfTUZxoNc7Z1N24KNuWsu24WFvHXGub4VIAw6E7xmDylHmk4QRQz+/xn3d9nuXr0sWYI2y7j2b5lHizbFG+Y34n/28JUUMPyzn7Cwsnzr0qTqL5jRdaMR2YcUp2Pg01jxTsAOBtZrbY/bE6A+OEPgHBts2RO91NnzQuXW/rFmGBaEhocVPcTLw8UG3vQyYguWI508PSp5wav1FeJmEz0zrRkUiE929qJKRUfuBEWgtHzzxxdJUT55xIPauzc2wcn9LYeWK8F+LSSSa86iM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR04MB1357; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(6045074)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6046074)(6072074);SRVR:VI1PR04MB1357;BCL:0;PCL:0;RULEID:;SRVR:VI1PR04MB1357; x-forefront-prvs: 0108A997B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(24454002)(377454003)(189002)(199003)(106356001)(74316002)(101416001)(3660700001)(7736002)(7846002)(54356999)(76176999)(305945005)(3280700002)(3846002)(9686002)(81156014)(8936002)(10400500002)(106116001)(8676002)(105586002)(76576001)(68736007)(102836003)(81166006)(50986999)(189998001)(6116002)(586003)(97736004)(110136003)(66066001)(122556002)(33656002)(86362001)(2906002)(11100500001)(7696004)(5002640100001)(2900100001)(19580395003)(2950100002)(77096005)(87936001)(4326007)(92566002)(19580405001)(6916009)(5660300001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB1357;H:DB5PR0401MB1925.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2016 05:29:26.6784 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB1357 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9R5hxUT005684 Content-Length: 2335 Lines: 71 >From: Arnd Bergmann [mailto:arnd@arndb.de] >On Tuesday, October 25, 2016 4:26:27 PM CEST Sriram Dash wrote: >> Do not require dma_set_coherent_mask for hcd >> >> Signed-off-by: Arnd Bergmann > >Aside from the comments I had for patch 3, you are doing two different things >here: > >> diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c >> index 89a2f71..4d7439c 100644 >> --- a/drivers/usb/dwc3/dwc3-st.c >> +++ b/drivers/usb/dwc3/dwc3-st.c >> @@ -218,7 +218,6 @@ static int st_dwc3_probe(struct platform_device *pdev) >> if (IS_ERR(regmap)) >> return PTR_ERR(regmap); >> >> - dma_set_coherent_mask(dev, dev->coherent_dma_mask); >> dwc3_data->dev = dev; >> dwc3_data->regmap = regmap; >> > >This one was setting the mask for the device itself (incorrectly), so it can be >removed along with the dma_coerce_mask_and_coherent() call in >dwc3_exynos_probe, or as a separate patch. It is an independent cleanup. > >> --- a/drivers/usb/chipidea/core.c >> +++ b/drivers/usb/chipidea/core.c >> @@ -833,9 +833,6 @@ struct platform_device *ci_hdrc_add_device(struct >> device *dev, >> >> - dma_set_coherent_mask(&pdev->dev, dev->coherent_dma_mask); >> >> ret = platform_device_add_resources(pdev, res, nres); >> if (ret) > >> --- a/drivers/usb/dwc3/core.c >> +++ b/drivers/usb/dwc3/core.c >> @@ -1059,12 +1059,6 @@ static int dwc3_probe(struct platform_device >> *pdev) >> >> spin_lock_init(&dwc->lock); >> >> - dma_set_coherent_mask(dev, dev->parent- >>coherent_dma_mask); > >> --- a/drivers/usb/dwc3/host.c >> +++ b/drivers/usb/dwc3/host.c >> @@ -72,11 +72,7 @@ int dwc3_host_init(struct dwc3 *dwc) >> return -ENOMEM; >> } >> >> - dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask); >> - > >These three all set the mask for the *child* devices, as that is no longer needed >after the change in patch 1/3. >I'd suggest leaving those changes together with the rest of that patch. > >However, it's probably better to split up that patch along the boundaries of the >drivers, starting with the USB core: > Ok. Will do the needful in the next version. >1/4 usb: separate out sysdev pointer from usb_bus >2/4 usb: chipidea: use bus->sysdev for DMA configuration >3/4 usb: xhci: use bus->sysdev for DMA configuration >4/4 usb: dwc3: use bus->sysdev for DMA configuration > > Arnd