From 3482be62e48ddd2182873b25989270eb9088a65f Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Tue, 16 Nov 2010 17:14:32 -0500 Subject: USB: gadget: f_mtp: Support for file transfer length greater than 4 gigabytes For backward compatibility with PTP, MTP is limited to a 32-bit file size. When transferring files greater than 4 gig, MTP uses 0xFFFFFFFF as the file size and the receiver reads until it receives a short packet. Expanded size of mtp_file_range.length to 64 bits and added support for writing zero length packets. Signed-off-by: Mike Lockwood --- include/linux/usb/f_mtp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/usb/f_mtp.h b/include/linux/usb/f_mtp.h index 426c6b5cc06a..e4fd88066389 100644 --- a/include/linux/usb/f_mtp.h +++ b/include/linux/usb/f_mtp.h @@ -29,7 +29,7 @@ struct mtp_file_range { /* offset in file for start of transfer */ loff_t offset; /* number of bytes to transfer */ - size_t length; + int64_t length; }; struct mtp_event { -- cgit v1.2.3