aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
diff options
context:
space:
mode:
authorHimanshu Madhani <himanshu.madhani@qlogic.com>2014-01-23 17:18:33 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-23 19:13:09 -0500
commitcb9327d567be71ae9248d1a9bbc9c274831f5b6a (patch)
treed4cea4d1a62524136ee8059271321ed46e6e7091 /drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
parenta514722afebc59cf9d98387ee4db81ee62154df0 (diff)
qlcnic: Enhance logic to calculate msix vectors.
o Refactored MSI-x vector calculation for All adapters. Decoupled logic in the code which was using same call to request MSI-x vectors in default driver load, as well as during set_channel() operation for TSS/RSS. This refactoring simplifies code for TSS/RSS code path as well as probe path of the driver load for all adapters. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic.h')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index eb6df4ae3c35..e55098f0eeb1 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -105,6 +105,8 @@
105#define QLCNIC_DEF_TX_RINGS 4 105#define QLCNIC_DEF_TX_RINGS 4
106#define QLCNIC_MAX_VNIC_TX_RINGS 4 106#define QLCNIC_MAX_VNIC_TX_RINGS 4
107#define QLCNIC_MAX_VNIC_SDS_RINGS 4 107#define QLCNIC_MAX_VNIC_SDS_RINGS 4
108#define QLCNIC_83XX_MINIMUM_VECTOR 3
109#define QLCNIC_82XX_MINIMUM_VECTOR 2
108 110
109enum qlcnic_queue_type { 111enum qlcnic_queue_type {
110 QLCNIC_TX_QUEUE = 1, 112 QLCNIC_TX_QUEUE = 1,
@@ -962,6 +964,7 @@ struct qlcnic_ipaddr {
962#define QLCNIC_TX_INTR_SHARED 0x10000 964#define QLCNIC_TX_INTR_SHARED 0x10000
963#define QLCNIC_APP_CHANGED_FLAGS 0x20000 965#define QLCNIC_APP_CHANGED_FLAGS 0x20000
964#define QLCNIC_HAS_PHYS_PORT_ID 0x40000 966#define QLCNIC_HAS_PHYS_PORT_ID 0x40000
967#define QLCNIC_TSS_RSS 0x80000
965 968
966#define QLCNIC_IS_MSI_FAMILY(adapter) \ 969#define QLCNIC_IS_MSI_FAMILY(adapter) \
967 ((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED)) 970 ((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))
@@ -1058,6 +1061,9 @@ struct qlcnic_adapter {
1058 u8 drv_tx_rings; /* max tx rings supported by driver */ 1061 u8 drv_tx_rings; /* max tx rings supported by driver */
1059 u8 drv_sds_rings; /* max sds rings supported by driver */ 1062 u8 drv_sds_rings; /* max sds rings supported by driver */
1060 1063
1064 u8 drv_tss_rings; /* tss ring input */
1065 u8 drv_rss_rings; /* rss ring input */
1066
1061 u8 rx_csum; 1067 u8 rx_csum;
1062 u8 portnum; 1068 u8 portnum;
1063 1069
@@ -1574,7 +1580,7 @@ int qlcnic_diag_alloc_res(struct net_device *netdev, int);
1574netdev_tx_t qlcnic_xmit_frame(struct sk_buff *, struct net_device *); 1580netdev_tx_t qlcnic_xmit_frame(struct sk_buff *, struct net_device *);
1575void qlcnic_set_tx_ring_count(struct qlcnic_adapter *, u8); 1581void qlcnic_set_tx_ring_count(struct qlcnic_adapter *, u8);
1576void qlcnic_set_sds_ring_count(struct qlcnic_adapter *, u8); 1582void qlcnic_set_sds_ring_count(struct qlcnic_adapter *, u8);
1577int qlcnic_setup_rings(struct qlcnic_adapter *, u8, u8); 1583int qlcnic_setup_rings(struct qlcnic_adapter *);
1578int qlcnic_validate_rings(struct qlcnic_adapter *, __u32, int); 1584int qlcnic_validate_rings(struct qlcnic_adapter *, __u32, int);
1579void qlcnic_alloc_lb_filters_mem(struct qlcnic_adapter *adapter); 1585void qlcnic_alloc_lb_filters_mem(struct qlcnic_adapter *adapter);
1580int qlcnic_enable_msix(struct qlcnic_adapter *, u32); 1586int qlcnic_enable_msix(struct qlcnic_adapter *, u32);
@@ -1614,7 +1620,7 @@ void qlcnic_set_vlan_config(struct qlcnic_adapter *,
1614 struct qlcnic_esw_func_cfg *); 1620 struct qlcnic_esw_func_cfg *);
1615void qlcnic_set_eswitch_port_features(struct qlcnic_adapter *, 1621void qlcnic_set_eswitch_port_features(struct qlcnic_adapter *,
1616 struct qlcnic_esw_func_cfg *); 1622 struct qlcnic_esw_func_cfg *);
1617 1623int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *);
1618void qlcnic_down(struct qlcnic_adapter *, struct net_device *); 1624void qlcnic_down(struct qlcnic_adapter *, struct net_device *);
1619int qlcnic_up(struct qlcnic_adapter *, struct net_device *); 1625int qlcnic_up(struct qlcnic_adapter *, struct net_device *);
1620void __qlcnic_down(struct qlcnic_adapter *, struct net_device *); 1626void __qlcnic_down(struct qlcnic_adapter *, struct net_device *);
@@ -1671,11 +1677,8 @@ static inline int qlcnic_set_real_num_queues(struct qlcnic_adapter *adapter,
1671 1677
1672 err = netif_set_real_num_tx_queues(netdev, adapter->drv_tx_rings); 1678 err = netif_set_real_num_tx_queues(netdev, adapter->drv_tx_rings);
1673 if (err) 1679 if (err)
1674 dev_err(&adapter->pdev->dev, "failed to set %d Tx queues\n", 1680 netdev_err(netdev, "failed to set %d Tx queues\n",
1675 adapter->drv_tx_rings); 1681 adapter->drv_tx_rings);
1676 else
1677 dev_info(&adapter->pdev->dev, "Set %d Tx queues\n",
1678 adapter->drv_tx_rings);
1679 1682
1680 return err; 1683 return err;
1681} 1684}