All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>,
	Andrey Smirnov <andrew.smirnov@gmail.com>,
	linux-usb@vger.kernel.org
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: xhci: Convert xhci_handshake() to use readl_poll_timeout()
Date: Thu, 07 Feb 2019 10:45:34 +0200	[thread overview]
Message-ID: <87sgx0kmvl.fsf@linux.intel.com> (raw)

Hi,

Mathias Nyman <mathias.nyman@linux.intel.com> writes:
> On 07.02.2019 02:03, Andrey Smirnov wrote:
>> Xhci_handshake() implements the algorithm already captured by
>> readl_poll_timeout(). Convert the former to use the latter to avoid
>> repetition.
>
> readl_poll_timeout() doesn't really work here as it might sleep.
>
> iopoll.h:
>
> /**
>   * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
>   *
> ...                                                                                                              
>   * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
>   * case, the last read value at @addr is stored in @val. Must not
>   * be called from atomic context if sleep_us or timeout_us are used.

readl_poll_timeout_atomic()?

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>,
	Andrey Smirnov <andrew.smirnov@gmail.com>,
	linux-usb@vger.kernel.org
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xhci: Convert xhci_handshake() to use readl_poll_timeout()
Date: Thu, 07 Feb 2019 10:45:34 +0200	[thread overview]
Message-ID: <87sgx0kmvl.fsf@linux.intel.com> (raw)
In-Reply-To: <63866354-48b8-5787-39de-5c23e7471f6f@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]


Hi,

Mathias Nyman <mathias.nyman@linux.intel.com> writes:
> On 07.02.2019 02:03, Andrey Smirnov wrote:
>> Xhci_handshake() implements the algorithm already captured by
>> readl_poll_timeout(). Convert the former to use the latter to avoid
>> repetition.
>
> readl_poll_timeout() doesn't really work here as it might sleep.
>
> iopoll.h:
>
> /**
>   * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
>   *
> ...                                                                                                              
>   * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
>   * case, the last read value at @addr is stored in @val. Must not
>   * be called from atomic context if sleep_us or timeout_us are used.

readl_poll_timeout_atomic()?

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

             reply	other threads:[~2019-02-07  8:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  8:45 Felipe Balbi [this message]
2019-02-07  8:45 ` [PATCH] xhci: Convert xhci_handshake() to use readl_poll_timeout() Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2019-02-07 21:03 Andrey Smirnov
2019-02-07 21:03 ` [PATCH] " Andrey Smirnov
2019-02-07  8:32 Mathias Nyman
2019-02-07  8:32 ` [PATCH] " Mathias Nyman
2019-02-07  0:03 Andrey Smirnov
2019-02-07  0:03 ` [PATCH] " Andrey Smirnov

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=87sgx0kmvl.fsf@linux.intel.com \
    --to=felipe.balbi@linux.intel.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mathias.nyman@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.