diff options
author | Nikita Kiryanov <nikita@compulab.co.il> | 2013-10-16 04:41:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-17 13:35:56 -0400 |
commit | 727a282fdb9bc1545542095def45a84d0480f78e (patch) | |
tree | 887cdf311906920c378dd66fc0524e2513459ce9 /drivers/net | |
parent | 09ee9f87d02e779e4fc3f5c29212c733d6d6e349 (diff) |
dm9000: report the correct LPA
Report the LPA by checking mii_if_info, instead of just saying "no LPA" every
time.
Cc: David S. Miller <davem@davemloft.net>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/davicom/dm9000.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c index a179f8150034..a7a941b1a655 100644 --- a/drivers/net/ethernet/davicom/dm9000.c +++ b/drivers/net/ethernet/davicom/dm9000.c | |||
@@ -753,15 +753,20 @@ static const struct ethtool_ops dm9000_ethtool_ops = { | |||
753 | static void dm9000_show_carrier(board_info_t *db, | 753 | static void dm9000_show_carrier(board_info_t *db, |
754 | unsigned carrier, unsigned nsr) | 754 | unsigned carrier, unsigned nsr) |
755 | { | 755 | { |
756 | int lpa; | ||
756 | struct net_device *ndev = db->ndev; | 757 | struct net_device *ndev = db->ndev; |
758 | struct mii_if_info *mii = &db->mii; | ||
757 | unsigned ncr = dm9000_read_locked(db, DM9000_NCR); | 759 | unsigned ncr = dm9000_read_locked(db, DM9000_NCR); |
758 | 760 | ||
759 | if (carrier) | 761 | if (carrier) { |
760 | dev_info(db->dev, "%s: link up, %dMbps, %s-duplex, no LPA\n", | 762 | lpa = mii->mdio_read(mii->dev, mii->phy_id, MII_LPA); |
763 | dev_info(db->dev, | ||
764 | "%s: link up, %dMbps, %s-duplex, lpa 0x%04X\n", | ||
761 | ndev->name, (nsr & NSR_SPEED) ? 10 : 100, | 765 | ndev->name, (nsr & NSR_SPEED) ? 10 : 100, |
762 | (ncr & NCR_FDX) ? "full" : "half"); | 766 | (ncr & NCR_FDX) ? "full" : "half", lpa); |
763 | else | 767 | } else { |
764 | dev_info(db->dev, "%s: link down\n", ndev->name); | 768 | dev_info(db->dev, "%s: link down\n", ndev->name); |
769 | } | ||
765 | } | 770 | } |
766 | 771 | ||
767 | static void | 772 | static void |