diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-18 13:40:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 06:09:41 -0400 |
commit | 7e12bb0adb5b3114a73098d3536b3c45635e6c95 (patch) | |
tree | 2b02a2276bb026f906619957638939b4348bfa85 /drivers/net/netxen | |
parent | 9b0c290e78d667e6a483bde8c7cef7dd15f49017 (diff) |
netxen: make local function static.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 18 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 29 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 6 |
3 files changed, 16 insertions, 37 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 92f89af0720e..8e8a97839cb0 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -1256,19 +1256,9 @@ struct netxen_adapter { | |||
1256 | const struct firmware *fw; | 1256 | const struct firmware *fw; |
1257 | }; | 1257 | }; |
1258 | 1258 | ||
1259 | int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port); | ||
1260 | int netxen_niu_disable_xg_port(struct netxen_adapter *adapter); | ||
1261 | |||
1262 | int nx_fw_cmd_query_phy(struct netxen_adapter *adapter, u32 reg, u32 *val); | 1259 | int nx_fw_cmd_query_phy(struct netxen_adapter *adapter, u32 reg, u32 *val); |
1263 | int nx_fw_cmd_set_phy(struct netxen_adapter *adapter, u32 reg, u32 val); | 1260 | int nx_fw_cmd_set_phy(struct netxen_adapter *adapter, u32 reg, u32 val); |
1264 | 1261 | ||
1265 | /* Functions available from netxen_nic_hw.c */ | ||
1266 | int netxen_nic_set_mtu_xgb(struct netxen_adapter *adapter, int new_mtu); | ||
1267 | int netxen_nic_set_mtu_gb(struct netxen_adapter *adapter, int new_mtu); | ||
1268 | |||
1269 | int netxen_p2_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr); | ||
1270 | int netxen_p3_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr); | ||
1271 | |||
1272 | #define NXRD32(adapter, off) \ | 1262 | #define NXRD32(adapter, off) \ |
1273 | (adapter->crb_read(adapter, off)) | 1263 | (adapter->crb_read(adapter, off)) |
1274 | #define NXWR32(adapter, off, val) \ | 1264 | #define NXWR32(adapter, off, val) \ |
@@ -1348,11 +1338,8 @@ void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid, | |||
1348 | struct nx_host_rds_ring *rds_ring); | 1338 | struct nx_host_rds_ring *rds_ring); |
1349 | int netxen_process_cmd_ring(struct netxen_adapter *adapter); | 1339 | int netxen_process_cmd_ring(struct netxen_adapter *adapter); |
1350 | int netxen_process_rcv_ring(struct nx_host_sds_ring *sds_ring, int max); | 1340 | int netxen_process_rcv_ring(struct nx_host_sds_ring *sds_ring, int max); |
1351 | void netxen_p2_nic_set_multi(struct net_device *netdev); | 1341 | |
1352 | void netxen_p3_nic_set_multi(struct net_device *netdev); | ||
1353 | void netxen_p3_free_mac_list(struct netxen_adapter *adapter); | 1342 | void netxen_p3_free_mac_list(struct netxen_adapter *adapter); |
1354 | int netxen_p2_nic_set_promisc(struct netxen_adapter *adapter, u32 mode); | ||
1355 | int netxen_p3_nic_set_promisc(struct netxen_adapter *adapter, u32); | ||
1356 | int netxen_config_intr_coalesce(struct netxen_adapter *adapter); | 1343 | int netxen_config_intr_coalesce(struct netxen_adapter *adapter); |
1357 | int netxen_config_rss(struct netxen_adapter *adapter, int enable); | 1344 | int netxen_config_rss(struct netxen_adapter *adapter, int enable); |
1358 | int netxen_config_ipaddr(struct netxen_adapter *adapter, u32 ip, int cmd); | 1345 | int netxen_config_ipaddr(struct netxen_adapter *adapter, u32 ip, int cmd); |
@@ -1367,9 +1354,6 @@ int netxen_config_hw_lro(struct netxen_adapter *adapter, int enable); | |||
1367 | int netxen_config_bridged_mode(struct netxen_adapter *adapter, int enable); | 1354 | int netxen_config_bridged_mode(struct netxen_adapter *adapter, int enable); |
1368 | int netxen_send_lro_cleanup(struct netxen_adapter *adapter); | 1355 | int netxen_send_lro_cleanup(struct netxen_adapter *adapter); |
1369 | 1356 | ||
1370 | int netxen_nic_set_mac(struct net_device *netdev, void *p); | ||
1371 | struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev); | ||
1372 | |||
1373 | void netxen_nic_update_cmd_producer(struct netxen_adapter *adapter, | 1357 | void netxen_nic_update_cmd_producer(struct netxen_adapter *adapter, |
1374 | struct nx_host_tx_ring *tx_ring); | 1358 | struct nx_host_tx_ring *tx_ring); |
1375 | 1359 | ||
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 4b4ac7106786..37d3ebd65be8 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -319,6 +319,8 @@ static unsigned crb_hub_agt[64] = | |||
319 | 319 | ||
320 | #define NETXEN_PCIE_SEM_TIMEOUT 10000 | 320 | #define NETXEN_PCIE_SEM_TIMEOUT 10000 |
321 | 321 | ||
322 | static int netxen_nic_set_mtu_xgb(struct netxen_adapter *adapter, int new_mtu); | ||
323 | |||
322 | int | 324 | int |
323 | netxen_pcie_sem_lock(struct netxen_adapter *adapter, int sem, u32 id_reg) | 325 | netxen_pcie_sem_lock(struct netxen_adapter *adapter, int sem, u32 id_reg) |
324 | { | 326 | { |
@@ -345,7 +347,7 @@ netxen_pcie_sem_unlock(struct netxen_adapter *adapter, int sem) | |||
345 | NXRD32(adapter, NETXEN_PCIE_REG(PCIE_SEM_UNLOCK(sem))); | 347 | NXRD32(adapter, NETXEN_PCIE_REG(PCIE_SEM_UNLOCK(sem))); |
346 | } | 348 | } |
347 | 349 | ||
348 | int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port) | 350 | static int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port) |
349 | { | 351 | { |
350 | if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { | 352 | if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { |
351 | NXWR32(adapter, NETXEN_NIU_XGE_CONFIG_1+(0x10000*port), 0x1447); | 353 | NXWR32(adapter, NETXEN_NIU_XGE_CONFIG_1+(0x10000*port), 0x1447); |
@@ -356,7 +358,7 @@ int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port) | |||
356 | } | 358 | } |
357 | 359 | ||
358 | /* Disable an XG interface */ | 360 | /* Disable an XG interface */ |
359 | int netxen_niu_disable_xg_port(struct netxen_adapter *adapter) | 361 | static int netxen_niu_disable_xg_port(struct netxen_adapter *adapter) |
360 | { | 362 | { |
361 | __u32 mac_cfg; | 363 | __u32 mac_cfg; |
362 | u32 port = adapter->physical_port; | 364 | u32 port = adapter->physical_port; |
@@ -383,7 +385,7 @@ int netxen_niu_disable_xg_port(struct netxen_adapter *adapter) | |||
383 | #define MAC_LO(addr) \ | 385 | #define MAC_LO(addr) \ |
384 | ((addr[5] << 16) | (addr[4] << 8) | (addr[3])) | 386 | ((addr[5] << 16) | (addr[4] << 8) | (addr[3])) |
385 | 387 | ||
386 | int netxen_p2_nic_set_promisc(struct netxen_adapter *adapter, u32 mode) | 388 | static int netxen_p2_nic_set_promisc(struct netxen_adapter *adapter, u32 mode) |
387 | { | 389 | { |
388 | u32 mac_cfg; | 390 | u32 mac_cfg; |
389 | u32 cnt = 0; | 391 | u32 cnt = 0; |
@@ -434,7 +436,7 @@ int netxen_p2_nic_set_promisc(struct netxen_adapter *adapter, u32 mode) | |||
434 | return 0; | 436 | return 0; |
435 | } | 437 | } |
436 | 438 | ||
437 | int netxen_p2_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr) | 439 | static int netxen_p2_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr) |
438 | { | 440 | { |
439 | u32 mac_hi, mac_lo; | 441 | u32 mac_hi, mac_lo; |
440 | u32 reg_hi, reg_lo; | 442 | u32 reg_hi, reg_lo; |
@@ -531,7 +533,7 @@ netxen_nic_set_mcast_addr(struct netxen_adapter *adapter, | |||
531 | return 0; | 533 | return 0; |
532 | } | 534 | } |
533 | 535 | ||
534 | void netxen_p2_nic_set_multi(struct net_device *netdev) | 536 | static void netxen_p2_nic_set_multi(struct net_device *netdev) |
535 | { | 537 | { |
536 | struct netxen_adapter *adapter = netdev_priv(netdev); | 538 | struct netxen_adapter *adapter = netdev_priv(netdev); |
537 | struct netdev_hw_addr *ha; | 539 | struct netdev_hw_addr *ha; |
@@ -680,7 +682,7 @@ static int nx_p3_nic_add_mac(struct netxen_adapter *adapter, | |||
680 | cur->mac_addr, NETXEN_MAC_ADD); | 682 | cur->mac_addr, NETXEN_MAC_ADD); |
681 | } | 683 | } |
682 | 684 | ||
683 | void netxen_p3_nic_set_multi(struct net_device *netdev) | 685 | static void netxen_p3_nic_set_multi(struct net_device *netdev) |
684 | { | 686 | { |
685 | struct netxen_adapter *adapter = netdev_priv(netdev); | 687 | struct netxen_adapter *adapter = netdev_priv(netdev); |
686 | struct netdev_hw_addr *ha; | 688 | struct netdev_hw_addr *ha; |
@@ -727,7 +729,7 @@ send_fw_cmd: | |||
727 | } | 729 | } |
728 | } | 730 | } |
729 | 731 | ||
730 | int netxen_p3_nic_set_promisc(struct netxen_adapter *adapter, u32 mode) | 732 | static int netxen_p3_nic_set_promisc(struct netxen_adapter *adapter, u32 mode) |
731 | { | 733 | { |
732 | nx_nic_req_t req; | 734 | nx_nic_req_t req; |
733 | u64 word; | 735 | u64 word; |
@@ -760,7 +762,7 @@ void netxen_p3_free_mac_list(struct netxen_adapter *adapter) | |||
760 | } | 762 | } |
761 | } | 763 | } |
762 | 764 | ||
763 | int netxen_p3_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr) | 765 | static int netxen_p3_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr) |
764 | { | 766 | { |
765 | /* assuming caller has already copied new addr to netdev */ | 767 | /* assuming caller has already copied new addr to netdev */ |
766 | netxen_p3_nic_set_multi(adapter->netdev); | 768 | netxen_p3_nic_set_multi(adapter->netdev); |
@@ -1873,16 +1875,7 @@ int netxen_nic_get_board_info(struct netxen_adapter *adapter) | |||
1873 | } | 1875 | } |
1874 | 1876 | ||
1875 | /* NIU access sections */ | 1877 | /* NIU access sections */ |
1876 | 1878 | static int netxen_nic_set_mtu_xgb(struct netxen_adapter *adapter, int new_mtu) | |
1877 | int netxen_nic_set_mtu_gb(struct netxen_adapter *adapter, int new_mtu) | ||
1878 | { | ||
1879 | new_mtu += MTU_FUDGE_FACTOR; | ||
1880 | NXWR32(adapter, NETXEN_NIU_GB_MAX_FRAME_SIZE(adapter->physical_port), | ||
1881 | new_mtu); | ||
1882 | return 0; | ||
1883 | } | ||
1884 | |||
1885 | int netxen_nic_set_mtu_xgb(struct netxen_adapter *adapter, int new_mtu) | ||
1886 | { | 1879 | { |
1887 | new_mtu += MTU_FUDGE_FACTOR; | 1880 | new_mtu += MTU_FUDGE_FACTOR; |
1888 | if (adapter->physical_port == 0) | 1881 | if (adapter->physical_port == 0) |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 6f111691aca4..50820beac3aa 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -95,6 +95,8 @@ static irqreturn_t netxen_msi_intr(int irq, void *data); | |||
95 | static irqreturn_t netxen_msix_intr(int irq, void *data); | 95 | static irqreturn_t netxen_msix_intr(int irq, void *data); |
96 | 96 | ||
97 | static void netxen_config_indev_addr(struct net_device *dev, unsigned long); | 97 | static void netxen_config_indev_addr(struct net_device *dev, unsigned long); |
98 | static struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev); | ||
99 | static int netxen_nic_set_mac(struct net_device *netdev, void *p); | ||
98 | 100 | ||
99 | /* PCI Device ID Table */ | 101 | /* PCI Device ID Table */ |
100 | #define ENTRY(device) \ | 102 | #define ENTRY(device) \ |
@@ -455,7 +457,7 @@ netxen_read_mac_addr(struct netxen_adapter *adapter) | |||
455 | return 0; | 457 | return 0; |
456 | } | 458 | } |
457 | 459 | ||
458 | int netxen_nic_set_mac(struct net_device *netdev, void *p) | 460 | static int netxen_nic_set_mac(struct net_device *netdev, void *p) |
459 | { | 461 | { |
460 | struct netxen_adapter *adapter = netdev_priv(netdev); | 462 | struct netxen_adapter *adapter = netdev_priv(netdev); |
461 | struct sockaddr *addr = p; | 463 | struct sockaddr *addr = p; |
@@ -2052,7 +2054,7 @@ request_reset: | |||
2052 | clear_bit(__NX_RESETTING, &adapter->state); | 2054 | clear_bit(__NX_RESETTING, &adapter->state); |
2053 | } | 2055 | } |
2054 | 2056 | ||
2055 | struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) | 2057 | static struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) |
2056 | { | 2058 | { |
2057 | struct netxen_adapter *adapter = netdev_priv(netdev); | 2059 | struct netxen_adapter *adapter = netdev_priv(netdev); |
2058 | struct net_device_stats *stats = &netdev->stats; | 2060 | struct net_device_stats *stats = &netdev->stats; |