diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 22:54:01 +1100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 22:54:01 +1100 |
commit | 0ba6c33bcddc64a54b5f1c25a696c4767dc76292 (patch) | |
tree | 62e616f97a4762d8e75bf732e4827af2d15d52c5 /drivers/net/netxen/netxen_nic_niu.c | |
parent | 21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (diff) | |
parent | 85040bcb4643cba578839e953f25e2d1965d83d0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25: (1470 commits)
[IPV6] ADDRLABEL: Fix double free on label deletion.
[PPP]: Sparse warning fixes.
[IPV4] fib_trie: remove unneeded NULL check
[IPV4] fib_trie: More whitespace cleanup.
[NET_SCHED]: Use nla_policy for attribute validation in ematches
[NET_SCHED]: Use nla_policy for attribute validation in actions
[NET_SCHED]: Use nla_policy for attribute validation in classifiers
[NET_SCHED]: Use nla_policy for attribute validation in packet schedulers
[NET_SCHED]: sch_api: introduce constant for rate table size
[NET_SCHED]: Use typeful attribute parsing helpers
[NET_SCHED]: Use typeful attribute construction helpers
[NET_SCHED]: Use NLA_PUT_STRING for string dumping
[NET_SCHED]: Use nla_nest_start/nla_nest_end
[NET_SCHED]: Propagate nla_parse return value
[NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_get
[NET_SCHED]: act_api: use nlmsg_parse
[NET_SCHED]: act_api: fix netlink API conversion bug
[NET_SCHED]: sch_netem: use nla_parse_nested_compat
[NET_SCHED]: sch_atm: fix format string warning
[NETNS]: Add namespace for ICMP replying code.
...
Diffstat (limited to 'drivers/net/netxen/netxen_nic_niu.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_niu.c | 64 |
1 files changed, 36 insertions, 28 deletions
diff --git a/drivers/net/netxen/netxen_nic_niu.c b/drivers/net/netxen/netxen_nic_niu.c index d04ecb77d08..1c852a76c80 100644 --- a/drivers/net/netxen/netxen_nic_niu.c +++ b/drivers/net/netxen/netxen_nic_niu.c @@ -40,7 +40,7 @@ static long phy_lock_timeout = 100000000; -static inline int phy_lock(struct netxen_adapter *adapter) +static int phy_lock(struct netxen_adapter *adapter) { int i; int done = 0, timeout = 0; @@ -68,14 +68,14 @@ static inline int phy_lock(struct netxen_adapter *adapter) return 0; } -static inline int phy_unlock(struct netxen_adapter *adapter) +static int phy_unlock(struct netxen_adapter *adapter) { readl(pci_base_offset(adapter, NETXEN_PCIE_REG(PCIE_SEM3_UNLOCK))); return 0; } -/* +/* * netxen_niu_gbe_phy_read - read a register from the GbE PHY via * mii management interface. * @@ -88,7 +88,7 @@ static inline int phy_unlock(struct netxen_adapter *adapter) * -1 on error * */ -int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long reg, +int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long reg, __u32 * readval) { long timeout = 0; @@ -171,7 +171,7 @@ int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long reg, return result; } -/* +/* * netxen_niu_gbe_phy_write - write a register to the GbE PHY via * mii management interface. * @@ -184,7 +184,7 @@ int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long reg, * -1 on error * */ -int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, long reg, +int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, long reg, __u32 val) { long timeout = 0; @@ -275,7 +275,7 @@ int netxen_niu_gbe_enable_phy_interrupts(struct netxen_adapter *adapter) netxen_set_phy_int_speed_changed(enable); if (0 != - netxen_niu_gbe_phy_write(adapter, + netxen_niu_gbe_phy_write(adapter, NETXEN_NIU_GB_MII_MGMT_ADDR_INT_ENABLE, enable)) result = -EIO; @@ -300,17 +300,19 @@ int netxen_niu_gbe_disable_phy_interrupts(struct netxen_adapter *adapter) return result; } +#if 0 int netxen_niu_xgbe_clear_phy_interrupts(struct netxen_adapter *adapter) { netxen_crb_writelit_adapter(adapter, NETXEN_NIU_ACTIVE_INT, -1); return 0; } +#endif /* 0 */ -int netxen_niu_gbe_clear_phy_interrupts(struct netxen_adapter *adapter) +static int netxen_niu_gbe_clear_phy_interrupts(struct netxen_adapter *adapter) { int result = 0; if (0 != - netxen_niu_gbe_phy_write(adapter, + netxen_niu_gbe_phy_write(adapter, NETXEN_NIU_GB_MII_MGMT_ADDR_INT_STATUS, -EIO)) result = -EIO; @@ -318,12 +320,12 @@ int netxen_niu_gbe_clear_phy_interrupts(struct netxen_adapter *adapter) return result; } -/* +/* * netxen_niu_gbe_set_mii_mode- Set 10/100 Mbit Mode for GbE MAC * */ -void netxen_niu_gbe_set_mii_mode(struct netxen_adapter *adapter, - int port, long enable) +static void netxen_niu_gbe_set_mii_mode(struct netxen_adapter *adapter, + int port, long enable) { netxen_crb_writelit_adapter(adapter, NETXEN_NIU_MODE, 0x2); netxen_crb_writelit_adapter(adapter, NETXEN_NIU_GB_MAC_CONFIG_0(port), @@ -342,9 +344,9 @@ void netxen_niu_gbe_set_mii_mode(struct netxen_adapter *adapter, NETXEN_NIU_GB_MII_MGMT_CONFIG(port), 0x7); if (enable) { - /* - * Do NOT enable flow control until a suitable solution for - * shutting down pause frames is found. + /* + * Do NOT enable flow control until a suitable solution for + * shutting down pause frames is found. */ netxen_crb_writelit_adapter(adapter, NETXEN_NIU_GB_MAC_CONFIG_0(port), @@ -357,11 +359,11 @@ void netxen_niu_gbe_set_mii_mode(struct netxen_adapter *adapter, printk(KERN_ERR PFX "ERROR clearing PHY interrupts\n"); } -/* +/* * netxen_niu_gbe_set_gmii_mode- Set GbE Mode for GbE MAC */ -void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter, - int port, long enable) +static void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter, + int port, long enable) { netxen_crb_writelit_adapter(adapter, NETXEN_NIU_MODE, 0x2); netxen_crb_writelit_adapter(adapter, NETXEN_NIU_GB_MAC_CONFIG_0(port), @@ -380,9 +382,9 @@ void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter, NETXEN_NIU_GB_MII_MGMT_CONFIG(port), 0x7); if (enable) { - /* - * Do NOT enable flow control until a suitable solution for - * shutting down pause frames is found. + /* + * Do NOT enable flow control until a suitable solution for + * shutting down pause frames is found. */ netxen_crb_writelit_adapter(adapter, NETXEN_NIU_GB_MAC_CONFIG_0(port), @@ -464,7 +466,8 @@ int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port) return 0; } -/* +#if 0 +/* * netxen_niu_gbe_handle_phy_interrupt - Handles GbE PHY interrupts * @param enable 0 means don't enable the port * 1 means enable (or re-enable) the port @@ -544,8 +547,8 @@ int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter, port, enable); } else { - printk(KERN_ERR PFX "ERROR reading" - "PHY status. Illegal speed.\n"); + printk(KERN_ERR PFX "ERROR reading " + "PHY status. Invalid speed.\n"); result = -1; } } else { @@ -559,13 +562,14 @@ int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter, } return result; } +#endif /* 0 */ /* * Return the current station MAC address. * Note that the passed-in value must already be in network byte order. */ -int netxen_niu_macaddr_get(struct netxen_adapter *adapter, - netxen_ethernet_macaddr_t * addr) +static int netxen_niu_macaddr_get(struct netxen_adapter *adapter, + netxen_ethernet_macaddr_t * addr) { u32 stationhigh; u32 stationlow; @@ -619,7 +623,7 @@ int netxen_niu_macaddr_set(struct netxen_adapter *adapter, (adapter, NETXEN_NIU_GB_STATION_ADDR_0(phy), &val, 4)) return -2; - netxen_niu_macaddr_get(adapter, + netxen_niu_macaddr_get(adapter, (netxen_ethernet_macaddr_t *) mac_addr); if (memcmp(mac_addr, addr, 6) == 0) break; @@ -636,6 +640,7 @@ int netxen_niu_macaddr_set(struct netxen_adapter *adapter, return 0; } +#if 0 /* Enable a GbE interface */ int netxen_niu_enable_gbe_port(struct netxen_adapter *adapter, int port, netxen_niu_gbe_ifmode_t mode) @@ -713,6 +718,7 @@ int netxen_niu_enable_gbe_port(struct netxen_adapter *adapter, return -EIO; return 0; } +#endif /* 0 */ /* Disable a GbE interface */ int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter) @@ -747,7 +753,7 @@ int netxen_niu_disable_xg_port(struct netxen_adapter *adapter) } /* Set promiscuous mode for a GbE interface */ -int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, +int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, netxen_niu_prom_mode_t mode) { __u32 reg; @@ -853,6 +859,7 @@ int netxen_niu_xg_macaddr_set(struct netxen_adapter *adapter, return 0; } +#if 0 /* * Return the current station MAC address. * Note that the passed-in value must already be in network byte order. @@ -883,6 +890,7 @@ int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, return 0; } +#endif /* 0 */ int netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter, netxen_niu_prom_mode_t mode) |