summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cavium/thunder/nic.h
diff options
context:
space:
mode:
authorSunil Goutham <sgoutham@cavium.com>2016-08-12 16:51:28 +0530
committerDavid S. Miller <davem@davemloft.net>2016-08-13 11:59:30 -0700
commit02a72bd8cded6aea8385d996b7d3d5403653f88a (patch)
treefa8873e07421c2c0a0b1d5b04ca6a15639a316c1 /drivers/net/ethernet/cavium/thunder/nic.h
parent3a397ebe154b385e5e3d0c7fee478ccef58742fc (diff)
net: thunderx: Enable CQE_RX desc's extension fields
Unlike 88xx, CQE_RX descriptor's tunnelling extension i.e CQE_RX2_S is always enabled on 81xx/83xx and HW does insert these fields into CQE_RX. As a result receive buffer addresses will now be present at 7th word of CQE_RX instead of 6th. Enable CQE_RX2_S on 88xx pass 2.x as well. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/thunder/nic.h')
-rw-r--r--drivers/net/ethernet/cavium/thunder/nic.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
index 6b0b2407ca3b..136db2a8f044 100644
--- a/drivers/net/ethernet/cavium/thunder/nic.h
+++ b/drivers/net/ethernet/cavium/thunder/nic.h
@@ -493,7 +493,14 @@ static inline int nic_get_node_id(struct pci_dev *pdev)
static inline bool pass1_silicon(struct pci_dev *pdev)
{
- return pdev->revision < 8;
+ return (pdev->revision < 8) &&
+ (pdev->subsystem_device == PCI_SUBSYS_DEVID_88XX_NIC_PF);
+}
+
+static inline bool pass2_silicon(struct pci_dev *pdev)
+{
+ return (pdev->revision >= 8) &&
+ (pdev->subsystem_device == PCI_SUBSYS_DEVID_88XX_NIC_PF);
}
int nicvf_set_real_num_queues(struct net_device *netdev,