Commit e96b44e0 authored by Scott Feldman's avatar Scott Feldman Committed by Jeff Garzik

[PATCH] Add MDI/MDI-X status to ethtool reg dump

* Add MDI/MDI-X (crossover cable) status to ethtool reg dump.
parent 3ec4a3a4
......@@ -3528,6 +3528,7 @@ e100_ethtool_gregs(struct net_device *dev, struct ifreq *ifr)
u32 regs_buff[E100_REGS_LEN];
struct ethtool_regs regs = {ETHTOOL_GREGS};
void *addr = ifr->ifr_data;
u16 mdi_reg;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
......@@ -3540,6 +3541,8 @@ e100_ethtool_gregs(struct net_device *dev, struct ifreq *ifr)
regs_buff[0] = readb(&(bdp->scb->scb_cmd_hi)) << 24 |
readb(&(bdp->scb->scb_cmd_low)) << 16 |
readw(&(bdp->scb->scb_status));
e100_mdi_read(bdp, MII_NCONFIG, bdp->phy_addr, &mdi_reg);
regs_buff[1] = mdi_reg;
if(copy_to_user(addr, &regs, sizeof(regs)))
return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment