Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1171595pxf; Fri, 9 Apr 2021 01:38:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfhQSrfSjyi0DEUdgBxoVdmm5NeFhQvHPBKAZewx3MW+OZP7Llxq+a1uOS15jUbHkhbCJZ X-Received: by 2002:a17:906:9bee:: with SMTP id de46mr1665367ejc.413.1617957533399; Fri, 09 Apr 2021 01:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617957533; cv=none; d=google.com; s=arc-20160816; b=MRKzjhIPovMUOmA2GpgAK8ic6OVOMi1Kukv4r/6nhIrwXIwlsgVKaNyWPUR1EnfMZS UyDmMzc7frRfHyz7Lf5duPQGZOVGjhtcAgcuOf80cmfqG3pCKiy95GK1HjmjDpMj7rtM 8viC8KHvnWBSWGI0cnb4eX19+OfSYkA+79zmIJsy5C+h+eiHEYFONOj2xP4WZ4Vij+3f 7JTsBR+TxYcNVA50bTcMv3PLRAyWZCDrUhzdme60KrzFz18QnA71QWiLhdsCDkXTlHCR Dy1xZPDymJr8/d3ygWTdDIphp1Ud+zEW3Y0qj5pxxUqPcLAHBa7HjHP54hWBcePk1jxd UjTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=O2rUVgWem9zSGNOeE2N4Rx7Oy08u8fWIqqvRwg2Vq0o=; b=1BdXg3runO/zIgdDzbxLFfQPZxGdFQv3R4wQ/rWhdB3bPo1D4DBZ+vLWsK0zLibpkz x16MQdqDgRVwQGD5+X1qBDicSwTt7sQ/k+5F6eeZqL5r6bLPXsp8ThqbC+LqePd9vh/R 75Rd5Jj0uuaOttvOn7eDqtPA6Nl2RA58KAwY+I1VTpVJGbP8pmQq/rsYVszH1KtqcMfr gvFI1e3gW7YDjmswLI0FZaHK1FKmxXBuwkHCNV7iV+4HQsTye1sJtubXbIvVd7s38lsX NSGkqi7G8O3TjfHUU1kkJ1ujLc9juZtPjpau9iko1+70nGl/bhmFB525YUZZ+AaXbNal C13Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p21si1757763edm.361.2021.04.09.01.38.28; Fri, 09 Apr 2021 01:38:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231954AbhDIIhk (ORCPT + 99 others); Fri, 9 Apr 2021 04:37:40 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:16499 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231851AbhDIIhj (ORCPT ); Fri, 9 Apr 2021 04:37:39 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FGrz14M7xzPpcL; Fri, 9 Apr 2021 16:34:37 +0800 (CST) Received: from [10.67.102.118] (10.67.102.118) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Fri, 9 Apr 2021 16:37:16 +0800 Subject: Re: [PATCH v4] USB:ehci:fix Kunpeng920 ehci hardware problem To: , , , CC: , , , References: <1617957098-8375-1-git-send-email-liulongfang@huawei.com> From: liulongfang Message-ID: <83e50a56-d168-1a4c-a393-92f2aff8bcfd@huawei.com> Date: Fri, 9 Apr 2021 16:37:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1617957098-8375-1-git-send-email-liulongfang@huawei.com> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.118] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/4/9 16:31, Longfang Liu wrote: > Kunpeng920's EHCI controller does not have SBRN register. > Reading the SBRN register when the controller driver is > initialized will get 0. > > When rebooting the EHCI driver, ehci_shutdown() will be called. > if the sbrn flag is 0, ehci_shutdown() will return directly. > The sbrn flag being 0 will cause the EHCI interrupt signal to > not be turned off after reboot. this interrupt that is not closed > will cause an exception to the device sharing the interrupt. > > Therefore, the EHCI controller of Kunpeng920 needs to skip > the read operation of the SBRN register. > > Signed-off-by: Longfang Liu > --- > > Changes in v4: > - Modify the code implementation. > > Changes in v3: > - Fix some code style issues. > - Update struct name. > > Changes in v2: > - Fix some code style issues. > - Update function name. > > drivers/usb/host/ehci-pci.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c > index 3c3820a..237a346 100644 > --- a/drivers/usb/host/ehci-pci.c > +++ b/drivers/usb/host/ehci-pci.c > @@ -291,6 +291,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd) > if (pdev->vendor == PCI_VENDOR_ID_STMICRO > && pdev->device == PCI_DEVICE_ID_STMICRO_USB_HOST) > ; /* ConneXT has no sbrn register */ > + else if (pdev->vendor == PCI_VENDOR_ID_HUAWEI > + && pdev->device == 0xa239) Sorry. There is a problem with the format, I need to resend Thanks. Longfang. > + ; /* HUAWEI Kunpeng920 USB EHCI has no sbrn register */ > else > pci_read_config_byte(pdev, 0x60, &ehci->sbrn); > >