ChangeSet 1.823.3.4, 2002/11/11 13:13:30-08:00, mdharm-usb@one-eyed-alien.net

[PATCH] usb storage: fix spelling, comments.

This patch fixes some spelling errors and makes some comments a bit
more clear.


diff -Nru a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
--- a/drivers/usb/storage/freecom.c	Thu Nov 14 14:13:01 2002
+++ b/drivers/usb/storage/freecom.c	Thu Nov 14 14:13:01 2002
@@ -128,7 +128,7 @@
         result = usb_stor_bulk_msg (us, fxfr, opipe,
                         FCM_PACKET_LENGTH, &partial);
         if (result != USB_STOR_XFER_GOOD) {
-                US_DEBUGP ("Freecom readdata xpot failure: r=%d, p=%d\n",
+                US_DEBUGP ("Freecom readdata xport failure: r=%d, p=%d\n",
                                 result, partial);
                 return USB_STOR_TRANSPORT_ERROR;
         }
@@ -164,7 +164,7 @@
         result = usb_stor_bulk_msg (us, fxfr, opipe,
                         FCM_PACKET_LENGTH, &partial);
         if (result != USB_STOR_XFER_GOOD) {
-                US_DEBUGP ("Freecom writedata xpot failure: r=%d, p=%d\n",
+                US_DEBUGP ("Freecom writedata xport failure: r=%d, p=%d\n",
                                 result, partial);
                 return USB_STOR_TRANSPORT_ERROR;
         }
diff -Nru a/drivers/usb/storage/raw_bulk.c b/drivers/usb/storage/raw_bulk.c
--- a/drivers/usb/storage/raw_bulk.c	Thu Nov 14 14:13:01 2002
+++ b/drivers/usb/storage/raw_bulk.c	Thu Nov 14 14:13:01 2002
@@ -1,16 +1,9 @@
 /*
  * Common routines for a handful of drivers.
- * Unrelated to CF/SM - just USB stuff.
- *
- * This is mostly a thin layer on top of transport.c.
- * It converts routines that return values like -EPIPE
- * into routines that return USB_STOR_TRANSPORT_ABORTED etc.
- *
- * There is also some debug printing here.
+ * Unrelated to CF/SM - just scatter-gather stuff.
  */
 
-#include "debug.h"
-#include "transport.h"
+#include "usb.h"
 #include "raw_bulk.h"
 
 /*
diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
--- a/drivers/usb/storage/scsiglue.c	Thu Nov 14 14:13:01 2002
+++ b/drivers/usb/storage/scsiglue.c	Thu Nov 14 14:13:01 2002
@@ -103,7 +103,7 @@
  *
  * NOTE: There is no contention here, because we're already deregistered
  * the driver and we're doing each virtual host in turn, not in parallel
- * Synchronization: BLK, no spinlock.
+ * Synchronization: BKL, no spinlock.
  */
 static int release(struct Scsi_Host *psh)
 {
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c	Thu Nov 14 14:13:01 2002
+++ b/drivers/usb/storage/transport.c	Thu Nov 14 14:13:01 2002
@@ -657,7 +657,7 @@
 
 	/* initialize the scatter-gather request block */
 	US_DEBUGP("usb_stor_bulk_transfer_sglist(): xfer %d bytes, "
-			"%d entires\n", length, num_sg);
+			"%d entries\n", length, num_sg);
 	result = usb_sg_init(us->current_sg, us->pusb_dev, pipe, 0,
 			sg, num_sg, length, SLAB_NOIO);
 	if (result) {
@@ -679,26 +679,27 @@
 		}
 	}
 
+	/* wait for the completion of the transfer */
 	usb_sg_wait(us->current_sg);
 	clear_bit(US_FLIDX_CANCEL_SG, &us->flags);
 
 	result = us->current_sg->status;
 	partial = us->current_sg->bytes;
-	US_DEBUGP("usb_sg_wait() returned %d xferrerd %d/%d\n",
+	US_DEBUGP("usb_sg_wait() returned %d xferred %d/%d\n",
 			result, partial, length);
 	if (act_len)
 		*act_len = partial;
 
 	/* if we stall, we need to clear it before we go on */
 	if (result == -EPIPE) {
-		US_DEBUGP("clearing endpoint halt for pipe 0x%x,"
+		US_DEBUGP("clearing endpoint halt for pipe 0x%x, "
 				"stalled at %d bytes\n", pipe, partial);
 		if (usb_stor_clear_halt(us, pipe) < 0)
 			return USB_STOR_XFER_ERROR;
 		return USB_STOR_XFER_STALLED;
 	}
 
-	/* NAK - that means we've tried this a few times already */
+	/* NAK - that means we've retried this a few times already */
 	if (result == -ETIMEDOUT) {
 		US_DEBUGP("-- device NAKed\n");
 		return USB_STOR_XFER_ERROR;
@@ -726,10 +727,10 @@
  * Transfer an entire SCSI command's worth of data payload over the bulk
  * pipe.
  *
- * Nore that this uses the usb_stor_bulk_transfer_buf() and
+ * Nore that this uses usb_stor_bulk_transfer_buf() and
  * usb_stor_bulk_transfer_sglist() to achieve its goals --
  * this function simply determines whether we're going to use
- * scatter-gather or not, and acts apropriately.
+ * scatter-gather or not, and acts appropriately.
  */
 int usb_stor_bulk_transfer_sg(struct us_data* us, unsigned int pipe,
 		char *buf, unsigned int length_left, int use_sg, int *residual)
