On Wed, 2015-04-22 at 15:43 +0200, Ivan Vecera wrote: > The driver unlike other drivers does not log link state changes.
Why add all the speed stuff, why not add a query instead? I think it'd be simpler to add a line like: status = be_cmd_link_status_query(adapter, &speed, &status, 0); before emitting speed/link_status Question for the emulex folk: Is the dom argument to link_status_query necessary? It's currently always 0. and trivially: > diff --git a/drivers/net/ethernet/emulex/benet/be_main.c > b/drivers/net/ethernet/emulex/benet/be_main.c [] > @@ -649,7 +649,8 @@ static struct rtnl_link_stats64 *be_get_stats64(struct > net_device *netdev, > return stats; > } > > -void be_link_status_update(struct be_adapter *adapter, u8 link_status) > +void be_link_status_update(struct be_adapter *adapter, u8 link_status, > + u16 speed) > { > struct net_device *netdev = adapter->netdev; > > @@ -658,10 +659,18 @@ void be_link_status_update(struct be_adapter *adapter, > u8 link_status) > adapter->flags |= BE_FLAGS_LINK_STATUS_INIT; > } > > - if (link_status) > + if (link_status) { > + if (speed) > + /* Print speed only when it is known */ > + netdev_info(netdev, "Link is Up at %d Mbps\n", speed); signed/unsigned mismatch. %u, speed -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html