On Wed, 20 Oct 2004, Greg KH wrote:

> This doesn't apply against the latest tree :(

Are you sure?  I just did "bk pull" followed by "patch" with no errors.
Maybe you tried applying it out of the proper sequence.  I've included it 
again below; it should work okay now.

Alan Stern



This patch adds the __le16 data types to the file-storage gadget and
removes some erroneous conversions to little-endian order.

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

===== drivers/usb/gadget/file_storage.c 1.24 vs edited =====
--- 1.24/drivers/usb/gadget/file_storage.c      2004-09-27 17:47:54 -04:00
+++ edited/drivers/usb/gadget/file_storage.c    2004-10-20 10:25:24 -04:00
@@ -250,7 +250,7 @@
 
 #define DRIVER_DESC            "File-backed Storage Gadget"
 #define DRIVER_NAME            "g_file_storage"
-#define DRIVER_VERSION         "31 August 2004"
+#define DRIVER_VERSION         "20 October 2004"
 
 static const char longname[] = DRIVER_DESC;
 static const char shortname[] = DRIVER_NAME;
@@ -430,9 +430,9 @@
 
 /* Command Block Wrapper */
 struct bulk_cb_wrap {
-       u32     Signature;              // Contains 'USBC'
+       __le32  Signature;              // Contains 'USBC'
        u32     Tag;                    // Unique per command id
-       u32     DataTransferLength;     // Size of the data
+       __le32  DataTransferLength;     // Size of the data
        u8      Flags;                  // Direction in bit 7
        u8      Lun;                    // LUN (normally 0)
        u8      Length;                 // Of the CDB, <= MAX_COMMAND_SIZE
@@ -445,9 +445,9 @@
 
 /* Command Status Wrapper */
 struct bulk_cs_wrap {
-       u32     Signature;              // Should = 'USBS'
+       __le32  Signature;              // Should = 'USBS'
        u32     Tag;                    // Same as original command
-       u32     Residue;                // Amount not transferred
+       __le32  Residue;                // Amount not transferred
        u8      Status;                 // See below
 };
 
@@ -3717,30 +3717,30 @@
 
        if (mod_data.release == 0xffff) {       // Parameter wasn't set
                if (gadget_is_net2280(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16(0x0301);
+                       mod_data.release = 0x0301;
                else if (gadget_is_dummy(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16(0x0302);
+                       mod_data.release = 0x0302;
                else if (gadget_is_pxa(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16(0x0303);
+                       mod_data.release = 0x0303;
                else if (gadget_is_sh(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16(0x0304);
+                       mod_data.release = 0x0304;
 
                /* The sa1100 controller is not supported */
 
                else if (gadget_is_goku(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16(0x0306);
+                       mod_data.release = 0x0306;
                else if (gadget_is_mq11xx(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16(0x0307);
+                       mod_data.release = 0x0307;
                else if (gadget_is_omap(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16(0x0308);
+                       mod_data.release = 0x0308;
                else if (gadget_is_lh7a40x(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16 (0x0309);
+                       mod_data.release = 0x0309;
                else if (gadget_is_n9604(fsg->gadget))
-                       mod_data.release = __constant_cpu_to_le16 (0x0310);
+                       mod_data.release = 0x0310;
                else {
                        WARN(fsg, "controller '%s' not recognized\n",
                                fsg->gadget->name);
-                       mod_data.release = __constant_cpu_to_le16(0x0399);
+                       mod_data.release = 0x0399;
                }
        }
 



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to