Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354451
b: refs/heads/master
c: 4c56a2b
h: refs/heads/master
i:
  354449: 220f276
  354447: 3709955
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Feb 6, 2013
1 parent e2615ca commit 0baa5ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f25a527eac10d9ba277a2de7a2a9d3e92c08a52
refs/heads/master: 4c56a2b63979ec1992fddc087c4660fde7d8e6c0
46 changes: 8 additions & 38 deletions trunk/drivers/staging/comedi/drivers/vmk80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,6 @@ enum {
#define URB_RCV_FLAG (1 << 0)
#define URB_SND_FLAG (1 << 1)

#ifdef CONFIG_COMEDI_DEBUG
static int dbgcm = 1;
#else
static int dbgcm;
#endif

#define dbgcm(fmt, arg...) \
do { \
if (dbgcm) \
printk(KERN_DEBUG fmt, ##arg); \
} while (0)

enum vmk80xx_model {
VMK8055_MODEL,
VMK8061_MODEL
Expand Down Expand Up @@ -212,12 +200,6 @@ static void vmk80xx_tx_callback(struct urb *urb)
{
struct vmk80xx_private *devpriv = urb->context;
unsigned long *flags = &devpriv->flags;
int stat = urb->status;

if (stat && !(stat == -ENOENT
|| stat == -ECONNRESET || stat == -ESHUTDOWN))
dbgcm("comedi#: vmk80xx: %s - nonzero urb status (%d)\n",
__func__, stat);

if (!test_bit(TRANS_OUT_BUSY, flags))
return;
Expand All @@ -241,26 +223,16 @@ static void vmk80xx_rx_callback(struct urb *urb)
case -ESHUTDOWN:
break;
default:
dbgcm("comedi#: vmk80xx: %s - nonzero urb status (%d)\n",
__func__, stat);
goto resubmit;
}

goto exit;
resubmit:
if (test_bit(TRANS_IN_RUNNING, flags) && devpriv->intf) {
usb_anchor_urb(urb, &devpriv->rx_anchor);

if (!usb_submit_urb(urb, GFP_KERNEL))
goto exit;
/* Try to resubmit the urb */
if (test_bit(TRANS_IN_RUNNING, flags) && devpriv->intf) {
usb_anchor_urb(urb, &devpriv->rx_anchor);

dev_err(&urb->dev->dev,
"comedi#: vmk80xx: %s - submit urb failed\n",
__func__);

usb_unanchor_urb(urb);
if (usb_submit_urb(urb, GFP_KERNEL))
usb_unanchor_urb(urb);
}
break;
}
exit:

clear_bit(TRANS_IN_BUSY, flags);

wake_up_interruptible(&devpriv->read_wait);
Expand Down Expand Up @@ -1187,8 +1159,6 @@ static int vmk80xx_auto_attach(struct comedi_device *dev,
if (vmk80xx_check_data_link(devpriv)) {
vmk80xx_read_eeprom(devpriv, IC6_VERSION);
dev_info(&intf->dev, "%s\n", devpriv->fw.ic6_vers);
} else {
dbgcm("comedi#: vmk80xx: no conn. to CPU\n");
}
}

Expand Down

0 comments on commit 0baa5ae

Please sign in to comment.