Commit 70d2f61f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: orinoco_usb: remove CONFIG_USB_DEBUG support

Now that the config option is gone, the driver needs to be converted
over to using the dynamic_debug infrastructure, like all other USB
drivers have been already.

Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cf24df60
......@@ -100,25 +100,11 @@ static struct ez_usb_fw firmware = {
.code = NULL,
};
#ifdef CONFIG_USB_DEBUG
static int debug = 1;
#else
static int debug;
#endif
/* Debugging macros */
#undef dbg
#define dbg(format, arg...) \
do { if (debug) printk(KERN_DEBUG PFX "%s: " format "\n", \
__func__ , ## arg); } while (0)
#undef err
#define err(format, arg...) \
do { printk(KERN_ERR PFX format "\n", ## arg); } while (0)
/* Module paramaters */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Debug enabled or not");
MODULE_FIRMWARE("orinoco_ezusb_fw");
/*
......@@ -341,7 +327,7 @@ static void ezusb_request_timerfn(u_long _ctx)
ctx->state = EZUSB_CTX_REQ_TIMEOUT;
} else {
ctx->state = EZUSB_CTX_RESP_TIMEOUT;
dbg("couldn't unlink");
dev_dbg(&ctx->outurb->dev->dev, "couldn't unlink\n");
atomic_inc(&ctx->refcount);
ctx->killed = 1;
ezusb_ctx_complete(ctx);
......@@ -634,9 +620,9 @@ static void ezusb_request_in_callback(struct ezusb_priv *upriv,
ctx = c;
break;
}
dbg("Skipped (0x%x/0x%x) (%d/%d)",
le16_to_cpu(ans->hermes_rid),
c->in_rid, ans->ans_reply_count, reply_count);
netdev_dbg(upriv->dev, "Skipped (0x%x/0x%x) (%d/%d)\n",
le16_to_cpu(ans->hermes_rid), c->in_rid,
ans->ans_reply_count, reply_count);
}
}
......@@ -768,7 +754,7 @@ static int ezusb_submit_in_urb(struct ezusb_priv *upriv)
void *cur_buf = upriv->read_urb->transfer_buffer;
if (upriv->read_urb->status == -EINPROGRESS) {
dbg("urb busy, not resubmiting");
netdev_dbg(upriv->dev, "urb busy, not resubmiting\n");
retval = -EBUSY;
goto exit;
}
......@@ -838,8 +824,9 @@ static int ezusb_firmware_download(struct ezusb_priv *upriv,
memcpy(fw_buffer, &fw->code[addr], FW_BUF_SIZE);
if (variant_offset >= addr &&
variant_offset < addr + FW_BUF_SIZE) {
dbg("Patching card_variant byte at 0x%04X",
variant_offset);
netdev_dbg(upriv->dev,
"Patching card_variant byte at 0x%04X\n",
variant_offset);
fw_buffer[variant_offset - addr] = FW_VAR_VALUE;
}
retval = usb_control_msg(upriv->udev,
......@@ -879,7 +866,6 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
BUG_ON(in_irq());
if (!upriv->udev) {
dbg("Device disconnected");
retval = -ENODEV;
goto exit;
}
......@@ -1023,8 +1009,9 @@ static int ezusb_doicmd_wait(struct hermes *hw, u16 cmd, u16 parm0, u16 parm1,
cpu_to_le16(parm1),
cpu_to_le16(parm2),
};
dbg("0x%04X, parm0 0x%04X, parm1 0x%04X, parm2 0x%04X",
cmd, parm0, parm1, parm2);
netdev_dbg(upriv->dev,
"0x%04X, parm0 0x%04X, parm1 0x%04X, parm2 0x%04X\n", cmd,
parm0, parm1, parm2);
ctx = ezusb_alloc_ctx(upriv, EZUSB_RID_DOCMD, EZUSB_RID_ACK);
if (!ctx)
return -ENOMEM;
......@@ -1045,7 +1032,7 @@ static int ezusb_docmd_wait(struct hermes *hw, u16 cmd, u16 parm0,
0,
0,
};
dbg("0x%04X, parm0 0x%04X", cmd, parm0);
netdev_dbg(upriv->dev, "0x%04X, parm0 0x%04X\n", cmd, parm0);
ctx = ezusb_alloc_ctx(upriv, EZUSB_RID_DOCMD, EZUSB_RID_ACK);
if (!ctx)
return -ENOMEM;
......@@ -1332,7 +1319,7 @@ static int ezusb_hard_reset(struct orinoco_private *priv)
return retval;
}
dbg("sending control message");
netdev_dbg(upriv->dev, "sending control message\n");
retval = usb_control_msg(upriv->udev,
usb_sndctrlpipe(upriv->udev, 0),
EZUSB_REQUEST_TRIGER,
......@@ -1401,10 +1388,8 @@ static void ezusb_bulk_in_callback(struct urb *urb)
u16 crc;
u16 hermes_rid;
if (upriv->udev == NULL) {
dbg("disconnected");
if (upriv->udev == NULL)
return;
}
if (urb->status == -ETIMEDOUT) {
/* When a device gets unplugged we get this every time
......@@ -1421,12 +1406,13 @@ static void ezusb_bulk_in_callback(struct urb *urb)
if ((urb->status == -EILSEQ)
|| (urb->status == -ENOENT)
|| (urb->status == -ECONNRESET)) {
dbg("status %d, not resubmiting", urb->status);
netdev_dbg(upriv->dev, "status %d, not resubmiting\n",
urb->status);
return;
}
if (urb->status)
dbg("status: %d length: %d",
urb->status, urb->actual_length);
netdev_dbg(upriv->dev, "status: %d length: %d\n",
urb->status, urb->actual_length);
if (urb->actual_length < sizeof(*ans)) {
err("%s: short read, ignoring", __func__);
goto resubmit;
......
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