Re: [PATCH 2/3] usb: ehci: only prepare zero packet for out transfer if required

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Aug 2011 tom.leiming@xxxxxxxxx wrote:

> From: Ming Lei <tom.leiming@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> ---
>  drivers/usb/host/ehci-q.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
> index 4431876..b6b6815 100644
> --- a/drivers/usb/host/ehci-q.c
> +++ b/drivers/usb/host/ehci-q.c
> @@ -722,7 +722,8 @@ qh_urb_transaction (
>  
>  	/*
>  	 * control requests may need a terminating data "status" ack;
> -	 * bulk ones may need a terminating short packet (zero length).
> +	 * other OUT ones may need a terminating short packet
> +	 * (zero length).
>  	 */
>  	if (likely (urb->transfer_buffer_length != 0)) {
>  		int	one_more = 0;
> @@ -731,7 +732,7 @@ qh_urb_transaction (
>  			one_more = 1;
>  			token ^= 0x0100;	/* "in" <--> "out"  */
>  			token |= QTD_TOGGLE;	/* force DATA1 */
> -		} else if (usb_pipebulk (urb->pipe)
> +		} else if (usb_pipeout (urb->pipe)

There shouldn't be a space between the function name and the open 
paren.  Otherwise okay.

>  				&& (urb->transfer_flags & URB_ZERO_PACKET)
>  				&& !(urb->transfer_buffer_length % maxpacket)) {
>  			one_more = 1;

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux