aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/usbnet.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-17 05:30:23 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 16:35:40 -0500
commit60b86755929e1a7e9038c8d860a8491cfdf8d93a (patch)
tree97062c7136ead4adcdbf2bd3280143da1fabbe20 /drivers/net/usb/usbnet.c
parent82456b031e3c3b5bf95a7e49bd9b68b146446e76 (diff)
usbnet: Convert dev(dbg|err|warn|info) macros to netdev_<level>
These macros are too similar to the dev_<level> equivalents but take a usbnet * argument. Convert them to the recently introduced netdev_<level> macros and remove the old macros. The old macros had "\n" appended to the format string. Add the "\n" to the converted uses. Some existing uses of the dev<foo> macros in cdc_eem.c probably mistakenly had trailing "\n". No "\n" added there. Fix net1080 this/other log message inversion. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r--drivers/net/usb/usbnet.c162
1 files changed, 82 insertions, 80 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 035fab04c0a0..8e732930d249 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -243,12 +243,12 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
243 dev->net->stats.rx_bytes += skb->len; 243 dev->net->stats.rx_bytes += skb->len;
244 244
245 if (netif_msg_rx_status (dev)) 245 if (netif_msg_rx_status (dev))
246 devdbg (dev, "< rx, len %zu, type 0x%x", 246 netdev_dbg(dev->net, "< rx, len %zu, type 0x%x\n",
247 skb->len + sizeof (struct ethhdr), skb->protocol); 247 skb->len + sizeof (struct ethhdr), skb->protocol);
248 memset (skb->cb, 0, sizeof (struct skb_data)); 248 memset (skb->cb, 0, sizeof (struct skb_data));
249 status = netif_rx (skb); 249 status = netif_rx (skb);
250 if (status != NET_RX_SUCCESS && netif_msg_rx_err (dev)) 250 if (status != NET_RX_SUCCESS && netif_msg_rx_err (dev))
251 devdbg (dev, "netif_rx status %d", status); 251 netdev_dbg(dev->net, "netif_rx status %d\n", status);
252} 252}
253EXPORT_SYMBOL_GPL(usbnet_skb_return); 253EXPORT_SYMBOL_GPL(usbnet_skb_return);
254 254
@@ -313,9 +313,9 @@ void usbnet_defer_kevent (struct usbnet *dev, int work)
313{ 313{
314 set_bit (work, &dev->flags); 314 set_bit (work, &dev->flags);
315 if (!schedule_work (&dev->kevent)) 315 if (!schedule_work (&dev->kevent))
316 deverr (dev, "kevent %d may have been dropped", work); 316 netdev_err(dev->net, "kevent %d may have been dropped\n", work);
317 else 317 else
318 devdbg (dev, "kevent %d scheduled", work); 318 netdev_dbg(dev->net, "kevent %d scheduled\n", work);
319} 319}
320EXPORT_SYMBOL_GPL(usbnet_defer_kevent); 320EXPORT_SYMBOL_GPL(usbnet_defer_kevent);
321 321
@@ -333,7 +333,7 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
333 333
334 if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) { 334 if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) {
335 if (netif_msg_rx_err (dev)) 335 if (netif_msg_rx_err (dev))
336 devdbg (dev, "no rx skb"); 336 netdev_dbg(dev->net, "no rx skb\n");
337 usbnet_defer_kevent (dev, EVENT_RX_MEMORY); 337 usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
338 usb_free_urb (urb); 338 usb_free_urb (urb);
339 return; 339 return;
@@ -364,12 +364,12 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
364 break; 364 break;
365 case -ENODEV: 365 case -ENODEV:
366 if (netif_msg_ifdown (dev)) 366 if (netif_msg_ifdown (dev))
367 devdbg (dev, "device gone"); 367 netdev_dbg(dev->net, "device gone\n");
368 netif_device_detach (dev->net); 368 netif_device_detach (dev->net);
369 break; 369 break;
370 default: 370 default:
371 if (netif_msg_rx_err (dev)) 371 if (netif_msg_rx_err (dev))
372 devdbg (dev, "rx submit, %d", retval); 372 netdev_dbg(dev->net, "rx submit, %d\n", retval);
373 tasklet_schedule (&dev->bh); 373 tasklet_schedule (&dev->bh);
374 break; 374 break;
375 case 0: 375 case 0:
@@ -377,7 +377,7 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
377 } 377 }
378 } else { 378 } else {
379 if (netif_msg_ifdown (dev)) 379 if (netif_msg_ifdown (dev))
380 devdbg (dev, "rx: stopped"); 380 netdev_dbg(dev->net, "rx: stopped\n");
381 retval = -ENOLINK; 381 retval = -ENOLINK;
382 } 382 }
383 spin_unlock_irqrestore (&dev->rxq.lock, lockflags); 383 spin_unlock_irqrestore (&dev->rxq.lock, lockflags);
@@ -401,7 +401,7 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb)
401 usbnet_skb_return (dev, skb); 401 usbnet_skb_return (dev, skb);
402 else { 402 else {
403 if (netif_msg_rx_err (dev)) 403 if (netif_msg_rx_err (dev))
404 devdbg (dev, "drop"); 404 netdev_dbg(dev->net, "drop\n");
405error: 405error:
406 dev->net->stats.rx_errors++; 406 dev->net->stats.rx_errors++;
407 skb_queue_tail (&dev->done, skb); 407 skb_queue_tail (&dev->done, skb);
@@ -429,7 +429,7 @@ static void rx_complete (struct urb *urb)
429 dev->net->stats.rx_errors++; 429 dev->net->stats.rx_errors++;
430 dev->net->stats.rx_length_errors++; 430 dev->net->stats.rx_length_errors++;
431 if (netif_msg_rx_err (dev)) 431 if (netif_msg_rx_err (dev))
432 devdbg (dev, "rx length %d", skb->len); 432 netdev_dbg(dev->net, "rx length %d\n", skb->len);
433 } 433 }
434 break; 434 break;
435 435
@@ -447,7 +447,7 @@ static void rx_complete (struct urb *urb)
447 case -ECONNRESET: /* async unlink */ 447 case -ECONNRESET: /* async unlink */
448 case -ESHUTDOWN: /* hardware gone */ 448 case -ESHUTDOWN: /* hardware gone */
449 if (netif_msg_ifdown (dev)) 449 if (netif_msg_ifdown (dev))
450 devdbg (dev, "rx shutdown, code %d", urb_status); 450 netdev_dbg(dev->net, "rx shutdown, code %d\n", urb_status);
451 goto block; 451 goto block;
452 452
453 /* we get controller i/o faults during khubd disconnect() delays. 453 /* we get controller i/o faults during khubd disconnect() delays.
@@ -461,7 +461,7 @@ static void rx_complete (struct urb *urb)
461 if (!timer_pending (&dev->delay)) { 461 if (!timer_pending (&dev->delay)) {
462 mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES); 462 mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES);
463 if (netif_msg_link (dev)) 463 if (netif_msg_link (dev))
464 devdbg (dev, "rx throttle %d", urb_status); 464 netdev_dbg(dev->net, "rx throttle %d\n", urb_status);
465 } 465 }
466block: 466block:
467 entry->state = rx_cleanup; 467 entry->state = rx_cleanup;
@@ -478,7 +478,7 @@ block:
478 entry->state = rx_cleanup; 478 entry->state = rx_cleanup;
479 dev->net->stats.rx_errors++; 479 dev->net->stats.rx_errors++;
480 if (netif_msg_rx_err (dev)) 480 if (netif_msg_rx_err (dev))
481 devdbg (dev, "rx status %d", urb_status); 481 netdev_dbg(dev->net, "rx status %d\n", urb_status);
482 break; 482 break;
483 } 483 }
484 484
@@ -493,7 +493,7 @@ block:
493 usb_free_urb (urb); 493 usb_free_urb (urb);
494 } 494 }
495 if (netif_msg_rx_err (dev)) 495 if (netif_msg_rx_err (dev))
496 devdbg (dev, "no read resubmitted"); 496 netdev_dbg(dev->net, "no read resubmitted\n");
497} 497}
498 498
499static void intr_complete (struct urb *urb) 499static void intr_complete (struct urb *urb)
@@ -511,14 +511,14 @@ static void intr_complete (struct urb *urb)
511 case -ENOENT: /* urb killed */ 511 case -ENOENT: /* urb killed */
512 case -ESHUTDOWN: /* hardware gone */ 512 case -ESHUTDOWN: /* hardware gone */
513 if (netif_msg_ifdown (dev)) 513 if (netif_msg_ifdown (dev))
514 devdbg (dev, "intr shutdown, code %d", status); 514 netdev_dbg(dev->net, "intr shutdown, code %d\n", status);
515 return; 515 return;
516 516
517 /* NOTE: not throttling like RX/TX, since this endpoint 517 /* NOTE: not throttling like RX/TX, since this endpoint
518 * already polls infrequently 518 * already polls infrequently
519 */ 519 */
520 default: 520 default:
521 devdbg (dev, "intr status %d", status); 521 netdev_dbg(dev->net, "intr status %d\n", status);
522 break; 522 break;
523 } 523 }
524 524
@@ -528,7 +528,7 @@ static void intr_complete (struct urb *urb)
528 memset(urb->transfer_buffer, 0, urb->transfer_buffer_length); 528 memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
529 status = usb_submit_urb (urb, GFP_ATOMIC); 529 status = usb_submit_urb (urb, GFP_ATOMIC);
530 if (status != 0 && netif_msg_timer (dev)) 530 if (status != 0 && netif_msg_timer (dev))
531 deverr(dev, "intr resubmit --> %d", status); 531 netdev_err(dev->net, "intr resubmit --> %d\n", status);
532} 532}
533 533
534/*-------------------------------------------------------------------------*/ 534/*-------------------------------------------------------------------------*/
@@ -537,7 +537,7 @@ void usbnet_pause_rx(struct usbnet *dev)
537 set_bit(EVENT_RX_PAUSED, &dev->flags); 537 set_bit(EVENT_RX_PAUSED, &dev->flags);
538 538
539 if (netif_msg_rx_status(dev)) 539 if (netif_msg_rx_status(dev))
540 devdbg(dev, "paused rx queue enabled"); 540 netdev_dbg(dev->net, "paused rx queue enabled\n");
541} 541}
542EXPORT_SYMBOL_GPL(usbnet_pause_rx); 542EXPORT_SYMBOL_GPL(usbnet_pause_rx);
543 543
@@ -556,7 +556,8 @@ void usbnet_resume_rx(struct usbnet *dev)
556 tasklet_schedule(&dev->bh); 556 tasklet_schedule(&dev->bh);
557 557
558 if (netif_msg_rx_status(dev)) 558 if (netif_msg_rx_status(dev))
559 devdbg(dev, "paused rx queue disabled, %d skbs requeued", num); 559 netdev_dbg(dev->net, "paused rx queue disabled, %d skbs requeued\n",
560 num);
560} 561}
561EXPORT_SYMBOL_GPL(usbnet_resume_rx); 562EXPORT_SYMBOL_GPL(usbnet_resume_rx);
562 563
@@ -589,7 +590,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
589 // these (async) unlinks complete immediately 590 // these (async) unlinks complete immediately
590 retval = usb_unlink_urb (urb); 591 retval = usb_unlink_urb (urb);
591 if (retval != -EINPROGRESS && retval != 0) 592 if (retval != -EINPROGRESS && retval != 0)
592 devdbg (dev, "unlink urb err, %d", retval); 593 netdev_dbg(dev->net, "unlink urb err, %d\n", retval);
593 else 594 else
594 count++; 595 count++;
595 } 596 }
@@ -632,8 +633,8 @@ static void usbnet_terminate_urbs(struct usbnet *dev)
632 schedule_timeout(UNLINK_TIMEOUT_MS); 633 schedule_timeout(UNLINK_TIMEOUT_MS);
633 set_current_state(TASK_UNINTERRUPTIBLE); 634 set_current_state(TASK_UNINTERRUPTIBLE);
634 if (netif_msg_ifdown(dev)) 635 if (netif_msg_ifdown(dev))
635 devdbg(dev, "waited for %d urb completions", 636 netdev_dbg(dev->net, "waited for %d urb completions\n",
636 temp); 637 temp);
637 } 638 }
638 set_current_state(TASK_RUNNING); 639 set_current_state(TASK_RUNNING);
639 dev->wait = NULL; 640 dev->wait = NULL;
@@ -649,21 +650,20 @@ int usbnet_stop (struct net_device *net)
649 netif_stop_queue (net); 650 netif_stop_queue (net);
650 651
651 if (netif_msg_ifdown (dev)) 652 if (netif_msg_ifdown (dev))
652 devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld", 653 netdev_info(dev->net, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n",
653 net->stats.rx_packets, net->stats.tx_packets, 654 net->stats.rx_packets, net->stats.tx_packets,
654 net->stats.rx_errors, net->stats.tx_errors 655 net->stats.rx_errors, net->stats.tx_errors);
655 );
656 656
657 /* allow minidriver to stop correctly (wireless devices to turn off 657 /* allow minidriver to stop correctly (wireless devices to turn off
658 * radio etc) */ 658 * radio etc) */
659 if (info->stop) { 659 if (info->stop) {
660 retval = info->stop(dev); 660 retval = info->stop(dev);
661 if (retval < 0 && netif_msg_ifdown(dev)) 661 if (retval < 0 && netif_msg_ifdown(dev))
662 devinfo(dev, 662 netdev_info(dev->net,
663 "stop fail (%d) usbnet usb-%s-%s, %s", 663 "stop fail (%d) usbnet usb-%s-%s, %s\n",
664 retval, 664 retval,
665 dev->udev->bus->bus_name, dev->udev->devpath, 665 dev->udev->bus->bus_name, dev->udev->devpath,
666 info->description); 666 info->description);
667 } 667 }
668 668
669 if (!(info->flags & FLAG_AVOID_UNLINK_URBS)) 669 if (!(info->flags & FLAG_AVOID_UNLINK_URBS))
@@ -703,29 +703,31 @@ int usbnet_open (struct net_device *net)
703 703
704 if ((retval = usb_autopm_get_interface(dev->intf)) < 0) { 704 if ((retval = usb_autopm_get_interface(dev->intf)) < 0) {
705 if (netif_msg_ifup (dev)) 705 if (netif_msg_ifup (dev))
706 devinfo (dev, 706 netdev_info(dev->net,
707 "resumption fail (%d) usbnet usb-%s-%s, %s", 707 "resumption fail (%d) usbnet usb-%s-%s, %s\n",
708 retval, 708 retval,
709 dev->udev->bus->bus_name, dev->udev->devpath, 709 dev->udev->bus->bus_name,
710 info->description); 710 dev->udev->devpath,
711 info->description);
711 goto done_nopm; 712 goto done_nopm;
712 } 713 }
713 714
714 // put into "known safe" state 715 // put into "known safe" state
715 if (info->reset && (retval = info->reset (dev)) < 0) { 716 if (info->reset && (retval = info->reset (dev)) < 0) {
716 if (netif_msg_ifup (dev)) 717 if (netif_msg_ifup (dev))
717 devinfo (dev, 718 netdev_info(dev->net,
718 "open reset fail (%d) usbnet usb-%s-%s, %s", 719 "open reset fail (%d) usbnet usb-%s-%s, %s\n",
719 retval, 720 retval,
720 dev->udev->bus->bus_name, dev->udev->devpath, 721 dev->udev->bus->bus_name,
721 info->description); 722 dev->udev->devpath,
723 info->description);
722 goto done; 724 goto done;
723 } 725 }
724 726
725 // insist peer be connected 727 // insist peer be connected
726 if (info->check_connect && (retval = info->check_connect (dev)) < 0) { 728 if (info->check_connect && (retval = info->check_connect (dev)) < 0) {
727 if (netif_msg_ifup (dev)) 729 if (netif_msg_ifup (dev))
728 devdbg (dev, "can't open; %d", retval); 730 netdev_dbg(dev->net, "can't open; %d\n", retval);
729 goto done; 731 goto done;
730 } 732 }
731 733
@@ -734,7 +736,7 @@ int usbnet_open (struct net_device *net)
734 retval = usb_submit_urb (dev->interrupt, GFP_KERNEL); 736 retval = usb_submit_urb (dev->interrupt, GFP_KERNEL);
735 if (retval < 0) { 737 if (retval < 0) {
736 if (netif_msg_ifup (dev)) 738 if (netif_msg_ifup (dev))
737 deverr (dev, "intr submit %d", retval); 739 netdev_err(dev->net, "intr submit %d\n", retval);
738 goto done; 740 goto done;
739 } 741 }
740 } 742 }
@@ -756,10 +758,9 @@ int usbnet_open (struct net_device *net)
756 else 758 else
757 framing = "simple"; 759 framing = "simple";
758 760
759 devinfo (dev, "open: enable queueing " 761 netdev_info(dev->net, "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n",
760 "(rx %d, tx %d) mtu %d %s framing", 762 (int)RX_QLEN(dev), (int)TX_QLEN(dev),
761 (int)RX_QLEN (dev), (int)TX_QLEN (dev), dev->net->mtu, 763 dev->net->mtu, framing);
762 framing);
763 } 764 }
764 765
765 // delay posting reads until we're fully open 766 // delay posting reads until we're fully open
@@ -908,8 +909,8 @@ kevent (struct work_struct *work)
908 status != -ESHUTDOWN) { 909 status != -ESHUTDOWN) {
909 if (netif_msg_tx_err (dev)) 910 if (netif_msg_tx_err (dev))
910fail_pipe: 911fail_pipe:
911 deverr (dev, "can't clear tx halt, status %d", 912 netdev_err(dev->net, "can't clear tx halt, status %d\n",
912 status); 913 status);
913 } else { 914 } else {
914 clear_bit (EVENT_TX_HALT, &dev->flags); 915 clear_bit (EVENT_TX_HALT, &dev->flags);
915 if (status != -ESHUTDOWN) 916 if (status != -ESHUTDOWN)
@@ -928,8 +929,8 @@ fail_pipe:
928 status != -ESHUTDOWN) { 929 status != -ESHUTDOWN) {
929 if (netif_msg_rx_err (dev)) 930 if (netif_msg_rx_err (dev))
930fail_halt: 931fail_halt:
931 deverr (dev, "can't clear rx halt, status %d", 932 netdev_err(dev->net, "can't clear rx halt, status %d\n",
932 status); 933 status);
933 } else { 934 } else {
934 clear_bit (EVENT_RX_HALT, &dev->flags); 935 clear_bit (EVENT_RX_HALT, &dev->flags);
935 tasklet_schedule (&dev->bh); 936 tasklet_schedule (&dev->bh);
@@ -967,18 +968,18 @@ fail_lowmem:
967 if(info->link_reset && (retval = info->link_reset(dev)) < 0) { 968 if(info->link_reset && (retval = info->link_reset(dev)) < 0) {
968 usb_autopm_put_interface(dev->intf); 969 usb_autopm_put_interface(dev->intf);
969skip_reset: 970skip_reset:
970 devinfo(dev, "link reset failed (%d) usbnet usb-%s-%s, %s", 971 netdev_info(dev->net, "link reset failed (%d) usbnet usb-%s-%s, %s\n",
971 retval, 972 retval,
972 dev->udev->bus->bus_name, dev->udev->devpath, 973 dev->udev->bus->bus_name,
973 info->description); 974 dev->udev->devpath,
975 info->description);
974 } else { 976 } else {
975 usb_autopm_put_interface(dev->intf); 977 usb_autopm_put_interface(dev->intf);
976 } 978 }
977 } 979 }
978 980
979 if (dev->flags) 981 if (dev->flags)
980 devdbg (dev, "kevent done, flags = 0x%lx", 982 netdev_dbg(dev->net, "kevent done, flags = 0x%lx\n", dev->flags);
981 dev->flags);
982} 983}
983 984
984/*-------------------------------------------------------------------------*/ 985/*-------------------------------------------------------------------------*/
@@ -1015,14 +1016,15 @@ static void tx_complete (struct urb *urb)
1015 mod_timer (&dev->delay, 1016 mod_timer (&dev->delay,
1016 jiffies + THROTTLE_JIFFIES); 1017 jiffies + THROTTLE_JIFFIES);
1017 if (netif_msg_link (dev)) 1018 if (netif_msg_link (dev))
1018 devdbg (dev, "tx throttle %d", 1019 netdev_dbg(dev->net, "tx throttle %d\n",
1019 urb->status); 1020 urb->status);
1020 } 1021 }
1021 netif_stop_queue (dev->net); 1022 netif_stop_queue (dev->net);
1022 break; 1023 break;
1023 default: 1024 default:
1024 if (netif_msg_tx_err (dev)) 1025 if (netif_msg_tx_err (dev))
1025 devdbg (dev, "tx err %d", entry->urb->status); 1026 netdev_dbg(dev->net, "tx err %d\n",
1027 entry->urb->status);
1026 break; 1028 break;
1027 } 1029 }
1028 } 1030 }
@@ -1065,7 +1067,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
1065 skb = info->tx_fixup (dev, skb, GFP_ATOMIC); 1067 skb = info->tx_fixup (dev, skb, GFP_ATOMIC);
1066 if (!skb) { 1068 if (!skb) {
1067 if (netif_msg_tx_err (dev)) 1069 if (netif_msg_tx_err (dev))
1068 devdbg (dev, "can't tx_fixup skb"); 1070 netdev_dbg(dev->net, "can't tx_fixup skb\n");
1069 goto drop; 1071 goto drop;
1070 } 1072 }
1071 } 1073 }
@@ -1073,7 +1075,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
1073 1075
1074 if (!(urb = usb_alloc_urb (0, GFP_ATOMIC))) { 1076 if (!(urb = usb_alloc_urb (0, GFP_ATOMIC))) {
1075 if (netif_msg_tx_err (dev)) 1077 if (netif_msg_tx_err (dev))
1076 devdbg (dev, "no urb"); 1078 netdev_dbg(dev->net, "no urb\n");
1077 goto drop; 1079 goto drop;
1078 } 1080 }
1079 1081
@@ -1113,7 +1115,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
1113 /* no use to process more packets */ 1115 /* no use to process more packets */
1114 netif_stop_queue(net); 1116 netif_stop_queue(net);
1115 spin_unlock_irqrestore(&dev->txq.lock, flags); 1117 spin_unlock_irqrestore(&dev->txq.lock, flags);
1116 devdbg(dev, "Delaying transmission for resumption"); 1118 netdev_dbg(dev->net, "Delaying transmission for resumption\n");
1117 goto deferred; 1119 goto deferred;
1118 } 1120 }
1119#endif 1121#endif
@@ -1127,7 +1129,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
1127 default: 1129 default:
1128 usb_autopm_put_interface_async(dev->intf); 1130 usb_autopm_put_interface_async(dev->intf);
1129 if (netif_msg_tx_err (dev)) 1131 if (netif_msg_tx_err (dev))
1130 devdbg (dev, "tx: submit urb err %d", retval); 1132 netdev_dbg(dev->net, "tx: submit urb err %d\n", retval);
1131 break; 1133 break;
1132 case 0: 1134 case 0:
1133 net->trans_start = jiffies; 1135 net->trans_start = jiffies;
@@ -1139,15 +1141,15 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
1139 1141
1140 if (retval) { 1142 if (retval) {
1141 if (netif_msg_tx_err (dev)) 1143 if (netif_msg_tx_err (dev))
1142 devdbg (dev, "drop, code %d", retval); 1144 netdev_dbg(dev->net, "drop, code %d\n", retval);
1143drop: 1145drop:
1144 dev->net->stats.tx_dropped++; 1146 dev->net->stats.tx_dropped++;
1145 if (skb) 1147 if (skb)
1146 dev_kfree_skb_any (skb); 1148 dev_kfree_skb_any (skb);
1147 usb_free_urb (urb); 1149 usb_free_urb (urb);
1148 } else if (netif_msg_tx_queued (dev)) { 1150 } else if (netif_msg_tx_queued (dev)) {
1149 devdbg (dev, "> tx, len %d, type 0x%x", 1151 netdev_dbg(dev->net, "> tx, len %d, type 0x%x\n",
1150 length, skb->protocol); 1152 length, skb->protocol);
1151 } 1153 }
1152#ifdef CONFIG_PM 1154#ifdef CONFIG_PM
1153deferred: 1155deferred:
@@ -1179,7 +1181,7 @@ static void usbnet_bh (unsigned long param)
1179 dev_kfree_skb (skb); 1181 dev_kfree_skb (skb);
1180 continue; 1182 continue;
1181 default: 1183 default:
1182 devdbg (dev, "bogus skb state %d", entry->state); 1184 netdev_dbg(dev->net, "bogus skb state %d\n", entry->state);
1183 } 1185 }
1184 } 1186 }
1185 1187
@@ -1208,8 +1210,8 @@ static void usbnet_bh (unsigned long param)
1208 rx_submit (dev, urb, GFP_ATOMIC); 1210 rx_submit (dev, urb, GFP_ATOMIC);
1209 } 1211 }
1210 if (temp != dev->rxq.qlen && netif_msg_link (dev)) 1212 if (temp != dev->rxq.qlen && netif_msg_link (dev))
1211 devdbg (dev, "rxqlen %d --> %d", 1213 netdev_dbg(dev->net, "rxqlen %d --> %d\n",
1212 temp, dev->rxq.qlen); 1214 temp, dev->rxq.qlen);
1213 if (dev->rxq.qlen < qlen) 1215 if (dev->rxq.qlen < qlen)
1214 tasklet_schedule (&dev->bh); 1216 tasklet_schedule (&dev->bh);
1215 } 1217 }
@@ -1241,10 +1243,10 @@ void usbnet_disconnect (struct usb_interface *intf)
1241 xdev = interface_to_usbdev (intf); 1243 xdev = interface_to_usbdev (intf);
1242 1244
1243 if (netif_msg_probe (dev)) 1245 if (netif_msg_probe (dev))
1244 devinfo (dev, "unregister '%s' usb-%s-%s, %s", 1246 netdev_info(dev->net, "unregister '%s' usb-%s-%s, %s\n",
1245 intf->dev.driver->name, 1247 intf->dev.driver->name,
1246 xdev->bus->bus_name, xdev->devpath, 1248 xdev->bus->bus_name, xdev->devpath,
1247 dev->driver_info->description); 1249 dev->driver_info->description);
1248 1250
1249 net = dev->net; 1251 net = dev->net;
1250 unregister_netdev (net); 1252 unregister_netdev (net);
@@ -1408,11 +1410,11 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1408 if (status) 1410 if (status)
1409 goto out3; 1411 goto out3;
1410 if (netif_msg_probe (dev)) 1412 if (netif_msg_probe (dev))
1411 devinfo (dev, "register '%s' at usb-%s-%s, %s, %pM", 1413 netdev_info(dev->net, "register '%s' at usb-%s-%s, %s, %pM\n",
1412 udev->dev.driver->name, 1414 udev->dev.driver->name,
1413 xdev->bus->bus_name, xdev->devpath, 1415 xdev->bus->bus_name, xdev->devpath,
1414 dev->driver_info->description, 1416 dev->driver_info->description,
1415 net->dev_addr); 1417 net->dev_addr);
1416 1418
1417 // ok, it's ready to go. 1419 // ok, it's ready to go.
1418 usb_set_intfdata (udev, dev); 1420 usb_set_intfdata (udev, dev);