diff options
author | Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> | 2014-04-25 17:43:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-27 23:20:53 -0400 |
commit | 868e9144314a00f04ee30ab1288338e510b4cf3a (patch) | |
tree | 362424f41ba6415d79c5348139b1c1c744f9652e /drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | |
parent | 1f0f467b670eec101419a2a1235e315e4324ea07 (diff) | |
download | linux-868e9144314a00f04ee30ab1288338e510b4cf3a.tar.gz linux-868e9144314a00f04ee30ab1288338e510b4cf3a.tar.bz2 linux-868e9144314a00f04ee30ab1288338e510b4cf3a.zip |
qlcnic: Allow setting TX interrupt coalescing parameters from VF.
o Tx interrupt coalescing parameters can now be set from VF.
o Added validation code in PF to validate the parameters.
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 19878fb393d0..5ceff4796df6 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -2052,6 +2052,7 @@ out: static int qlcnic_alloc_adapter_resources(struct qlcnic_adapter *adapter) { + struct qlcnic_hardware_context *ahw = adapter->ahw; int err = 0; adapter->recv_ctx = kzalloc(sizeof(struct qlcnic_recv_context), @@ -2061,6 +2062,18 @@ static int qlcnic_alloc_adapter_resources(struct qlcnic_adapter *adapter) goto err_out; } + if (qlcnic_83xx_check(adapter)) { + ahw->coal.type = QLCNIC_INTR_COAL_TYPE_RX_TX; + ahw->coal.tx_time_us = QLCNIC_DEF_INTR_COALESCE_TX_TIME_US; + ahw->coal.tx_packets = QLCNIC_DEF_INTR_COALESCE_TX_PACKETS; + ahw->coal.rx_time_us = QLCNIC_DEF_INTR_COALESCE_RX_TIME_US; + ahw->coal.rx_packets = QLCNIC_DEF_INTR_COALESCE_RX_PACKETS; + } else { + ahw->coal.type = QLCNIC_INTR_COAL_TYPE_RX; + ahw->coal.rx_time_us = QLCNIC_DEF_INTR_COALESCE_RX_TIME_US; + ahw->coal.rx_packets = QLCNIC_DEF_INTR_COALESCE_RX_PACKETS; + } + /* clear stats */ memset(&adapter->stats, 0, sizeof(adapter->stats)); err_out: |