projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aaba215
)
tg3: Check all adv bits when checking config
author
Matt Carlson
<
[email protected]
>
Wed, 31 Aug 2011 11:44:47 +0000
(11:44 +0000)
committer
David S. Miller
<
[email protected]
>
Thu, 15 Sep 2011 19:56:39 +0000
(15:56 -0400)
This patch makes sure the driver checks all advertisement bits when
checking the current hw advertisements.
Signed-off-by: Matt Carlson <
[email protected]
>
Reviewed-by: Benjamin Li <
[email protected]
>
Reviewed-by: Michael Chan <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/tg3.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/tg3.c
b/drivers/net/ethernet/broadcom/tg3.c
index a7e28a2c5348596fa7ff9e16f50e7487559d9005..4e9aedada6a55d79352b02523313d892ad9f9606 100644
(file)
--- a/
drivers/net/ethernet/broadcom/tg3.c
+++ b/
drivers/net/ethernet/broadcom/tg3.c
@@
-3334,8
+3334,9
@@
static int tg3_copper_is_advertising_all(struct tg3 *tp, u32 mask)
if (tg3_readphy(tp, MII_ADVERTISE, &adv_reg))
return 0;
- if ((adv_reg &
all_mask
) != all_mask)
+ if ((adv_reg &
ADVERTISE_ALL
) != all_mask)
return 0;
+
if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
u32 tg3_ctrl;
@@
-3348,7
+3349,8
@@
static int tg3_copper_is_advertising_all(struct tg3 *tp, u32 mask)
if (tg3_readphy(tp, MII_CTRL1000, &tg3_ctrl))
return 0;
- if ((tg3_ctrl & all_mask) != all_mask)
+ tg3_ctrl &= (ADVERTISE_1000HALF | ADVERTISE_1000FULL);
+ if (tg3_ctrl != all_mask)
return 0;
}
return 1;