Greg:

This patch fixes a couple of places in g_file_storage where I forgot to 
use proper byte-swapping.  Please apply.

Alan Stern



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

===== drivers/usb/gadget/file_storage.c 1.10 vs edited =====
--- 1.10/drivers/usb/gadget/file_storage.c      Tue Jun  8 07:03:07 2004
+++ edited/drivers/usb/gadget/file_storage.c    Thu Jun 17 16:15:53 2004
@@ -2501,7 +2501,7 @@
                /* Store and send the Bulk-only CSW */
                csw->Signature = __constant_cpu_to_le32(USB_BULK_CS_SIG);
                csw->Tag = fsg->tag;
-               csw->Residue = fsg->residue;
+               csw->Residue = cpu_to_le32(fsg->residue);
                csw->Status = status;
 
                bh->inreq->length = USB_BULK_CS_WRAP_LEN;
@@ -2947,7 +2947,7 @@
                fsg->data_dir = DATA_DIR_TO_HOST;
        else
                fsg->data_dir = DATA_DIR_FROM_HOST;
-       fsg->data_size = cbw->DataTransferLength;
+       fsg->data_size = le32_to_cpu(cbw->DataTransferLength);
        if (fsg->data_size == 0)
                fsg->data_dir = DATA_DIR_NONE;
        fsg->lun = cbw->Lun;



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to