Re: [PATCH 10/14] usb: chipidea: udc: fix buffer count of each TD

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

 



On Wed, Mar 20, 2013 at 11:26:49PM +0100, Michael Grzeschik wrote:
> Each TD can maintain five buffer pointers. Each of them is 4k aligned.
> There is no need to limit this to less then possible. This patch lowers
> the overhead of extra TDs.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/udc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index 70296c7..007a97a 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -693,8 +693,8 @@ static int _ep_queue(struct usb_ep *ep, struct usb_request *req,
>  		goto done;
>  	}
>  
> -	if (req->length > 4 * CI13XXX_PAGE_SIZE) {
> -		req->length = 4 * CI13XXX_PAGE_SIZE;
> +	if (req->length > 5 * CI13XXX_PAGE_SIZE) {
> +		req->length = 5 * CI13XXX_PAGE_SIZE;
>  		retval = -EMSGSIZE;
>  		dev_warn(mEp->ci->dev, "request length truncated\n");
>  	}
> -- 
> 1.8.2.rc2

>From the discussion with Peter, this patch is wrong. We have to
keep that limit to 4 in the special case when (req->dma % PAGE_COUNT).

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
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