mtp: modify receive_file_work return error problem, when force disconnect usb
authorhwg <hwg@rock-chips.com>
Mon, 23 Apr 2012 07:41:51 +0000 (15:41 +0800)
committerhwg <hwg@rock-chips.com>
Mon, 23 Apr 2012 07:41:51 +0000 (15:41 +0800)
drivers/usb/gadget/f_mtp.c

index 72d24554b022248e2550582e37ef69cea891b6f8..1f6f02ff38e15d63d1df4c0812231613497f4b95 100755 (executable)
@@ -787,7 +787,8 @@ static void receive_file_work(struct work_struct *data)
                        if (read_req->actual < read_req->length) {
                                /* short packet is used to signal EOF for sizes > 4 gig */
                                DBG(cdev, "got short packet\n");
-                               count = 0;
+                               if (count == 0xFFFFFFFF)
+                                       count = 0;
                        }
 
                        write_req = read_req;