Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp185394pxf; Thu, 8 Apr 2021 00:08:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDd/vEvS3cnT+HI/S+cenQxvohasugoR5w/lw7ud+EaQl8DrKHrVjlhd+bko0kk4tCqJp6 X-Received: by 2002:a65:5bca:: with SMTP id o10mr6973369pgr.248.1617865714889; Thu, 08 Apr 2021 00:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617865714; cv=none; d=google.com; s=arc-20160816; b=eaA9xqiRMoyUR6Gs2SqQjyMFDFxhihHK9b94SoWFdkyW0gbP+InQWlfkOiK519A104 0pezscsMqCCwvYDVNtP6DkynkTGmJhx+MHtymD+rzAqX4Io+EKTgOmjl5U/25bm93RN0 8AGu5QA0Mx2rEIkc4I9HFBzZVRDWlQckDI4Ttr3UuxtfCkg2O5+kq+yjbMC3MtsceKDI aupZ/8F/VmuDd1/wgwSdpPE9vII2op3vxRWN6pJ07WeByI0xoohNGfECGWrj1EI30XFn sVncqgZgxcWmnMP2xzEtD/yztCapLQzDA/4mQSWSozzjiUnIQlsE3KOMHpzXLqAa2zf6 DBKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=NgHYRTgzEQS98tbSip2hWyZYfo+US0fqDBHJgzB7Bu4=; b=APOzKDJzUJv+hzH51heKp5ccLfetGisUYdupEIJbKjFfGUZC73b14LBf52tft6zhzR 5FGinIHrlmgk0skwrlu8kkSWOPYM6ka289WGMrblFxxDM2/I3j3uWIrAUov8EXxRat3C hrYrduc0/tCTPAxe3+d9BS/7o1nYAUB8Gxxmq+XoXPONLfYftRSCQ7KgJtuwC4QRjGWy FZmh1lu9KU21NGOvyItWo8UpwVfmcH3Vtyyfy+6V64jIjTCl0Ig7TRxXVHsnBVqLR6gl GWpO+VYNx88qbu/EeCQ6Ny2ZDNCtroTmUOmQ/q4WKNoN5GDE8vvKI/kW3/IiXjjB8DG9 3csw== 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 i11si3927904pgs.125.2021.04.08.00.08.22; Thu, 08 Apr 2021 00:08:34 -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 S230014AbhDHHGj (ORCPT + 99 others); Thu, 8 Apr 2021 03:06:39 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:16824 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbhDHHGi (ORCPT ); Thu, 8 Apr 2021 03:06:38 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FGC1B3Mvyz93XJ; Thu, 8 Apr 2021 15:04:14 +0800 (CST) Received: from huawei.com (10.67.165.24) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Thu, 8 Apr 2021 15:06:19 +0800 From: Longfang Liu To: , , , CC: , , , , Subject: [PATCH] USB:ehci:fix ehci hardware problem Date: Thu, 8 Apr 2021 15:03:45 +0800 Message-ID: <1617865425-28782-1-git-send-email-liulongfang@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When rebooting the EHCI driver, ehci_shutdown() will be called. if the sbrn flag is 0, ehci_shutdown() will return directly. Our EHCI hardware does not define the SBRN register, which cause its value to default to 0. The sbrn flag being 0 will cause the EHCI interrupt signal to not be turned off after reboot. An interrupt that is not closed will cause an exception to the device sharing the interrupt. Currently, our hardware has this problem. We hope to solve this problem by skipping reading the sbrn register value. On the next generation of hardware, we will define this SBRN register in accordance with the controller standard. Signed-off-by: Longfang Liu --- drivers/usb/host/ehci-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 3c3820a..5dc6821 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -291,6 +291,8 @@ 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) + ; /* sbrn register is undefined */ else pci_read_config_byte(pdev, 0x60, &ehci->sbrn); -- 2.8.1