diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-04 11:44:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-05 03:47:37 -0400 |
commit | debf279a81c93d6942a50ec0fd3ba1f158b109fb (patch) | |
tree | 7dbe8b95b9c79bf1720621fe84e9c21dc1653d24 /drivers/net | |
parent | ee624599d32bc698212d3c04faf908dc01a40457 (diff) |
qlcnic: remove dead code
This driver has several pieces of dead code (found by running
make namespacecheck). This patch removes them.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/qlcnic/qlcnic.h | 7 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ctx.c | 169 |
2 files changed, 0 insertions, 176 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 42a288348aca..a1fabdc10b59 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h | |||
@@ -1323,19 +1323,12 @@ netdev_tx_t qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev); | |||
1323 | void qlcnic_process_rcv_ring_diag(struct qlcnic_host_sds_ring *sds_ring); | 1323 | void qlcnic_process_rcv_ring_diag(struct qlcnic_host_sds_ring *sds_ring); |
1324 | 1324 | ||
1325 | /* Management functions */ | 1325 | /* Management functions */ |
1326 | int qlcnic_set_mac_address(struct qlcnic_adapter *, u8*); | ||
1327 | int qlcnic_get_mac_address(struct qlcnic_adapter *, u8*); | 1326 | int qlcnic_get_mac_address(struct qlcnic_adapter *, u8*); |
1328 | int qlcnic_get_nic_info(struct qlcnic_adapter *, struct qlcnic_info *, u8); | 1327 | int qlcnic_get_nic_info(struct qlcnic_adapter *, struct qlcnic_info *, u8); |
1329 | int qlcnic_set_nic_info(struct qlcnic_adapter *, struct qlcnic_info *); | 1328 | int qlcnic_set_nic_info(struct qlcnic_adapter *, struct qlcnic_info *); |
1330 | int qlcnic_get_pci_info(struct qlcnic_adapter *, struct qlcnic_pci_info*); | 1329 | int qlcnic_get_pci_info(struct qlcnic_adapter *, struct qlcnic_pci_info*); |
1331 | int qlcnic_reset_partition(struct qlcnic_adapter *, u8); | ||
1332 | 1330 | ||
1333 | /* eSwitch management functions */ | 1331 | /* eSwitch management functions */ |
1334 | int qlcnic_get_eswitch_capabilities(struct qlcnic_adapter *, u8, | ||
1335 | struct qlcnic_eswitch *); | ||
1336 | int qlcnic_get_eswitch_status(struct qlcnic_adapter *, u8, | ||
1337 | struct qlcnic_eswitch *); | ||
1338 | int qlcnic_toggle_eswitch(struct qlcnic_adapter *, u8, u8); | ||
1339 | int qlcnic_config_switch_port(struct qlcnic_adapter *, | 1332 | int qlcnic_config_switch_port(struct qlcnic_adapter *, |
1340 | struct qlcnic_esw_func_cfg *); | 1333 | struct qlcnic_esw_func_cfg *); |
1341 | int qlcnic_get_eswitch_port_config(struct qlcnic_adapter *, | 1334 | int qlcnic_get_eswitch_port_config(struct qlcnic_adapter *, |
diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c index 75e3b19e35ee..1cdc05dade6b 100644 --- a/drivers/net/qlcnic/qlcnic_ctx.c +++ b/drivers/net/qlcnic/qlcnic_ctx.c | |||
@@ -556,32 +556,6 @@ void qlcnic_free_hw_resources(struct qlcnic_adapter *adapter) | |||
556 | } | 556 | } |
557 | } | 557 | } |
558 | 558 | ||
559 | /* Set MAC address of a NIC partition */ | ||
560 | int qlcnic_set_mac_address(struct qlcnic_adapter *adapter, u8* mac) | ||
561 | { | ||
562 | int err = 0; | ||
563 | u32 arg1, arg2, arg3; | ||
564 | |||
565 | arg1 = adapter->ahw.pci_func | BIT_9; | ||
566 | arg2 = mac[0] | (mac[1] << 8) | (mac[2] << 16) | (mac[3] << 24); | ||
567 | arg3 = mac[4] | (mac[5] << 16); | ||
568 | |||
569 | err = qlcnic_issue_cmd(adapter, | ||
570 | adapter->ahw.pci_func, | ||
571 | adapter->fw_hal_version, | ||
572 | arg1, | ||
573 | arg2, | ||
574 | arg3, | ||
575 | QLCNIC_CDRP_CMD_MAC_ADDRESS); | ||
576 | |||
577 | if (err != QLCNIC_RCODE_SUCCESS) { | ||
578 | dev_err(&adapter->pdev->dev, | ||
579 | "Failed to set mac address%d\n", err); | ||
580 | err = -EIO; | ||
581 | } | ||
582 | |||
583 | return err; | ||
584 | } | ||
585 | 559 | ||
586 | /* Get MAC address of a NIC partition */ | 560 | /* Get MAC address of a NIC partition */ |
587 | int qlcnic_get_mac_address(struct qlcnic_adapter *adapter, u8 *mac) | 561 | int qlcnic_get_mac_address(struct qlcnic_adapter *adapter, u8 *mac) |
@@ -764,149 +738,6 @@ int qlcnic_get_pci_info(struct qlcnic_adapter *adapter, | |||
764 | return err; | 738 | return err; |
765 | } | 739 | } |
766 | 740 | ||
767 | /* Reset a NIC partition */ | ||
768 | |||
769 | int qlcnic_reset_partition(struct qlcnic_adapter *adapter, u8 func_no) | ||
770 | { | ||
771 | int err = -EIO; | ||
772 | |||
773 | if (adapter->op_mode != QLCNIC_MGMT_FUNC) | ||
774 | return err; | ||
775 | |||
776 | err = qlcnic_issue_cmd(adapter, | ||
777 | adapter->ahw.pci_func, | ||
778 | adapter->fw_hal_version, | ||
779 | func_no, | ||
780 | 0, | ||
781 | 0, | ||
782 | QLCNIC_CDRP_CMD_RESET_NPAR); | ||
783 | |||
784 | if (err != QLCNIC_RCODE_SUCCESS) { | ||
785 | dev_err(&adapter->pdev->dev, | ||
786 | "Failed to issue reset partition%d\n", err); | ||
787 | err = -EIO; | ||
788 | } | ||
789 | |||
790 | return err; | ||
791 | } | ||
792 | |||
793 | /* Get eSwitch Capabilities */ | ||
794 | int qlcnic_get_eswitch_capabilities(struct qlcnic_adapter *adapter, u8 port, | ||
795 | struct qlcnic_eswitch *eswitch) | ||
796 | { | ||
797 | int err = -EIO; | ||
798 | u32 arg1, arg2; | ||
799 | |||
800 | if (adapter->op_mode == QLCNIC_NON_PRIV_FUNC) | ||
801 | return err; | ||
802 | |||
803 | err = qlcnic_issue_cmd(adapter, | ||
804 | adapter->ahw.pci_func, | ||
805 | adapter->fw_hal_version, | ||
806 | port, | ||
807 | 0, | ||
808 | 0, | ||
809 | QLCNIC_CDRP_CMD_GET_ESWITCH_CAPABILITY); | ||
810 | |||
811 | if (err == QLCNIC_RCODE_SUCCESS) { | ||
812 | arg1 = QLCRD32(adapter, QLCNIC_ARG1_CRB_OFFSET); | ||
813 | arg2 = QLCRD32(adapter, QLCNIC_ARG2_CRB_OFFSET); | ||
814 | |||
815 | eswitch->port = arg1 & 0xf; | ||
816 | eswitch->max_ucast_filters = LSW(arg2); | ||
817 | eswitch->max_active_vlans = MSW(arg2) & 0xfff; | ||
818 | if (arg1 & BIT_6) | ||
819 | eswitch->flags |= QLCNIC_SWITCH_VLAN_FILTERING; | ||
820 | if (arg1 & BIT_7) | ||
821 | eswitch->flags |= QLCNIC_SWITCH_PROMISC_MODE; | ||
822 | if (arg1 & BIT_8) | ||
823 | eswitch->flags |= QLCNIC_SWITCH_PORT_MIRRORING; | ||
824 | } else { | ||
825 | dev_err(&adapter->pdev->dev, | ||
826 | "Failed to get eswitch capabilities%d\n", err); | ||
827 | } | ||
828 | |||
829 | return err; | ||
830 | } | ||
831 | |||
832 | /* Get current status of eswitch */ | ||
833 | int qlcnic_get_eswitch_status(struct qlcnic_adapter *adapter, u8 port, | ||
834 | struct qlcnic_eswitch *eswitch) | ||
835 | { | ||
836 | int err = -EIO; | ||
837 | u32 arg1, arg2; | ||
838 | |||
839 | if (adapter->op_mode != QLCNIC_MGMT_FUNC) | ||
840 | return err; | ||
841 | |||
842 | err = qlcnic_issue_cmd(adapter, | ||
843 | adapter->ahw.pci_func, | ||
844 | adapter->fw_hal_version, | ||
845 | port, | ||
846 | 0, | ||
847 | 0, | ||
848 | QLCNIC_CDRP_CMD_GET_ESWITCH_STATUS); | ||
849 | |||
850 | if (err == QLCNIC_RCODE_SUCCESS) { | ||
851 | arg1 = QLCRD32(adapter, QLCNIC_ARG1_CRB_OFFSET); | ||
852 | arg2 = QLCRD32(adapter, QLCNIC_ARG2_CRB_OFFSET); | ||
853 | |||
854 | eswitch->port = arg1 & 0xf; | ||
855 | eswitch->active_vports = LSB(arg2); | ||
856 | eswitch->active_ucast_filters = MSB(arg2); | ||
857 | eswitch->active_vlans = LSB(MSW(arg2)); | ||
858 | if (arg1 & BIT_6) | ||
859 | eswitch->flags |= QLCNIC_SWITCH_VLAN_FILTERING; | ||
860 | if (arg1 & BIT_8) | ||
861 | eswitch->flags |= QLCNIC_SWITCH_PORT_MIRRORING; | ||
862 | |||
863 | } else { | ||
864 | dev_err(&adapter->pdev->dev, | ||
865 | "Failed to get eswitch status%d\n", err); | ||
866 | } | ||
867 | |||
868 | return err; | ||
869 | } | ||
870 | |||
871 | /* Enable/Disable eSwitch */ | ||
872 | int qlcnic_toggle_eswitch(struct qlcnic_adapter *adapter, u8 id, u8 enable) | ||
873 | { | ||
874 | int err = -EIO; | ||
875 | u32 arg1, arg2; | ||
876 | struct qlcnic_eswitch *eswitch; | ||
877 | |||
878 | if (adapter->op_mode != QLCNIC_MGMT_FUNC) | ||
879 | return err; | ||
880 | |||
881 | eswitch = &adapter->eswitch[id]; | ||
882 | if (!eswitch) | ||
883 | return err; | ||
884 | |||
885 | arg1 = eswitch->port | (enable ? BIT_4 : 0); | ||
886 | arg2 = eswitch->active_vports | (eswitch->max_ucast_filters << 8) | | ||
887 | (eswitch->max_active_vlans << 16); | ||
888 | err = qlcnic_issue_cmd(adapter, | ||
889 | adapter->ahw.pci_func, | ||
890 | adapter->fw_hal_version, | ||
891 | arg1, | ||
892 | arg2, | ||
893 | 0, | ||
894 | QLCNIC_CDRP_CMD_TOGGLE_ESWITCH); | ||
895 | |||
896 | if (err != QLCNIC_RCODE_SUCCESS) { | ||
897 | dev_err(&adapter->pdev->dev, | ||
898 | "Failed to enable eswitch%d\n", eswitch->port); | ||
899 | eswitch->flags &= ~QLCNIC_SWITCH_ENABLE; | ||
900 | err = -EIO; | ||
901 | } else { | ||
902 | eswitch->flags |= QLCNIC_SWITCH_ENABLE; | ||
903 | dev_info(&adapter->pdev->dev, | ||
904 | "Enabled eSwitch for port %d\n", eswitch->port); | ||
905 | } | ||
906 | |||
907 | return err; | ||
908 | } | ||
909 | |||
910 | /* Configure eSwitch for port mirroring */ | 741 | /* Configure eSwitch for port mirroring */ |
911 | int qlcnic_config_port_mirroring(struct qlcnic_adapter *adapter, u8 id, | 742 | int qlcnic_config_port_mirroring(struct qlcnic_adapter *adapter, u8 id, |
912 | u8 enable_mirroring, u8 pci_func) | 743 | u8 enable_mirroring, u8 pci_func) |