diff options
author | Joe Perches <joe@perches.com> | 2010-02-17 05:30:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 16:35:41 -0500 |
commit | a475f603d23392f386e45cf377b17c30ed3bbb80 (patch) | |
tree | 47e3377f1a1bf402f33dbddc4e14768e2a9881ec /drivers/net/usb/pegasus.c | |
parent | 60b86755929e1a7e9038c8d860a8491cfdf8d93a (diff) |
drivers/net/usb: Use netif_<level> logging facilities
Convert from:
if (netif_msg_<foo>(priv))
dev_<level>(dev...
to
netif_<level>(priv, foo, dev...
Also convert a few:
if (i < REG_TIMEOUT) {
etc...
return ret;
}
to
if (i >= REG_TIMEOUT)
goto fail;
etc...
return ret;
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/pegasus.c')
-rw-r--r-- | drivers/net/usb/pegasus.c | 170 |
1 files changed, 74 insertions, 96 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 44ae8f6d3135..41838773b568 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -132,9 +132,10 @@ static void ctrl_callback(struct urb *urb) | |||
132 | case -ENOENT: | 132 | case -ENOENT: |
133 | break; | 133 | break; |
134 | default: | 134 | default: |
135 | if (netif_msg_drv(pegasus) && printk_ratelimit()) | 135 | if (net_ratelimit()) |
136 | dev_dbg(&pegasus->intf->dev, "%s, status %d\n", | 136 | netif_dbg(pegasus, drv, pegasus->net, |
137 | __func__, status); | 137 | "%s, status %d\n", __func__, status); |
138 | break; | ||
138 | } | 139 | } |
139 | pegasus->flags &= ~ETH_REGS_CHANGED; | 140 | pegasus->flags &= ~ETH_REGS_CHANGED; |
140 | wake_up(&pegasus->ctrl_wait); | 141 | wake_up(&pegasus->ctrl_wait); |
@@ -149,9 +150,8 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
149 | 150 | ||
150 | buffer = kmalloc(size, GFP_KERNEL); | 151 | buffer = kmalloc(size, GFP_KERNEL); |
151 | if (!buffer) { | 152 | if (!buffer) { |
152 | if (netif_msg_drv(pegasus)) | 153 | netif_warn(pegasus, drv, pegasus->net, |
153 | dev_warn(&pegasus->intf->dev, "out of memory in %s\n", | 154 | "out of memory in %s\n", __func__); |
154 | __func__); | ||
155 | return -ENOMEM; | 155 | return -ENOMEM; |
156 | } | 156 | } |
157 | add_wait_queue(&pegasus->ctrl_wait, &wait); | 157 | add_wait_queue(&pegasus->ctrl_wait, &wait); |
@@ -181,9 +181,9 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
181 | set_current_state(TASK_RUNNING); | 181 | set_current_state(TASK_RUNNING); |
182 | if (ret == -ENODEV) | 182 | if (ret == -ENODEV) |
183 | netif_device_detach(pegasus->net); | 183 | netif_device_detach(pegasus->net); |
184 | if (netif_msg_drv(pegasus) && printk_ratelimit()) | 184 | if (net_ratelimit()) |
185 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 185 | netif_err(pegasus, drv, pegasus->net, |
186 | __func__, ret); | 186 | "%s, status %d\n", __func__, ret); |
187 | goto out; | 187 | goto out; |
188 | } | 188 | } |
189 | 189 | ||
@@ -205,9 +205,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
205 | 205 | ||
206 | buffer = kmalloc(size, GFP_KERNEL); | 206 | buffer = kmalloc(size, GFP_KERNEL); |
207 | if (!buffer) { | 207 | if (!buffer) { |
208 | if (netif_msg_drv(pegasus)) | 208 | netif_warn(pegasus, drv, pegasus->net, |
209 | dev_warn(&pegasus->intf->dev, "out of memory in %s\n", | 209 | "out of memory in %s\n", __func__); |
210 | __func__); | ||
211 | return -ENOMEM; | 210 | return -ENOMEM; |
212 | } | 211 | } |
213 | memcpy(buffer, data, size); | 212 | memcpy(buffer, data, size); |
@@ -237,9 +236,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
237 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { | 236 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { |
238 | if (ret == -ENODEV) | 237 | if (ret == -ENODEV) |
239 | netif_device_detach(pegasus->net); | 238 | netif_device_detach(pegasus->net); |
240 | if (netif_msg_drv(pegasus)) | 239 | netif_err(pegasus, drv, pegasus->net, |
241 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 240 | "%s, status %d\n", __func__, ret); |
242 | __func__, ret); | ||
243 | goto out; | 241 | goto out; |
244 | } | 242 | } |
245 | 243 | ||
@@ -259,9 +257,8 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) | |||
259 | 257 | ||
260 | tmp = kmalloc(1, GFP_KERNEL); | 258 | tmp = kmalloc(1, GFP_KERNEL); |
261 | if (!tmp) { | 259 | if (!tmp) { |
262 | if (netif_msg_drv(pegasus)) | 260 | netif_warn(pegasus, drv, pegasus->net, |
263 | dev_warn(&pegasus->intf->dev, "out of memory in %s\n", | 261 | "out of memory in %s\n", __func__); |
264 | __func__); | ||
265 | return -ENOMEM; | 262 | return -ENOMEM; |
266 | } | 263 | } |
267 | memcpy(tmp, &data, 1); | 264 | memcpy(tmp, &data, 1); |
@@ -290,9 +287,9 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) | |||
290 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { | 287 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { |
291 | if (ret == -ENODEV) | 288 | if (ret == -ENODEV) |
292 | netif_device_detach(pegasus->net); | 289 | netif_device_detach(pegasus->net); |
293 | if (netif_msg_drv(pegasus) && printk_ratelimit()) | 290 | if (net_ratelimit()) |
294 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 291 | netif_err(pegasus, drv, pegasus->net, |
295 | __func__, ret); | 292 | "%s, status %d\n", __func__, ret); |
296 | goto out; | 293 | goto out; |
297 | } | 294 | } |
298 | 295 | ||
@@ -323,9 +320,8 @@ static int update_eth_regs_async(pegasus_t * pegasus) | |||
323 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { | 320 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { |
324 | if (ret == -ENODEV) | 321 | if (ret == -ENODEV) |
325 | netif_device_detach(pegasus->net); | 322 | netif_device_detach(pegasus->net); |
326 | if (netif_msg_drv(pegasus)) | 323 | netif_err(pegasus, drv, pegasus->net, |
327 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 324 | "%s, status %d\n", __func__, ret); |
328 | __func__, ret); | ||
329 | } | 325 | } |
330 | 326 | ||
331 | return ret; | 327 | return ret; |
@@ -349,14 +345,16 @@ static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd) | |||
349 | if (data[0] & PHY_DONE) | 345 | if (data[0] & PHY_DONE) |
350 | break; | 346 | break; |
351 | } | 347 | } |
352 | if (i < REG_TIMEOUT) { | 348 | |
353 | ret = get_registers(pegasus, PhyData, 2, ®di); | 349 | if (i >= REG_TIMEOUT) |
354 | *regd = le16_to_cpu(regdi); | 350 | goto fail; |
355 | return ret; | 351 | |
356 | } | 352 | ret = get_registers(pegasus, PhyData, 2, ®di); |
353 | *regd = le16_to_cpu(regdi); | ||
354 | return ret; | ||
355 | |||
357 | fail: | 356 | fail: |
358 | if (netif_msg_drv(pegasus)) | 357 | netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__); |
359 | dev_warn(&pegasus->intf->dev, "%s failed\n", __func__); | ||
360 | 358 | ||
361 | return ret; | 359 | return ret; |
362 | } | 360 | } |
@@ -388,12 +386,14 @@ static int write_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 regd) | |||
388 | if (data[0] & PHY_DONE) | 386 | if (data[0] & PHY_DONE) |
389 | break; | 387 | break; |
390 | } | 388 | } |
391 | if (i < REG_TIMEOUT) | 389 | |
392 | return ret; | 390 | if (i >= REG_TIMEOUT) |
391 | goto fail; | ||
392 | |||
393 | return ret; | ||
393 | 394 | ||
394 | fail: | 395 | fail: |
395 | if (netif_msg_drv(pegasus)) | 396 | netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__); |
396 | dev_warn(&pegasus->intf->dev, "%s failed\n", __func__); | ||
397 | return -ETIMEDOUT; | 397 | return -ETIMEDOUT; |
398 | } | 398 | } |
399 | 399 | ||
@@ -422,15 +422,15 @@ static int read_eprom_word(pegasus_t * pegasus, __u8 index, __u16 * retdata) | |||
422 | if (ret == -ESHUTDOWN) | 422 | if (ret == -ESHUTDOWN) |
423 | goto fail; | 423 | goto fail; |
424 | } | 424 | } |
425 | if (i < REG_TIMEOUT) { | 425 | if (i >= REG_TIMEOUT) |
426 | ret = get_registers(pegasus, EpromData, 2, &retdatai); | 426 | goto fail; |
427 | *retdata = le16_to_cpu(retdatai); | 427 | |
428 | return ret; | 428 | ret = get_registers(pegasus, EpromData, 2, &retdatai); |
429 | } | 429 | *retdata = le16_to_cpu(retdatai); |
430 | return ret; | ||
430 | 431 | ||
431 | fail: | 432 | fail: |
432 | if (netif_msg_drv(pegasus)) | 433 | netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__); |
433 | dev_warn(&pegasus->intf->dev, "%s failed\n", __func__); | ||
434 | return -ETIMEDOUT; | 434 | return -ETIMEDOUT; |
435 | } | 435 | } |
436 | 436 | ||
@@ -475,11 +475,13 @@ static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data) | |||
475 | break; | 475 | break; |
476 | } | 476 | } |
477 | disable_eprom_write(pegasus); | 477 | disable_eprom_write(pegasus); |
478 | if (i < REG_TIMEOUT) | 478 | if (i >= REG_TIMEOUT) |
479 | return ret; | 479 | goto fail; |
480 | |||
481 | return ret; | ||
482 | |||
480 | fail: | 483 | fail: |
481 | if (netif_msg_drv(pegasus)) | 484 | netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__); |
482 | dev_warn(&pegasus->intf->dev, "%s failed\n", __func__); | ||
483 | return -ETIMEDOUT; | 485 | return -ETIMEDOUT; |
484 | } | 486 | } |
485 | #endif /* PEGASUS_WRITE_EEPROM */ | 487 | #endif /* PEGASUS_WRITE_EEPROM */ |
@@ -642,25 +644,20 @@ static void read_bulk_callback(struct urb *urb) | |||
642 | case 0: | 644 | case 0: |
643 | break; | 645 | break; |
644 | case -ETIME: | 646 | case -ETIME: |
645 | if (netif_msg_rx_err(pegasus)) | 647 | netif_dbg(pegasus, rx_err, net, "reset MAC\n"); |
646 | pr_debug("%s: reset MAC\n", net->name); | ||
647 | pegasus->flags &= ~PEGASUS_RX_BUSY; | 648 | pegasus->flags &= ~PEGASUS_RX_BUSY; |
648 | break; | 649 | break; |
649 | case -EPIPE: /* stall, or disconnect from TT */ | 650 | case -EPIPE: /* stall, or disconnect from TT */ |
650 | /* FIXME schedule work to clear the halt */ | 651 | /* FIXME schedule work to clear the halt */ |
651 | if (netif_msg_rx_err(pegasus)) | 652 | netif_warn(pegasus, rx_err, net, "no rx stall recovery\n"); |
652 | printk(KERN_WARNING "%s: no rx stall recovery\n", | ||
653 | net->name); | ||
654 | return; | 653 | return; |
655 | case -ENOENT: | 654 | case -ENOENT: |
656 | case -ECONNRESET: | 655 | case -ECONNRESET: |
657 | case -ESHUTDOWN: | 656 | case -ESHUTDOWN: |
658 | if (netif_msg_ifdown(pegasus)) | 657 | netif_dbg(pegasus, ifdown, net, "rx unlink, %d\n", status); |
659 | pr_debug("%s: rx unlink, %d\n", net->name, status); | ||
660 | return; | 658 | return; |
661 | default: | 659 | default: |
662 | if (netif_msg_rx_err(pegasus)) | 660 | netif_dbg(pegasus, rx_err, net, "RX status %d\n", status); |
663 | pr_debug("%s: RX status %d\n", net->name, status); | ||
664 | goto goon; | 661 | goto goon; |
665 | } | 662 | } |
666 | 663 | ||
@@ -669,9 +666,8 @@ static void read_bulk_callback(struct urb *urb) | |||
669 | 666 | ||
670 | rx_status = buf[count - 2]; | 667 | rx_status = buf[count - 2]; |
671 | if (rx_status & 0x1e) { | 668 | if (rx_status & 0x1e) { |
672 | if (netif_msg_rx_err(pegasus)) | 669 | netif_dbg(pegasus, rx_err, net, |
673 | pr_debug("%s: RX packet error %x\n", | 670 | "RX packet error %x\n", rx_status); |
674 | net->name, rx_status); | ||
675 | pegasus->stats.rx_errors++; | 671 | pegasus->stats.rx_errors++; |
676 | if (rx_status & 0x06) // long or runt | 672 | if (rx_status & 0x06) // long or runt |
677 | pegasus->stats.rx_length_errors++; | 673 | pegasus->stats.rx_length_errors++; |
@@ -758,9 +754,7 @@ static void rx_fixup(unsigned long data) | |||
758 | pegasus->rx_skb = pull_skb(pegasus); | 754 | pegasus->rx_skb = pull_skb(pegasus); |
759 | } | 755 | } |
760 | if (pegasus->rx_skb == NULL) { | 756 | if (pegasus->rx_skb == NULL) { |
761 | if (netif_msg_rx_err(pegasus)) | 757 | netif_warn(pegasus, rx_err, pegasus->net, "low on memory\n"); |
762 | printk(KERN_WARNING "%s: low on memory\n", | ||
763 | pegasus->net->name); | ||
764 | tasklet_schedule(&pegasus->rx_tl); | 758 | tasklet_schedule(&pegasus->rx_tl); |
765 | goto done; | 759 | goto done; |
766 | } | 760 | } |
@@ -800,19 +794,15 @@ static void write_bulk_callback(struct urb *urb) | |||
800 | case -EPIPE: | 794 | case -EPIPE: |
801 | /* FIXME schedule_work() to clear the tx halt */ | 795 | /* FIXME schedule_work() to clear the tx halt */ |
802 | netif_stop_queue(net); | 796 | netif_stop_queue(net); |
803 | if (netif_msg_tx_err(pegasus)) | 797 | netif_warn(pegasus, tx_err, net, "no tx stall recovery\n"); |
804 | printk(KERN_WARNING "%s: no tx stall recovery\n", | ||
805 | net->name); | ||
806 | return; | 798 | return; |
807 | case -ENOENT: | 799 | case -ENOENT: |
808 | case -ECONNRESET: | 800 | case -ECONNRESET: |
809 | case -ESHUTDOWN: | 801 | case -ESHUTDOWN: |
810 | if (netif_msg_ifdown(pegasus)) | 802 | netif_dbg(pegasus, ifdown, net, "tx unlink, %d\n", status); |
811 | pr_debug("%s: tx unlink, %d\n", net->name, status); | ||
812 | return; | 803 | return; |
813 | default: | 804 | default: |
814 | if (netif_msg_tx_err(pegasus)) | 805 | netif_info(pegasus, tx_err, net, "TX status %d\n", status); |
815 | pr_info("%s: TX status %d\n", net->name, status); | ||
816 | /* FALL THROUGH */ | 806 | /* FALL THROUGH */ |
817 | case 0: | 807 | case 0: |
818 | break; | 808 | break; |
@@ -843,9 +833,7 @@ static void intr_callback(struct urb *urb) | |||
843 | /* some Pegasus-I products report LOTS of data | 833 | /* some Pegasus-I products report LOTS of data |
844 | * toggle errors... avoid log spamming | 834 | * toggle errors... avoid log spamming |
845 | */ | 835 | */ |
846 | if (netif_msg_timer(pegasus)) | 836 | netif_dbg(pegasus, timer, net, "intr status %d\n", status); |
847 | pr_debug("%s: intr status %d\n", net->name, | ||
848 | status); | ||
849 | } | 837 | } |
850 | 838 | ||
851 | if (urb->actual_length >= 6) { | 839 | if (urb->actual_length >= 6) { |
@@ -875,16 +863,15 @@ static void intr_callback(struct urb *urb) | |||
875 | res = usb_submit_urb(urb, GFP_ATOMIC); | 863 | res = usb_submit_urb(urb, GFP_ATOMIC); |
876 | if (res == -ENODEV) | 864 | if (res == -ENODEV) |
877 | netif_device_detach(pegasus->net); | 865 | netif_device_detach(pegasus->net); |
878 | if (res && netif_msg_timer(pegasus)) | 866 | if (res) |
879 | printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n", | 867 | netif_err(pegasus, timer, net, |
880 | net->name, res); | 868 | "can't resubmit interrupt urb, %d\n", res); |
881 | } | 869 | } |
882 | 870 | ||
883 | static void pegasus_tx_timeout(struct net_device *net) | 871 | static void pegasus_tx_timeout(struct net_device *net) |
884 | { | 872 | { |
885 | pegasus_t *pegasus = netdev_priv(net); | 873 | pegasus_t *pegasus = netdev_priv(net); |
886 | if (netif_msg_timer(pegasus)) | 874 | netif_warn(pegasus, timer, net, "tx timeout\n"); |
887 | printk(KERN_WARNING "%s: tx timeout\n", net->name); | ||
888 | usb_unlink_urb(pegasus->tx_urb); | 875 | usb_unlink_urb(pegasus->tx_urb); |
889 | pegasus->stats.tx_errors++; | 876 | pegasus->stats.tx_errors++; |
890 | } | 877 | } |
@@ -906,9 +893,7 @@ static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb, | |||
906 | pegasus->tx_buff, count, | 893 | pegasus->tx_buff, count, |
907 | write_bulk_callback, pegasus); | 894 | write_bulk_callback, pegasus); |
908 | if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) { | 895 | if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) { |
909 | if (netif_msg_tx_err(pegasus)) | 896 | netif_warn(pegasus, tx_err, net, "fail tx, %d\n", res); |
910 | printk(KERN_WARNING "%s: fail tx, %d\n", | ||
911 | net->name, res); | ||
912 | switch (res) { | 897 | switch (res) { |
913 | case -EPIPE: /* stall, or disconnect from TT */ | 898 | case -EPIPE: /* stall, or disconnect from TT */ |
914 | /* cleanup should already have been scheduled */ | 899 | /* cleanup should already have been scheduled */ |
@@ -952,10 +937,9 @@ static inline void get_interrupt_interval(pegasus_t * pegasus) | |||
952 | interval = data >> 8; | 937 | interval = data >> 8; |
953 | if (pegasus->usb->speed != USB_SPEED_HIGH) { | 938 | if (pegasus->usb->speed != USB_SPEED_HIGH) { |
954 | if (interval < 0x80) { | 939 | if (interval < 0x80) { |
955 | if (netif_msg_timer(pegasus)) | 940 | netif_info(pegasus, timer, pegasus->net, |
956 | dev_info(&pegasus->intf->dev, "intr interval " | 941 | "intr interval changed from %ums to %ums\n", |
957 | "changed from %ums to %ums\n", | 942 | interval, 0x80); |
958 | interval, 0x80); | ||
959 | interval = 0x80; | 943 | interval = 0x80; |
960 | data = (data & 0x00FF) | ((u16)interval << 8); | 944 | data = (data & 0x00FF) | ((u16)interval << 8); |
961 | #ifdef PEGASUS_WRITE_EEPROM | 945 | #ifdef PEGASUS_WRITE_EEPROM |
@@ -1046,8 +1030,7 @@ static int pegasus_open(struct net_device *net) | |||
1046 | if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) { | 1030 | if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) { |
1047 | if (res == -ENODEV) | 1031 | if (res == -ENODEV) |
1048 | netif_device_detach(pegasus->net); | 1032 | netif_device_detach(pegasus->net); |
1049 | if (netif_msg_ifup(pegasus)) | 1033 | netif_dbg(pegasus, ifup, net, "failed rx_urb, %d\n", res); |
1050 | pr_debug("%s: failed rx_urb, %d", net->name, res); | ||
1051 | goto exit; | 1034 | goto exit; |
1052 | } | 1035 | } |
1053 | 1036 | ||
@@ -1058,15 +1041,13 @@ static int pegasus_open(struct net_device *net) | |||
1058 | if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) { | 1041 | if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) { |
1059 | if (res == -ENODEV) | 1042 | if (res == -ENODEV) |
1060 | netif_device_detach(pegasus->net); | 1043 | netif_device_detach(pegasus->net); |
1061 | if (netif_msg_ifup(pegasus)) | 1044 | netif_dbg(pegasus, ifup, net, "failed intr_urb, %d\n", res); |
1062 | pr_debug("%s: failed intr_urb, %d\n", net->name, res); | ||
1063 | usb_kill_urb(pegasus->rx_urb); | 1045 | usb_kill_urb(pegasus->rx_urb); |
1064 | goto exit; | 1046 | goto exit; |
1065 | } | 1047 | } |
1066 | if ((res = enable_net_traffic(net, pegasus->usb))) { | 1048 | if ((res = enable_net_traffic(net, pegasus->usb))) { |
1067 | if (netif_msg_ifup(pegasus)) | 1049 | netif_dbg(pegasus, ifup, net, |
1068 | pr_debug("%s: can't enable_net_traffic() - %d\n", | 1050 | "can't enable_net_traffic() - %d\n", res); |
1069 | net->name, res); | ||
1070 | res = -EIO; | 1051 | res = -EIO; |
1071 | usb_kill_urb(pegasus->rx_urb); | 1052 | usb_kill_urb(pegasus->rx_urb); |
1072 | usb_kill_urb(pegasus->intr_urb); | 1053 | usb_kill_urb(pegasus->intr_urb); |
@@ -1075,8 +1056,7 @@ static int pegasus_open(struct net_device *net) | |||
1075 | } | 1056 | } |
1076 | set_carrier(net); | 1057 | set_carrier(net); |
1077 | netif_start_queue(net); | 1058 | netif_start_queue(net); |
1078 | if (netif_msg_ifup(pegasus)) | 1059 | netif_dbg(pegasus, ifup, net, "open\n"); |
1079 | pr_debug("%s: open\n", net->name); | ||
1080 | res = 0; | 1060 | res = 0; |
1081 | exit: | 1061 | exit: |
1082 | return res; | 1062 | return res; |
@@ -1230,13 +1210,11 @@ static void pegasus_set_multicast(struct net_device *net) | |||
1230 | 1210 | ||
1231 | if (net->flags & IFF_PROMISC) { | 1211 | if (net->flags & IFF_PROMISC) { |
1232 | pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; | 1212 | pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; |
1233 | if (netif_msg_link(pegasus)) | 1213 | netif_info(pegasus, link, net, "Promiscuous mode enabled\n"); |
1234 | pr_info("%s: Promiscuous mode enabled.\n", net->name); | ||
1235 | } else if (!netdev_mc_empty(net) || (net->flags & IFF_ALLMULTI)) { | 1214 | } else if (!netdev_mc_empty(net) || (net->flags & IFF_ALLMULTI)) { |
1236 | pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; | 1215 | pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; |
1237 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; | 1216 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; |
1238 | if (netif_msg_link(pegasus)) | 1217 | netif_dbg(pegasus, link, net, "set allmulti\n"); |
1239 | pr_debug("%s: set allmulti\n", net->name); | ||
1240 | } else { | 1218 | } else { |
1241 | pegasus->eth_regs[EthCtrl0] &= ~RX_MULTICAST; | 1219 | pegasus->eth_regs[EthCtrl0] &= ~RX_MULTICAST; |
1242 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; | 1220 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; |