From patchwork Sun Jul 1 21:16:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Menzel X-Patchwork-Id: 10500255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1A4F36035E for ; Sun, 1 Jul 2018 21:16:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08D9320072 for ; Sun, 1 Jul 2018 21:16:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F012D27FAC; Sun, 1 Jul 2018 21:16:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_SBL_CSS autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9804420072 for ; Sun, 1 Jul 2018 21:16:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752535AbeGAVQ0 (ORCPT ); Sun, 1 Jul 2018 17:16:26 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:58681 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752407AbeGAVQ0 (ORCPT ); Sun, 1 Jul 2018 17:16:26 -0400 Received: from localhost.localdomain (unknown [62.214.191.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id B13BE2012BA066; Sun, 1 Jul 2018 23:16:23 +0200 (CEST) From: Paul Menzel To: Greg Kroah-Hartman Cc: Paul Menzel , linux-usb@vger.kernel.org, Alan Stern , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] usb/host/pci-quirks: Only reset USB bus on NVIDIA devices Date: Sun, 1 Jul 2018 23:16:07 +0200 Message-Id: <20180701211607.7833-1-pmenzel@molgen.mpg.de> X-Mailer: git-send-email 2.17.1 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, on the AMD board Asus F2A85-M Pro there is a 100 ms delay as the USB bus of each of the two OHCI PCI devices is reset. As a 50 ms delay is done per the USB specification. Commit c6187597 (OHCI: final fix for NVIDIA problems (I hope)) unconditionally does the bus reset for all chipsets, while it was only doen for NVIDIA chipsets before. As it should not be needed for non-NVIDIA chipsets, only do the reset for Nvidia devices. Tested on Asus F2A85-M PRO and ASRock E350M1. The USB keyboard works and the LUKS passphrase can be e ntered. Signed-off-by: Paul Menzel Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: Alan Stern Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org --- drivers/usb/host/pci-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 3625a5c1a41b..f6b1a9bbe301 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -784,7 +784,7 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev) writel((u32) ~0, base + OHCI_INTRDISABLE); /* Reset the USB bus, if the controller isn't already in RESET */ - if (control & OHCI_HCFS) { + if ((pdev->vendor == PCI_VENDOR_ID_NVIDIA) && (control & OHCI_HCFS)) { /* Go into RESET, preserving RWC (and possibly IR) */ writel(control & OHCI_CTRL_MASK, base + OHCI_CONTROL); readl(base + OHCI_CONTROL);