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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 004CBC43334 for ; Sun, 26 Jun 2022 20:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231676AbiFZUDD (ORCPT ); Sun, 26 Jun 2022 16:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230484AbiFZUDC (ORCPT ); Sun, 26 Jun 2022 16:03:02 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52AB1241 for ; Sun, 26 Jun 2022 13:03:00 -0700 (PDT) Received: from [127.0.0.1] ([86.151.31.128]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.163]) with ESMTPA (Nemesis) id 1M2OEw-1o4zyB1Diw-003yEi; Sun, 26 Jun 2022 22:02:49 +0200 From: Darren Stevens To: Sergei Shtylyov CC: linuxppc-dev@lists.ozlabs.org, oss@buserror.net, chzigotzky@xenosoft.de, robh@kernel.org, stern@rowland.harvard.edu, linux-usb@vger.kernel.org, shawnguo@kernel.org, leoyang.li@nxp.com Date: Sun, 26 Jun 2022 20:49:11 +0100 (BST) Message-ID: <53ac873c23e.3ae9df00@auth.smtp.1and1.co.uk> In-Reply-To: <947e4583-fe0b-b8af-61b3-2d120357727c@gmail.com> References: <20220625214151.547b3570@Cyrus.lan> <947e4583-fe0b-b8af-61b3-2d120357727c@gmail.com> User-Agent: YAM/2.9p1 (AmigaOS4; PPC; rv:20140418r7798) Subject: Re: drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode. MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03: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JMfPtdO93tPk= Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hello Sergei On 26/06/2022, Sergei Shtylyov wrote: > Hello! > > On 6/25/22 11:41 PM, Darren Stevens wrote: > >> In patch a1a2b7125e10 (Drop static setup of IRQ resource from DT >> core) we stopped platform_get_resource() from returning the IRQ, as all > > In commit a1a2b7125e10 ("Drop static setup of IRQ resource from DT core") > >> drivers were supposed to have switched to platform_get_irq() >> Unfortunately the Freescale EHCI driver in host mode got missed. Fix >> it. Also fix allocation of resources to work with current kernel. > > The basic rule (especially for the fixes) is "do one thing per patch". I thought I'd done that, this is the minimum amount of changes that fix what changed in the specified commit. > [...] >> @@ -92,15 +89,18 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) >> goto err1; >> } >> >> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> - hcd->regs = devm_ioremap_resource(&pdev->dev, res); >> + tmp = of_address_to_resource(dn, 0, &res); > > Hm, why? What does this fix? With baseline the mouse and keyboard on our machines don't work - dmesg reports no interrupt. Fixing the interrupt detection throws a 'invalid resoure' error instead (No idea why), which these lines fix. Both problems disappear if we revert the 'fixes' patch. Hmmm, perhaps title shoud be 'fix resource detection in host mode'? Regards Darren