From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/8] usb: add usb_submit_int_msg_nonblock
Date: Tue, 2 Jul 2019 13:59:49 +0200 [thread overview]
Message-ID: <8a0869a4-9c7c-9a12-e7b1-2bbf1ec17c4e@denx.de> (raw)
In-Reply-To: <28844f682ed31648b5f0d812aeff18b2458baa6c.1561996556.git.msuchanek@suse.de>
On 7/1/19 5:56 PM, Michal Suchanek wrote:
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> common/usb.c | 9 +++++++++
> include/usb.h | 2 ++
> 2 files changed, 11 insertions(+)
>
> diff --git a/common/usb.c b/common/usb.c
> index 3ae71c98aaf4..d8302d39a91a 100644
> --- a/common/usb.c
> +++ b/common/usb.c
> @@ -200,6 +200,15 @@ int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe,
> return submit_int_msg(dev, pipe, buffer, transfer_len, interval, false);
> }
>
> +/*
> + * submits an Interrupt Message without retry
> + */
> +int usb_submit_int_msg_nonblock(struct usb_device *dev, unsigned long pipe,
> + void *buffer, int transfer_len, int interval)
> +{
> + return submit_int_msg(dev, pipe, buffer, transfer_len, interval, true);
> +}
Is this wrapper really necessary ?
> /*
> * submits a control message and waits for comletion (at least timeout * 1ms)
> * If timeout is 0, we don't wait for completion (used as example to set and
> diff --git a/include/usb.h b/include/usb.h
> index dde3e601da45..d1e7112f4c4e 100644
> --- a/include/usb.h
> +++ b/include/usb.h
> @@ -263,6 +263,8 @@ int usb_bulk_msg(struct usb_device *dev, unsigned int pipe,
> void *data, int len, int *actual_length, int timeout);
> int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe,
> void *buffer, int transfer_len, int interval);
> +int usb_submit_int_msg_nonblock(struct usb_device *dev, unsigned long pipe,
> + void *buffer, int transfer_len, int interval);
> int usb_disable_asynch(int disable);
> int usb_maxpacket(struct usb_device *dev, unsigned long pipe);
> int usb_get_configuration_no(struct usb_device *dev, int cfgno,
>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2019-07-02 11:59 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 15:56 [U-Boot] [PATCH 1/8] usb: r8a66597: return -ENOTSUPP from unimplemented submit_int_msg Michal Suchanek
2019-07-01 15:56 ` [U-Boot] [PATCH 2/8] usb: sl811-hcd: " Michal Suchanek
2019-07-01 15:56 ` [U-Boot] [PATCH 3/8] usb_kdb: only process events succesfully received Michal Suchanek
2019-07-02 11:58 ` Marek Vasut
2019-07-02 13:04 ` Michal Suchánek
2019-07-02 13:11 ` Marek Vasut
2019-07-02 14:22 ` Michal Suchánek
2019-07-02 16:58 ` Marek Vasut
2019-07-02 17:50 ` Michal Suchánek
2019-07-02 18:09 ` Michal Suchánek
2019-07-02 18:38 ` Marek Vasut
2019-07-02 19:31 ` Michal Suchánek
2019-07-02 21:20 ` Marek Vasut
2019-07-03 9:46 ` Michal Suchánek
2019-07-03 11:26 ` Marek Vasut
2019-07-03 11:43 ` Michal Suchánek
2019-07-03 11:48 ` Marek Vasut
2019-07-03 16:41 ` Michal Suchánek
2019-07-04 15:19 ` Marek Vasut
2019-07-01 15:56 ` [U-Boot] [PATCH 4/8] usb: storage: submit_int_msg -> usb_submit_int_msg Michal Suchanek
2019-07-01 15:56 ` [U-Boot] [PATCH 5/8] usb: Add nonblock argument to submit_int_msg Michal Suchanek
2019-07-01 15:56 ` [U-Boot] [PATCH 6/8] usb: add usb_submit_int_msg_nonblock Michal Suchanek
2019-07-02 11:59 ` Marek Vasut [this message]
2019-07-02 14:14 ` Michal Suchánek
2019-07-02 14:16 ` Bin Meng
2019-07-02 14:25 ` Michal Suchánek
2019-07-02 14:29 ` Bin Meng
2019-07-02 14:58 ` Michal Suchánek
2019-07-02 15:11 ` Bin Meng
2019-07-02 15:30 ` Michal Suchánek
2019-07-02 15:39 ` Bin Meng
2019-07-02 15:44 ` Michal Suchánek
2019-07-01 15:56 ` [U-Boot] [PATCH 7/8] usb: kbd: use usb_submit_int_msg_nonblock for polling Michal Suchanek
2019-07-01 15:56 ` [U-Boot] [PATCH 8/8] dwc2: use the nonblock argument in submit_int_msg Michal Suchanek
2019-07-02 11:57 ` [U-Boot] [PATCH 1/8] usb: r8a66597: return -ENOTSUPP from unimplemented submit_int_msg Marek Vasut
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=8a0869a4-9c7c-9a12-e7b1-2bbf1ec17c4e@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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