diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-08 17:56:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 17:56:41 -0400 |
commit | 4dd565134ece7e5d528d4c5288879310c54419e9 (patch) | |
tree | e08910d2d0feae0c030f8f01acc9b03eb760ad9a /drivers/net/e1000e/ethtool.c | |
parent | 071d7ab6649eb34a873a53e71635186e9117101d (diff) | |
parent | 69849375d6b13e94d08cdc94b49b11fbab454a0e (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/netdev.c
Diffstat (limited to 'drivers/net/e1000e/ethtool.c')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index 52b762eb1745..70c11c811a08 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -432,6 +432,10 @@ static void e1000_get_regs(struct net_device *netdev, | |||
432 | regs_buff[11] = er32(TIDV); | 432 | regs_buff[11] = er32(TIDV); |
433 | 433 | ||
434 | regs_buff[12] = adapter->hw.phy.type; /* PHY type (IGP=1, M88=0) */ | 434 | regs_buff[12] = adapter->hw.phy.type; /* PHY type (IGP=1, M88=0) */ |
435 | |||
436 | /* ethtool doesn't use anything past this point, so all this | ||
437 | * code is likely legacy junk for apps that may or may not | ||
438 | * exist */ | ||
435 | if (hw->phy.type == e1000_phy_m88) { | 439 | if (hw->phy.type == e1000_phy_m88) { |
436 | e1e_rphy(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); | 440 | e1e_rphy(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); |
437 | regs_buff[13] = (u32)phy_data; /* cable length */ | 441 | regs_buff[13] = (u32)phy_data; /* cable length */ |
@@ -447,7 +451,7 @@ static void e1000_get_regs(struct net_device *netdev, | |||
447 | regs_buff[22] = adapter->phy_stats.receive_errors; | 451 | regs_buff[22] = adapter->phy_stats.receive_errors; |
448 | regs_buff[23] = regs_buff[13]; /* mdix mode */ | 452 | regs_buff[23] = regs_buff[13]; /* mdix mode */ |
449 | } | 453 | } |
450 | regs_buff[21] = adapter->phy_stats.idle_errors; /* phy idle errors */ | 454 | regs_buff[21] = 0; /* was idle_errors */ |
451 | e1e_rphy(hw, PHY_1000T_STATUS, &phy_data); | 455 | e1e_rphy(hw, PHY_1000T_STATUS, &phy_data); |
452 | regs_buff[24] = (u32)phy_data; /* phy local receiver status */ | 456 | regs_buff[24] = (u32)phy_data; /* phy local receiver status */ |
453 | regs_buff[25] = regs_buff[24]; /* phy remote receiver status */ | 457 | regs_buff[25] = regs_buff[24]; /* phy remote receiver status */ |
@@ -529,6 +533,9 @@ static int e1000_set_eeprom(struct net_device *netdev, | |||
529 | if (eeprom->magic != (adapter->pdev->vendor | (adapter->pdev->device << 16))) | 533 | if (eeprom->magic != (adapter->pdev->vendor | (adapter->pdev->device << 16))) |
530 | return -EFAULT; | 534 | return -EFAULT; |
531 | 535 | ||
536 | if (adapter->flags & FLAG_READ_ONLY_NVM) | ||
537 | return -EINVAL; | ||
538 | |||
532 | max_len = hw->nvm.word_size * 2; | 539 | max_len = hw->nvm.word_size * 2; |
533 | 540 | ||
534 | first_word = eeprom->offset >> 1; | 541 | first_word = eeprom->offset >> 1; |