diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 14:34:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-29 14:22:47 -0400 |
commit | 70d2f61fc7559df3d5be32a9d01efdb9ee1b11d8 (patch) | |
tree | 3990a8583c26edb5a3feea08e000e485ccfd97c8 /drivers/net/wireless/orinoco | |
parent | cf24df6061b02063af19aba130d0fc4546959520 (diff) |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco')
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco_usb.c | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c index f9805c9353d2..3ac71339d040 100644 --- a/drivers/net/wireless/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/orinoco/orinoco_usb.c | |||
@@ -100,25 +100,11 @@ static struct ez_usb_fw firmware = { | |||
100 | .code = NULL, | 100 | .code = NULL, |
101 | }; | 101 | }; |
102 | 102 | ||
103 | #ifdef CONFIG_USB_DEBUG | ||
104 | static int debug = 1; | ||
105 | #else | ||
106 | static int debug; | ||
107 | #endif | ||
108 | |||
109 | /* Debugging macros */ | 103 | /* Debugging macros */ |
110 | #undef dbg | ||
111 | #define dbg(format, arg...) \ | ||
112 | do { if (debug) printk(KERN_DEBUG PFX "%s: " format "\n", \ | ||
113 | __func__ , ## arg); } while (0) | ||
114 | #undef err | 104 | #undef err |
115 | #define err(format, arg...) \ | 105 | #define err(format, arg...) \ |
116 | do { printk(KERN_ERR PFX format "\n", ## arg); } while (0) | 106 | do { printk(KERN_ERR PFX format "\n", ## arg); } while (0) |
117 | 107 | ||
118 | /* Module paramaters */ | ||
119 | module_param(debug, int, 0644); | ||
120 | MODULE_PARM_DESC(debug, "Debug enabled or not"); | ||
121 | |||
122 | MODULE_FIRMWARE("orinoco_ezusb_fw"); | 108 | MODULE_FIRMWARE("orinoco_ezusb_fw"); |
123 | 109 | ||
124 | /* | 110 | /* |
@@ -341,7 +327,7 @@ static void ezusb_request_timerfn(u_long _ctx) | |||
341 | ctx->state = EZUSB_CTX_REQ_TIMEOUT; | 327 | ctx->state = EZUSB_CTX_REQ_TIMEOUT; |
342 | } else { | 328 | } else { |
343 | ctx->state = EZUSB_CTX_RESP_TIMEOUT; | 329 | ctx->state = EZUSB_CTX_RESP_TIMEOUT; |
344 | dbg("couldn't unlink"); | 330 | dev_dbg(&ctx->outurb->dev->dev, "couldn't unlink\n"); |
345 | atomic_inc(&ctx->refcount); | 331 | atomic_inc(&ctx->refcount); |
346 | ctx->killed = 1; | 332 | ctx->killed = 1; |
347 | ezusb_ctx_complete(ctx); | 333 | ezusb_ctx_complete(ctx); |
@@ -634,9 +620,9 @@ static void ezusb_request_in_callback(struct ezusb_priv *upriv, | |||
634 | ctx = c; | 620 | ctx = c; |
635 | break; | 621 | break; |
636 | } | 622 | } |
637 | dbg("Skipped (0x%x/0x%x) (%d/%d)", | 623 | netdev_dbg(upriv->dev, "Skipped (0x%x/0x%x) (%d/%d)\n", |
638 | le16_to_cpu(ans->hermes_rid), | 624 | le16_to_cpu(ans->hermes_rid), c->in_rid, |
639 | c->in_rid, ans->ans_reply_count, reply_count); | 625 | ans->ans_reply_count, reply_count); |
640 | } | 626 | } |
641 | } | 627 | } |
642 | 628 | ||
@@ -768,7 +754,7 @@ static int ezusb_submit_in_urb(struct ezusb_priv *upriv) | |||
768 | void *cur_buf = upriv->read_urb->transfer_buffer; | 754 | void *cur_buf = upriv->read_urb->transfer_buffer; |
769 | 755 | ||
770 | if (upriv->read_urb->status == -EINPROGRESS) { | 756 | if (upriv->read_urb->status == -EINPROGRESS) { |
771 | dbg("urb busy, not resubmiting"); | 757 | netdev_dbg(upriv->dev, "urb busy, not resubmiting\n"); |
772 | retval = -EBUSY; | 758 | retval = -EBUSY; |
773 | goto exit; | 759 | goto exit; |
774 | } | 760 | } |
@@ -838,8 +824,9 @@ static int ezusb_firmware_download(struct ezusb_priv *upriv, | |||
838 | memcpy(fw_buffer, &fw->code[addr], FW_BUF_SIZE); | 824 | memcpy(fw_buffer, &fw->code[addr], FW_BUF_SIZE); |
839 | if (variant_offset >= addr && | 825 | if (variant_offset >= addr && |
840 | variant_offset < addr + FW_BUF_SIZE) { | 826 | variant_offset < addr + FW_BUF_SIZE) { |
841 | dbg("Patching card_variant byte at 0x%04X", | 827 | netdev_dbg(upriv->dev, |
842 | variant_offset); | 828 | "Patching card_variant byte at 0x%04X\n", |
829 | variant_offset); | ||
843 | fw_buffer[variant_offset - addr] = FW_VAR_VALUE; | 830 | fw_buffer[variant_offset - addr] = FW_VAR_VALUE; |
844 | } | 831 | } |
845 | retval = usb_control_msg(upriv->udev, | 832 | retval = usb_control_msg(upriv->udev, |
@@ -879,7 +866,6 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv, | |||
879 | BUG_ON(in_irq()); | 866 | BUG_ON(in_irq()); |
880 | 867 | ||
881 | if (!upriv->udev) { | 868 | if (!upriv->udev) { |
882 | dbg("Device disconnected"); | ||
883 | retval = -ENODEV; | 869 | retval = -ENODEV; |
884 | goto exit; | 870 | goto exit; |
885 | } | 871 | } |
@@ -1023,8 +1009,9 @@ static int ezusb_doicmd_wait(struct hermes *hw, u16 cmd, u16 parm0, u16 parm1, | |||
1023 | cpu_to_le16(parm1), | 1009 | cpu_to_le16(parm1), |
1024 | cpu_to_le16(parm2), | 1010 | cpu_to_le16(parm2), |
1025 | }; | 1011 | }; |
1026 | dbg("0x%04X, parm0 0x%04X, parm1 0x%04X, parm2 0x%04X", | 1012 | netdev_dbg(upriv->dev, |
1027 | cmd, parm0, parm1, parm2); | 1013 | "0x%04X, parm0 0x%04X, parm1 0x%04X, parm2 0x%04X\n", cmd, |
1014 | parm0, parm1, parm2); | ||
1028 | ctx = ezusb_alloc_ctx(upriv, EZUSB_RID_DOCMD, EZUSB_RID_ACK); | 1015 | ctx = ezusb_alloc_ctx(upriv, EZUSB_RID_DOCMD, EZUSB_RID_ACK); |
1029 | if (!ctx) | 1016 | if (!ctx) |
1030 | return -ENOMEM; | 1017 | return -ENOMEM; |
@@ -1045,7 +1032,7 @@ static int ezusb_docmd_wait(struct hermes *hw, u16 cmd, u16 parm0, | |||
1045 | 0, | 1032 | 0, |
1046 | 0, | 1033 | 0, |
1047 | }; | 1034 | }; |
1048 | dbg("0x%04X, parm0 0x%04X", cmd, parm0); | 1035 | netdev_dbg(upriv->dev, "0x%04X, parm0 0x%04X\n", cmd, parm0); |
1049 | ctx = ezusb_alloc_ctx(upriv, EZUSB_RID_DOCMD, EZUSB_RID_ACK); | 1036 | ctx = ezusb_alloc_ctx(upriv, EZUSB_RID_DOCMD, EZUSB_RID_ACK); |
1050 | if (!ctx) | 1037 | if (!ctx) |
1051 | return -ENOMEM; | 1038 | return -ENOMEM; |
@@ -1332,7 +1319,7 @@ static int ezusb_hard_reset(struct orinoco_private *priv) | |||
1332 | return retval; | 1319 | return retval; |
1333 | } | 1320 | } |
1334 | 1321 | ||
1335 | dbg("sending control message"); | 1322 | netdev_dbg(upriv->dev, "sending control message\n"); |
1336 | retval = usb_control_msg(upriv->udev, | 1323 | retval = usb_control_msg(upriv->udev, |
1337 | usb_sndctrlpipe(upriv->udev, 0), | 1324 | usb_sndctrlpipe(upriv->udev, 0), |
1338 | EZUSB_REQUEST_TRIGER, | 1325 | EZUSB_REQUEST_TRIGER, |
@@ -1401,10 +1388,8 @@ static void ezusb_bulk_in_callback(struct urb *urb) | |||
1401 | u16 crc; | 1388 | u16 crc; |
1402 | u16 hermes_rid; | 1389 | u16 hermes_rid; |
1403 | 1390 | ||
1404 | if (upriv->udev == NULL) { | 1391 | if (upriv->udev == NULL) |
1405 | dbg("disconnected"); | ||
1406 | return; | 1392 | return; |
1407 | } | ||
1408 | 1393 | ||
1409 | if (urb->status == -ETIMEDOUT) { | 1394 | if (urb->status == -ETIMEDOUT) { |
1410 | /* When a device gets unplugged we get this every time | 1395 | /* When a device gets unplugged we get this every time |
@@ -1421,12 +1406,13 @@ static void ezusb_bulk_in_callback(struct urb *urb) | |||
1421 | if ((urb->status == -EILSEQ) | 1406 | if ((urb->status == -EILSEQ) |
1422 | || (urb->status == -ENOENT) | 1407 | || (urb->status == -ENOENT) |
1423 | || (urb->status == -ECONNRESET)) { | 1408 | || (urb->status == -ECONNRESET)) { |
1424 | dbg("status %d, not resubmiting", urb->status); | 1409 | netdev_dbg(upriv->dev, "status %d, not resubmiting\n", |
1410 | urb->status); | ||
1425 | return; | 1411 | return; |
1426 | } | 1412 | } |
1427 | if (urb->status) | 1413 | if (urb->status) |
1428 | dbg("status: %d length: %d", | 1414 | netdev_dbg(upriv->dev, "status: %d length: %d\n", |
1429 | urb->status, urb->actual_length); | 1415 | urb->status, urb->actual_length); |
1430 | if (urb->actual_length < sizeof(*ans)) { | 1416 | if (urb->actual_length < sizeof(*ans)) { |
1431 | err("%s: short read, ignoring", __func__); | 1417 | err("%s: short read, ignoring", __func__); |
1432 | goto resubmit; | 1418 | goto resubmit; |