From c070d23fcf22238f9484365d706718867cf5aa02 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sun, 23 Sep 2007 19:36:22 +0100 Subject: Revert "cxacru: Use appropriate logging for errors" This reverts commit 54dc97ca60e08bdef47ed7fe4b1850ccbab301ff. --- drivers/usb/atm/cxacru.c | 29 +++++++++++------------------ 1 files changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 35308a8..1e5ee88 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c @@ -482,8 +482,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, int rbuflen = ((rsize - 1) / stride + 1) * CMD_PACKET_SIZE; if (wbuflen > PAGE_SIZE || rbuflen > PAGE_SIZE) { - usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n", - wbuflen, rbuflen); + dbg("too big transfer requested"); ret = -ENOMEM; goto fail; } @@ -494,8 +493,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, init_completion(&instance->rcv_done); ret = usb_submit_urb(instance->rcv_urb, GFP_KERNEL); if (ret < 0) { - usb_err(instance->usbatm, "submit of read urb for cm %#x failed (%d)\n", - cm, ret); + dbg("submitting read urb for cm %#x failed", cm); ret = ret; goto fail; } @@ -512,28 +510,27 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, init_completion(&instance->snd_done); ret = usb_submit_urb(instance->snd_urb, GFP_KERNEL); if (ret < 0) { - usb_err(instance->usbatm, "submit of write urb for cm %#x failed (%d)\n", - cm, ret); + dbg("submitting write urb for cm %#x failed", cm); ret = ret; goto fail; } ret = cxacru_start_wait_urb(instance->snd_urb, &instance->snd_done, NULL); if (ret < 0) { - usb_err(instance->usbatm, "send of cm %#x failed (%d)\n", cm, ret); + dbg("sending cm %#x failed", cm); ret = ret; goto fail; } ret = cxacru_start_wait_urb(instance->rcv_urb, &instance->rcv_done, &actlen); if (ret < 0) { - usb_err(instance->usbatm, "receive of cm %#x failed (%d)\n", cm, ret); + dbg("receiving cm %#x failed", cm); ret = ret; goto fail; } if (actlen % CMD_PACKET_SIZE || !actlen) { - usb_err(instance->usbatm, "invalid response length to cm %#x: %d\n", - cm, actlen); + dbg("response is not a positive multiple of %d: %#x", + CMD_PACKET_SIZE, actlen); ret = -EIO; goto fail; } @@ -541,14 +538,12 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, /* check the return status and copy the data to the output buffer, if needed */ for (offb = offd = 0; offd < rsize && offb < actlen; offb += CMD_PACKET_SIZE) { if (rbuf[offb] != cm) { - usb_err(instance->usbatm, "wrong cm %#x in response to cm %#x\n", - rbuf[offb], cm); + dbg("wrong cm %#x in response", rbuf[offb]); ret = -EIO; goto fail; } if (rbuf[offb + 1] != CM_STATUS_SUCCESS) { - usb_err(instance->usbatm, "response to cm %#x failed: %#x\n", - cm, rbuf[offb + 1]); + dbg("response failed: %#x", rbuf[offb + 1]); ret = -EIO; goto fail; } @@ -587,16 +582,14 @@ static int cxacru_cm_get_array(struct cxacru_data *instance, enum cxacru_cm_requ for (offb = 0; offb < len; ) { int l = le32_to_cpu(buf[offb++]); if (l > stride || l > (len - offb) / 2) { - usb_err(instance->usbatm, "invalid data length from cm %#x: %d\n", - cm, l); + dbg("wrong data length %#x in response", l); ret = -EIO; goto cleanup; } while (l--) { offd = le32_to_cpu(buf[offb++]); if (offd >= size) { - usb_err(instance->usbatm, "wrong index #%x in response to cm #%x\n", - offd, cm); + dbg("wrong index %#x in response", offd); ret = -EIO; goto cleanup; } -- 1.5.0.1