Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Neal Liu <neal_liu@aspeedtech.com>
To: Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bjorn Helgaas <bhelgaas@google.com>, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>
Cc: Neal Liu <neal_liu@aspeedtech.com>,
	Tao Ren <rentao.bupt@gmail.com>, <BMC-SW@aspeedtech.com>
Subject: [PATCH] usb: ehci: add pci device support for Aspeed platforms
Date: Tue, 8 Feb 2022 14:29:27 +0800	[thread overview]
Message-ID: <20220208062927.3527137-1-neal_liu@aspeedtech.com> (raw)

Enable Aspeed quirks in commit 7f2d73788d90 ("usb: ehci:
handshake CMD_RUN instead of STS_HALT") to support Aspeed
ehci-pci device.

Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
---
 drivers/usb/host/ehci-pci.c | 6 ++++++
 include/linux/pci_ids.h     | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index e87cf3a00fa4..a91b25d216ae 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -222,6 +222,12 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 			ehci->has_synopsys_hc_bug = 1;
 		}
 		break;
+	case PCI_VENDOR_ID_ASPEED:
+		if (pdev->device == PCI_DEVICE_ID_ASPEED_EHCI) {
+			ehci_info(ehci, "applying Aspeed HC workaround\n");
+			ehci->is_aspeed = 1;
+		}
+		break;
 	}
 
 	/* optional debug port, normally in the first BAR */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index aad54c666407..410b395fe56c 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -3096,4 +3096,7 @@
 
 #define PCI_VENDOR_ID_NCUBE		0x10ff
 
+#define PCI_VENDOR_ID_ASPEED		0x1a03
+#define PCI_DEVICE_ID_ASPEED_EHCI	0x2603
+
 #endif /* _LINUX_PCI_IDS_H */
-- 
2.25.1


             reply	other threads:[~2022-02-08  6:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08  6:29 Neal Liu [this message]
2022-02-08  7:37 ` [PATCH] usb: ehci: add pci device support for Aspeed platforms Greg Kroah-Hartman
2022-02-08  8:20   ` Neal Liu
2022-02-08  8:41     ` Greg Kroah-Hartman
2022-02-08  8:53       ` Neal Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220208062927.3527137-1-neal_liu@aspeedtech.com \
    --to=neal_liu@aspeedtech.com \
    --cc=BMC-SW@aspeedtech.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rentao.bupt@gmail.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox