Re: [PATCH v2 4/9] usb: renesas: gadget: use generic map/unmap routines

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

 



Hi Felipe

Thank you for your rework

> > So your driver threats the IN direction as "into the device" rather than
> > "into the host" ? That's very confusing as the USB Specification states
> > that direction is always from the point of view of the host. I will
> > change to use usbhs_pipe_is_dir_host() and, if possible, I would like to
> > get your Tested-by on the final set that I will send in few hours.

I tried latest felipe/generic-map-unmap branch (renesas_usbhs new version)
It works

Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

> I have now fixed and pushed to my generic-map-unmap branch for reference
> (it might take a while until kernel.org syncs up), if you can pull that
> and give it a shot, I would be really glad.
> 
> Also, you might to add this very minor optimization:
> 
> diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
> index c2559e8..488dc65 100644
> --- a/drivers/usb/renesas_usbhs/pipe.c
> +++ b/drivers/usb/renesas_usbhs/pipe.c
> @@ -330,8 +330,7 @@ static u16 usbhsp_setup_pipecfg(struct usbhs_pipe *pipe,
>  	if (dir_in)
>  		usbhsp_flags_set(pipe, IS_DIR_HOST);
>  
> -	if ((is_host  && !dir_in) ||
> -	    (!is_host && dir_in))
> +	if (is_host ^ dir_in)
>  		dir |= DIR_OUT;
>  
>  	if (!dir)
> 
> -- 
> balbi

And this is nice !

Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

Best regards
---
Kuninori Morimoto
--
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