From: Johan Hovold <johan@kernel.org>
To: Sean Young <sean@mess.org>, Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Mike Isely <isely@pobox.com>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
linux-media@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>,
stable@vger.kernel.org
Subject: [PATCH 5/8] media: em28xx: fix control-message timeouts
Date: Mon, 25 Oct 2021 14:16:38 +0200 [thread overview]
Message-ID: <20211025121641.6759-6-johan@kernel.org> (raw)
In-Reply-To: <20211025121641.6759-1-johan@kernel.org>
USB control-message timeouts are specified in milliseconds and should
specifically not vary with CONFIG_HZ.
Fixes: a6c2ba283565 ("[PATCH] v4l: 716: support for em28xx board family")
Cc: stable@vger.kernel.org # 2.6.16
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/media/usb/em28xx/em28xx-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
index 584fa400cd7d..f366bb47ec6d 100644
--- a/drivers/media/usb/em28xx/em28xx-core.c
+++ b/drivers/media/usb/em28xx/em28xx-core.c
@@ -89,7 +89,7 @@ int em28xx_read_reg_req_len(struct em28xx *dev, u8 req, u16 reg,
mutex_lock(&dev->ctrl_urb_lock);
ret = usb_control_msg(udev, pipe, req,
USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 0x0000, reg, dev->urb_buf, len, HZ);
+ 0x0000, reg, dev->urb_buf, len, 1000);
if (ret < 0) {
em28xx_regdbg("(pipe 0x%08x): IN: %02x %02x %02x %02x %02x %02x %02x %02x failed with error %i\n",
pipe,
@@ -158,7 +158,7 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
memcpy(dev->urb_buf, buf, len);
ret = usb_control_msg(udev, pipe, req,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 0x0000, reg, dev->urb_buf, len, HZ);
+ 0x0000, reg, dev->urb_buf, len, 1000);
mutex_unlock(&dev->ctrl_urb_lock);
if (ret < 0) {
--
2.32.0
next prev parent reply other threads:[~2021-10-25 12:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 12:16 [PATCH 0/8] media: fix control-message timeouts Johan Hovold
2021-10-25 12:16 ` [PATCH 1/8] media: mceusb: " Johan Hovold
2021-10-25 12:16 ` [PATCH 2/8] media: redrat3: " Johan Hovold
2021-10-25 12:16 ` [PATCH 3/8] media: flexcop-usb: " Johan Hovold
2021-10-25 12:16 ` [PATCH 4/8] media: cpia2: " Johan Hovold
2021-10-25 12:16 ` Johan Hovold [this message]
2021-10-25 12:16 ` [PATCH 6/8] media: pvrusb2: " Johan Hovold
2021-10-25 12:16 ` [PATCH 7/8] media: s2255: " Johan Hovold
2021-10-25 12:16 ` [PATCH 8/8] media: stk1160: " 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=20211025121641.6759-6-johan@kernel.org \
--to=johan@kernel.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=isely@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sean@mess.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).