diff options
author | Mithlesh Thukral <mithlesh@netxen.com> | 2007-04-20 10:53:05 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 11:01:05 -0400 |
commit | 13ba9c7714cfa40821d29090442de14d01d6eb33 (patch) | |
tree | 3e588342e36e85fb557c46e18efabbac6c69f80c /drivers/net/netxen/netxen_nic_hw.c | |
parent | 3176ff3ee71bddbd1d68e6a9e28dbcf0a2960c95 (diff) |
NetXen: Removal of redundant argument passing
NetXen: Removal of redundant function call parameters and bug fixes.
This patch will remove the redundant paramters which were being passed to
many functions since now adapter->portnum can be used.
Signed-off-by: Mithlesh Thukral <mithlesh@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 50430911c800..5ed8c60c906f 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -587,7 +587,7 @@ void netxen_nic_pci_change_crbwindow(struct netxen_adapter *adapter, u32 wndw) | |||
587 | 587 | ||
588 | if (adapter->curr_window == wndw) | 588 | if (adapter->curr_window == wndw) |
589 | return; | 589 | return; |
590 | switch(adapter->portnum) { | 590 | switch(adapter->ahw.pci_func) { |
591 | case 0: | 591 | case 0: |
592 | offset = PCI_OFFSET_SECOND_RANGE(adapter, | 592 | offset = PCI_OFFSET_SECOND_RANGE(adapter, |
593 | NETXEN_PCIX_PH_REG(PCIX_CRB_WINDOW)); | 593 | NETXEN_PCIX_PH_REG(PCIX_CRB_WINDOW)); |
@@ -606,7 +606,7 @@ void netxen_nic_pci_change_crbwindow(struct netxen_adapter *adapter, u32 wndw) | |||
606 | break; | 606 | break; |
607 | default: | 607 | default: |
608 | printk(KERN_INFO "Changing the window for PCI function" | 608 | printk(KERN_INFO "Changing the window for PCI function" |
609 | "%d\n", adapter->portnum); | 609 | "%d\n", adapter->ahw.pci_func); |
610 | offset = PCI_OFFSET_SECOND_RANGE(adapter, | 610 | offset = PCI_OFFSET_SECOND_RANGE(adapter, |
611 | NETXEN_PCIX_PH_REG(PCIX_CRB_WINDOW)); | 611 | NETXEN_PCIX_PH_REG(PCIX_CRB_WINDOW)); |
612 | break; | 612 | break; |
@@ -881,6 +881,17 @@ netxen_nic_pci_set_window(struct netxen_adapter *adapter, | |||
881 | return addr; | 881 | return addr; |
882 | } | 882 | } |
883 | 883 | ||
884 | int | ||
885 | netxen_nic_erase_pxe(struct netxen_adapter *adapter) | ||
886 | { | ||
887 | if (netxen_rom_fast_write(adapter, PXE_START, 0) == -1) { | ||
888 | printk(KERN_ERR "%s: erase pxe failed\n", | ||
889 | netxen_nic_driver_name); | ||
890 | return -1; | ||
891 | } | ||
892 | return 0; | ||
893 | } | ||
894 | |||
884 | int netxen_nic_get_board_info(struct netxen_adapter *adapter) | 895 | int netxen_nic_get_board_info(struct netxen_adapter *adapter) |
885 | { | 896 | { |
886 | int rv = 0; | 897 | int rv = 0; |
@@ -991,7 +1002,7 @@ void netxen_nic_set_link_parameters(struct netxen_adapter *adapter) | |||
991 | if (netxen_get_niu_enable_ge(mode)) { /* Gb 10/100/1000 Mbps mode */ | 1002 | if (netxen_get_niu_enable_ge(mode)) { /* Gb 10/100/1000 Mbps mode */ |
992 | if (adapter->phy_read | 1003 | if (adapter->phy_read |
993 | && adapter-> | 1004 | && adapter-> |
994 | phy_read(adapter, adapter->portnum, | 1005 | phy_read(adapter, |
995 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, | 1006 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, |
996 | &status) == 0) { | 1007 | &status) == 0) { |
997 | if (netxen_get_phy_link(status)) { | 1008 | if (netxen_get_phy_link(status)) { |
@@ -1022,7 +1033,7 @@ void netxen_nic_set_link_parameters(struct netxen_adapter *adapter) | |||
1022 | } | 1033 | } |
1023 | if (adapter->phy_read | 1034 | if (adapter->phy_read |
1024 | && adapter-> | 1035 | && adapter-> |
1025 | phy_read(adapter, adapter->portnum, | 1036 | phy_read(adapter, |
1026 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, | 1037 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, |
1027 | &autoneg) != 0) | 1038 | &autoneg) != 0) |
1028 | adapter->link_autoneg = autoneg; | 1039 | adapter->link_autoneg = autoneg; |