aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-q.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2011-09-05 09:05:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-18 04:38:59 -0400
commit9a971dda8208e0982094f29ef34bd190f2a081bd (patch)
treee80657b8493ba68235751781ab9b0c4411428827 /drivers/usb/host/ehci-q.c
parent0412560e18b4330366653819c0c5e73a743ff7e8 (diff)
usb: ehci: only prepare zero packet for out transfer if required
Obviously, ZLP is only required for transfer of OUT direction, so just take same policy with UHCI for ZLP packet. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r--drivers/usb/host/ehci-q.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 726bd9d74ebb..ef5925830bf1 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -722,7 +722,8 @@ qh_urb_transaction (
722 722
723 /* 723 /*
724 * control requests may need a terminating data "status" ack; 724 * control requests may need a terminating data "status" ack;
725 * bulk ones may need a terminating short packet (zero length). 725 * other OUT ones may need a terminating short packet
726 * (zero length).
726 */ 727 */
727 if (likely (urb->transfer_buffer_length != 0)) { 728 if (likely (urb->transfer_buffer_length != 0)) {
728 int one_more = 0; 729 int one_more = 0;
@@ -731,7 +732,7 @@ qh_urb_transaction (
731 one_more = 1; 732 one_more = 1;
732 token ^= 0x0100; /* "in" <--> "out" */ 733 token ^= 0x0100; /* "in" <--> "out" */
733 token |= QTD_TOGGLE; /* force DATA1 */ 734 token |= QTD_TOGGLE; /* force DATA1 */
734 } else if (usb_pipebulk (urb->pipe) 735 } else if (usb_pipeout(urb->pipe)
735 && (urb->transfer_flags & URB_ZERO_PACKET) 736 && (urb->transfer_flags & URB_ZERO_PACKET)
736 && !(urb->transfer_buffer_length % maxpacket)) { 737 && !(urb->transfer_buffer_length % maxpacket)) {
737 one_more = 1; 738 one_more = 1;