ChangeSet 1.2020.1.119, 2005/03/08 00:37:33-08:00, [EMAIL PROTECTED]

[PATCH] usb-storage: Don't log expected signatures

This fairly trivial patch makes three small changes:

        Correct a typo in a comment.

        Don't print a debugging message when a USB mass-storage device
        uses the standard signature (the one we would expect normally).

        Shorten a debugging message and add a newline.


Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/storage/scsiglue.c  |    2 +-
 drivers/usb/storage/transport.c |    7 ++++---
 drivers/usb/storage/transport.h |    1 +
 3 files changed, 6 insertions(+), 4 deletions(-)


diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
--- a/drivers/usb/storage/scsiglue.c    2005-03-08 16:43:20 -08:00
+++ b/drivers/usb/storage/scsiglue.c    2005-03-08 16:43:20 -08:00
@@ -149,7 +149,7 @@
                sdev->skip_ms_page_3f = 1;
 #endif
 
-               /* Some disks return the total number blocks in response
+               /* Some disks return the total number of blocks in response
                 * to READ CAPACITY rather than the highest block number.
                 * If this device makes that mistake, tell the sd driver. */
                if (us->flags & US_FL_FIX_CAPACITY)
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c   2005-03-08 16:43:20 -08:00
+++ b/drivers/usb/storage/transport.c   2005-03-08 16:43:20 -08:00
@@ -1066,10 +1066,11 @@
         */
        if (!us->bcs_signature) {
                us->bcs_signature = bcs->Signature;
-               US_DEBUGP("Learnt BCS signature 0x%08X\n",
-                         le32_to_cpu(us->bcs_signature));
+               if (us->bcs_signature != cpu_to_le32(US_BULK_CS_SIGN))
+                       US_DEBUGP("Learnt BCS signature 0x%08X\n",
+                                       le32_to_cpu(us->bcs_signature));
        } else if (bcs->Signature != us->bcs_signature) {
-               US_DEBUGP("Signature mismatch: device sent %08X, expecting 
%08X",
+               US_DEBUGP("Signature mismatch: got %08X, expecting %08X\n",
                          le32_to_cpu(bcs->Signature),
                          le32_to_cpu(us->bcs_signature));
                return USB_STOR_TRANSPORT_ERROR;
diff -Nru a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h
--- a/drivers/usb/storage/transport.h   2005-03-08 16:43:20 -08:00
+++ b/drivers/usb/storage/transport.h   2005-03-08 16:43:20 -08:00
@@ -107,6 +107,7 @@
 };
 
 #define US_BULK_CS_WRAP_LEN    13
+#define US_BULK_CS_SIGN                0x53425355      /* spells out 'USBS' */
 #define US_BULK_STAT_OK                0
 #define US_BULK_STAT_FAIL      1
 #define US_BULK_STAT_PHASE     2



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to