aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_hw.c
diff options
context:
space:
mode:
authorAnirban Chakraborty <anirban.chakraborty@qlogic.com>2011-04-01 10:28:21 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-06 15:47:12 -0400
commit8816d0099b9c0f48452b69471c2f54037f7e0e3b (patch)
tree7c22e00a48baa5bebc5a0692288bbba75893dd54 /drivers/net/qlcnic/qlcnic_hw.c
parentb9796a14d9705c4be4a080a4fe39379a51681374 (diff)
qlcnic: Remove unused code
Cleaned up unused codes for interrupt coalescence settings Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_hw.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_hw.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
index 7e3f52690e3f..3901be85dcac 100644
--- a/drivers/net/qlcnic/qlcnic_hw.c
+++ b/drivers/net/qlcnic/qlcnic_hw.c
@@ -532,33 +532,31 @@ void qlcnic_delete_lb_filters(struct qlcnic_adapter *adapter)
532 } 532 }
533} 533}
534 534
535#define QLCNIC_CONFIG_INTR_COALESCE 3
536
537/* 535/*
538 * Send the interrupt coalescing parameter set by ethtool to the card. 536 * Send the interrupt coalescing parameter set by ethtool to the card.
539 */ 537 */
540int qlcnic_config_intr_coalesce(struct qlcnic_adapter *adapter) 538int qlcnic_config_intr_coalesce(struct qlcnic_adapter *adapter)
541{ 539{
542 struct qlcnic_nic_req req; 540 struct qlcnic_nic_req req;
543 u64 word[6]; 541 int rv;
544 int rv, i;
545 542
546 memset(&req, 0, sizeof(struct qlcnic_nic_req)); 543 memset(&req, 0, sizeof(struct qlcnic_nic_req));
547 544
548 req.qhdr = cpu_to_le64(QLCNIC_HOST_REQUEST << 23); 545 req.qhdr = cpu_to_le64(QLCNIC_HOST_REQUEST << 23);
549 546
550 word[0] = QLCNIC_CONFIG_INTR_COALESCE | ((u64)adapter->portnum << 16); 547 req.req_hdr = cpu_to_le64(QLCNIC_CONFIG_INTR_COALESCE |
551 req.req_hdr = cpu_to_le64(word[0]); 548 ((u64) adapter->portnum << 16));
552
553 memcpy(&word[0], &adapter->coal, sizeof(adapter->coal));
554 for (i = 0; i < 6; i++)
555 req.words[i] = cpu_to_le64(word[i]);
556 549
550 req.words[0] = cpu_to_le64(((u64) adapter->ahw->coal.flag) << 32);
551 req.words[2] = cpu_to_le64(adapter->ahw->coal.rx_packets |
552 ((u64) adapter->ahw->coal.rx_time_us) << 16);
553 req.words[5] = cpu_to_le64(adapter->ahw->coal.timer_out |
554 ((u64) adapter->ahw->coal.type) << 32 |
555 ((u64) adapter->ahw->coal.sts_ring_mask) << 40);
557 rv = qlcnic_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); 556 rv = qlcnic_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1);
558 if (rv != 0) 557 if (rv != 0)
559 dev_err(&adapter->netdev->dev, 558 dev_err(&adapter->netdev->dev,
560 "Could not send interrupt coalescing parameters\n"); 559 "Could not send interrupt coalescing parameters\n");
561
562 return rv; 560 return rv;
563} 561}
564 562