diff options
author | Himanshu Madhani <himanshu.madhani@qlogic.com> | 2013-04-24 16:42:42 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-25 03:34:05 +0400 |
commit | be273dc197eb84304b740db8965a2103005c49ba (patch) | |
tree | ca802219265eabcfea4e42096e8a538d44806000 /drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | |
parent | 522907403b202dea8528c308ffc21e79d0636ee6 (diff) | |
download | linux-be273dc197eb84304b740db8965a2103005c49ba.tar.xz |
qlcnic: Enable Interrupt Coalescing for 83xx adapter
Enable Interrupt coalescing through ethtool on 83xx adapter.
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index c40b077d43da..ea790a93ee7c 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c @@ -1937,7 +1937,7 @@ int qlcnic_83xx_get_mac_address(struct qlcnic_adapter *adapter, u8 *mac) void qlcnic_83xx_config_intr_coal(struct qlcnic_adapter *adapter) { int err; - u32 temp; + u16 temp; struct qlcnic_cmd_args cmd; struct qlcnic_nic_intr_coalesce *coal = &adapter->ahw->coal; @@ -1945,10 +1945,18 @@ void qlcnic_83xx_config_intr_coal(struct qlcnic_adapter *adapter) return; qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_CONFIG_INTR_COAL); - cmd.req.arg[1] = 1 | (adapter->recv_ctx->context_id << 16); + if (coal->type == QLCNIC_INTR_COAL_TYPE_RX) { + temp = adapter->recv_ctx->context_id; + cmd.req.arg[1] = QLCNIC_INTR_COAL_TYPE_RX | temp << 16; + temp = coal->rx_time_us; + cmd.req.arg[2] = coal->rx_packets | temp << 16; + } else if (coal->type == QLCNIC_INTR_COAL_TYPE_TX) { + temp = adapter->tx_ring->ctx_id; + cmd.req.arg[1] = QLCNIC_INTR_COAL_TYPE_TX | temp << 16; + temp = coal->tx_time_us; + cmd.req.arg[2] = coal->tx_packets | temp << 16; + } cmd.req.arg[3] = coal->flag; - temp = coal->rx_time_us << 16; - cmd.req.arg[2] = coal->rx_packets | temp; err = qlcnic_issue_cmd(adapter, &cmd); if (err != QLCNIC_RCODE_SUCCESS) dev_info(&adapter->pdev->dev, |