Skip to content

Commit

Permalink
net: cavium: Register driver with PCI subsys IDs
Browse files Browse the repository at this point in the history
Across Cavium's ThunderX and Marvell's OcteonTx2 silicons
the PTP timestamping block's PCI device ID and vendor ID
have remained same but the HW architecture has changed.

Hence added PCI subsystem IDs to the device table to avoid
this driver from being probed on OcteonTx2 silicons.

Signed-off-by: Prakash Brahmajyosyula <bprakash@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Prakash Brahmajyosyula authored and David S. Miller committed Mar 2, 2020
1 parent 605a9bb commit aa3afcc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/net/ethernet/cavium/common/cavium_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#define DRV_NAME "cavium_ptp"

#define PCI_DEVICE_ID_CAVIUM_PTP 0xA00C
#define PCI_SUBSYS_DEVID_88XX_PTP 0xA10C
#define PCI_SUBSYS_DEVID_81XX_PTP 0XA20C
#define PCI_SUBSYS_DEVID_83XX_PTP 0xA30C
#define PCI_DEVICE_ID_CAVIUM_RST 0xA00E

#define PCI_PTP_BAR_NO 0
Expand Down Expand Up @@ -321,7 +324,12 @@ static void cavium_ptp_remove(struct pci_dev *pdev)
}

static const struct pci_device_id cavium_ptp_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP) },
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP,
PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_88XX_PTP) },
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP,
PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_81XX_PTP) },
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP,
PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_83XX_PTP) },
{ 0, }
};

Expand Down

0 comments on commit aa3afcc

Please sign in to comment.