usbnet whitespace fixes
Whitespace updates for usbnet core, mostly switching to tab-only indents. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
committed by
Jeff Garzik
parent
2501f843b0
commit
18ab458fb7
@@ -393,7 +393,7 @@ static void rx_complete (struct urb *urb)
|
|||||||
entry->urb = NULL;
|
entry->urb = NULL;
|
||||||
|
|
||||||
switch (urb_status) {
|
switch (urb_status) {
|
||||||
// success
|
/* success */
|
||||||
case 0:
|
case 0:
|
||||||
if (skb->len < dev->net->hard_header_len) {
|
if (skb->len < dev->net->hard_header_len) {
|
||||||
entry->state = rx_cleanup;
|
entry->state = rx_cleanup;
|
||||||
@@ -404,25 +404,27 @@ static void rx_complete (struct urb *urb)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// stalls need manual reset. this is rare ... except that
|
/* stalls need manual reset. this is rare ... except that
|
||||||
// when going through USB 2.0 TTs, unplug appears this way.
|
* when going through USB 2.0 TTs, unplug appears this way.
|
||||||
// we avoid the highspeed version of the ETIMEOUT/EILSEQ
|
* we avoid the highspeed version of the ETIMEOUT/EILSEQ
|
||||||
// storm, recovering as needed.
|
* storm, recovering as needed.
|
||||||
|
*/
|
||||||
case -EPIPE:
|
case -EPIPE:
|
||||||
dev->stats.rx_errors++;
|
dev->stats.rx_errors++;
|
||||||
usbnet_defer_kevent (dev, EVENT_RX_HALT);
|
usbnet_defer_kevent (dev, EVENT_RX_HALT);
|
||||||
// FALLTHROUGH
|
// FALLTHROUGH
|
||||||
|
|
||||||
// software-driven interface shutdown
|
/* software-driven interface shutdown */
|
||||||
case -ECONNRESET: // async unlink
|
case -ECONNRESET: /* async unlink */
|
||||||
case -ESHUTDOWN: // hardware gone
|
case -ESHUTDOWN: /* hardware gone */
|
||||||
if (netif_msg_ifdown (dev))
|
if (netif_msg_ifdown (dev))
|
||||||
devdbg (dev, "rx shutdown, code %d", urb_status);
|
devdbg (dev, "rx shutdown, code %d", urb_status);
|
||||||
goto block;
|
goto block;
|
||||||
|
|
||||||
// we get controller i/o faults during khubd disconnect() delays.
|
/* we get controller i/o faults during khubd disconnect() delays.
|
||||||
// throttle down resubmits, to avoid log floods; just temporarily,
|
* throttle down resubmits, to avoid log floods; just temporarily,
|
||||||
// so we still recover when the fault isn't a khubd delay.
|
* so we still recover when the fault isn't a khubd delay.
|
||||||
|
*/
|
||||||
case -EPROTO:
|
case -EPROTO:
|
||||||
case -ETIME:
|
case -ETIME:
|
||||||
case -EILSEQ:
|
case -EILSEQ:
|
||||||
@@ -438,7 +440,7 @@ block:
|
|||||||
urb = NULL;
|
urb = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// data overrun ... flush fifo?
|
/* data overrun ... flush fifo? */
|
||||||
case -EOVERFLOW:
|
case -EOVERFLOW:
|
||||||
dev->stats.rx_over_errors++;
|
dev->stats.rx_over_errors++;
|
||||||
// FALLTHROUGH
|
// FALLTHROUGH
|
||||||
@@ -477,8 +479,8 @@ static void intr_complete (struct urb *urb)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* software-driven interface shutdown */
|
/* software-driven interface shutdown */
|
||||||
case -ENOENT: // urb killed
|
case -ENOENT: /* urb killed */
|
||||||
case -ESHUTDOWN: // hardware gone
|
case -ESHUTDOWN: /* hardware gone */
|
||||||
if (netif_msg_ifdown (dev))
|
if (netif_msg_ifdown (dev))
|
||||||
devdbg (dev, "intr shutdown, code %d", status);
|
devdbg (dev, "intr shutdown, code %d", status);
|
||||||
return;
|
return;
|
||||||
@@ -569,9 +571,9 @@ static int usbnet_stop (struct net_device *net)
|
|||||||
temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq);
|
temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq);
|
||||||
|
|
||||||
// maybe wait for deletions to finish.
|
// maybe wait for deletions to finish.
|
||||||
while (!skb_queue_empty(&dev->rxq) &&
|
while (!skb_queue_empty(&dev->rxq)
|
||||||
!skb_queue_empty(&dev->txq) &&
|
&& !skb_queue_empty(&dev->txq)
|
||||||
!skb_queue_empty(&dev->done)) {
|
&& !skb_queue_empty(&dev->done)) {
|
||||||
msleep(UNLINK_TIMEOUT_MS);
|
msleep(UNLINK_TIMEOUT_MS);
|
||||||
if (netif_msg_ifdown (dev))
|
if (netif_msg_ifdown (dev))
|
||||||
devdbg (dev, "waited for %d urb completions", temp);
|
devdbg (dev, "waited for %d urb completions", temp);
|
||||||
|
Reference in New Issue
Block a user