diff options
author | Nick Nunley <nicholasx.d.nunley@intel.com> | 2010-07-01 09:37:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-02 01:45:55 -0400 |
commit | ede3ef0d940ef052466f42c849390b23c6859abc (patch) | |
tree | bf222dc6133e09189011fa39ba02ec2f96c7644e /drivers/net/igb | |
parent | 7475271004b66e9c22e1bb28f240a38c5d6fe76e (diff) |
igb: fix PHY config access on 82580
82580 NICs can have up to 4 functions. This fixes phy accesses
to use the correct locks for functions 2 and 3.
Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/e1000_82575.c | 8 | ||||
-rw-r--r-- | drivers/net/igb/e1000_defines.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c index 86438b59fa21..06251a9e9f1b 100644 --- a/drivers/net/igb/e1000_82575.c +++ b/drivers/net/igb/e1000_82575.c | |||
@@ -295,6 +295,10 @@ static s32 igb_acquire_phy_82575(struct e1000_hw *hw) | |||
295 | 295 | ||
296 | if (hw->bus.func == E1000_FUNC_1) | 296 | if (hw->bus.func == E1000_FUNC_1) |
297 | mask = E1000_SWFW_PHY1_SM; | 297 | mask = E1000_SWFW_PHY1_SM; |
298 | else if (hw->bus.func == E1000_FUNC_2) | ||
299 | mask = E1000_SWFW_PHY2_SM; | ||
300 | else if (hw->bus.func == E1000_FUNC_3) | ||
301 | mask = E1000_SWFW_PHY3_SM; | ||
298 | 302 | ||
299 | return igb_acquire_swfw_sync_82575(hw, mask); | 303 | return igb_acquire_swfw_sync_82575(hw, mask); |
300 | } | 304 | } |
@@ -312,6 +316,10 @@ static void igb_release_phy_82575(struct e1000_hw *hw) | |||
312 | 316 | ||
313 | if (hw->bus.func == E1000_FUNC_1) | 317 | if (hw->bus.func == E1000_FUNC_1) |
314 | mask = E1000_SWFW_PHY1_SM; | 318 | mask = E1000_SWFW_PHY1_SM; |
319 | else if (hw->bus.func == E1000_FUNC_2) | ||
320 | mask = E1000_SWFW_PHY2_SM; | ||
321 | else if (hw->bus.func == E1000_FUNC_3) | ||
322 | mask = E1000_SWFW_PHY3_SM; | ||
315 | 323 | ||
316 | igb_release_swfw_sync_82575(hw, mask); | 324 | igb_release_swfw_sync_82575(hw, mask); |
317 | } | 325 | } |
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h index 24d9be64342f..90bc29d7e182 100644 --- a/drivers/net/igb/e1000_defines.h +++ b/drivers/net/igb/e1000_defines.h | |||
@@ -164,6 +164,8 @@ | |||
164 | #define E1000_SWFW_EEP_SM 0x1 | 164 | #define E1000_SWFW_EEP_SM 0x1 |
165 | #define E1000_SWFW_PHY0_SM 0x2 | 165 | #define E1000_SWFW_PHY0_SM 0x2 |
166 | #define E1000_SWFW_PHY1_SM 0x4 | 166 | #define E1000_SWFW_PHY1_SM 0x4 |
167 | #define E1000_SWFW_PHY2_SM 0x20 | ||
168 | #define E1000_SWFW_PHY3_SM 0x40 | ||
167 | 169 | ||
168 | /* FACTPS Definitions */ | 170 | /* FACTPS Definitions */ |
169 | /* Device Control */ | 171 | /* Device Control */ |