Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp959406pxb; Fri, 13 Aug 2021 10:04:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTv4Sj/iGBvk0DALBy8L0eakrwf6BK69JurLTl2kkXiOODw/va5hclIb/f/tY/ODCBTY3j X-Received: by 2002:a5e:8e4c:: with SMTP id r12mr2784696ioo.73.1628874287112; Fri, 13 Aug 2021 10:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628874287; cv=none; d=google.com; s=arc-20160816; b=VVLRx60HHTZ22Z0CccGAPM7LE2rfmUw3xAo+PakRUL3FmuFZ9Lq1/YI+dIs8f6sC0o fNaJjMJhMG8YoewrVxNsHQmLWPW36JbkgRawXqOCwGKqROp0QHGYFj2qpqeyFF9ZMDDq +515XgO1Sun8tg0YjFb2+Ds3dzDBbpQ6SR0C5e8grSFMITavKL67OgKT3hkGr6TWRSGW nlj2re2rRYkGt8/lQ4OFt0/6hy0TmJhGG8iBwW6CMbA62gx4TlHa2Nrn3s203gyfkbMo d5JkhRNXBs5bEAFUlGI6t8UNbos8pxrZ++JYx1XogX+vSlocu436Ki3JA7XbcUc5Qi/l KrlQ== 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=HJhVH5RqaCwO/e0rPbbsKOdLUpmrJxGFc+RJOiHpD1g=; b=ep5ST4u7tRFHTP15G/zQcuz7vwz0XUqG/D7vm8D2slZYYkNnP/mdo20/RRwuvO2xJo mBuXwUG+dfzjFNAA4A30b8BEkoUapKRywak8vgTF5AI1vu1h8IZ5aR4wvbGL7nqS27bk IJqRGpH3kDqds+JsM7V54f47AFSSYGMSAtnsIrGtCD7jMdPugzzMs9+UAT1cm+BVF50N jRyDmJGRHTMM+2Fi3a+U3e7Cx0Wnu1HCKmBpsQaeF83CBHlksfURbuyUaL87W9/xRP5+ Vh2HKBUOlmDwHmcAqubxfJsdqMsNJH/gm3NNxFLCD+R6UB7/pEjrhEnC/dxCGbpkd99d JpGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N6yBDrTq; 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 10si1860202ilq.145.2021.08.13.10.04.35; Fri, 13 Aug 2021 10:04:47 -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=N6yBDrTq; 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 S242303AbhHMPO6 (ORCPT + 99 others); Fri, 13 Aug 2021 11:14:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:56440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242014AbhHMPNQ (ORCPT ); Fri, 13 Aug 2021 11:13:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 55D6C610FF; Fri, 13 Aug 2021 15:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867567; bh=5bM0VwdyJN9ot4hCjJftDeLaiVlC+Sip1objMN7EOk4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N6yBDrTq0l592mjZnyJpJJIE/XIT2DuKeKMDRq6LiOWe7nmSLRUoUAC+WIolz/NUV N79/qQUFTVnocefI+wTedVVo/FIa2Ja/yNBF6K3mlW2TsZkLE7037AF8Es7XwK6DW2 iNh+AKl4rz0YzrhQged7iLvviugDQ1N0b6jjnzJc= 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.19 08/11] USB:ehci:fix Kunpeng920 ehci hardware problem Date: Fri, 13 Aug 2021 17:07:15 +0200 Message-Id: <20210813150520.340771651@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150520.072304554@linuxfoundation.org> References: <20210813150520.072304554@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 @@ -298,6 +298,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);