diff options
Diffstat (limited to 'drivers/net/usb/rtl8150.c')
-rw-r--r-- | drivers/net/usb/rtl8150.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index df56a518691c..6133401ebc67 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c | |||
@@ -221,7 +221,7 @@ static void ctrl_callback(struct urb *urb) | |||
221 | case -ENOENT: | 221 | case -ENOENT: |
222 | break; | 222 | break; |
223 | default: | 223 | default: |
224 | warn("ctrl urb status %d", urb->status); | 224 | dev_warn(&urb->dev->dev, "ctrl urb status %d\n", urb->status); |
225 | } | 225 | } |
226 | dev = urb->context; | 226 | dev = urb->context; |
227 | clear_bit(RX_REG_SET, &dev->flags); | 227 | clear_bit(RX_REG_SET, &dev->flags); |
@@ -441,10 +441,10 @@ static void read_bulk_callback(struct urb *urb) | |||
441 | case -ENOENT: | 441 | case -ENOENT: |
442 | return; /* the urb is in unlink state */ | 442 | return; /* the urb is in unlink state */ |
443 | case -ETIME: | 443 | case -ETIME: |
444 | warn("may be reset is needed?.."); | 444 | dev_warn(&urb->dev->dev, "may be reset is needed?..\n"); |
445 | goto goon; | 445 | goto goon; |
446 | default: | 446 | default: |
447 | warn("Rx status %d", urb->status); | 447 | dev_warn(&urb->dev->dev, "Rx status %d\n", urb->status); |
448 | goto goon; | 448 | goto goon; |
449 | } | 449 | } |
450 | 450 | ||
@@ -538,7 +538,8 @@ static void write_bulk_callback(struct urb *urb) | |||
538 | if (!netif_device_present(dev->netdev)) | 538 | if (!netif_device_present(dev->netdev)) |
539 | return; | 539 | return; |
540 | if (urb->status) | 540 | if (urb->status) |
541 | info("%s: Tx status %d", dev->netdev->name, urb->status); | 541 | dev_info(&urb->dev->dev, "%s: Tx status %d\n", |
542 | dev->netdev->name, urb->status); | ||
542 | dev->netdev->trans_start = jiffies; | 543 | dev->netdev->trans_start = jiffies; |
543 | netif_wake_queue(dev->netdev); | 544 | netif_wake_queue(dev->netdev); |
544 | } | 545 | } |
@@ -561,7 +562,8 @@ static void intr_callback(struct urb *urb) | |||
561 | return; | 562 | return; |
562 | /* -EPIPE: should clear the halt */ | 563 | /* -EPIPE: should clear the halt */ |
563 | default: | 564 | default: |
564 | info("%s: intr status %d", dev->netdev->name, urb->status); | 565 | dev_info(&urb->dev->dev, "%s: intr status %d\n", |
566 | dev->netdev->name, urb->status); | ||
565 | goto resubmit; | 567 | goto resubmit; |
566 | } | 568 | } |
567 | 569 | ||
@@ -665,7 +667,7 @@ static int enable_net_traffic(rtl8150_t * dev) | |||
665 | u8 cr, tcr, rcr, msr; | 667 | u8 cr, tcr, rcr, msr; |
666 | 668 | ||
667 | if (!rtl8150_reset(dev)) { | 669 | if (!rtl8150_reset(dev)) { |
668 | warn("%s - device reset failed", __FUNCTION__); | 670 | dev_warn(&dev->udev->dev, "device reset failed\n"); |
669 | } | 671 | } |
670 | /* RCR bit7=1 attach Rx info at the end; =0 HW CRC (which is broken) */ | 672 | /* RCR bit7=1 attach Rx info at the end; =0 HW CRC (which is broken) */ |
671 | rcr = 0x9e; | 673 | rcr = 0x9e; |
@@ -699,7 +701,7 @@ static struct net_device_stats *rtl8150_netdev_stats(struct net_device *dev) | |||
699 | static void rtl8150_tx_timeout(struct net_device *netdev) | 701 | static void rtl8150_tx_timeout(struct net_device *netdev) |
700 | { | 702 | { |
701 | rtl8150_t *dev = netdev_priv(netdev); | 703 | rtl8150_t *dev = netdev_priv(netdev); |
702 | warn("%s: Tx timeout.", netdev->name); | 704 | dev_warn(&netdev->dev, "Tx timeout.\n"); |
703 | usb_unlink_urb(dev->tx_urb); | 705 | usb_unlink_urb(dev->tx_urb); |
704 | dev->stats.tx_errors++; | 706 | dev->stats.tx_errors++; |
705 | } | 707 | } |
@@ -710,12 +712,12 @@ static void rtl8150_set_multicast(struct net_device *netdev) | |||
710 | netif_stop_queue(netdev); | 712 | netif_stop_queue(netdev); |
711 | if (netdev->flags & IFF_PROMISC) { | 713 | if (netdev->flags & IFF_PROMISC) { |
712 | dev->rx_creg |= cpu_to_le16(0x0001); | 714 | dev->rx_creg |= cpu_to_le16(0x0001); |
713 | info("%s: promiscuous mode", netdev->name); | 715 | dev_info(&netdev->dev, "%s: promiscuous mode\n", netdev->name); |
714 | } else if (netdev->mc_count || | 716 | } else if (netdev->mc_count || |
715 | (netdev->flags & IFF_ALLMULTI)) { | 717 | (netdev->flags & IFF_ALLMULTI)) { |
716 | dev->rx_creg &= cpu_to_le16(0xfffe); | 718 | dev->rx_creg &= cpu_to_le16(0xfffe); |
717 | dev->rx_creg |= cpu_to_le16(0x0002); | 719 | dev->rx_creg |= cpu_to_le16(0x0002); |
718 | info("%s: allmulti set", netdev->name); | 720 | dev_info(&netdev->dev, "%s: allmulti set\n", netdev->name); |
719 | } else { | 721 | } else { |
720 | /* ~RX_MULTICAST, ~RX_PROMISCUOUS */ | 722 | /* ~RX_MULTICAST, ~RX_PROMISCUOUS */ |
721 | dev->rx_creg &= cpu_to_le16(0x00fc); | 723 | dev->rx_creg &= cpu_to_le16(0x00fc); |
@@ -740,7 +742,7 @@ static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
740 | if (res == -ENODEV) | 742 | if (res == -ENODEV) |
741 | netif_device_detach(dev->netdev); | 743 | netif_device_detach(dev->netdev); |
742 | else { | 744 | else { |
743 | warn("failed tx_urb %d\n", res); | 745 | dev_warn(&netdev->dev, "failed tx_urb %d\n", res); |
744 | dev->stats.tx_errors++; | 746 | dev->stats.tx_errors++; |
745 | netif_start_queue(netdev); | 747 | netif_start_queue(netdev); |
746 | } | 748 | } |
@@ -783,7 +785,7 @@ static int rtl8150_open(struct net_device *netdev) | |||
783 | if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL))) { | 785 | if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL))) { |
784 | if (res == -ENODEV) | 786 | if (res == -ENODEV) |
785 | netif_device_detach(dev->netdev); | 787 | netif_device_detach(dev->netdev); |
786 | warn("%s: rx_urb submit failed: %d", __FUNCTION__, res); | 788 | dev_warn(&netdev->dev, "rx_urb submit failed: %d\n", res); |
787 | return res; | 789 | return res; |
788 | } | 790 | } |
789 | usb_fill_int_urb(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3), | 791 | usb_fill_int_urb(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3), |
@@ -792,7 +794,7 @@ static int rtl8150_open(struct net_device *netdev) | |||
792 | if ((res = usb_submit_urb(dev->intr_urb, GFP_KERNEL))) { | 794 | if ((res = usb_submit_urb(dev->intr_urb, GFP_KERNEL))) { |
793 | if (res == -ENODEV) | 795 | if (res == -ENODEV) |
794 | netif_device_detach(dev->netdev); | 796 | netif_device_detach(dev->netdev); |
795 | warn("%s: intr_urb submit failed: %d", __FUNCTION__, res); | 797 | dev_warn(&netdev->dev, "intr_urb submit failed: %d\n", res); |
796 | usb_kill_urb(dev->rx_urb); | 798 | usb_kill_urb(dev->rx_urb); |
797 | return res; | 799 | return res; |
798 | } | 800 | } |
@@ -947,7 +949,7 @@ static int rtl8150_probe(struct usb_interface *intf, | |||
947 | goto out2; | 949 | goto out2; |
948 | } | 950 | } |
949 | 951 | ||
950 | info("%s: rtl8150 is detected", netdev->name); | 952 | dev_info(&intf->dev, "%s: rtl8150 is detected\n", netdev->name); |
951 | 953 | ||
952 | return 0; | 954 | return 0; |
953 | 955 | ||
@@ -984,7 +986,8 @@ static void rtl8150_disconnect(struct usb_interface *intf) | |||
984 | 986 | ||
985 | static int __init usb_rtl8150_init(void) | 987 | static int __init usb_rtl8150_init(void) |
986 | { | 988 | { |
987 | info(DRIVER_DESC " " DRIVER_VERSION); | 989 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
990 | DRIVER_DESC "\n"); | ||
988 | return usb_register(&rtl8150_driver); | 991 | return usb_register(&rtl8150_driver); |
989 | } | 992 | } |
990 | 993 | ||