diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2015-04-04 22:51:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-30 17:59:23 +0300 |
commit | 2638f71307f649532f613a4bcb3b163b7b63017a (patch) | |
tree | 5d77e841858394c95b3d0d1e1622b3597632f1df /drivers/staging/octeon/ethernet-rgmii.c | |
parent | 36a14572415459877933857f67d93d3e053180a2 (diff) | |
download | linux-2638f71307f649532f613a4bcb3b163b7b63017a.tar.xz |
staging: octeon-ethernet: consolidate carrier notifications
Always use cvm_oct_note_carrier() to avoid copy-pasted code.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon/ethernet-rgmii.c')
-rw-r--r-- | drivers/staging/octeon/ethernet-rgmii.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c index a6b853118bc5..65edfbf251c4 100644 --- a/drivers/staging/octeon/ethernet-rgmii.c +++ b/drivers/staging/octeon/ethernet-rgmii.c @@ -176,23 +176,10 @@ static void cvm_oct_rgmii_poll(struct net_device *dev) if (link_info.s.link_up) { if (!netif_carrier_ok(dev)) netif_carrier_on(dev); - if (priv->queue != -1) - printk_ratelimited("%s: %u Mbps %s duplex, port %2d, queue %2d\n", - dev->name, link_info.s.speed, - (link_info.s.full_duplex) ? - "Full" : "Half", - priv->port, priv->queue); - else - printk_ratelimited("%s: %u Mbps %s duplex, port %2d, POW\n", - dev->name, link_info.s.speed, - (link_info.s.full_duplex) ? - "Full" : "Half", - priv->port); - } else { - if (netif_carrier_ok(dev)) - netif_carrier_off(dev); - printk_ratelimited("%s: Link down\n", dev->name); + } else if (netif_carrier_ok(dev)) { + netif_carrier_off(dev); } + cvm_oct_note_carrier(priv, link_info); } } |