aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_main.c
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-05-12 23:07:46 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-14 06:08:00 -0400
commit251a84c9272b88eac4888d610c44c821b277c6c9 (patch)
treef5b401d901040740368190aa053db3e848e2c4f7 /drivers/net/qlcnic/qlcnic_main.c
parent1bb09fb9c9333c97dc58524b05d4ee35b02b4216 (diff)
qlcnic: cleanup unused code
LRO ring, cut-thru mode and specific fw version are not valid to Qlogic CNA device. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c33
1 files changed, 4 insertions, 29 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index a3d010a24747..50be833c3767 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -543,22 +543,10 @@ qlcnic_check_options(struct qlcnic_adapter *adapter)
543 brd_name, adapter->ahw.revision_id); 543 brd_name, adapter->ahw.revision_id);
544 } 544 }
545 545
546 if (adapter->fw_version < QLCNIC_VERSION_CODE(3, 4, 216)) { 546 dev_info(&pdev->dev, "firmware v%d.%d.%d\n",
547 adapter->driver_mismatch = 1; 547 fw_major, fw_minor, fw_build);
548 dev_warn(&pdev->dev, "firmware version %d.%d.%d unsupported\n",
549 fw_major, fw_minor, fw_build);
550 return;
551 }
552
553 i = QLCRD32(adapter, QLCNIC_SRE_MISC);
554 adapter->ahw.cut_through = (i & 0x8000) ? 1 : 0;
555
556 dev_info(&pdev->dev, "firmware v%d.%d.%d [%s]\n",
557 fw_major, fw_minor, fw_build,
558 adapter->ahw.cut_through ? "cut-through" : "legacy");
559 548
560 if (adapter->fw_version >= QLCNIC_VERSION_CODE(4, 0, 222)) 549 adapter->capabilities = QLCRD32(adapter, CRB_FW_CAPABILITIES_1);
561 adapter->capabilities = QLCRD32(adapter, CRB_FW_CAPABILITIES_1);
562 550
563 adapter->flags &= ~QLCNIC_LRO_ENABLED; 551 adapter->flags &= ~QLCNIC_LRO_ENABLED;
564 552
@@ -575,7 +563,6 @@ qlcnic_check_options(struct qlcnic_adapter *adapter)
575 563
576 adapter->num_txd = MAX_CMD_DESCRIPTORS; 564 adapter->num_txd = MAX_CMD_DESCRIPTORS;
577 565
578 adapter->num_lro_rxd = 0;
579 adapter->max_rds_rings = 2; 566 adapter->max_rds_rings = 2;
580} 567}
581 568
@@ -2566,24 +2553,12 @@ qlcnic_remove_diag_entries(struct qlcnic_adapter *adapter)
2566 2553
2567#define is_qlcnic_netdev(dev) (dev->netdev_ops == &qlcnic_netdev_ops) 2554#define is_qlcnic_netdev(dev) (dev->netdev_ops == &qlcnic_netdev_ops)
2568 2555
2569static int
2570qlcnic_destip_supported(struct qlcnic_adapter *adapter)
2571{
2572 if (adapter->ahw.cut_through)
2573 return 0;
2574
2575 return 1;
2576}
2577
2578static void 2556static void
2579qlcnic_config_indev_addr(struct net_device *dev, unsigned long event) 2557qlcnic_config_indev_addr(struct net_device *dev, unsigned long event)
2580{ 2558{
2581 struct in_device *indev; 2559 struct in_device *indev;
2582 struct qlcnic_adapter *adapter = netdev_priv(dev); 2560 struct qlcnic_adapter *adapter = netdev_priv(dev);
2583 2561
2584 if (!qlcnic_destip_supported(adapter))
2585 return;
2586
2587 indev = in_dev_get(dev); 2562 indev = in_dev_get(dev);
2588 if (!indev) 2563 if (!indev)
2589 return; 2564 return;
@@ -2662,7 +2637,7 @@ recheck:
2662 2637
2663 adapter = netdev_priv(dev); 2638 adapter = netdev_priv(dev);
2664 2639
2665 if (!adapter || !qlcnic_destip_supported(adapter)) 2640 if (!adapter)
2666 goto done; 2641 goto done;
2667 2642
2668 if (adapter->is_up != QLCNIC_ADAPTER_UP_MAGIC) 2643 if (adapter->is_up != QLCNIC_ADAPTER_UP_MAGIC)