From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>
Subject: [PATCH 1/2] Documentation: USB: fix example bulk-message timeout
Date: Mon, 25 Oct 2021 13:51:58 +0200 [thread overview]
Message-ID: <20211025115159.4954-2-johan@kernel.org> (raw)
In-Reply-To: <20211025115159.4954-1-johan@kernel.org>
USB bulk-message timeouts are specified in milliseconds and should
specifically not vary with CONFIG_HZ.
Use a fixed five-second timeout in the "Writing USB Device Drivers"
example.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
Documentation/driver-api/usb/writing_usb_driver.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/driver-api/usb/writing_usb_driver.rst b/Documentation/driver-api/usb/writing_usb_driver.rst
index 2176297e5765..4356f023065b 100644
--- a/Documentation/driver-api/usb/writing_usb_driver.rst
+++ b/Documentation/driver-api/usb/writing_usb_driver.rst
@@ -231,7 +231,7 @@ error message. This can be shown with the following code::
skel->bulk_in_endpointAddr),
skel->bulk_in_buffer,
skel->bulk_in_size,
- &count, HZ*10);
+ &count, 5000);
/* if the read was successful, copy the data to user space */
if (!retval) {
if (copy_to_user (buffer, skel->bulk_in_buffer, count))
--
2.32.0
next prev parent reply other threads:[~2021-10-25 11:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 11:51 [PATCH 0/2] USB: fix control-message timeouts Johan Hovold
2021-10-25 11:51 ` Johan Hovold [this message]
2021-10-25 11:51 ` [PATCH 2/2] USB: iowarrior: " Johan Hovold
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=20211025115159.4954-2-johan@kernel.org \
--to=johan@kernel.org \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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.