Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35106
b: refs/heads/master
c: 053dd21
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik committed Jul 29, 2006
1 parent ef9ed89 commit a600516
Show file tree
Hide file tree
Showing 2 changed files with 14 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: d7446c0b5224e7024bd2f881b3d7fce0b9713fea
refs/heads/master: 053dd21789eb8fdf9e69982bd223e4cf644c1477
17 changes: 13 additions & 4 deletions trunk/drivers/net/via-velocity.c
Original file line number Diff line number Diff line change
Expand Up @@ -2742,7 +2742,7 @@ static u32 check_connection_type(struct mac_regs __iomem * regs)

if (PHYSR0 & PHYSR0_SPDG)
status |= VELOCITY_SPEED_1000;
if (PHYSR0 & PHYSR0_SPD10)
else if (PHYSR0 & PHYSR0_SPD10)
status |= VELOCITY_SPEED_10;
else
status |= VELOCITY_SPEED_100;
Expand Down Expand Up @@ -2851,8 +2851,17 @@ static int velocity_get_settings(struct net_device *dev, struct ethtool_cmd *cmd
u32 status;
status = check_connection_type(vptr->mac_regs);

cmd->supported = SUPPORTED_TP | SUPPORTED_Autoneg | SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full;
if (status & VELOCITY_SPEED_100)
cmd->supported = SUPPORTED_TP |
SUPPORTED_Autoneg |
SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full |
SUPPORTED_100baseT_Half |
SUPPORTED_100baseT_Full |
SUPPORTED_1000baseT_Half |
SUPPORTED_1000baseT_Full;
if (status & VELOCITY_SPEED_1000)
cmd->speed = SPEED_1000;
else if (status & VELOCITY_SPEED_100)
cmd->speed = SPEED_100;
else
cmd->speed = SPEED_10;
Expand Down Expand Up @@ -2896,7 +2905,7 @@ static u32 velocity_get_link(struct net_device *dev)
{
struct velocity_info *vptr = netdev_priv(dev);
struct mac_regs __iomem * regs = vptr->mac_regs;
return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, &regs->PHYSR0) ? 0 : 1;
return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, &regs->PHYSR0) ? 1 : 0;
}

static void velocity_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
Expand Down

0 comments on commit a600516

Please sign in to comment.