The patch titled USB: g_printer: fix handling zero-length packet has been added to the -mm tree. Its filename is usb-g_printer-fix-handling-zero-length-packet.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: USB: g_printer: fix handling zero-length packet From: SangSu Park<sangsu@xxxxxxxxx> g_printer doesn't have to check whether the data size is a multiple of MaxPacketSize, because device controller driver already make that check. Signed-off-by: SangSu Park<sangsu@xxxxxxxxx> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/usb/gadget/printer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/usb/gadget/printer.c~usb-g_printer-fix-handling-zero-length-packet drivers/usb/gadget/printer.c --- a/drivers/usb/gadget/printer.c~usb-g_printer-fix-handling-zero-length-packet +++ a/drivers/usb/gadget/printer.c @@ -1278,8 +1278,7 @@ unknown: /* respond with data transfer before status phase? */ if (value >= 0) { req->length = value; - req->zero = value < wLength - && (value % gadget->ep0->maxpacket) == 0; + req->zero = value < wLength; value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); if (value < 0) { DBG(dev, "ep_queue --> %d\n", value); _ Patches currently in -mm which might be from sangsu@xxxxxxxxx are usb-g_printer-fix-handling-zero-length-packet.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html