usbatm cxacru.c,1.13,1.14

kagan at infradead.org kagan at infradead.org
Thu Feb 10 18:20:57 EST 2005


Update of /home/cvs/usbatm
In directory phoenix.infradead.org:/tmp/cvs-serv4927

Modified Files:
	cxacru.c 
Log Message:
Replace err() with dbg() since those failures may be legal and shouldn't
needlessly alert users.  Let the caller decide if they are actually fatal.


Index: cxacru.c
===================================================================
RCS file: /home/cvs/usbatm/cxacru.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- cxacru.c	10 Feb 2005 22:37:26 -0000	1.13
+++ cxacru.c	10 Feb 2005 23:20:54 -0000	1.14
@@ -226,7 +226,7 @@
 	init_completion(&instance->rcv_done);
 	ret = usb_submit_urb(instance->rcv_urb, GFP_KERNEL);
 	if (ret < 0) {
-		err("submitting read urb for cm %#x failed", cm);
+		dbg("submitting read urb for cm %#x failed", cm);
 		ret = ret;
 		goto fail;
 	}
@@ -243,26 +243,26 @@
 	init_completion(&instance->snd_done);
 	ret = usb_submit_urb(instance->snd_urb, GFP_KERNEL);
 	if (ret < 0) {
-		err("submitting write urb for cm %#x failed", cm);
+		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) {
-		err("sending cm %#x failed", cm);
+		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) {
-		err("receiving cm %#x failed", cm);
+		dbg("receiving cm %#x failed", cm);
 		ret = ret;
 		goto fail;
 	}
 	if (actlen % CMD_PACKET_SIZE || !actlen) {
-		err("response is not a positive multiple of %d: %#x",
+		dbg("response is not a positive multiple of %d: %#x",
 				CMD_PACKET_SIZE, actlen);
 		ret = -EIO;
 		goto fail;
@@ -271,12 +271,12 @@
 	/* 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) {
-			err("wrong cm %#x in response", rbuf[offb]);
+			dbg("wrong cm %#x in response", rbuf[offb]);
 			ret = -EIO;
 			goto fail;
 		}
 		if (rbuf[offb + 1] != CM_STATUS_SUCCESS) {
-			err("response failed: %#x", rbuf[offb + 1]);
+			dbg("response failed: %#x", rbuf[offb + 1]);
 			ret = -EIO;
 			goto fail;
 		}
@@ -315,14 +315,14 @@
 	for (offb = 0; offb < len; ) {
 		int l = le32_to_cpu(buf[offb++]);
 		if (l > stride || l > (len - offb) / 2) {
-			err("wrong data length %#x in response", l);
+			dbg("wrong data length %#x in response", l);
 			ret = -EIO;
 			goto cleanup;
 		}
 		while (l--) {
 			offd = le32_to_cpu(buf[offb++]);
 			if (offd >= size) {
-				err("wrong index %#x in response", offd);
+				dbg("wrong index %#x in response", offd);
 				ret = -EIO;
 				goto cleanup;
 			}
@@ -491,7 +491,7 @@
 			ret = usb_bulk_msg(usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_CMD),
 					   buf, offb, NULL, CMD_TIMEOUT);
 			if (ret < 0) {
-				err("sending fw %#x failed", fw);
+				dbg("sending fw %#x failed", fw);
 				goto cleanup;
 			}
 			offb = 0;




More information about the Usbatm-commits mailing list