Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b78f48a authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Bjorn Helgaas
Browse files

PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition



PCI-SIG has defined Interface FEh for Base Class 0Ch, Sub-Class 03h as "USB
Device (not host controller)".  It is already being used in various USB
device controller drivers for matching, so add PCI_CLASS_SERIAL_USB_DEVICE
and use it.

Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent caf02abf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ static void quirk_amd_nl_class(struct pci_dev *pdev)
	u32 class = pdev->class;

	/* Use "USB Device (not host controller)" class */
	pdev->class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe;
	pdev->class = PCI_CLASS_SERIAL_USB_DEVICE;
	dev_info(&pdev->dev, "PCI class overridden (%#08x -> %#08x) so dwc3 driver can claim this instead of xhci\n",
		 class, pdev->class);
}
+1 −1
Original line number Diff line number Diff line
@@ -3397,7 +3397,7 @@ static int udc_pci_probe(
static const struct pci_device_id pci_id[] = {
	{
		PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x2096),
		.class =	(PCI_CLASS_SERIAL_USB << 8) | 0xfe,
		.class =	PCI_CLASS_SERIAL_USB_DEVICE,
		.class_mask =	0xffffffff,
	},
	{},
+1 −1
Original line number Diff line number Diff line
@@ -1846,7 +1846,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
/*-------------------------------------------------------------------------*/

static const struct pci_device_id pci_ids[] = { {
	.class =	((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
	.class =	PCI_CLASS_SERIAL_USB_DEVICE,
	.class_mask =	~0,
	.vendor =	0x102f,		/* Toshiba */
	.device =	0x0107,		/* this UDC */
+4 −4
Original line number Diff line number Diff line
@@ -3735,7 +3735,7 @@ static void net2280_shutdown(struct pci_dev *pdev)
/*-------------------------------------------------------------------------*/

static const struct pci_device_id pci_ids[] = { {
	.class =	((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
	.class =	PCI_CLASS_SERIAL_USB_DEVICE,
	.class_mask =	~0,
	.vendor =	PCI_VENDOR_ID_PLX_LEGACY,
	.device =	0x2280,
@@ -3743,7 +3743,7 @@ static const struct pci_device_id pci_ids[] = { {
	.subdevice =	PCI_ANY_ID,
	.driver_data =	PLX_LEGACY | PLX_2280,
	}, {
	.class =	((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
	.class =	PCI_CLASS_SERIAL_USB_DEVICE,
	.class_mask =	~0,
	.vendor =	PCI_VENDOR_ID_PLX_LEGACY,
	.device =	0x2282,
@@ -3752,7 +3752,7 @@ static const struct pci_device_id pci_ids[] = { {
	.driver_data =	PLX_LEGACY,
	},
	{
	.class =	((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
	.class =	PCI_CLASS_SERIAL_USB_DEVICE,
	.class_mask =	~0,
	.vendor =	PCI_VENDOR_ID_PLX,
	.device =	0x3380,
@@ -3761,7 +3761,7 @@ static const struct pci_device_id pci_ids[] = { {
	.driver_data =	PLX_SUPERSPEED,
	 },
	{
	.class =	((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
	.class =	PCI_CLASS_SERIAL_USB_DEVICE,
	.class_mask =	~0,
	.vendor =	PCI_VENDOR_ID_PLX,
	.device =	0x3382,
+4 −4
Original line number Diff line number Diff line
@@ -3234,22 +3234,22 @@ static const struct pci_device_id pch_udc_pcidev_id[] = {
	{
		PCI_DEVICE(PCI_VENDOR_ID_INTEL,
			   PCI_DEVICE_ID_INTEL_QUARK_X1000_UDC),
		.class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
		.class = PCI_CLASS_SERIAL_USB_DEVICE,
		.class_mask = 0xffffffff,
	},
	{
		PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EG20T_UDC),
		.class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
		.class = PCI_CLASS_SERIAL_USB_DEVICE,
		.class_mask = 0xffffffff,
	},
	{
		PCI_DEVICE(PCI_VENDOR_ID_ROHM, PCI_DEVICE_ID_ML7213_IOH_UDC),
		.class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
		.class = PCI_CLASS_SERIAL_USB_DEVICE,
		.class_mask = 0xffffffff,
	},
	{
		PCI_DEVICE(PCI_VENDOR_ID_ROHM, PCI_DEVICE_ID_ML7831_IOH_UDC),
		.class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
		.class = PCI_CLASS_SERIAL_USB_DEVICE,
		.class_mask = 0xffffffff,
	},
	{ 0 },
Loading