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

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

 



On Fri, Sep 11, 2015 at 08:27:55PM +0300, Peter Mamonov wrote:
> Signed-off-by: Peter Mamonov <pmamonov@xxxxxxxxx>
> ---
>  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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux