[RFC v2 2/3] WIP: usb: ehci-hcd: use non-interruptible version of mdelay()

Sascha Hauer s.hauer at pengutronix.de
Sun Sep 13 23:27:27 PDT 2015


On Fri, Sep 11, 2015 at 08:27:55PM +0300, Peter Mamonov wrote:
> Signed-off-by: Peter Mamonov <pmamonov at gmail.com>
> ---
>  drivers/usb/host/ehci-hcd.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index c9bf703..3d89ec5 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -133,6 +133,14 @@ static struct descriptor {
>  	},
>  };
>  
> +static inline void mdelay_ni(unsigned long msecs)
> +{
> +	uint64_t start = get_time_ns();
> +
> +	while (!is_timeout_non_interruptible(start, msecs * MSECOND))
> +		;
> +}

Instead of introducing a new function I think the existing [mun]delay
functions should be made noninterruptible.

Sascha


-- 
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 |



More information about the barebox mailing list