lkml.org 
[lkml]   [2012]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v3] Ethernet driver for the WIZnet W5300 chip
    From
    Date
    On Sat, 2012-03-24 at 16:02 +0500, Mike Sinkovsky wrote:
    > Based on original driver from chip manufacturer, but nearly full rewite.
    > Tested and used in production with Blackfin BF531 embedded processor.

    Hi Mike.

    Just a trivial comment. Instead of:
    if (netif_<test>(priv))
    netdev_<level>(ndev, ...)
    you can use
    netif_<level>(priv, <test>, ndev, ,...)

    > diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
    []
    > +static irqreturn_t w5300_detect_link(int irq, void *ndev_instance)
    > +{
    > + struct net_device *ndev = ndev_instance;
    > + struct w5300_private *priv = netdev_priv(ndev);
    > +
    > + if (netif_running(ndev)) {
    > + if (gpio_get_value(priv->link_gpio) != 0) {
    []
    > + if (netif_msg_link(priv))
    > + netdev_info(ndev, "link is Up\n");

    like:
    netif_info(priv, link, ndev, "link is up\n");

    > + netif_carrier_on(ndev);
    > + } else {
    > + if (netif_msg_link(priv))
    > + netdev_info(ndev, "link is Down\n");

    netif_info(priv, link, ndev, "link is down\n");

    > +static int w5300_stop(struct net_device *ndev)
    > +{
    > + struct w5300_private *priv = netdev_priv(ndev);
    > +
    > + if (netif_msg_ifdown(priv))
    > + netdev_dbg(ndev, "shutting down\n");

    netif_dbg(priv, ifdown, ndev, "shutting down\n");




    \
     
     \ /
      Last update: 2012-03-24 16:55    [W:0.020 / U:29.740 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site