Received: by 10.213.65.68 with SMTP id h4csp896113imn; Wed, 14 Mar 2018 03:33:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELvgQ3PxJOB2YB2zYUjd3OesUCOAF6mDOAvkShVcSfj14Tkg6fzPWFKqk2sy715aj8tXtBEp X-Received: by 10.99.109.142 with SMTP id i136mr2133470pgc.306.1521023600070; Wed, 14 Mar 2018 03:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521023600; cv=none; d=google.com; s=arc-20160816; b=0Xvm7gpE1D3JrNkI+L0ngA19H3eHZ6bsNNfpeXfgtInYO+7bsMVM1PP050w9EoBGZR /DWqmq9VytKZ53g+f+pMDfpktFGseF6yu8F45me3oqik2RMH3TYBKg3EO77VkgG0IDP6 CYLbStF0VVeaHGYp6YEQziByDfQ8D7K6NpJMFJyY/AucjAg9qWP+k1BKQzSpSWKpGeWW aE77+10P2/ZzksMSOtA8QpBo8hLLjCiMTyoAPCKguYyT/3P2EyM2VGVNDc8NdTUaJAHN nfW8arTVECdQqmENDPjT6LM9EBlnSnATZ5SsCxvZm3J6qma10Z2J2r8tSRr0UlICoROe ndCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=knXs2BB1BrdB9x498dN9hhrSMRLKV8Wv3F9MmIqTp/I=; b=CTdJpfFP5LXTs+QVwzTbbaR08qAgZE79cQ21lP2v+tCvgN2k3I8HWaIfIT30yKybw/ 3SAtM7kcqARLKqYiJbCAg8c8unOGHWQYGKuenKRQJkJvMZpEH3k6Iiks6wttfo3vqzGA jSy25l6AHXmbZmv7Ca3yry8MMY/2NrRLA3Fm4B+Mb/w4Z0SsduxnwckIvKKKI20CsbE6 lcgAX3ob5rAwqhWCzVbeatmBTX5VTORPKBJqcc58wvSd1O9Hs09TdNCKxKsXwcnywXuo yzMw47zc4EO4og+cz7i39DIr9cDna60TxNGaIgDu00dTG1GxR5bgqjeYelNuiAzySvnb 5BeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3-v6si1738972plb.221.2018.03.14.03.33.04; Wed, 14 Mar 2018 03:33:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbeCNKa2 (ORCPT + 99 others); Wed, 14 Mar 2018 06:30:28 -0400 Received: from relay14.alfahosting-server.de ([109.237.142.228]:47781 "EHLO relay14.alfahosting-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbeCNK3x (ORCPT ); Wed, 14 Mar 2018 06:29:53 -0400 Received: by relay01.alfahosting-server.de (Postfix, from userid 1001) id 2939332C75CF; Wed, 14 Mar 2018 11:29:51 +0100 (CET) X-Spam-DCC: : X-Spam-Level: X-Spam-Status: No, score=-1000.0 required=7.0 tests=BAYES_50,D_SENT_WITH_SASL autolearn=disabled version=3.2.5 Received: from alfa3028.alfahosting-server.de (alfa3028.alfahosting-server.de [109.237.138.38]) by relay01.alfahosting-server.de (Postfix) with ESMTPS id A69D532C75CF; Wed, 14 Mar 2018 11:29:49 +0100 (CET) Received: from localhost.localdomain (unknown [91.230.2.244]) (Authenticated sender: yes) by alfa3028.alfahosting-server.de (Postfix) with ESMTPA id 2193E3BE0002; Wed, 14 Mar 2018 11:29:49 +0100 (CET) From: Richard Leitner To: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Cc: gregkh@linuxfoundation.org, mathias.nyman@intel.com, bhelgaas@google.com, richard.leitner@skidata.com Subject: [PATCH 1/3] usb: host: pci: use existing Intel PCI ID macros Date: Wed, 14 Mar 2018 11:29:31 +0100 Message-Id: <20180314102933.21367-2-dev@g0hl1n.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180314102933.21367-1-dev@g0hl1n.net> References: <20180314102933.21367-1-dev@g0hl1n.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Richard Leitner Instead of the hardcoded hexadecimal PCI IDs use the existing macros from pci_ids.h for Intel IDs. Signed-off-by: Richard Leitner --- drivers/usb/host/pci-quirks.c | 10 +++++----- drivers/usb/host/xhci-pci.c | 3 ++- include/linux/pci_ids.h | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 67ad4bb6919a..4f4a9f36a68e 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -858,8 +858,8 @@ static void ehci_bios_handoff(struct pci_dev *pdev, * * The HASEE E200 hangs when the semaphore is set (bugzilla #77021). */ - if (pdev->vendor == 0x8086 && (pdev->device == 0x283a || - pdev->device == 0x27cc)) { + if (pdev->vendor == PCI_VENDOR_ID_INTEL && + (pdev->device == 0x283a || pdev->device == 0x27cc)) { if (dmi_check_system(ehci_dmi_nohandoff_table)) try_handoff = 0; } @@ -1168,9 +1168,9 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev) val = readl(base + ext_cap_offset); /* Auto handoff never worked for these devices. Force it and continue */ - if ((pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) || - (pdev->vendor == PCI_VENDOR_ID_RENESAS - && pdev->device == 0x0014)) { + if ((pdev->vendor == PCI_VENDOR_ID_TI && + pdev->device == PCI_DEVICE_ID_TI_TUSB73X0) || + (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0014)) { val = (val | XHCI_HC_OS_OWNED) & ~XHCI_HC_BIOS_OWNED; writel(val, base + ext_cap_offset); } diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 5262fa571a5d..a5bfd890190c 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -213,7 +213,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL; - if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) + if (pdev->vendor == PCI_VENDOR_ID_TI && + pdev->device == PCI_DEVICE_ID_TI_TUSB73X0) xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7; if (xhci->quirks & XHCI_RESET_ON_RESUME) diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a6b30667a331..e8d1af82a688 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -838,6 +838,7 @@ #define PCI_DEVICE_ID_TI_XX12 0x8039 #define PCI_DEVICE_ID_TI_XX12_FM 0x803b #define PCI_DEVICE_ID_TI_XIO2000A 0x8231 +#define PCI_DEVICE_ID_TI_TUSB73X0 0x8241 #define PCI_DEVICE_ID_TI_1130 0xac12 #define PCI_DEVICE_ID_TI_1031 0xac13 #define PCI_DEVICE_ID_TI_1131 0xac15 -- 2.11.0