Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp875749pxb; Fri, 13 Aug 2021 08:13:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytfGBghVobWuYciCh3ZcC7zJnQTW6xIOBPBa0ss+mB9Vu2LnhUnbUAkumRtQPyGKbvm8ao X-Received: by 2002:a1c:f008:: with SMTP id a8mr3119981wmb.83.1628867624533; Fri, 13 Aug 2021 08:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628867624; cv=none; d=google.com; s=arc-20160816; b=oPC9dg4kqJRd1xRGN6Lh+DsZYfMojqGcLAFlZMIH69b2Jy25w9YKJ2zphTZsnQgB7a olrX5HjXdWHik3tOWLUTzHHtM6d6iIF46m7XhJ3p4y1gySc4BMirP1wPfZJamkf3C5ko mpzu0e8UTsjPsEAty10dlbNw0U+WW0h6z2iCDUUqauY5w4UbM8Jh2aFwLbsXS6BB0ITO Ju6iu7oQ296A1MY0m1R9v8ebAwym9BNrwQtSOesnpf8kqQkmVQa7ga+f9QBxdPVba55U B3buBwsLi1spB9YIMSzpFA4VofdKJT7bgrpPiJy/IwIWCPYmd7m3Jtq2jeEj4XTJwPbN 5P2w== 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=0Zwn95b72C5OJVX5GNpkT3HoZYI9O6o+s0inX/hyC8o9/nxs8sILfYO2HlkI8nA1R4 EiOKER65X67uxN31HNLKarXEtXFy2zPKMpQ5oxtn9tQKWRZe6CXtmr1vYtAniTl+lGjw i4959KaLW5ofl9hTtBAExuTA2dVqS2SSvlnjGv5uNQc7VNIo7MO5Z5QAejdSf+RaqgMb m50JwTBl282hPJrcTBCUZHq16XGqkHdpjIrpcHnJ76X3RIGi2QNg1u6cPN30QI0eO2vf S/Q3zgb2eVWLc4wfQn5QbN1FpYzR9p3GrvLjEXnhzMynSZ2NKK4ET1QOnxmf7QmcKayv HMWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GO53xJyp; 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 m7si2064629edq.539.2021.08.13.08.13.20; Fri, 13 Aug 2021 08:13:44 -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=GO53xJyp; 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 S241404AbhHMPLX (ORCPT + 99 others); Fri, 13 Aug 2021 11:11:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:52610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241764AbhHMPKl (ORCPT ); Fri, 13 Aug 2021 11:10:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 265ED6109D; Fri, 13 Aug 2021 15:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867414; bh=hB1ZqywZVYuDQf7z/EFxyNDz5gV77JsuSqEQx0lqY5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GO53xJypFUkS00toQNgSngTNsyICV8ghsl60uUlb8OZd6lJ6lk9devU9ArjnWAW61 HNcvQUd8qah2VJQuTOXC7ZB52yS2GyC4rsNkjmwNekVBIuUmtzcYSpXgsxg0A/mAAX d28arTyxo4Ehwp4BS03IbH/4WF07pZWdJI335D6U= 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.9 27/30] USB:ehci:fix Kunpeng920 ehci hardware problem Date: Fri, 13 Aug 2021 17:06:55 +0200 Message-Id: <20210813150523.324553598@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150522.445553924@linuxfoundation.org> References: <20210813150522.445553924@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);