]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: use network device in phy_print_status
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 12 Feb 2014 01:27:33 +0000 (17:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2014 00:08:19 +0000 (19:08 -0500)
commita67696afb3b11c0e322d445457e80cd9f2780720
treebd08cd23e60c247b74a56789ad79ce3a723af50a
parent5e15d0982200520a17da84e267f791d0f07a3372
net: phy: use network device in phy_print_status

phy_print_status() currently uses dev_name(&phydev->dev) which will
usually result in printing something along those lines for Device Tree
aware drivers:

libphy: f0b60000.etherne:0a - Link is Down
libphy: f0ba0000.etherne:00 - Link is Up - 1000/Full

This is not terribly useful for network administrators or users since we
expect a network interface name to be able to correlate link events with
interfaces. Update phy_print_status() to use netdev_info() with
phydev->attached_dev which is the backing network device for our PHY
device. The leading dash is removed since netdev_info() prefixes the
messages with "<interface>: " already.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c