summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/f_thor.c10
-rw-r--r--drivers/usb/gadget/f_thor.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
index 6d38cb6d49..c8eda05832 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -262,8 +262,10 @@ static long long int process_rqt_download(const struct rqt_box *rqt)
switch (rqt->rqt_data) {
case RQT_DL_INIT:
- thor_file_size = rqt->int_data[0];
- debug("INIT: total %d bytes\n", rqt->int_data[0]);
+ thor_file_size = (unsigned long long int)rqt->int_data[0] +
+ (((unsigned long long int)rqt->int_data[1])
+ << 32);
+ debug("INIT: total %llu bytes\n", thor_file_size);
break;
case RQT_DL_FILE_INFO:
file_type = rqt->int_data[0];
@@ -274,7 +276,9 @@ static long long int process_rqt_download(const struct rqt_box *rqt)
break;
}
- thor_file_size = rqt->int_data[1];
+ thor_file_size = (unsigned long long int)rqt->int_data[1] +
+ (((unsigned long long int)rqt->int_data[2])
+ << 32);
memcpy(f_name, rqt->str_data[0], F_NAME_BUF_SIZE);
f_name[F_NAME_BUF_SIZE] = '\0';
diff --git a/drivers/usb/gadget/f_thor.h b/drivers/usb/gadget/f_thor.h
index 47abc8aebd..8ba3fa21b7 100644
--- a/drivers/usb/gadget/f_thor.h
+++ b/drivers/usb/gadget/f_thor.h
@@ -34,7 +34,7 @@ struct usb_cdc_attribute_vendor_descriptor {
__u8 DAUValue;
} __packed;
-#define VER_PROTOCOL_MAJOR 4
+#define VER_PROTOCOL_MAJOR 5
#define VER_PROTOCOL_MINOR 0
enum rqt {