Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10916
b: refs/heads/master
c: 37ff238
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and Jeff Garzik committed Oct 28, 2005
1 parent 684a408 commit 8489991
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28fbef78a420acdea20570d31f3bdcbfa0cac0d2
refs/heads/master: 37ff238d68683d42e7363eee3303773906c336d9
18 changes: 14 additions & 4 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@

#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.42"
#define DRV_MODULE_RELDATE "Oct 3, 2005"
#define DRV_MODULE_VERSION "3.43"
#define DRV_MODULE_RELDATE "Oct 24, 2005"

#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
Expand Down Expand Up @@ -7279,15 +7279,25 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct tg3 *tp = netdev_priv(dev);

if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
if (tp->tg3_flags2 & TG3_FLG2_ANY_SERDES) {
/* These are the only valid advertisement bits allowed. */
if (cmd->autoneg == AUTONEG_ENABLE &&
(cmd->advertising & ~(ADVERTISED_1000baseT_Half |
ADVERTISED_1000baseT_Full |
ADVERTISED_Autoneg |
ADVERTISED_FIBRE)))
return -EINVAL;
}
/* Fiber can only do SPEED_1000. */
else if ((cmd->autoneg != AUTONEG_ENABLE) &&
(cmd->speed != SPEED_1000))
return -EINVAL;
/* Copper cannot force SPEED_1000. */
} else if ((cmd->autoneg != AUTONEG_ENABLE) &&
(cmd->speed == SPEED_1000))
return -EINVAL;
else if ((cmd->speed == SPEED_1000) &&
(tp->tg3_flags2 & TG3_FLAG_10_100_ONLY))
return -EINVAL;

tg3_full_lock(tp, 0);

Expand Down

0 comments on commit 8489991

Please sign in to comment.