msc ext command update by ly&hsl
authoryangkai <yangkai@ubuntu-fs>
Thu, 8 Sep 2011 02:11:17 +0000 (10:11 +0800)
committeryangkai <yangkai@ubuntu-fs>
Thu, 8 Sep 2011 02:11:17 +0000 (10:11 +0800)
drivers/usb/gadget/f_mass_storage.c

index 32bf6fcc625e2c562549dfd17e40844e62e885e0..e5efee14a18476c6f1ca43081c0fb27796c7ca27 100755 (executable)
@@ -1861,7 +1861,7 @@ typedef struct tagLoaderParam
        int     crc;
 } PARM_INFO;
 #define PARM_TAG                       0x4D524150
-#define MSC_EXT_DBG                    1
+#define MSC_EXT_DBG                    0
 extern int  GetParamterInfo(char * pbuf , int len);
 
 /* the buf is bh->buf,it is large enough. */
@@ -1975,13 +1975,21 @@ static int do_get_versions( int ret ,char* buf )
                ver[4] = ASC_BCD1(p_f[0])|ASC_BCD0(p_f[1]);
                p_f+=3;
        } 
-       ver[2] = ASC_BCD0(p_f[0]);
-       p_f++;
-       if( p_f[0] != ' ' ){
-               ver[2] |= ASC_BCD1(p_f[0]);
-               p_f++;
-       }
+//     ver[2] = ASC_BCD0(p_f[0]);
+//     p_f++;
+//     if( p_f[0] != ' ' ){
+//             ver[2] |= ASC_BCD1(p_f[0]);
+//             p_f++;
+//     }
        // only support 2 byte version.
+       if ((p_f[1]>='0')&&(p_f[1]<='9'))
+       {
+               ver[2] = ASC_BCD1(p_f[0])|ASC_BCD0(p_f[1]);
+       }
+       else
+       {
+               ver[2] = ASC_BCD0(p_f[0]);
+       }
        ver[3] = 0;
 
        #if MSC_EXT_DBG