Re: [PATCH 3/4] rtl8187: fix control-message timeouts

From: Hin-Tak Leung
Date: Mon Oct 25 2021 - 15:11:55 EST


> USB control-message timeouts are specified in milliseconds and should
> specifically not vary with CONFIG_HZ.

> Fixes: 605bebe23bf6 ("[PATCH] Add rtl8187 wireless driver")
> Cc: stable@xxxxxxxxxxxxxxx # 2.6.23
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>

Acked-by: Hin-Tak Leung <htl10@xxxxxxxxxxxxxxxxxxxxx>

> ---
> .../net/wireless/realtek/rtl818x/rtl8187/rtl8225.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)

> diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c
> index 585784258c66..4efab907a3ac 100644
> --- a/drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c
> +++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c
> @@ -28,7 +28,7 @@ u8 rtl818x_ioread8_idx(struct rtl8187_priv *priv,
> usb_control_msg(priv->udev, usb_rcvctrlpipe(priv->udev, 0),
> RTL8187_REQ_GET_REG, RTL8187_REQT_READ,
> (unsigned long)addr, idx & 0x03,
> - &priv->io_dmabuf->bits8, sizeof(val), HZ / 2);
> + &priv->io_dmabuf->bits8, sizeof(val), 500);

Looks reasonable, although I would have preferred a common defined value taken from a common header, instead of a hard-coded 1/2 second.