usb: plusb: Add debug to reset function
authorsimon <simon@ubuntu.(none)>
Wed, 6 Apr 2011 21:40:15 +0000 (21:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2011 01:46:45 +0000 (18:46 -0700)
This patch adds some debug to the reset function to print out the
reason why it fails.

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/plusb.c

index f46aa07bfa694b03ba3dbca86d3577d3ebb87748..217aec8a768f8481ea82560fe3c0ace5dbd00d60 100644 (file)
@@ -94,11 +94,15 @@ pl_set_QuickLink_features(struct usbnet *dev, int val)
 
 static int pl_reset(struct usbnet *dev)
 {
+       int status;
+
        /* some units seem to need this reset, others reject it utterly.
         * FIXME be more like "naplink" or windows drivers.
         */
-       (void) pl_set_QuickLink_features(dev,
+       status = pl_set_QuickLink_features(dev,
                PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);
+       if (status != 0 && netif_msg_probe(dev))
+               netif_dbg(dev, link, dev->net, "pl_reset --> %d\n", status);
        return 0;
 }
 
This page took 0.028499 seconds and 5 git commands to generate.