Commit a475f603 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 60b86755
...@@ -339,8 +339,8 @@ EXPORT_SYMBOL_GPL(usbnet_cdc_unbind); ...@@ -339,8 +339,8 @@ EXPORT_SYMBOL_GPL(usbnet_cdc_unbind);
static void dumpspeed(struct usbnet *dev, __le32 *speeds) static void dumpspeed(struct usbnet *dev, __le32 *speeds)
{ {
if (netif_msg_timer(dev)) netif_info(dev, timer, dev->net,
netdev_info(dev->net, "link speeds: %u kbps up, %u kbps down\n", "link speeds: %u kbps up, %u kbps down\n",
__le32_to_cpu(speeds[0]) / 1000, __le32_to_cpu(speeds[0]) / 1000,
__le32_to_cpu(speeds[1]) / 1000); __le32_to_cpu(speeds[1]) / 1000);
} }
...@@ -361,8 +361,7 @@ static void cdc_status(struct usbnet *dev, struct urb *urb) ...@@ -361,8 +361,7 @@ static void cdc_status(struct usbnet *dev, struct urb *urb)
event = urb->transfer_buffer; event = urb->transfer_buffer;
switch (event->bNotificationType) { switch (event->bNotificationType) {
case USB_CDC_NOTIFY_NETWORK_CONNECTION: case USB_CDC_NOTIFY_NETWORK_CONNECTION:
if (netif_msg_timer(dev)) netif_dbg(dev, timer, dev->net, "CDC: carrier %s\n",
netdev_dbg(dev->net, "CDC: carrier %s\n",
event->wValue ? "on" : "off"); event->wValue ? "on" : "off");
if (event->wValue) if (event->wValue)
netif_carrier_on(dev->net); netif_carrier_on(dev->net);
...@@ -370,8 +369,7 @@ static void cdc_status(struct usbnet *dev, struct urb *urb) ...@@ -370,8 +369,7 @@ static void cdc_status(struct usbnet *dev, struct urb *urb)
netif_carrier_off(dev->net); netif_carrier_off(dev->net);
break; break;
case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */ case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */
if (netif_msg_timer(dev)) netif_dbg(dev, timer, dev->net, "CDC: speed change (len %d)\n",
netdev_dbg(dev->net, "CDC: speed change (len %d)\n",
urb->actual_length); urb->actual_length);
if (urb->actual_length != (sizeof *event + 8)) if (urb->actual_length != (sizeof *event + 8))
set_bit(EVENT_STS_SPLIT, &dev->flags); set_bit(EVENT_STS_SPLIT, &dev->flags);
......
...@@ -203,11 +203,8 @@ static void nc_dump_registers(struct usbnet *dev) ...@@ -203,11 +203,8 @@ static void nc_dump_registers(struct usbnet *dev)
static inline void nc_dump_usbctl(struct usbnet *dev, u16 usbctl) static inline void nc_dump_usbctl(struct usbnet *dev, u16 usbctl)
{ {
if (!netif_msg_link(dev)) netif_dbg(dev, link, dev->net,
return; "net1080 %s-%s usbctl 0x%x:%s%s%s%s%s; this%s%s; other%s%s; r/o 0x%x\n",
netdev_dbg(dev->net, "net1080 %s-%s usbctl 0x%x:%s%s%s%s%s;"
" this%s%s;"
" other%s%s; r/o 0x%x\n",
dev->udev->bus->bus_name, dev->udev->devpath, dev->udev->bus->bus_name, dev->udev->devpath,
usbctl, usbctl,
(usbctl & USBCTL_ENABLE_LANG) ? " lang" : "", (usbctl & USBCTL_ENABLE_LANG) ? " lang" : "",
...@@ -249,9 +246,8 @@ static inline void nc_dump_usbctl(struct usbnet *dev, u16 usbctl) ...@@ -249,9 +246,8 @@ static inline void nc_dump_usbctl(struct usbnet *dev, u16 usbctl)
static inline void nc_dump_status(struct usbnet *dev, u16 status) static inline void nc_dump_status(struct usbnet *dev, u16 status)
{ {
if (!netif_msg_link(dev)) netif_dbg(dev, link, dev->net,
return; "net1080 %s-%s status 0x%x: this (%c) PKT=%d%s%s%s; other PKT=%d%s%s%s; unspec 0x%x\n",
netdev_dbg(dev->net, "net1080 %s-%s status 0x%x: this (%c) PKT=%d%s%s%s; other PKT=%d%s%s%s; unspec 0x%x\n",
dev->udev->bus->bus_name, dev->udev->devpath, dev->udev->bus->bus_name, dev->udev->devpath,
status, status,
...@@ -284,8 +280,7 @@ static inline void nc_dump_status(struct usbnet *dev, u16 status) ...@@ -284,8 +280,7 @@ static inline void nc_dump_status(struct usbnet *dev, u16 status)
static inline void nc_dump_ttl(struct usbnet *dev, u16 ttl) static inline void nc_dump_ttl(struct usbnet *dev, u16 ttl)
{ {
if (netif_msg_link(dev)) netif_dbg(dev, link, dev->net, "net1080 %s-%s ttl 0x%x this = %d, other = %d\n",
netdev_dbg(dev->net, "net1080 %s-%s ttl 0x%x this = %d, other = %d\n",
dev->udev->bus->bus_name, dev->udev->devpath, dev->udev->bus->bus_name, dev->udev->devpath,
ttl, TTL_THIS(ttl), TTL_OTHER(ttl)); ttl, TTL_THIS(ttl), TTL_OTHER(ttl));
} }
...@@ -332,8 +327,7 @@ static int net1080_reset(struct usbnet *dev) ...@@ -332,8 +327,7 @@ static int net1080_reset(struct usbnet *dev)
MK_TTL(NC_READ_TTL_MS, TTL_OTHER(ttl)) ); MK_TTL(NC_READ_TTL_MS, TTL_OTHER(ttl)) );
dbg("%s: assigned TTL, %d ms", dev->net->name, NC_READ_TTL_MS); dbg("%s: assigned TTL, %d ms", dev->net->name, NC_READ_TTL_MS);
if (netif_msg_link(dev)) netif_info(dev, link, dev->net, "port %c, peer %sconnected\n",
netdev_info(dev->net, "port %c, peer %sconnected\n",
(status & STATUS_PORT_A) ? 'A' : 'B', (status & STATUS_PORT_A) ? 'A' : 'B',
(status & STATUS_CONN_OTHER) ? "" : "dis"); (status & STATUS_CONN_OTHER) ? "" : "dis");
retval = 0; retval = 0;
...@@ -412,8 +406,8 @@ static void nc_ensure_sync(struct usbnet *dev) ...@@ -412,8 +406,8 @@ static void nc_ensure_sync(struct usbnet *dev)
return; return;
} }
if (netif_msg_rx_err(dev)) netif_dbg(dev, rx_err, dev->net,
netdev_dbg(dev->net, "flush net1080; too many framing errors\n"); "flush net1080; too many framing errors\n");
dev->frame_errors = 0; dev->frame_errors = 0;
} }
} }
......
...@@ -132,9 +132,10 @@ static void ctrl_callback(struct urb *urb) ...@@ -132,9 +132,10 @@ static void ctrl_callback(struct urb *urb)
case -ENOENT: case -ENOENT:
break; break;
default: default:
if (netif_msg_drv(pegasus) && printk_ratelimit()) if (net_ratelimit())
dev_dbg(&pegasus->intf->dev, "%s, status %d\n", netif_dbg(pegasus, drv, pegasus->net,
__func__, status); "%s, status %d\n", __func__, status);
break;
} }
pegasus->flags &= ~ETH_REGS_CHANGED; pegasus->flags &= ~ETH_REGS_CHANGED;
wake_up(&pegasus->ctrl_wait); wake_up(&pegasus->ctrl_wait);
...@@ -149,9 +150,8 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, ...@@ -149,9 +150,8 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
buffer = kmalloc(size, GFP_KERNEL); buffer = kmalloc(size, GFP_KERNEL);
if (!buffer) { if (!buffer) {
if (netif_msg_drv(pegasus)) netif_warn(pegasus, drv, pegasus->net,
dev_warn(&pegasus->intf->dev, "out of memory in %s\n", "out of memory in %s\n", __func__);
__func__);
return -ENOMEM; return -ENOMEM;
} }
add_wait_queue(&pegasus->ctrl_wait, &wait); add_wait_queue(&pegasus->ctrl_wait, &wait);
...@@ -181,9 +181,9 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, ...@@ -181,9 +181,9 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
if (ret == -ENODEV) if (ret == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (netif_msg_drv(pegasus) && printk_ratelimit()) if (net_ratelimit())
dev_err(&pegasus->intf->dev, "%s, status %d\n", netif_err(pegasus, drv, pegasus->net,
__func__, ret); "%s, status %d\n", __func__, ret);
goto out; goto out;
} }
...@@ -205,9 +205,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size, ...@@ -205,9 +205,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
buffer = kmalloc(size, GFP_KERNEL); buffer = kmalloc(size, GFP_KERNEL);
if (!buffer) { if (!buffer) {
if (netif_msg_drv(pegasus)) netif_warn(pegasus, drv, pegasus->net,
dev_warn(&pegasus->intf->dev, "out of memory in %s\n", "out of memory in %s\n", __func__);
__func__);
return -ENOMEM; return -ENOMEM;
} }
memcpy(buffer, data, size); memcpy(buffer, data, size);
...@@ -237,9 +236,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size, ...@@ -237,9 +236,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
if (ret == -ENODEV) if (ret == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (netif_msg_drv(pegasus)) netif_err(pegasus, drv, pegasus->net,
dev_err(&pegasus->intf->dev, "%s, status %d\n", "%s, status %d\n", __func__, ret);
__func__, ret);
goto out; goto out;
} }
...@@ -259,9 +257,8 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) ...@@ -259,9 +257,8 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
tmp = kmalloc(1, GFP_KERNEL); tmp = kmalloc(1, GFP_KERNEL);
if (!tmp) { if (!tmp) {
if (netif_msg_drv(pegasus)) netif_warn(pegasus, drv, pegasus->net,
dev_warn(&pegasus->intf->dev, "out of memory in %s\n", "out of memory in %s\n", __func__);
__func__);
return -ENOMEM; return -ENOMEM;
} }
memcpy(tmp, &data, 1); memcpy(tmp, &data, 1);
...@@ -290,9 +287,9 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) ...@@ -290,9 +287,9 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
if (ret == -ENODEV) if (ret == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (netif_msg_drv(pegasus) && printk_ratelimit()) if (net_ratelimit())
dev_err(&pegasus->intf->dev, "%s, status %d\n", netif_err(pegasus, drv, pegasus->net,
__func__, ret); "%s, status %d\n", __func__, ret);
goto out; goto out;
} }
...@@ -323,9 +320,8 @@ static int update_eth_regs_async(pegasus_t * pegasus) ...@@ -323,9 +320,8 @@ static int update_eth_regs_async(pegasus_t * pegasus)
if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
if (ret == -ENODEV) if (ret == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (netif_msg_drv(pegasus)) netif_err(pegasus, drv, pegasus->net,
dev_err(&pegasus->intf->dev, "%s, status %d\n", "%s, status %d\n", __func__, ret);
__func__, ret);
} }
return ret; return ret;
...@@ -349,14 +345,16 @@ static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd) ...@@ -349,14 +345,16 @@ static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd)
if (data[0] & PHY_DONE) if (data[0] & PHY_DONE)
break; break;
} }
if (i < REG_TIMEOUT) {
if (i >= REG_TIMEOUT)
goto fail;
ret = get_registers(pegasus, PhyData, 2, &regdi); ret = get_registers(pegasus, PhyData, 2, &regdi);
*regd = le16_to_cpu(regdi); *regd = le16_to_cpu(regdi);
return ret; return ret;
}
fail: fail:
if (netif_msg_drv(pegasus)) netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__);
dev_warn(&pegasus->intf->dev, "%s failed\n", __func__);
return ret; return ret;
} }
...@@ -388,12 +386,14 @@ static int write_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 regd) ...@@ -388,12 +386,14 @@ static int write_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 regd)
if (data[0] & PHY_DONE) if (data[0] & PHY_DONE)
break; break;
} }
if (i < REG_TIMEOUT)
if (i >= REG_TIMEOUT)
goto fail;
return ret; return ret;
fail: fail:
if (netif_msg_drv(pegasus)) netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__);
dev_warn(&pegasus->intf->dev, "%s failed\n", __func__);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -422,15 +422,15 @@ static int read_eprom_word(pegasus_t * pegasus, __u8 index, __u16 * retdata) ...@@ -422,15 +422,15 @@ static int read_eprom_word(pegasus_t * pegasus, __u8 index, __u16 * retdata)
if (ret == -ESHUTDOWN) if (ret == -ESHUTDOWN)
goto fail; goto fail;
} }
if (i < REG_TIMEOUT) { if (i >= REG_TIMEOUT)
goto fail;
ret = get_registers(pegasus, EpromData, 2, &retdatai); ret = get_registers(pegasus, EpromData, 2, &retdatai);
*retdata = le16_to_cpu(retdatai); *retdata = le16_to_cpu(retdatai);
return ret; return ret;
}
fail: fail:
if (netif_msg_drv(pegasus)) netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__);
dev_warn(&pegasus->intf->dev, "%s failed\n", __func__);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -475,11 +475,13 @@ static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data) ...@@ -475,11 +475,13 @@ static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data)
break; break;
} }
disable_eprom_write(pegasus); disable_eprom_write(pegasus);
if (i < REG_TIMEOUT) if (i >= REG_TIMEOUT)
goto fail;
return ret; return ret;
fail: fail:
if (netif_msg_drv(pegasus)) netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__);
dev_warn(&pegasus->intf->dev, "%s failed\n", __func__);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
#endif /* PEGASUS_WRITE_EEPROM */ #endif /* PEGASUS_WRITE_EEPROM */
...@@ -642,25 +644,20 @@ static void read_bulk_callback(struct urb *urb) ...@@ -642,25 +644,20 @@ static void read_bulk_callback(struct urb *urb)
case 0: case 0:
break; break;
case -ETIME: case -ETIME:
if (netif_msg_rx_err(pegasus)) netif_dbg(pegasus, rx_err, net, "reset MAC\n");
pr_debug("%s: reset MAC\n", net->name);
pegasus->flags &= ~PEGASUS_RX_BUSY; pegasus->flags &= ~PEGASUS_RX_BUSY;
break; break;
case -EPIPE: /* stall, or disconnect from TT */ case -EPIPE: /* stall, or disconnect from TT */
/* FIXME schedule work to clear the halt */ /* FIXME schedule work to clear the halt */
if (netif_msg_rx_err(pegasus)) netif_warn(pegasus, rx_err, net, "no rx stall recovery\n");
printk(KERN_WARNING "%s: no rx stall recovery\n",
net->name);
return; return;
case -ENOENT: case -ENOENT:
case -ECONNRESET: case -ECONNRESET:
case -ESHUTDOWN: case -ESHUTDOWN:
if (netif_msg_ifdown(pegasus)) netif_dbg(pegasus, ifdown, net, "rx unlink, %d\n", status);
pr_debug("%s: rx unlink, %d\n", net->name, status);
return; return;
default: default:
if (netif_msg_rx_err(pegasus)) netif_dbg(pegasus, rx_err, net, "RX status %d\n", status);
pr_debug("%s: RX status %d\n", net->name, status);
goto goon; goto goon;
} }
...@@ -669,9 +666,8 @@ static void read_bulk_callback(struct urb *urb) ...@@ -669,9 +666,8 @@ static void read_bulk_callback(struct urb *urb)
rx_status = buf[count - 2]; rx_status = buf[count - 2];
if (rx_status & 0x1e) { if (rx_status & 0x1e) {
if (netif_msg_rx_err(pegasus)) netif_dbg(pegasus, rx_err, net,
pr_debug("%s: RX packet error %x\n", "RX packet error %x\n", rx_status);
net->name, rx_status);
pegasus->stats.rx_errors++; pegasus->stats.rx_errors++;
if (rx_status & 0x06) // long or runt if (rx_status & 0x06) // long or runt
pegasus->stats.rx_length_errors++; pegasus->stats.rx_length_errors++;
...@@ -758,9 +754,7 @@ static void rx_fixup(unsigned long data) ...@@ -758,9 +754,7 @@ static void rx_fixup(unsigned long data)
pegasus->rx_skb = pull_skb(pegasus); pegasus->rx_skb = pull_skb(pegasus);
} }
if (pegasus->rx_skb == NULL) { if (pegasus->rx_skb == NULL) {
if (netif_msg_rx_err(pegasus)) netif_warn(pegasus, rx_err, pegasus->net, "low on memory\n");
printk(KERN_WARNING "%s: low on memory\n",
pegasus->net->name);
tasklet_schedule(&pegasus->rx_tl); tasklet_schedule(&pegasus->rx_tl);
goto done; goto done;
} }
...@@ -800,19 +794,15 @@ static void write_bulk_callback(struct urb *urb) ...@@ -800,19 +794,15 @@ static void write_bulk_callback(struct urb *urb)
case -EPIPE: case -EPIPE:
/* FIXME schedule_work() to clear the tx halt */ /* FIXME schedule_work() to clear the tx halt */
netif_stop_queue(net); netif_stop_queue(net);
if (netif_msg_tx_err(pegasus)) netif_warn(pegasus, tx_err, net, "no tx stall recovery\n");
printk(KERN_WARNING "%s: no tx stall recovery\n",
net->name);
return; return;
case -ENOENT: case -ENOENT:
case -ECONNRESET: case -ECONNRESET:
case -ESHUTDOWN: case -ESHUTDOWN:
if (netif_msg_ifdown(pegasus)) netif_dbg(pegasus, ifdown, net, "tx unlink, %d\n", status);
pr_debug("%s: tx unlink, %d\n", net->name, status);
return; return;
default: default:
if (netif_msg_tx_err(pegasus)) netif_info(pegasus, tx_err, net, "TX status %d\n", status);
pr_info("%s: TX status %d\n", net->name, status);
/* FALL THROUGH */ /* FALL THROUGH */
case 0: case 0:
break; break;
...@@ -843,9 +833,7 @@ static void intr_callback(struct urb *urb) ...@@ -843,9 +833,7 @@ static void intr_callback(struct urb *urb)
/* some Pegasus-I products report LOTS of data /* some Pegasus-I products report LOTS of data
* toggle errors... avoid log spamming * toggle errors... avoid log spamming
*/ */
if (netif_msg_timer(pegasus)) netif_dbg(pegasus, timer, net, "intr status %d\n", status);
pr_debug("%s: intr status %d\n", net->name,
status);
} }
if (urb->actual_length >= 6) { if (urb->actual_length >= 6) {
...@@ -875,16 +863,15 @@ static void intr_callback(struct urb *urb) ...@@ -875,16 +863,15 @@ static void intr_callback(struct urb *urb)
res = usb_submit_urb(urb, GFP_ATOMIC); res = usb_submit_urb(urb, GFP_ATOMIC);
if (res == -ENODEV) if (res == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (res && netif_msg_timer(pegasus)) if (res)
printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n", netif_err(pegasus, timer, net,
net->name, res); "can't resubmit interrupt urb, %d\n", res);
} }
static void pegasus_tx_timeout(struct net_device *net) static void pegasus_tx_timeout(struct net_device *net)
{ {
pegasus_t *pegasus = netdev_priv(net); pegasus_t *pegasus = netdev_priv(net);
if (netif_msg_timer(pegasus)) netif_warn(pegasus, timer, net, "tx timeout\n");
printk(KERN_WARNING "%s: tx timeout\n", net->name);
usb_unlink_urb(pegasus->tx_urb); usb_unlink_urb(pegasus->tx_urb);
pegasus->stats.tx_errors++; pegasus->stats.tx_errors++;
} }
...@@ -906,9 +893,7 @@ static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb, ...@@ -906,9 +893,7 @@ static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb,
pegasus->tx_buff, count, pegasus->tx_buff, count,
write_bulk_callback, pegasus); write_bulk_callback, pegasus);
if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) { if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) {
if (netif_msg_tx_err(pegasus)) netif_warn(pegasus, tx_err, net, "fail tx, %d\n", res);
printk(KERN_WARNING "%s: fail tx, %d\n",
net->name, res);
switch (res) { switch (res) {
case -EPIPE: /* stall, or disconnect from TT */ case -EPIPE: /* stall, or disconnect from TT */
/* cleanup should already have been scheduled */ /* cleanup should already have been scheduled */
...@@ -952,9 +937,8 @@ static inline void get_interrupt_interval(pegasus_t * pegasus) ...@@ -952,9 +937,8 @@ static inline void get_interrupt_interval(pegasus_t * pegasus)
interval = data >> 8; interval = data >> 8;
if (pegasus->usb->speed != USB_SPEED_HIGH) { if (pegasus->usb->speed != USB_SPEED_HIGH) {
if (interval < 0x80) { if (interval < 0x80) {
if (netif_msg_timer(pegasus)) netif_info(pegasus, timer, pegasus->net,
dev_info(&pegasus->intf->dev, "intr interval " "intr interval changed from %ums to %ums\n",
"changed from %ums to %ums\n",
interval, 0x80); interval, 0x80);
interval = 0x80; interval = 0x80;
data = (data & 0x00FF) | ((u16)interval << 8); data = (data & 0x00FF) | ((u16)interval << 8);
...@@ -1046,8 +1030,7 @@ static int pegasus_open(struct net_device *net) ...@@ -1046,8 +1030,7 @@ static int pegasus_open(struct net_device *net)
if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) { if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) {
if (res == -ENODEV) if (res == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (netif_msg_ifup(pegasus)) netif_dbg(pegasus, ifup, net, "failed rx_urb, %d\n", res);
pr_debug("%s: failed rx_urb, %d", net->name, res);
goto exit; goto exit;
} }
...@@ -1058,15 +1041,13 @@ static int pegasus_open(struct net_device *net) ...@@ -1058,15 +1041,13 @@ static int pegasus_open(struct net_device *net)
if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) { if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) {
if (res == -ENODEV) if (res == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (netif_msg_ifup(pegasus)) netif_dbg(pegasus, ifup, net, "failed intr_urb, %d\n", res);
pr_debug("%s: failed intr_urb, %d\n", net->name, res);
usb_kill_urb(pegasus->rx_urb); usb_kill_urb(pegasus->rx_urb);
goto exit; goto exit;
} }
if ((res = enable_net_traffic(net, pegasus->usb))) { if ((res = enable_net_traffic(net, pegasus->usb))) {
if (netif_msg_ifup(pegasus)) netif_dbg(pegasus, ifup, net,
pr_debug("%s: can't enable_net_traffic() - %d\n", "can't enable_net_traffic() - %d\n", res);
net->name, res);
res = -EIO; res = -EIO;
usb_kill_urb(pegasus->rx_urb); usb_kill_urb(pegasus->rx_urb);
usb_kill_urb(pegasus->intr_urb); usb_kill_urb(pegasus->intr_urb);
...@@ -1075,8 +1056,7 @@ static int pegasus_open(struct net_device *net) ...@@ -1075,8 +1056,7 @@ static int pegasus_open(struct net_device *net)
} }
set_carrier(net); set_carrier(net);
netif_start_queue(net); netif_start_queue(net);
if (netif_msg_ifup(pegasus)) netif_dbg(pegasus, ifup, net, "open\n");
pr_debug("%s: open\n", net->name);
res = 0; res = 0;
exit: exit:
return res; return res;
...@@ -1230,13 +1210,11 @@ static void pegasus_set_multicast(struct net_device *net) ...@@ -1230,13 +1210,11 @@ static void pegasus_set_multicast(struct net_device *net)
if (net->flags & IFF_PROMISC) { if (net->flags & IFF_PROMISC) {
pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
if (netif_msg_link(pegasus)) netif_info(pegasus, link, net, "Promiscuous mode enabled\n");
pr_info("%s: Promiscuous mode enabled.\n", net->name);
} else if (!netdev_mc_empty(net) || (net->flags & IFF_ALLMULTI)) { } else if (!netdev_mc_empty(net) || (net->flags & IFF_ALLMULTI)) {
pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST;
pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
if (netif_msg_link(pegasus)) netif_dbg(pegasus, link, net, "set allmulti\n");
pr_debug("%s: set allmulti\n", net->name);
} else { } else {
pegasus->eth_regs[EthCtrl0] &= ~RX_MULTICAST; pegasus->eth_regs[EthCtrl0] &= ~RX_MULTICAST;
pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
......
...@@ -335,8 +335,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) ...@@ -335,8 +335,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
dev->maxpacket = usb_maxpacket(dev->udev, dev->out, 1); dev->maxpacket = usb_maxpacket(dev->udev, dev->out, 1);
if (dev->maxpacket == 0) { if (dev->maxpacket == 0) {
if (netif_msg_probe(dev)) netif_dbg(dev, probe, dev->net,
dev_dbg(&intf->dev, "dev->maxpacket can't be 0\n"); "dev->maxpacket can't be 0\n");
retval = -EINVAL; retval = -EINVAL;
goto fail_and_release; goto fail_and_release;
} }
...@@ -394,17 +394,15 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) ...@@ -394,17 +394,15 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
} }
if ((flags & FLAG_RNDIS_PHYM_WIRELESS) && if ((flags & FLAG_RNDIS_PHYM_WIRELESS) &&
*phym != RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) { *phym != RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) {
if (netif_msg_probe(dev)) netif_dbg(dev, probe, dev->net,
dev_dbg(&intf->dev, "driver requires wireless " "driver requires wireless physical medium, but device is not\n");
"physical medium, but device is not.\n");
retval = -ENODEV; retval = -ENODEV;
goto halt_fail_and_release; goto halt_fail_and_release;
} }
if ((flags & FLAG_RNDIS_PHYM_NOT_WIRELESS) && if ((flags & FLAG_RNDIS_PHYM_NOT_WIRELESS) &&
*phym == RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) { *phym == RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) {
if (netif_msg_probe(dev)) netif_dbg(dev, probe, dev->net,
dev_dbg(&intf->dev, "driver requires non-wireless " "driver requires non-wireless physical medium, but device is wireless.\n");
"physical medium, but device is wireless.\n");
retval = -ENODEV; retval = -ENODEV;
goto halt_fail_and_release; goto halt_fail_and_release;
} }
......
...@@ -376,13 +376,11 @@ static void smsc95xx_set_multicast(struct net_device *netdev) ...@@ -376,13 +376,11 @@ static void smsc95xx_set_multicast(struct net_device *netdev)
spin_lock_irqsave(&pdata->mac_cr_lock, flags); spin_lock_irqsave(&pdata->mac_cr_lock, flags);
if (dev->net->flags & IFF_PROMISC) { if (dev->net->flags & IFF_PROMISC) {
if (netif_msg_drv(dev)) netif_dbg(dev, drv, dev->net, "promiscuous mode enabled\n");
netdev_dbg(dev->net, "promiscuous mode enabled\n");
pdata->mac_cr |= MAC_CR_PRMS_; pdata->mac_cr |= MAC_CR_PRMS_;
pdata->mac_cr &= ~(MAC_CR_MCPAS_ | MAC_CR_HPFILT_); pdata->mac_cr &= ~(MAC_CR_MCPAS_ | MAC_CR_HPFILT_);
} else if (dev->net->flags & IFF_ALLMULTI) { } else if (dev->net->flags & IFF_ALLMULTI) {
if (netif_msg_drv(dev)) netif_dbg(dev, drv, dev->net, "receive all multicast enabled\n");
netdev_dbg(dev->net, "receive all multicast enabled\n");
pdata->mac_cr |= MAC_CR_MCPAS_; pdata->mac_cr |= MAC_CR_MCPAS_;
pdata->mac_cr &= ~(MAC_CR_PRMS_ | MAC_CR_HPFILT_); pdata->mac_cr &= ~(MAC_CR_PRMS_ | MAC_CR_HPFILT_);
} else if (!netdev_mc_empty(dev->net)) { } else if (!netdev_mc_empty(dev->net)) {
...@@ -410,12 +408,10 @@ static void smsc95xx_set_multicast(struct net_device *netdev) ...@@ -410,12 +408,10 @@ static void smsc95xx_set_multicast(struct net_device *netdev)
if (count != ((u32) netdev_mc_count(dev->net))) if (count != ((u32) netdev_mc_count(dev->net)))
netdev_warn(dev->net, "mc_count != dev->mc_count\n"); netdev_warn(dev->net, "mc_count != dev->mc_count\n");
if (netif_msg_drv(dev)) netif_dbg(dev, drv, dev->net, "HASHH=0x%08X, HASHL=0x%08X\n",
netdev_dbg(dev->net, "HASHH=0x%08X, HASHL=0x%08X\n",
hash_hi, hash_lo); hash_hi, hash_lo);
} else { } else {
if (netif_msg_drv(dev)) netif_dbg(dev, drv, dev->net, "receive own packets only\n");
netdev_dbg(dev->net, "receive own packets only\n");
pdata->mac_cr &= pdata->mac_cr &=
~(MAC_CR_PRMS_ | MAC_CR_MCPAS_ | MAC_CR_HPFILT_); ~(MAC_CR_PRMS_ | MAC_CR_MCPAS_ | MAC_CR_HPFILT_);
} }
...@@ -452,13 +448,11 @@ static void smsc95xx_phy_update_flowcontrol(struct usbnet *dev, u8 duplex, ...@@ -452,13 +448,11 @@ static void smsc95xx_phy_update_flowcontrol(struct usbnet *dev, u8 duplex,
else else
afc_cfg &= ~0xF; afc_cfg &= ~0xF;
if (netif_msg_link(dev)) netif_dbg(dev, link, dev->net, "rx pause %s, tx pause %s\n",
netdev_dbg(dev->net, "rx pause %s, tx pause %s\n",
cap & FLOW_CTRL_RX ? "enabled" : "disabled", cap & FLOW_CTRL_RX ? "enabled" : "disabled",
cap & FLOW_CTRL_TX ? "enabled" : "disabled"); cap & FLOW_CTRL_TX ? "enabled" : "disabled");
} else { } else {
if (netif_msg_link(dev)) netif_dbg(dev, link, dev->net, "half duplex\n");
netdev_dbg(dev->net, "half duplex\n");
flow = 0; flow = 0;
afc_cfg |= 0xF; afc_cfg |= 0xF;
} }
...@@ -486,8 +480,7 @@ static int smsc95xx_link_reset(struct usbnet *dev) ...@@ -486,8 +480,7 @@ static int smsc95xx_link_reset(struct usbnet *dev)
lcladv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE); lcladv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE);
rmtadv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_LPA); rmtadv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_LPA);
if (netif_msg_link(dev)) netif_dbg(dev, link, dev->net, "speed: %d duplex: %d lcladv: %04x rmtadv: %04x\n",
netdev_dbg(dev->net, "speed: %d duplex: %d lcladv: %04x rmtadv: %04x\n",
ecmd.speed, ecmd.duplex, lcladv, rmtadv); ecmd.speed, ecmd.duplex, lcladv, rmtadv);
spin_lock_irqsave(&pdata->mac_cr_lock, flags); spin_lock_irqsave(&pdata->mac_cr_lock, flags);
...@@ -520,8 +513,7 @@ static void smsc95xx_status(struct usbnet *dev, struct urb *urb) ...@@ -520,8 +513,7 @@ static void smsc95xx_status(struct usbnet *dev, struct urb *urb)
memcpy(&intdata, urb->transfer_buffer, 4); memcpy(&intdata, urb->transfer_buffer, 4);
le32_to_cpus(&intdata); le32_to_cpus(&intdata);
if (netif_msg_link(dev)) netif_dbg(dev, link, dev->net, "intdata: 0x%08X\n", intdata);
netdev_dbg(dev->net, "intdata: 0x%08X\n", intdata);
if (intdata & INT_ENP_PHY_INT_) if (intdata & INT_ENP_PHY_INT_)
usbnet_defer_kevent(dev, EVENT_LINK_RESET); usbnet_defer_kevent(dev, EVENT_LINK_RESET);
...@@ -557,8 +549,7 @@ static int smsc95xx_set_csums(struct usbnet *dev) ...@@ -557,8 +549,7 @@ static int smsc95xx_set_csums(struct usbnet *dev)
return ret; return ret;
} }
if (netif_msg_hw(dev)) netif_dbg(dev, hw, dev->net, "COE_CR = 0x%08x\n", read_buf);
netdev_dbg(dev->net, "COE_CR = 0x%08x\n", read_buf);
return 0; return 0;
} }
...@@ -662,16 +653,14 @@ static void smsc95xx_init_mac_address(struct usbnet *dev) ...@@ -662,16 +653,14 @@ static void smsc95xx_init_mac_address(struct usbnet *dev)
dev->net->dev_addr) == 0) { dev->net->dev_addr) == 0) {
if (is_valid_ether_addr(dev->net->dev_addr)) { if (is_valid_ether_addr(dev->net->dev_addr)) {
/* eeprom values are valid so use them */ /* eeprom values are valid so use them */
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net, "MAC address read from EEPROM\n");
netdev_dbg(dev->net, "MAC address read from EEPROM\n");
return; return;
} }
} }
/* no eeprom, or eeprom values are invalid. generate random MAC */ /* no eeprom, or eeprom values are invalid. generate random MAC */
random_ether_addr(dev->net->dev_addr); random_ether_addr(dev->net->dev_addr);
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net, "MAC address set to random_ether_addr\n");
netdev_dbg(dev->net, "MAC address set to random_ether_addr\n");
} }
static int smsc95xx_set_mac_address(struct usbnet *dev) static int smsc95xx_set_mac_address(struct usbnet *dev)
...@@ -750,8 +739,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev) ...@@ -750,8 +739,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev)
PHY_INT_MASK_DEFAULT_); PHY_INT_MASK_DEFAULT_);
mii_nway_restart(&dev->mii); mii_nway_restart(&dev->mii);
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net, "phy initialised successfully\n");
netdev_dbg(dev->net, "phy initialised successfully\n");
return 0; return 0;
} }
...@@ -762,8 +750,7 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -762,8 +750,7 @@ static int smsc95xx_reset(struct usbnet *dev)
u32 read_buf, write_buf, burst_cap; u32 read_buf, write_buf, burst_cap;
int ret = 0, timeout; int ret = 0, timeout;
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net, "entering smsc95xx_reset\n");
netdev_dbg(dev->net, "entering smsc95xx_reset\n");
write_buf = HW_CFG_LRST_; write_buf = HW_CFG_LRST_;
ret = smsc95xx_write_reg(dev, HW_CFG, write_buf); ret = smsc95xx_write_reg(dev, HW_CFG, write_buf);
...@@ -818,8 +805,8 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -818,8 +805,8 @@ static int smsc95xx_reset(struct usbnet *dev)
if (ret < 0) if (ret < 0)
return ret; return ret;
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net,
netdev_dbg(dev->net, "MAC Address: %pM\n", dev->net->dev_addr); "MAC Address: %pM\n", dev->net->dev_addr);
ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf);
if (ret < 0) { if (ret < 0) {
...@@ -827,8 +814,8 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -827,8 +814,8 @@ static int smsc95xx_reset(struct usbnet *dev)
return ret; return ret;
} }
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net,
netdev_dbg(dev->net, "Read Value from HW_CFG : 0x%08x\n", read_buf); "Read Value from HW_CFG : 0x%08x\n", read_buf);
read_buf |= HW_CFG_BIR_; read_buf |= HW_CFG_BIR_;
...@@ -844,8 +831,8 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -844,8 +831,8 @@ static int smsc95xx_reset(struct usbnet *dev)
netdev_warn(dev->net, "Failed to read HW_CFG: %d\n", ret); netdev_warn(dev->net, "Failed to read HW_CFG: %d\n", ret);
return ret; return ret;
} }
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net,
netdev_dbg(dev->net, "Read Value from HW_CFG after writing HW_CFG_BIR_: 0x%08x\n", "Read Value from HW_CFG after writing HW_CFG_BIR_: 0x%08x\n",
read_buf); read_buf);
if (!turbo_mode) { if (!turbo_mode) {
...@@ -859,8 +846,8 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -859,8 +846,8 @@ static int smsc95xx_reset(struct usbnet *dev)
dev->rx_urb_size = DEFAULT_FS_BURST_CAP_SIZE; dev->rx_urb_size = DEFAULT_FS_BURST_CAP_SIZE;
} }
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net,
netdev_dbg(dev->net, "rx_urb_size=%ld\n", (ulong)dev->rx_urb_size); "rx_urb_size=%ld\n", (ulong)dev->rx_urb_size);
ret = smsc95xx_write_reg(dev, BURST_CAP, burst_cap); ret = smsc95xx_write_reg(dev, BURST_CAP, burst_cap);
if (ret < 0) { if (ret < 0) {
...@@ -873,8 +860,8 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -873,8 +860,8 @@ static int smsc95xx_reset(struct usbnet *dev)
netdev_warn(dev->net, "Failed to read BURST_CAP: %d\n", ret); netdev_warn(dev->net, "Failed to read BURST_CAP: %d\n", ret);
return ret; return ret;
} }
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net,
netdev_dbg(dev->net, "Read Value from BURST_CAP after writing: 0x%08x\n", "Read Value from BURST_CAP after writing: 0x%08x\n",
read_buf); read_buf);
read_buf = DEFAULT_BULK_IN_DELAY; read_buf = DEFAULT_BULK_IN_DELAY;
...@@ -889,8 +876,8 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -889,8 +876,8 @@ static int smsc95xx_reset(struct usbnet *dev)
netdev_warn(dev->net, "Failed to read BULK_IN_DLY: %d\n", ret); netdev_warn(dev->net, "Failed to read BULK_IN_DLY: %d\n", ret);
return ret; return ret;
} }
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net,
netdev_dbg(dev->net, "Read Value from BULK_IN_DLY after writing: 0x%08x\n", "Read Value from BULK_IN_DLY after writing: 0x%08x\n",
read_buf); read_buf);
ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf);
...@@ -898,8 +885,8 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -898,8 +885,8 @@ static int smsc95xx_reset(struct usbnet *dev)
netdev_warn(dev->net, "Failed to read HW_CFG: %d\n", ret); netdev_warn(dev->net, "Failed to read HW_CFG: %d\n", ret);
return ret; return ret;
} }
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net,
netdev_dbg(dev->net, "Read Value from HW_CFG: 0x%08x\n", read_buf); "Read Value from HW_CFG: 0x%08x\n", read_buf);
if (turbo_mode) if (turbo_mode)
read_buf |= (HW_CFG_MEF_ | HW_CFG_BCE_); read_buf |= (HW_CFG_MEF_ | HW_CFG_BCE_);
...@@ -921,9 +908,8 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -921,9 +908,8 @@ static int smsc95xx_reset(struct usbnet *dev)
netdev_warn(dev->net, "Failed to read HW_CFG: %d\n", ret); netdev_warn(dev->net, "Failed to read HW_CFG: %d\n", ret);
return ret; return ret;
} }
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net,
netdev_dbg(dev->net, "Read Value from HW_CFG after writing: 0x%08x\n", "Read Value from HW_CFG after writing: 0x%08x\n", read_buf);
read_buf);
write_buf = 0xFFFFFFFF; write_buf = 0xFFFFFFFF;
ret = smsc95xx_write_reg(dev, INT_STS, write_buf); ret = smsc95xx_write_reg(dev, INT_STS, write_buf);
...@@ -938,8 +924,7 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -938,8 +924,7 @@ static int smsc95xx_reset(struct usbnet *dev)
netdev_warn(dev->net, "Failed to read ID_REV: %d\n", ret); netdev_warn(dev->net, "Failed to read ID_REV: %d\n", ret);
return ret; return ret;
} }
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net, "ID_REV = 0x%08x\n", read_buf);
netdev_dbg(dev->net, "ID_REV = 0x%08x\n", read_buf);
/* Configure GPIO pins as LED outputs */ /* Configure GPIO pins as LED outputs */
write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED | write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED |
...@@ -1013,8 +998,7 @@ static int smsc95xx_reset(struct usbnet *dev) ...@@ -1013,8 +998,7 @@ static int smsc95xx_reset(struct usbnet *dev)
smsc95xx_start_tx_path(dev); smsc95xx_start_tx_path(dev);
smsc95xx_start_rx_path(dev); smsc95xx_start_rx_path(dev);
if (netif_msg_ifup(dev)) netif_dbg(dev, ifup, dev->net, "smsc95xx_reset, return 0\n");
netdev_dbg(dev->net, "smsc95xx_reset, return 0\n");
return 0; return 0;
} }
...@@ -1071,8 +1055,7 @@ static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf) ...@@ -1071,8 +1055,7 @@ static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf)
{ {
struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]); struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
if (pdata) { if (pdata) {
if (netif_msg_ifdown(dev)) netif_dbg(dev, ifdown, dev->net, "free pdata\n");
netdev_dbg(dev->net, "free pdata\n");
kfree(pdata); kfree(pdata);
pdata = NULL; pdata = NULL;
dev->data[0] = 0; dev->data[0] = 0;
...@@ -1106,9 +1089,8 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -1106,9 +1089,8 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
align_count = (4 - ((size + NET_IP_ALIGN) % 4)) % 4; align_count = (4 - ((size + NET_IP_ALIGN) % 4)) % 4;
if (unlikely(header & RX_STS_ES_)) { if (unlikely(header & RX_STS_ES_)) {
if (netif_msg_rx_err(dev)) netif_dbg(dev, rx_err, dev->net,
netdev_dbg(dev->net, "Error header=0x%08x\n", "Error header=0x%08x\n", header);
header);
dev->net->stats.rx_errors++; dev->net->stats.rx_errors++;
dev->net->stats.rx_dropped++; dev->net->stats.rx_dropped++;
...@@ -1125,9 +1107,8 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -1125,9 +1107,8 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
} else { } else {
/* ETH_FRAME_LEN + 4(CRC) + 2(COE) + 4(Vlan) */ /* ETH_FRAME_LEN + 4(CRC) + 2(COE) + 4(Vlan) */
if (unlikely(size > (ETH_FRAME_LEN + 12))) { if (unlikely(size > (ETH_FRAME_LEN + 12))) {
if (netif_msg_rx_err(dev)) netif_dbg(dev, rx_err, dev->net,
netdev_dbg(dev->net, "size err header=0x%08x\n", "size err header=0x%08x\n", header);
header);
return 0; return 0;
} }
......
...@@ -242,13 +242,13 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb) ...@@ -242,13 +242,13 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
dev->net->stats.rx_packets++; dev->net->stats.rx_packets++;
dev->net->stats.rx_bytes += skb->len; dev->net->stats.rx_bytes += skb->len;
if (netif_msg_rx_status (dev)) netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n",
netdev_dbg(dev->net, "< rx, len %zu, type 0x%x\n",
skb->len + sizeof (struct ethhdr), skb->protocol); skb->len + sizeof (struct ethhdr), skb->protocol);
memset (skb->cb, 0, sizeof (struct skb_data)); memset (skb->cb, 0, sizeof (struct skb_data));
status = netif_rx (skb); status = netif_rx (skb);
if (status != NET_RX_SUCCESS && netif_msg_rx_err (dev)) if (status != NET_RX_SUCCESS)
netdev_dbg(dev->net, "netif_rx status %d\n", status); netif_dbg(dev, rx_err, dev->net,
"netif_rx status %d\n", status);
} }
EXPORT_SYMBOL_GPL(usbnet_skb_return); EXPORT_SYMBOL_GPL(usbnet_skb_return);
...@@ -332,8 +332,7 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) ...@@ -332,8 +332,7 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
size_t size = dev->rx_urb_size; size_t size = dev->rx_urb_size;
if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) { if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) {
if (netif_msg_rx_err (dev)) netif_dbg(dev, rx_err, dev->net, "no rx skb\n");
netdev_dbg(dev->net, "no rx skb\n");
usbnet_defer_kevent (dev, EVENT_RX_MEMORY); usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
usb_free_urb (urb); usb_free_urb (urb);
return; return;
...@@ -363,21 +362,19 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) ...@@ -363,21 +362,19 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
usbnet_defer_kevent (dev, EVENT_RX_MEMORY); usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
break; break;
case -ENODEV: case -ENODEV:
if (netif_msg_ifdown (dev)) netif_dbg(dev, ifdown, dev->net, "device gone\n");
netdev_dbg(dev->net, "device gone\n");
netif_device_detach (dev->net); netif_device_detach (dev->net);
break; break;
default: default:
if (netif_msg_rx_err (dev)) netif_dbg(dev, rx_err, dev->net,
netdev_dbg(dev->net, "rx submit, %d\n", retval); "rx submit, %d\n", retval);
tasklet_schedule (&dev->bh); tasklet_schedule (&dev->bh);
break; break;
case 0: case 0:
__skb_queue_tail (&dev->rxq, skb); __skb_queue_tail (&dev->rxq, skb);
} }
} else { } else {
if (netif_msg_ifdown (dev)) netif_dbg(dev, ifdown, dev->net, "rx: stopped\n");
netdev_dbg(dev->net, "rx: stopped\n");
retval = -ENOLINK; retval = -ENOLINK;
} }
spin_unlock_irqrestore (&dev->rxq.lock, lockflags); spin_unlock_irqrestore (&dev->rxq.lock, lockflags);
...@@ -400,8 +397,7 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb) ...@@ -400,8 +397,7 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb)
if (skb->len) if (skb->len)
usbnet_skb_return (dev, skb); usbnet_skb_return (dev, skb);
else { else {
if (netif_msg_rx_err (dev)) netif_dbg(dev, rx_err, dev->net, "drop\n");
netdev_dbg(dev->net, "drop\n");
error: error:
dev->net->stats.rx_errors++; dev->net->stats.rx_errors++;
skb_queue_tail (&dev->done, skb); skb_queue_tail (&dev->done, skb);
...@@ -428,8 +424,8 @@ static void rx_complete (struct urb *urb) ...@@ -428,8 +424,8 @@ static void rx_complete (struct urb *urb)
entry->state = rx_cleanup; entry->state = rx_cleanup;
dev->net->stats.rx_errors++; dev->net->stats.rx_errors++;
dev->net->stats.rx_length_errors++; dev->net->stats.rx_length_errors++;
if (netif_msg_rx_err (dev)) netif_dbg(dev, rx_err, dev->net,
netdev_dbg(dev->net, "rx length %d\n", skb->len); "rx length %d\n", skb->len);
} }
break; break;
...@@ -446,8 +442,8 @@ static void rx_complete (struct urb *urb) ...@@ -446,8 +442,8 @@ static void rx_complete (struct urb *urb)
/* 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)) netif_dbg(dev, ifdown, dev->net,
netdev_dbg(dev->net, "rx shutdown, code %d\n", urb_status); "rx shutdown, code %d\n", 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.
...@@ -460,8 +456,8 @@ static void rx_complete (struct urb *urb) ...@@ -460,8 +456,8 @@ static void rx_complete (struct urb *urb)
dev->net->stats.rx_errors++; dev->net->stats.rx_errors++;
if (!timer_pending (&dev->delay)) { if (!timer_pending (&dev->delay)) {
mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES); mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES);
if (netif_msg_link (dev)) netif_dbg(dev, link, dev->net,
netdev_dbg(dev->net, "rx throttle %d\n", urb_status); "rx throttle %d\n", urb_status);
} }
block: block:
entry->state = rx_cleanup; entry->state = rx_cleanup;
...@@ -477,8 +473,7 @@ static void rx_complete (struct urb *urb) ...@@ -477,8 +473,7 @@ static void rx_complete (struct urb *urb)
default: default:
entry->state = rx_cleanup; entry->state = rx_cleanup;
dev->net->stats.rx_errors++; dev->net->stats.rx_errors++;
if (netif_msg_rx_err (dev)) netif_dbg(dev, rx_err, dev->net, "rx status %d\n", urb_status);
netdev_dbg(dev->net, "rx status %d\n", urb_status);
break; break;
} }
...@@ -492,8 +487,7 @@ static void rx_complete (struct urb *urb) ...@@ -492,8 +487,7 @@ static void rx_complete (struct urb *urb)
} }
usb_free_urb (urb); usb_free_urb (urb);
} }
if (netif_msg_rx_err (dev)) netif_dbg(dev, rx_err, dev->net, "no read resubmitted\n");
netdev_dbg(dev->net, "no read resubmitted\n");
} }
static void intr_complete (struct urb *urb) static void intr_complete (struct urb *urb)
...@@ -510,8 +504,8 @@ static void intr_complete (struct urb *urb) ...@@ -510,8 +504,8 @@ static void intr_complete (struct urb *urb)
/* 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)) netif_dbg(dev, ifdown, dev->net,
netdev_dbg(dev->net, "intr shutdown, code %d\n", status); "intr shutdown, code %d\n", status);
return; return;
/* NOTE: not throttling like RX/TX, since this endpoint /* NOTE: not throttling like RX/TX, since this endpoint
...@@ -527,8 +521,9 @@ static void intr_complete (struct urb *urb) ...@@ -527,8 +521,9 @@ static void intr_complete (struct urb *urb)
memset(urb->transfer_buffer, 0, urb->transfer_buffer_length); memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
status = usb_submit_urb (urb, GFP_ATOMIC); status = usb_submit_urb (urb, GFP_ATOMIC);
if (status != 0 && netif_msg_timer (dev)) if (status != 0)
netdev_err(dev->net, "intr resubmit --> %d\n", status); netif_err(dev, timer, dev->net,
"intr resubmit --> %d\n", status);
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -536,8 +531,7 @@ void usbnet_pause_rx(struct usbnet *dev) ...@@ -536,8 +531,7 @@ void usbnet_pause_rx(struct usbnet *dev)
{ {
set_bit(EVENT_RX_PAUSED, &dev->flags); set_bit(EVENT_RX_PAUSED, &dev->flags);
if (netif_msg_rx_status(dev)) netif_dbg(dev, rx_status, dev->net, "paused rx queue enabled\n");
netdev_dbg(dev->net, "paused rx queue enabled\n");
} }
EXPORT_SYMBOL_GPL(usbnet_pause_rx); EXPORT_SYMBOL_GPL(usbnet_pause_rx);
...@@ -555,9 +549,8 @@ void usbnet_resume_rx(struct usbnet *dev) ...@@ -555,9 +549,8 @@ void usbnet_resume_rx(struct usbnet *dev)
tasklet_schedule(&dev->bh); tasklet_schedule(&dev->bh);
if (netif_msg_rx_status(dev)) netif_dbg(dev, rx_status, dev->net,
netdev_dbg(dev->net, "paused rx queue disabled, %d skbs requeued\n", "paused rx queue disabled, %d skbs requeued\n", num);
num);
} }
EXPORT_SYMBOL_GPL(usbnet_resume_rx); EXPORT_SYMBOL_GPL(usbnet_resume_rx);
...@@ -632,9 +625,8 @@ static void usbnet_terminate_urbs(struct usbnet *dev) ...@@ -632,9 +625,8 @@ static void usbnet_terminate_urbs(struct usbnet *dev)
&& !skb_queue_empty(&dev->done)) { && !skb_queue_empty(&dev->done)) {
schedule_timeout(UNLINK_TIMEOUT_MS); schedule_timeout(UNLINK_TIMEOUT_MS);
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
if (netif_msg_ifdown(dev)) netif_dbg(dev, ifdown, dev->net,
netdev_dbg(dev->net, "waited for %d urb completions\n", "waited for %d urb completions\n", temp);
temp);
} }
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
dev->wait = NULL; dev->wait = NULL;
...@@ -649,8 +641,8 @@ int usbnet_stop (struct net_device *net) ...@@ -649,8 +641,8 @@ int usbnet_stop (struct net_device *net)
netif_stop_queue (net); netif_stop_queue (net);
if (netif_msg_ifdown (dev)) netif_info(dev, ifdown, dev->net,
netdev_info(dev->net, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n", "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n",
net->stats.rx_packets, net->stats.tx_packets, net->stats.rx_packets, net->stats.tx_packets,
net->stats.rx_errors, net->stats.tx_errors); net->stats.rx_errors, net->stats.tx_errors);
...@@ -658,8 +650,8 @@ int usbnet_stop (struct net_device *net) ...@@ -658,8 +650,8 @@ int usbnet_stop (struct net_device *net)
* radio etc) */ * radio etc) */
if (info->stop) { if (info->stop) {
retval = info->stop(dev); retval = info->stop(dev);
if (retval < 0 && netif_msg_ifdown(dev)) if (retval < 0)
netdev_info(dev->net, netif_info(dev, ifdown, dev->net,
"stop fail (%d) usbnet usb-%s-%s, %s\n", "stop fail (%d) usbnet usb-%s-%s, %s\n",
retval, retval,
dev->udev->bus->bus_name, dev->udev->devpath, dev->udev->bus->bus_name, dev->udev->devpath,
...@@ -702,8 +694,7 @@ int usbnet_open (struct net_device *net) ...@@ -702,8 +694,7 @@ int usbnet_open (struct net_device *net)
struct driver_info *info = dev->driver_info; struct driver_info *info = dev->driver_info;
if ((retval = usb_autopm_get_interface(dev->intf)) < 0) { if ((retval = usb_autopm_get_interface(dev->intf)) < 0) {
if (netif_msg_ifup (dev)) netif_info(dev, ifup, dev->net,
netdev_info(dev->net,
"resumption fail (%d) usbnet usb-%s-%s, %s\n", "resumption fail (%d) usbnet usb-%s-%s, %s\n",
retval, retval,
dev->udev->bus->bus_name, dev->udev->bus->bus_name,
...@@ -714,8 +705,7 @@ int usbnet_open (struct net_device *net) ...@@ -714,8 +705,7 @@ int usbnet_open (struct net_device *net)
// put into "known safe" state // put into "known safe" state
if (info->reset && (retval = info->reset (dev)) < 0) { if (info->reset && (retval = info->reset (dev)) < 0) {
if (netif_msg_ifup (dev)) netif_info(dev, ifup, dev->net,
netdev_info(dev->net,
"open reset fail (%d) usbnet usb-%s-%s, %s\n", "open reset fail (%d) usbnet usb-%s-%s, %s\n",
retval, retval,
dev->udev->bus->bus_name, dev->udev->bus->bus_name,
...@@ -726,8 +716,7 @@ int usbnet_open (struct net_device *net) ...@@ -726,8 +716,7 @@ int usbnet_open (struct net_device *net)
// insist peer be connected // insist peer be connected
if (info->check_connect && (retval = info->check_connect (dev)) < 0) { if (info->check_connect && (retval = info->check_connect (dev)) < 0) {
if (netif_msg_ifup (dev)) netif_dbg(dev, ifup, dev->net, "can't open; %d\n", retval);
netdev_dbg(dev->net, "can't open; %d\n", retval);
goto done; goto done;
} }
...@@ -735,33 +724,23 @@ int usbnet_open (struct net_device *net) ...@@ -735,33 +724,23 @@ int usbnet_open (struct net_device *net)
if (dev->interrupt) { if (dev->interrupt) {
retval = usb_submit_urb (dev->interrupt, GFP_KERNEL); retval = usb_submit_urb (dev->interrupt, GFP_KERNEL);
if (retval < 0) { if (retval < 0) {
if (netif_msg_ifup (dev)) netif_err(dev, ifup, dev->net,
netdev_err(dev->net, "intr submit %d\n", retval); "intr submit %d\n", retval);
goto done; goto done;
} }
} }
netif_start_queue (net); netif_start_queue (net);
if (netif_msg_ifup (dev)) { netif_info(dev, ifup, dev->net,
char *framing; "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n",
if (dev->driver_info->flags & FLAG_FRAMING_NC)
framing = "NetChip";
else if (dev->driver_info->flags & FLAG_FRAMING_GL)
framing = "GeneSys";
else if (dev->driver_info->flags & FLAG_FRAMING_Z)
framing = "Zaurus";
else if (dev->driver_info->flags & FLAG_FRAMING_RN)
framing = "RNDIS";
else if (dev->driver_info->flags & FLAG_FRAMING_AX)
framing = "ASIX";
else
framing = "simple";
netdev_info(dev->net, "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n",
(int)RX_QLEN(dev), (int)TX_QLEN(dev), (int)RX_QLEN(dev), (int)TX_QLEN(dev),
dev->net->mtu, framing); dev->net->mtu,
} (dev->driver_info->flags & FLAG_FRAMING_NC) ? "NetChip" :
(dev->driver_info->flags & FLAG_FRAMING_GL) ? "GeneSys" :
(dev->driver_info->flags & FLAG_FRAMING_Z) ? "Zaurus" :
(dev->driver_info->flags & FLAG_FRAMING_RN) ? "RNDIS" :
(dev->driver_info->flags & FLAG_FRAMING_AX) ? "ASIX" :
"simple");
// delay posting reads until we're fully open // delay posting reads until we're fully open
tasklet_schedule (&dev->bh); tasklet_schedule (&dev->bh);
...@@ -772,6 +751,7 @@ int usbnet_open (struct net_device *net) ...@@ -772,6 +751,7 @@ int usbnet_open (struct net_device *net)
usb_autopm_put_interface(dev->intf); usb_autopm_put_interface(dev->intf);
} }
return retval; return retval;
done: done:
usb_autopm_put_interface(dev->intf); usb_autopm_put_interface(dev->intf);
done_nopm: done_nopm:
...@@ -1015,16 +995,14 @@ static void tx_complete (struct urb *urb) ...@@ -1015,16 +995,14 @@ static void tx_complete (struct urb *urb)
if (!timer_pending (&dev->delay)) { if (!timer_pending (&dev->delay)) {
mod_timer (&dev->delay, mod_timer (&dev->delay,
jiffies + THROTTLE_JIFFIES); jiffies + THROTTLE_JIFFIES);
if (netif_msg_link (dev)) netif_dbg(dev, link, dev->net,
netdev_dbg(dev->net, "tx throttle %d\n", "tx throttle %d\n", urb->status);
urb->status);
} }
netif_stop_queue (dev->net); netif_stop_queue (dev->net);
break; break;
default: default:
if (netif_msg_tx_err (dev)) netif_dbg(dev, tx_err, dev->net,
netdev_dbg(dev->net, "tx err %d\n", "tx err %d\n", entry->urb->status);
entry->urb->status);
break; break;
} }
} }
...@@ -1066,16 +1044,14 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, ...@@ -1066,16 +1044,14 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
if (info->tx_fixup) { if (info->tx_fixup) {
skb = info->tx_fixup (dev, skb, GFP_ATOMIC); skb = info->tx_fixup (dev, skb, GFP_ATOMIC);
if (!skb) { if (!skb) {
if (netif_msg_tx_err (dev)) netif_dbg(dev, tx_err, dev->net, "can't tx_fixup skb\n");
netdev_dbg(dev->net, "can't tx_fixup skb\n");
goto drop; goto drop;
} }
} }
length = skb->len; length = skb->len;
if (!(urb = usb_alloc_urb (0, GFP_ATOMIC))) { if (!(urb = usb_alloc_urb (0, GFP_ATOMIC))) {
if (netif_msg_tx_err (dev)) netif_dbg(dev, tx_err, dev->net, "no urb\n");
netdev_dbg(dev->net, "no urb\n");
goto drop; goto drop;
} }
...@@ -1128,8 +1104,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, ...@@ -1128,8 +1104,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
break; break;
default: default:
usb_autopm_put_interface_async(dev->intf); usb_autopm_put_interface_async(dev->intf);
if (netif_msg_tx_err (dev)) netif_dbg(dev, tx_err, dev->net,
netdev_dbg(dev->net, "tx: submit urb err %d\n", retval); "tx: submit urb err %d\n", retval);
break; break;
case 0: case 0:
net->trans_start = jiffies; net->trans_start = jiffies;
...@@ -1140,17 +1116,15 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, ...@@ -1140,17 +1116,15 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
spin_unlock_irqrestore (&dev->txq.lock, flags); spin_unlock_irqrestore (&dev->txq.lock, flags);
if (retval) { if (retval) {
if (netif_msg_tx_err (dev)) netif_dbg(dev, tx_err, dev->net, "drop, code %d\n", retval);
netdev_dbg(dev->net, "drop, code %d\n", retval);
drop: drop:
dev->net->stats.tx_dropped++; dev->net->stats.tx_dropped++;
if (skb) if (skb)
dev_kfree_skb_any (skb); dev_kfree_skb_any (skb);
usb_free_urb (urb); usb_free_urb (urb);
} else if (netif_msg_tx_queued (dev)) { } else
netdev_dbg(dev->net, "> tx, len %d, type 0x%x\n", netif_dbg(dev, tx_queued, dev->net,
length, skb->protocol); "> tx, len %d, type 0x%x\n", length, skb->protocol);
}
#ifdef CONFIG_PM #ifdef CONFIG_PM
deferred: deferred:
#endif #endif
...@@ -1209,8 +1183,9 @@ static void usbnet_bh (unsigned long param) ...@@ -1209,8 +1183,9 @@ static void usbnet_bh (unsigned long param)
if (urb != NULL) if (urb != NULL)
rx_submit (dev, urb, GFP_ATOMIC); rx_submit (dev, urb, GFP_ATOMIC);
} }
if (temp != dev->rxq.qlen && netif_msg_link (dev)) if (temp != dev->rxq.qlen)
netdev_dbg(dev->net, "rxqlen %d --> %d\n", netif_dbg(dev, link, dev->net,
"rxqlen %d --> %d\n",
temp, dev->rxq.qlen); temp, dev->rxq.qlen);
if (dev->rxq.qlen < qlen) if (dev->rxq.qlen < qlen)
tasklet_schedule (&dev->bh); tasklet_schedule (&dev->bh);
...@@ -1242,8 +1217,7 @@ void usbnet_disconnect (struct usb_interface *intf) ...@@ -1242,8 +1217,7 @@ void usbnet_disconnect (struct usb_interface *intf)
xdev = interface_to_usbdev (intf); xdev = interface_to_usbdev (intf);
if (netif_msg_probe (dev)) netif_info(dev, probe, dev->net, "unregister '%s' usb-%s-%s, %s\n",
netdev_info(dev->net, "unregister '%s' usb-%s-%s, %s\n",
intf->dev.driver->name, intf->dev.driver->name,
xdev->bus->bus_name, xdev->devpath, xdev->bus->bus_name, xdev->devpath,
dev->driver_info->description); dev->driver_info->description);
...@@ -1409,8 +1383,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) ...@@ -1409,8 +1383,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
status = register_netdev (net); status = register_netdev (net);
if (status) if (status)
goto out3; goto out3;
if (netif_msg_probe (dev)) netif_info(dev, probe, dev->net,
netdev_info(dev->net, "register '%s' at usb-%s-%s, %s, %pM\n", "register '%s' at usb-%s-%s, %s, %pM\n",
udev->dev.driver->name, udev->dev.driver->name,
xdev->bus->bus_name, xdev->devpath, xdev->bus->bus_name, xdev->devpath,
dev->driver_info->description, dev->driver_info->description,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment