Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp874000pxb; Fri, 13 Aug 2021 08:11:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQbV+SM1QCaHMWA0ZrUnBlmMO+0Ek1/ML3NaIJcy8n1TeNMhXdRy1mvIj6QKb9ObjK8Kzy X-Received: by 2002:a02:caa1:: with SMTP id e1mr2736758jap.107.1628867510164; Fri, 13 Aug 2021 08:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628867510; cv=none; d=google.com; s=arc-20160816; b=upDyPl35YBCqmlfDg/iFCaDQgtIjol01E79ods8dHCGgPfyA0SvHm15LAWITUQ96xE 8Uq/+WKsytB4ZPaqpGL2DncA8j5LHDdWOaRlanhfoNu/xE/F0ZL3kz1VlMG0U8P09pXS +N/fngp33gzf7V42lB8qBZk/pWR/mze6rU46yLHiBCs8rI5AuO/4UK+DtNJTKUnTdcid sXnPfC4lQ/O1DuUQU3MnG2WzR549DDp4rjZ68DTjHyxU4UhnM5TXVed66woKS18noHoK 9+/7xSDLVJ4xRKutJOc4nvYf24mje2m0TavA/GuQiy/oi5mICHpIwLBfORPau1h+wLUf ZMmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=R9XUb7tU7v1J0Q10LA8adeO/myHkkVtfBupS9aU3uDo=; b=TMRgmVz7u8z5MpzbnGB0QGCtkzTp9T0slynf0LXpneg/Hwf6zm/l9Kp3KDDlgXBXwX 0HypipRJV93xAeZ9xV0g/KcVM8BqQ7a9lAt8coEW+xnPmrcD3NP8GRWXS/FNuEkQmhMZ tWlDqEpyuw9XPgNiYBEKmMkn9B4q7HuWlBaKgsYrGkl6H3xjjSN13I/HnLYu+QO7Ct5N x+SEDYC6r4Tm80ENt/dnfUCpWsHyo68s6lJVx3OVApmlnsPK+hD5xFu0TqQv6x1RSn5H Kmr4UKrVg8mGegESR4qr4koO5EEGutZfP87HN92vIxBLmbateioGb/0/lR4NHbYVwffJ Cm/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2LLHO9vL; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m43si1778696jav.124.2021.08.13.08.11.32; Fri, 13 Aug 2021 08:11: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=@linuxfoundation.org header.s=korg header.b=2LLHO9vL; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241576AbhHMPKK (ORCPT + 99 others); Fri, 13 Aug 2021 11:10:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:51472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241235AbhHMPJD (ORCPT ); Fri, 13 Aug 2021 11:09:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2708061153; Fri, 13 Aug 2021 15:08:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867316; bh=hB1ZqywZVYuDQf7z/EFxyNDz5gV77JsuSqEQx0lqY5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2LLHO9vLHAWb+YfIz3sQ18fxWo9dwX2EBh5VWOZqYlGBMLxDM2h3MvRFXjpbCcuYY hr99HhQEKdu5fpyTzvbeCpGzJ04bKj9xEO8aWc0Kap6x1Wmdq6IcGRag83Mc4XjeET +UFzbitdsMocr2Zsn7/tEqxvC36Ff8UD3Jni6BpU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Stern , Longfang Liu Subject: [PATCH 4.4 23/25] USB:ehci:fix Kunpeng920 ehci hardware problem Date: Fri, 13 Aug 2021 17:06:47 +0200 Message-Id: <20210813150521.470150195@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150520.718161915@linuxfoundation.org> References: <20210813150520.718161915@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Longfang Liu commit 26b75952ca0b8b4b3050adb9582c8e2f44d49687 upstream. 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. Acked-by: Alan Stern Signed-off-by: Longfang Liu Link: https://lore.kernel.org/r/1617958081-17999-1-git-send-email-liulongfang@huawei.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-pci.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -312,6 +312,9 @@ static int ehci_pci_setup(struct usb_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) + ; /* HUAWEI Kunpeng920 USB EHCI has no sbrn register */ else pci_read_config_byte(pdev, 0x60, &ehci->sbrn);