From: Sascha Hauer <s.hauer@pengutronix.de>
To: Peter Mamonov <pmamonov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC v2 2/3] WIP: usb: ehci-hcd: use non-interruptible version of mdelay()
Date: Mon, 14 Sep 2015 08:27:27 +0200 [thread overview]
Message-ID: <20150914062727.GV18700@pengutronix.de> (raw)
In-Reply-To: <1441992476-11703-3-git-send-email-pmamonov@gmail.com>
On Fri, Sep 11, 2015 at 08:27:55PM +0300, Peter Mamonov wrote:
> Signed-off-by: Peter Mamonov <pmamonov@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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-09-14 6:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 17:27 [RFC v2 0/3] WIP: add usb keyboard driver Peter Mamonov
2015-09-11 17:27 ` [RFC v2 1/3] usb: ehci-hcd: port periodic transactions implementation from the u-boot Peter Mamonov
2015-09-14 6:21 ` Sascha Hauer
2015-09-11 17:27 ` [RFC v2 2/3] WIP: usb: ehci-hcd: use non-interruptible version of mdelay() Peter Mamonov
2015-09-14 6:27 ` Sascha Hauer [this message]
2015-09-11 17:27 ` [RFC v2 3/3] input: port usb keyboard driver from the u-boot Peter Mamonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150914062727.GV18700@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=pmamonov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox