aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-17 18:43:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-17 18:43:52 -0400
commit0cfd81031a26717fe14380d18275f8e217571615 (patch)
tree78a84e4cb97e7f45eb77dc0fbd8857a5dd717869 /drivers/net
parentf7ea4a4ba84f382e8eb143e435551de0feee5b4b (diff)
parent802f389a2cc6e2771b8de915ac241456d41eb79e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (94 commits) USB: remove err() macro from more usb drivers USB: remove err() macro from usb misc drivers USB: remove err() macro from usb core code USB: remove err() macro from usb class drivers USB: remove use of err() in drivers/usb/serial USB: remove info() macro from usb mtd drivers USB: remove info() macro from usb input drivers USB: remove info() macro from usb network drivers USB: remove info() macro from remaining usb drivers USB: remove info() macro from usb/misc drivers USB: remove info() macro from usb/serial drivers USB: remove warn macro from HID core USB: remove warn() macro from usb drivers USB: remove warn() macro from usb net drivers USB: remove warn() macro from usb media drivers USB: remove warn() macro from usb input drivers usb/fsl_qe_udc: clear data toggle on clear halt request usb/fsl_qe_udc: fix response to get status request fsl_usb2_udc: Fix oops on probe failure. fsl_usb2_udc: Add a wmb before priming endpoint. ...
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/irda/kingsun-sir.c3
-rw-r--r--drivers/net/irda/ks959-sir.c3
-rw-r--r--drivers/net/irda/ksdazzle-sir.c3
-rw-r--r--drivers/net/irda/stir4200.c18
-rw-r--r--drivers/net/usb/catc.c8
-rw-r--r--drivers/net/usb/kaweth.c27
-rw-r--r--drivers/net/usb/rtl8150.c31
7 files changed, 52 insertions, 41 deletions
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index 73fe83be34fe..e1429fc6d050 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -540,7 +540,8 @@ static int kingsun_probe(struct usb_interface *intf,
540 if (ret != 0) 540 if (ret != 0)
541 goto free_mem; 541 goto free_mem;
542 542
543 info("IrDA: Registered KingSun/DonShine device %s", net->name); 543 dev_info(&net->dev, "IrDA: Registered KingSun/DonShine device %s\n",
544 net->name);
544 545
545 usb_set_intfdata(intf, kingsun); 546 usb_set_intfdata(intf, kingsun);
546 547
diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c
index 8c257a51341a..2482d61662a2 100644
--- a/drivers/net/irda/ks959-sir.c
+++ b/drivers/net/irda/ks959-sir.c
@@ -801,7 +801,8 @@ static int ks959_probe(struct usb_interface *intf,
801 if (ret != 0) 801 if (ret != 0)
802 goto free_mem; 802 goto free_mem;
803 803
804 info("IrDA: Registered KingSun KS-959 device %s", net->name); 804 dev_info(&net->dev, "IrDA: Registered KingSun KS-959 device %s\n",
805 net->name);
805 806
806 usb_set_intfdata(intf, kingsun); 807 usb_set_intfdata(intf, kingsun);
807 808
diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c
index d01a28593ce2..1e0de93fd618 100644
--- a/drivers/net/irda/ksdazzle-sir.c
+++ b/drivers/net/irda/ksdazzle-sir.c
@@ -705,7 +705,8 @@ static int ksdazzle_probe(struct usb_interface *intf,
705 if (ret != 0) 705 if (ret != 0)
706 goto free_mem; 706 goto free_mem;
707 707
708 info("IrDA: Registered KingSun/Dazzle device %s", net->name); 708 dev_info(&net->dev, "IrDA: Registered KingSun/Dazzle device %s\n",
709 net->name);
709 710
710 usb_set_intfdata(intf, kingsun); 711 usb_set_intfdata(intf, kingsun);
711 712
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c
index 051963782749..3575804fd7c6 100644
--- a/drivers/net/irda/stir4200.c
+++ b/drivers/net/irda/stir4200.c
@@ -506,7 +506,7 @@ static int change_speed(struct stir_cb *stir, unsigned speed)
506 goto found; 506 goto found;
507 } 507 }
508 508
509 warn("%s: invalid speed %d", stir->netdev->name, speed); 509 dev_warn(&stir->netdev->dev, "invalid speed %d\n", speed);
510 return -EINVAL; 510 return -EINVAL;
511 511
512 found: 512 found:
@@ -598,8 +598,8 @@ static int fifo_txwait(struct stir_cb *stir, int space)
598 err = read_reg(stir, REG_FIFOCTL, stir->fifo_status, 598 err = read_reg(stir, REG_FIFOCTL, stir->fifo_status,
599 FIFO_REGS_SIZE); 599 FIFO_REGS_SIZE);
600 if (unlikely(err != FIFO_REGS_SIZE)) { 600 if (unlikely(err != FIFO_REGS_SIZE)) {
601 warn("%s: FIFO register read error: %d", 601 dev_warn(&stir->netdev->dev,
602 stir->netdev->name, err); 602 "FIFO register read error: %d\n", err);
603 603
604 return err; 604 return err;
605 } 605 }
@@ -783,8 +783,9 @@ static int stir_transmit_thread(void *arg)
783 783
784 if (unlikely(receive_start(stir))) { 784 if (unlikely(receive_start(stir))) {
785 if (net_ratelimit()) 785 if (net_ratelimit())
786 info("%s: receive usb submit failed", 786 dev_info(&dev->dev,
787 stir->netdev->name); 787 "%s: receive usb submit failed\n",
788 stir->netdev->name);
788 stir->receiving = 0; 789 stir->receiving = 0;
789 msleep(10); 790 msleep(10);
790 continue; 791 continue;
@@ -836,8 +837,8 @@ static void stir_rcv_irq(struct urb *urb)
836 837
837 /* in case of error, the kernel thread will restart us */ 838 /* in case of error, the kernel thread will restart us */
838 if (err) { 839 if (err) {
839 warn("%s: usb receive submit error: %d", 840 dev_warn(&stir->netdev->dev, "usb receive submit error: %d\n",
840 stir->netdev->name, err); 841 err);
841 stir->receiving = 0; 842 stir->receiving = 0;
842 wake_up_process(stir->thread); 843 wake_up_process(stir->thread);
843 } 844 }
@@ -1073,7 +1074,8 @@ static int stir_probe(struct usb_interface *intf,
1073 if (ret != 0) 1074 if (ret != 0)
1074 goto err_out2; 1075 goto err_out2;
1075 1076
1076 info("IrDA: Registered SigmaTel device %s", net->name); 1077 dev_info(&intf->dev, "IrDA: Registered SigmaTel device %s\n",
1078 net->name);
1077 1079
1078 usb_set_intfdata(intf, stir); 1080 usb_set_intfdata(intf, stir);
1079 1081
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index 22c17bbacb69..466a89e24444 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -456,7 +456,7 @@ static void catc_tx_timeout(struct net_device *netdev)
456{ 456{
457 struct catc *catc = netdev_priv(netdev); 457 struct catc *catc = netdev_priv(netdev);
458 458
459 warn("Transmit timed out."); 459 dev_warn(&netdev->dev, "Transmit timed out.\n");
460 usb_unlink_urb(catc->tx_urb); 460 usb_unlink_urb(catc->tx_urb);
461} 461}
462 462
@@ -847,7 +847,8 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
847 dbg("64k Memory\n"); 847 dbg("64k Memory\n");
848 break; 848 break;
849 default: 849 default:
850 warn("Couldn't detect memory size, assuming 32k"); 850 dev_warn(&intf->dev,
851 "Couldn't detect memory size, assuming 32k\n");
851 case 0x87654321: 852 case 0x87654321:
852 catc_set_reg(catc, TxBufCount, 4); 853 catc_set_reg(catc, TxBufCount, 4);
853 catc_set_reg(catc, RxBufCount, 16); 854 catc_set_reg(catc, RxBufCount, 16);
@@ -953,7 +954,8 @@ static int __init catc_init(void)
953{ 954{
954 int result = usb_register(&catc_driver); 955 int result = usb_register(&catc_driver);
955 if (result == 0) 956 if (result == 0)
956 info(DRIVER_VERSION " " DRIVER_DESC); 957 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
958 DRIVER_DESC "\n");
957 return result; 959 return result;
958} 960}
959 961
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index d6829db51b45..fdbf3be24fda 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -832,7 +832,7 @@ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
832 832
833 if((res = usb_submit_urb(kaweth->tx_urb, GFP_ATOMIC))) 833 if((res = usb_submit_urb(kaweth->tx_urb, GFP_ATOMIC)))
834 { 834 {
835 warn("kaweth failed tx_urb %d", res); 835 dev_warn(&net->dev, "kaweth failed tx_urb %d\n", res);
836skip: 836skip:
837 kaweth->stats.tx_errors++; 837 kaweth->stats.tx_errors++;
838 838
@@ -924,7 +924,7 @@ static void kaweth_tx_timeout(struct net_device *net)
924{ 924{
925 struct kaweth_device *kaweth = netdev_priv(net); 925 struct kaweth_device *kaweth = netdev_priv(net);
926 926
927 warn("%s: Tx timed out. Resetting.", net->name); 927 dev_warn(&net->dev, "%s: Tx timed out. Resetting.\n", net->name);
928 kaweth->stats.tx_errors++; 928 kaweth->stats.tx_errors++;
929 net->trans_start = jiffies; 929 net->trans_start = jiffies;
930 930
@@ -1016,10 +1016,10 @@ static int kaweth_probe(
1016 */ 1016 */
1017 1017
1018 if (le16_to_cpu(dev->descriptor.bcdDevice) >> 8) { 1018 if (le16_to_cpu(dev->descriptor.bcdDevice) >> 8) {
1019 info("Firmware present in device."); 1019 dev_info(&intf->dev, "Firmware present in device.\n");
1020 } else { 1020 } else {
1021 /* Download the firmware */ 1021 /* Download the firmware */
1022 info("Downloading firmware..."); 1022 dev_info(&intf->dev, "Downloading firmware...\n");
1023 kaweth->firmware_buf = (__u8 *)__get_free_page(GFP_KERNEL); 1023 kaweth->firmware_buf = (__u8 *)__get_free_page(GFP_KERNEL);
1024 if ((result = kaweth_download_firmware(kaweth, 1024 if ((result = kaweth_download_firmware(kaweth,
1025 "kaweth/new_code.bin", 1025 "kaweth/new_code.bin",
@@ -1061,7 +1061,7 @@ static int kaweth_probe(
1061 } 1061 }
1062 1062
1063 /* Device will now disappear for a moment... */ 1063 /* Device will now disappear for a moment... */
1064 info("Firmware loaded. I'll be back..."); 1064 dev_info(&intf->dev, "Firmware loaded. I'll be back...\n");
1065err_fw: 1065err_fw:
1066 free_page((unsigned long)kaweth->firmware_buf); 1066 free_page((unsigned long)kaweth->firmware_buf);
1067 free_netdev(netdev); 1067 free_netdev(netdev);
@@ -1075,10 +1075,10 @@ err_fw:
1075 goto err_free_netdev; 1075 goto err_free_netdev;
1076 } 1076 }
1077 1077
1078 info("Statistics collection: %x", kaweth->configuration.statistics_mask); 1078 dev_info(&intf->dev, "Statistics collection: %x\n", kaweth->configuration.statistics_mask);
1079 info("Multicast filter limit: %x", kaweth->configuration.max_multicast_filters & ((1 << 15) - 1)); 1079 dev_info(&intf->dev, "Multicast filter limit: %x\n", kaweth->configuration.max_multicast_filters & ((1 << 15) - 1));
1080 info("MTU: %d", le16_to_cpu(kaweth->configuration.segment_size)); 1080 dev_info(&intf->dev, "MTU: %d\n", le16_to_cpu(kaweth->configuration.segment_size));
1081 info("Read MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x", 1081 dev_info(&intf->dev, "Read MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n",
1082 (int)kaweth->configuration.hw_addr[0], 1082 (int)kaweth->configuration.hw_addr[0],
1083 (int)kaweth->configuration.hw_addr[1], 1083 (int)kaweth->configuration.hw_addr[1],
1084 (int)kaweth->configuration.hw_addr[2], 1084 (int)kaweth->configuration.hw_addr[2],
@@ -1174,7 +1174,8 @@ err_fw:
1174 goto err_intfdata; 1174 goto err_intfdata;
1175 } 1175 }
1176 1176
1177 info("kaweth interface created at %s", kaweth->net->name); 1177 dev_info(&intf->dev, "kaweth interface created at %s\n",
1178 kaweth->net->name);
1178 1179
1179 dbg("Kaweth probe returning."); 1180 dbg("Kaweth probe returning.");
1180 1181
@@ -1205,11 +1206,11 @@ static void kaweth_disconnect(struct usb_interface *intf)
1205 struct kaweth_device *kaweth = usb_get_intfdata(intf); 1206 struct kaweth_device *kaweth = usb_get_intfdata(intf);
1206 struct net_device *netdev; 1207 struct net_device *netdev;
1207 1208
1208 info("Unregistering"); 1209 dev_info(&intf->dev, "Unregistering\n");
1209 1210
1210 usb_set_intfdata(intf, NULL); 1211 usb_set_intfdata(intf, NULL);
1211 if (!kaweth) { 1212 if (!kaweth) {
1212 warn("unregistering non-existant device"); 1213 dev_warn(&intf->dev, "unregistering non-existant device\n");
1213 return; 1214 return;
1214 } 1215 }
1215 netdev = kaweth->net; 1216 netdev = kaweth->net;
@@ -1269,7 +1270,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
1269 1270
1270 if (!wait_event_timeout(awd.wqh, awd.done, timeout)) { 1271 if (!wait_event_timeout(awd.wqh, awd.done, timeout)) {
1271 // timeout 1272 // timeout
1272 warn("usb_control/bulk_msg: timeout"); 1273 dev_warn(&urb->dev->dev, "usb_control/bulk_msg: timeout\n");
1273 usb_kill_urb(urb); // remove urb safely 1274 usb_kill_urb(urb); // remove urb safely
1274 status = -ETIMEDOUT; 1275 status = -ETIMEDOUT;
1275 } 1276 }
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)
699static void rtl8150_tx_timeout(struct net_device *netdev) 701static 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
985static int __init usb_rtl8150_init(void) 987static 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