Commit c94cb314 authored by Oliver Neukum's avatar Oliver Neukum Committed by David S. Miller

net: prepare usb net drivers for addition of status as a parameter

USB is going to switch the signature of the callbacks to
void callback(struct urb *urb, int status)
This patch will ease the transition.
Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab5024ab
...@@ -246,10 +246,11 @@ static int asix_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index, ...@@ -246,10 +246,11 @@ static int asix_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
static void asix_async_cmd_callback(struct urb *urb) static void asix_async_cmd_callback(struct urb *urb)
{ {
struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context; struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context;
int status = urb->status;
if (urb->status < 0) if (status < 0)
printk(KERN_DEBUG "asix_async_cmd_callback() failed with %d", printk(KERN_DEBUG "asix_async_cmd_callback() failed with %d",
urb->status); status);
kfree(req); kfree(req);
usb_free_urb(urb); usb_free_urb(urb);
......
...@@ -229,14 +229,15 @@ static void catc_rx_done(struct urb *urb) ...@@ -229,14 +229,15 @@ static void catc_rx_done(struct urb *urb)
u8 *pkt_start = urb->transfer_buffer; u8 *pkt_start = urb->transfer_buffer;
struct sk_buff *skb; struct sk_buff *skb;
int pkt_len, pkt_offset = 0; int pkt_len, pkt_offset = 0;
int status = urb->status;
if (!catc->is_f5u011) { if (!catc->is_f5u011) {
clear_bit(RX_RUNNING, &catc->flags); clear_bit(RX_RUNNING, &catc->flags);
pkt_offset = 2; pkt_offset = 2;
} }
if (urb->status) { if (status) {
dbg("rx_done, status %d, length %d", urb->status, urb->actual_length); dbg("rx_done, status %d, length %d", status, urb->actual_length);
return; return;
} }
...@@ -273,12 +274,12 @@ static void catc_rx_done(struct urb *urb) ...@@ -273,12 +274,12 @@ static void catc_rx_done(struct urb *urb)
if (catc->is_f5u011) { if (catc->is_f5u011) {
if (atomic_read(&catc->recq_sz)) { if (atomic_read(&catc->recq_sz)) {
int status; int state;
atomic_dec(&catc->recq_sz); atomic_dec(&catc->recq_sz);
dbg("getting extra packet"); dbg("getting extra packet");
urb->dev = catc->usbdev; urb->dev = catc->usbdev;
if ((status = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { if ((state = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
dbg("submit(rx_urb) status %d", status); dbg("submit(rx_urb) status %d", state);
} }
} else { } else {
clear_bit(RX_RUNNING, &catc->flags); clear_bit(RX_RUNNING, &catc->flags);
...@@ -290,8 +291,9 @@ static void catc_irq_done(struct urb *urb) ...@@ -290,8 +291,9 @@ static void catc_irq_done(struct urb *urb)
{ {
struct catc *catc = urb->context; struct catc *catc = urb->context;
u8 *data = urb->transfer_buffer; u8 *data = urb->transfer_buffer;
int status; int status = urb->status;
unsigned int hasdata = 0, linksts = LinkNoChange; unsigned int hasdata = 0, linksts = LinkNoChange;
int res;
if (!catc->is_f5u011) { if (!catc->is_f5u011) {
hasdata = data[1] & 0x80; hasdata = data[1] & 0x80;
...@@ -307,7 +309,7 @@ static void catc_irq_done(struct urb *urb) ...@@ -307,7 +309,7 @@ static void catc_irq_done(struct urb *urb)
linksts = LinkBad; linksts = LinkBad;
} }
switch (urb->status) { switch (status) {
case 0: /* success */ case 0: /* success */
break; break;
case -ECONNRESET: /* unlink */ case -ECONNRESET: /* unlink */
...@@ -316,7 +318,7 @@ static void catc_irq_done(struct urb *urb) ...@@ -316,7 +318,7 @@ static void catc_irq_done(struct urb *urb)
return; return;
/* -EPIPE: should clear the halt */ /* -EPIPE: should clear the halt */
default: /* error */ default: /* error */
dbg("irq_done, status %d, data %02x %02x.", urb->status, data[0], data[1]); dbg("irq_done, status %d, data %02x %02x.", status, data[0], data[1]);
goto resubmit; goto resubmit;
} }
...@@ -336,17 +338,17 @@ static void catc_irq_done(struct urb *urb) ...@@ -336,17 +338,17 @@ static void catc_irq_done(struct urb *urb)
atomic_inc(&catc->recq_sz); atomic_inc(&catc->recq_sz);
} else { } else {
catc->rx_urb->dev = catc->usbdev; catc->rx_urb->dev = catc->usbdev;
if ((status = usb_submit_urb(catc->rx_urb, GFP_ATOMIC)) < 0) { if ((res = usb_submit_urb(catc->rx_urb, GFP_ATOMIC)) < 0) {
err("submit(rx_urb) status %d", status); err("submit(rx_urb) status %d", res);
} }
} }
} }
resubmit: resubmit:
status = usb_submit_urb (urb, GFP_ATOMIC); res = usb_submit_urb (urb, GFP_ATOMIC);
if (status) if (res)
err ("can't resubmit intr, %s-%s, status %d", err ("can't resubmit intr, %s-%s, status %d",
catc->usbdev->bus->bus_name, catc->usbdev->bus->bus_name,
catc->usbdev->devpath, status); catc->usbdev->devpath, res);
} }
/* /*
...@@ -378,9 +380,9 @@ static void catc_tx_done(struct urb *urb) ...@@ -378,9 +380,9 @@ static void catc_tx_done(struct urb *urb)
{ {
struct catc *catc = urb->context; struct catc *catc = urb->context;
unsigned long flags; unsigned long flags;
int r; int r, status = urb->status;
if (urb->status == -ECONNRESET) { if (status == -ECONNRESET) {
dbg("Tx Reset."); dbg("Tx Reset.");
urb->status = 0; urb->status = 0;
catc->netdev->trans_start = jiffies; catc->netdev->trans_start = jiffies;
...@@ -390,8 +392,8 @@ static void catc_tx_done(struct urb *urb) ...@@ -390,8 +392,8 @@ static void catc_tx_done(struct urb *urb)
return; return;
} }
if (urb->status) { if (status) {
dbg("tx_done, status %d, length %d", urb->status, urb->actual_length); dbg("tx_done, status %d, length %d", status, urb->actual_length);
return; return;
} }
...@@ -502,9 +504,10 @@ static void catc_ctrl_done(struct urb *urb) ...@@ -502,9 +504,10 @@ static void catc_ctrl_done(struct urb *urb)
struct catc *catc = urb->context; struct catc *catc = urb->context;
struct ctrl_queue *q; struct ctrl_queue *q;
unsigned long flags; unsigned long flags;
int status = urb->status;
if (urb->status) if (status)
dbg("ctrl_done, status %d, len %d.", urb->status, urb->actual_length); dbg("ctrl_done, status %d, len %d.", status, urb->actual_length);
spin_lock_irqsave(&catc->ctrl_lock, flags); spin_lock_irqsave(&catc->ctrl_lock, flags);
......
...@@ -123,10 +123,11 @@ static int dm_write_reg(struct usbnet *dev, u8 reg, u8 value) ...@@ -123,10 +123,11 @@ static int dm_write_reg(struct usbnet *dev, u8 reg, u8 value)
static void dm_write_async_callback(struct urb *urb) static void dm_write_async_callback(struct urb *urb)
{ {
struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context; struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context;
int status = urb->status;
if (urb->status < 0) if (status < 0)
printk(KERN_DEBUG "dm_write_async_callback() failed with %d\n", printk(KERN_DEBUG "dm_write_async_callback() failed with %d\n",
urb->status); status);
kfree(req); kfree(req);
usb_free_urb(urb); usb_free_urb(urb);
......
...@@ -516,8 +516,9 @@ static void int_callback(struct urb *u) ...@@ -516,8 +516,9 @@ static void int_callback(struct urb *u)
{ {
struct kaweth_device *kaweth = u->context; struct kaweth_device *kaweth = u->context;
int act_state; int act_state;
int status = u->status;
switch (u->status) { switch (status) {
case 0: /* success */ case 0: /* success */
break; break;
case -ECONNRESET: /* unlink */ case -ECONNRESET: /* unlink */
...@@ -598,6 +599,7 @@ static void kaweth_usb_receive(struct urb *urb) ...@@ -598,6 +599,7 @@ static void kaweth_usb_receive(struct urb *urb)
{ {
struct kaweth_device *kaweth = urb->context; struct kaweth_device *kaweth = urb->context;
struct net_device *net = kaweth->net; struct net_device *net = kaweth->net;
int status = urb->status;
int count = urb->actual_length; int count = urb->actual_length;
int count2 = urb->transfer_buffer_length; int count2 = urb->transfer_buffer_length;
...@@ -606,7 +608,7 @@ static void kaweth_usb_receive(struct urb *urb) ...@@ -606,7 +608,7 @@ static void kaweth_usb_receive(struct urb *urb)
struct sk_buff *skb; struct sk_buff *skb;
if(unlikely(urb->status == -ECONNRESET || urb->status == -ESHUTDOWN)) if(unlikely(status == -ECONNRESET || status == -ESHUTDOWN))
/* we are killed - set a flag and wake the disconnect handler */ /* we are killed - set a flag and wake the disconnect handler */
{ {
kaweth->end = 1; kaweth->end = 1;
...@@ -621,10 +623,10 @@ static void kaweth_usb_receive(struct urb *urb) ...@@ -621,10 +623,10 @@ static void kaweth_usb_receive(struct urb *urb)
} }
spin_unlock(&kaweth->device_lock); spin_unlock(&kaweth->device_lock);
if(urb->status && urb->status != -EREMOTEIO && count != 1) { if(status && status != -EREMOTEIO && count != 1) {
err("%s RX status: %d count: %d packet_len: %d", err("%s RX status: %d count: %d packet_len: %d",
net->name, net->name,
urb->status, status,
count, count,
(int)pkt_len); (int)pkt_len);
kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC); kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
...@@ -775,10 +777,11 @@ static void kaweth_usb_transmit_complete(struct urb *urb) ...@@ -775,10 +777,11 @@ static void kaweth_usb_transmit_complete(struct urb *urb)
{ {
struct kaweth_device *kaweth = urb->context; struct kaweth_device *kaweth = urb->context;
struct sk_buff *skb = kaweth->tx_skb; struct sk_buff *skb = kaweth->tx_skb;
int status = urb->status;
if (unlikely(urb->status != 0)) if (unlikely(status != 0))
if (urb->status != -ENOENT) if (status != -ENOENT)
dbg("%s: TX status %d.", kaweth->net->name, urb->status); dbg("%s: TX status %d.", kaweth->net->name, status);
netif_wake_queue(kaweth->net); netif_wake_queue(kaweth->net);
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
......
...@@ -115,10 +115,11 @@ static int mcs7830_set_reg(struct usbnet *dev, u16 index, u16 size, void *data) ...@@ -115,10 +115,11 @@ static int mcs7830_set_reg(struct usbnet *dev, u16 index, u16 size, void *data)
static void mcs7830_async_cmd_callback(struct urb *urb) static void mcs7830_async_cmd_callback(struct urb *urb)
{ {
struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context; struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context;
int status = urb->status;
if (urb->status < 0) if (status < 0)
printk(KERN_DEBUG "%s() failed with %d\n", printk(KERN_DEBUG "%s() failed with %d\n",
__func__, urb->status); __func__, status);
kfree(req); kfree(req);
usb_free_urb(urb); usb_free_urb(urb);
......
...@@ -99,11 +99,12 @@ static int update_eth_regs_async(pegasus_t *); ...@@ -99,11 +99,12 @@ static int update_eth_regs_async(pegasus_t *);
static void ctrl_callback(struct urb *urb) static void ctrl_callback(struct urb *urb)
{ {
pegasus_t *pegasus = urb->context; pegasus_t *pegasus = urb->context;
int status = urb->status;
if (!pegasus) if (!pegasus)
return; return;
switch (urb->status) { switch (status) {
case 0: case 0:
if (pegasus->flags & ETH_REGS_CHANGE) { if (pegasus->flags & ETH_REGS_CHANGE) {
pegasus->flags &= ~ETH_REGS_CHANGE; pegasus->flags &= ~ETH_REGS_CHANGE;
...@@ -119,7 +120,7 @@ static void ctrl_callback(struct urb *urb) ...@@ -119,7 +120,7 @@ static void ctrl_callback(struct urb *urb)
default: default:
if (netif_msg_drv(pegasus) && printk_ratelimit()) if (netif_msg_drv(pegasus) && printk_ratelimit())
dev_dbg(&pegasus->intf->dev, "%s, status %d\n", dev_dbg(&pegasus->intf->dev, "%s, status %d\n",
__func__, urb->status); __func__, status);
} }
pegasus->flags &= ~ETH_REGS_CHANGED; pegasus->flags &= ~ETH_REGS_CHANGED;
wake_up(&pegasus->ctrl_wait); wake_up(&pegasus->ctrl_wait);
...@@ -611,6 +612,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -611,6 +612,7 @@ static void read_bulk_callback(struct urb *urb)
pegasus_t *pegasus = urb->context; pegasus_t *pegasus = urb->context;
struct net_device *net; struct net_device *net;
int rx_status, count = urb->actual_length; int rx_status, count = urb->actual_length;
int status = urb->status;
u8 *buf = urb->transfer_buffer; u8 *buf = urb->transfer_buffer;
__u16 pkt_len; __u16 pkt_len;
...@@ -621,7 +623,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -621,7 +623,7 @@ static void read_bulk_callback(struct urb *urb)
if (!netif_device_present(net) || !netif_running(net)) if (!netif_device_present(net) || !netif_running(net))
return; return;
switch (urb->status) { switch (status) {
case 0: case 0:
break; break;
case -ETIME: case -ETIME:
...@@ -639,11 +641,11 @@ static void read_bulk_callback(struct urb *urb) ...@@ -639,11 +641,11 @@ static void read_bulk_callback(struct urb *urb)
case -ECONNRESET: case -ECONNRESET:
case -ESHUTDOWN: case -ESHUTDOWN:
if (netif_msg_ifdown(pegasus)) if (netif_msg_ifdown(pegasus))
pr_debug("%s: rx unlink, %d\n", net->name, urb->status); pr_debug("%s: rx unlink, %d\n", net->name, status);
return; return;
default: default:
if (netif_msg_rx_err(pegasus)) if (netif_msg_rx_err(pegasus))
pr_debug("%s: RX status %d\n", net->name, urb->status); pr_debug("%s: RX status %d\n", net->name, status);
goto goon; goto goon;
} }
...@@ -769,6 +771,7 @@ static void write_bulk_callback(struct urb *urb) ...@@ -769,6 +771,7 @@ static void write_bulk_callback(struct urb *urb)
{ {
pegasus_t *pegasus = urb->context; pegasus_t *pegasus = urb->context;
struct net_device *net; struct net_device *net;
int status = urb->status;
if (!pegasus) if (!pegasus)
return; return;
...@@ -778,7 +781,7 @@ static void write_bulk_callback(struct urb *urb) ...@@ -778,7 +781,7 @@ static void write_bulk_callback(struct urb *urb)
if (!netif_device_present(net) || !netif_running(net)) if (!netif_device_present(net) || !netif_running(net))
return; return;
switch (urb->status) { switch (status) {
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);
...@@ -790,11 +793,11 @@ static void write_bulk_callback(struct urb *urb) ...@@ -790,11 +793,11 @@ static void write_bulk_callback(struct urb *urb)
case -ECONNRESET: case -ECONNRESET:
case -ESHUTDOWN: case -ESHUTDOWN:
if (netif_msg_ifdown(pegasus)) if (netif_msg_ifdown(pegasus))
pr_debug("%s: tx unlink, %d\n", net->name, urb->status); pr_debug("%s: tx unlink, %d\n", net->name, status);
return; return;
default: default:
if (netif_msg_tx_err(pegasus)) if (netif_msg_tx_err(pegasus))
pr_info("%s: TX status %d\n", net->name, urb->status); pr_info("%s: TX status %d\n", net->name, status);
/* FALL THROUGH */ /* FALL THROUGH */
case 0: case 0:
break; break;
...@@ -808,13 +811,13 @@ static void intr_callback(struct urb *urb) ...@@ -808,13 +811,13 @@ static void intr_callback(struct urb *urb)
{ {
pegasus_t *pegasus = urb->context; pegasus_t *pegasus = urb->context;
struct net_device *net; struct net_device *net;
int status; int res, status = urb->status;
if (!pegasus) if (!pegasus)
return; return;
net = pegasus->net; net = pegasus->net;
switch (urb->status) { switch (status) {
case 0: case 0:
break; break;
case -ECONNRESET: /* unlink */ case -ECONNRESET: /* unlink */
...@@ -827,7 +830,7 @@ static void intr_callback(struct urb *urb) ...@@ -827,7 +830,7 @@ static void intr_callback(struct urb *urb)
*/ */
if (netif_msg_timer(pegasus)) if (netif_msg_timer(pegasus))
pr_debug("%s: intr status %d\n", net->name, pr_debug("%s: intr status %d\n", net->name,
urb->status); status);
} }
if (urb->actual_length >= 6) { if (urb->actual_length >= 6) {
...@@ -854,12 +857,12 @@ static void intr_callback(struct urb *urb) ...@@ -854,12 +857,12 @@ static void intr_callback(struct urb *urb)
pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4]; pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4];
} }
status = usb_submit_urb(urb, GFP_ATOMIC); res = usb_submit_urb(urb, GFP_ATOMIC);
if (status == -ENODEV) if (res == -ENODEV)
netif_device_detach(pegasus->net); netif_device_detach(pegasus->net);
if (status && netif_msg_timer(pegasus)) if (res && netif_msg_timer(pegasus))
printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n", printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n",
net->name, status); net->name, res);
} }
static void pegasus_tx_timeout(struct net_device *net) static void pegasus_tx_timeout(struct net_device *net)
......
...@@ -212,8 +212,9 @@ static int set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data) ...@@ -212,8 +212,9 @@ static int set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
static void ctrl_callback(struct urb *urb) static void ctrl_callback(struct urb *urb)
{ {
rtl8150_t *dev; rtl8150_t *dev;
int status = urb->status;
switch (urb->status) { switch (status) {
case 0: case 0:
break; break;
case -EINPROGRESS: case -EINPROGRESS:
...@@ -221,7 +222,7 @@ static void ctrl_callback(struct urb *urb) ...@@ -221,7 +222,7 @@ static void ctrl_callback(struct urb *urb)
case -ENOENT: case -ENOENT:
break; break;
default: default:
dev_warn(&urb->dev->dev, "ctrl urb status %d\n", urb->status); dev_warn(&urb->dev->dev, "ctrl urb status %d\n", status);
} }
dev = urb->context; dev = urb->context;
clear_bit(RX_REG_SET, &dev->flags); clear_bit(RX_REG_SET, &dev->flags);
...@@ -424,7 +425,8 @@ static void read_bulk_callback(struct urb *urb) ...@@ -424,7 +425,8 @@ static void read_bulk_callback(struct urb *urb)
struct sk_buff *skb; struct sk_buff *skb;
struct net_device *netdev; struct net_device *netdev;
u16 rx_stat; u16 rx_stat;
int status; int status = urb->status;
int result;
dev = urb->context; dev = urb->context;
if (!dev) if (!dev)
...@@ -435,7 +437,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -435,7 +437,7 @@ static void read_bulk_callback(struct urb *urb)
if (!netif_device_present(netdev)) if (!netif_device_present(netdev))
return; return;
switch (urb->status) { switch (status) {
case 0: case 0:
break; break;
case -ENOENT: case -ENOENT:
...@@ -444,7 +446,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -444,7 +446,7 @@ static void read_bulk_callback(struct urb *urb)
dev_warn(&urb->dev->dev, "may be reset is needed?..\n"); dev_warn(&urb->dev->dev, "may be reset is needed?..\n");
goto goon; goto goon;
default: default:
dev_warn(&urb->dev->dev, "Rx status %d\n", urb->status); dev_warn(&urb->dev->dev, "Rx status %d\n", status);
goto goon; goto goon;
} }
...@@ -474,10 +476,10 @@ static void read_bulk_callback(struct urb *urb) ...@@ -474,10 +476,10 @@ static void read_bulk_callback(struct urb *urb)
goon: goon:
usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1), usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev); dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
status = usb_submit_urb(dev->rx_urb, GFP_ATOMIC); result = usb_submit_urb(dev->rx_urb, GFP_ATOMIC);
if (status == -ENODEV) if (result == -ENODEV)
netif_device_detach(dev->netdev); netif_device_detach(dev->netdev);
else if (status) { else if (result) {
set_bit(RX_URB_FAIL, &dev->flags); set_bit(RX_URB_FAIL, &dev->flags);
goto resched; goto resched;
} else { } else {
...@@ -530,6 +532,7 @@ static void rx_fixup(unsigned long data) ...@@ -530,6 +532,7 @@ static void rx_fixup(unsigned long data)
static void write_bulk_callback(struct urb *urb) static void write_bulk_callback(struct urb *urb)
{ {
rtl8150_t *dev; rtl8150_t *dev;
int status = urb->status;
dev = urb->context; dev = urb->context;
if (!dev) if (!dev)
...@@ -537,9 +540,9 @@ static void write_bulk_callback(struct urb *urb) ...@@ -537,9 +540,9 @@ static void write_bulk_callback(struct urb *urb)
dev_kfree_skb_irq(dev->tx_skb); dev_kfree_skb_irq(dev->tx_skb);
if (!netif_device_present(dev->netdev)) if (!netif_device_present(dev->netdev))
return; return;
if (urb->status) if (status)
dev_info(&urb->dev->dev, "%s: Tx status %d\n", dev_info(&urb->dev->dev, "%s: Tx status %d\n",
dev->netdev->name, urb->status); dev->netdev->name, status);
dev->netdev->trans_start = jiffies; dev->netdev->trans_start = jiffies;
netif_wake_queue(dev->netdev); netif_wake_queue(dev->netdev);
} }
...@@ -548,12 +551,13 @@ static void intr_callback(struct urb *urb) ...@@ -548,12 +551,13 @@ static void intr_callback(struct urb *urb)
{ {
rtl8150_t *dev; rtl8150_t *dev;
__u8 *d; __u8 *d;
int status; int status = urb->status;
int res;
dev = urb->context; dev = urb->context;
if (!dev) if (!dev)
return; return;
switch (urb->status) { switch (status) {
case 0: /* success */ case 0: /* success */
break; break;
case -ECONNRESET: /* unlink */ case -ECONNRESET: /* unlink */
...@@ -563,7 +567,7 @@ static void intr_callback(struct urb *urb) ...@@ -563,7 +567,7 @@ static void intr_callback(struct urb *urb)
/* -EPIPE: should clear the halt */ /* -EPIPE: should clear the halt */
default: default:
dev_info(&urb->dev->dev, "%s: intr status %d\n", dev_info(&urb->dev->dev, "%s: intr status %d\n",
dev->netdev->name, urb->status); dev->netdev->name, status);
goto resubmit; goto resubmit;
} }
...@@ -591,13 +595,13 @@ static void intr_callback(struct urb *urb) ...@@ -591,13 +595,13 @@ static void intr_callback(struct urb *urb)
} }
resubmit: resubmit:
status = usb_submit_urb (urb, GFP_ATOMIC); res = usb_submit_urb (urb, GFP_ATOMIC);
if (status == -ENODEV) if (res == -ENODEV)
netif_device_detach(dev->netdev); netif_device_detach(dev->netdev);
else if (status) else if (res)
err ("can't resubmit intr, %s-%s/input0, status %d", err ("can't resubmit intr, %s-%s/input0, status %d",
dev->udev->bus->bus_name, dev->udev->bus->bus_name,
dev->udev->devpath, status); dev->udev->devpath, res);
} }
static int rtl8150_suspend(struct usb_interface *intf, pm_message_t message) static int rtl8150_suspend(struct usb_interface *intf, pm_message_t message)
......
...@@ -311,9 +311,10 @@ static void smsc95xx_async_cmd_callback(struct urb *urb, struct pt_regs *regs) ...@@ -311,9 +311,10 @@ static void smsc95xx_async_cmd_callback(struct urb *urb, struct pt_regs *regs)
{ {
struct usb_context *usb_context = urb->context; struct usb_context *usb_context = urb->context;
struct usbnet *dev = usb_context->dev; struct usbnet *dev = usb_context->dev;
int status = urb->status;
if (urb->status < 0) if (status < 0)
devwarn(dev, "async callback failed with %d", urb->status); devwarn(dev, "async callback failed with %d", status);
complete(&usb_context->notify); complete(&usb_context->notify);
......
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