diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2008-08-01 06:14:55 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-07 02:11:07 -0400 |
commit | 24a7a45511f89959b4f1dc60a66260d09777901a (patch) | |
tree | ef48a3f9c6f65ba98f047b38937f71baef4a95ed /drivers/net/netxen/netxen_nic_hw.c | |
parent | 4ad7a018cf4ac3cbad661c28c0f783ee0a6e3bf6 (diff) |
netxen: fix link status, link speed
For NX3031, the phy is managed by firmware, so driver should avoid
setting any phy registers.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 96a3bc6426e2..008a6e7ffa00 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -2074,12 +2074,22 @@ void netxen_nic_set_link_parameters(struct netxen_adapter *adapter) | |||
2074 | __u32 status; | 2074 | __u32 status; |
2075 | __u32 autoneg; | 2075 | __u32 autoneg; |
2076 | __u32 mode; | 2076 | __u32 mode; |
2077 | __u32 port_mode; | ||
2077 | 2078 | ||
2078 | netxen_nic_read_w0(adapter, NETXEN_NIU_MODE, &mode); | 2079 | netxen_nic_read_w0(adapter, NETXEN_NIU_MODE, &mode); |
2079 | if (netxen_get_niu_enable_ge(mode)) { /* Gb 10/100/1000 Mbps mode */ | 2080 | if (netxen_get_niu_enable_ge(mode)) { /* Gb 10/100/1000 Mbps mode */ |
2081 | |||
2082 | adapter->hw_read_wx(adapter, | ||
2083 | NETXEN_PORT_MODE_ADDR, &port_mode, 4); | ||
2084 | if (port_mode == NETXEN_PORT_MODE_802_3_AP) { | ||
2085 | adapter->link_speed = SPEED_1000; | ||
2086 | adapter->link_duplex = DUPLEX_FULL; | ||
2087 | adapter->link_autoneg = AUTONEG_DISABLE; | ||
2088 | return; | ||
2089 | } | ||
2090 | |||
2080 | if (adapter->phy_read | 2091 | if (adapter->phy_read |
2081 | && adapter-> | 2092 | && adapter->phy_read(adapter, |
2082 | phy_read(adapter, | ||
2083 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, | 2093 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, |
2084 | &status) == 0) { | 2094 | &status) == 0) { |
2085 | if (netxen_get_phy_link(status)) { | 2095 | if (netxen_get_phy_link(status)) { |
@@ -2109,8 +2119,7 @@ void netxen_nic_set_link_parameters(struct netxen_adapter *adapter) | |||
2109 | break; | 2119 | break; |
2110 | } | 2120 | } |
2111 | if (adapter->phy_read | 2121 | if (adapter->phy_read |
2112 | && adapter-> | 2122 | && adapter->phy_read(adapter, |
2113 | phy_read(adapter, | ||
2114 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, | 2123 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, |
2115 | &autoneg) != 0) | 2124 | &autoneg) != 0) |
2116 | adapter->link_autoneg = autoneg; | 2125 | adapter->link_autoneg = autoneg; |