From patchwork Mon Oct 25 12:05:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12581613 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB958C433EF for ; Mon, 25 Oct 2021 12:06:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B304A61040 for ; Mon, 25 Oct 2021 12:06:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232421AbhJYMIM (ORCPT ); Mon, 25 Oct 2021 08:08:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:48762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231512AbhJYMIL (ORCPT ); Mon, 25 Oct 2021 08:08:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4D49560F46; Mon, 25 Oct 2021 12:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635163549; bh=XbL8XaQ+j8qWJFr6k5TpoWRzAyQkgL31WLDyiJCm/xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rFYvITElZXPr2Gj3rMTxDsABNP4KwYOghn8z318gs124G+vc+pO7kVpAGRpKKN0oM yj3RMK9U8vEFtzrpwkbWrURFnUyTi5RJ9rRZGHzfukuRAvWbeLw3opE7o/D2qqJP5N 4eCQ4AaX2Mw7dHnzy/MWuvKnwz3shqs0Bi38VFRjG0wxRXx72zCPQacU9bnZXnMDYJ XVMfNy+tMTp8JN4Iyre5moqu3+ADXXN/zQ/po9XDc3RHqX0Bea9HOXAdyc42h5AQuu xzy6ZM22sRwhJbP9pzFzD5SOmbs1Pxe0+QynG3XTe3D12bOmj07YUmMkohDe3vb+Mb 3jvqGqjmFE/Iw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1meyjL-0001aR-Q3; Mon, 25 Oct 2021 14:05:31 +0200 From: Johan Hovold To: Kalle Valo Cc: Herton Ronaldo Krzesinski , Hin-Tak Leung , Larry Finger , Amitkumar Karwar , Siva Rebbagondla , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org, Erik Stromdahl Subject: [PATCH 1/4] ath10k: fix control-message timeout Date: Mon, 25 Oct 2021 14:05:19 +0200 Message-Id: <20211025120522.6045-2-johan@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211025120522.6045-1-johan@kernel.org> References: <20211025120522.6045-1-johan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes: 4db66499df91 ("ath10k: add initial USB support") Cc: stable@vger.kernel.org # 4.14 Cc: Erik Stromdahl Signed-off-by: Johan Hovold --- drivers/net/wireless/ath/ath10k/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c index 19b9c27e30e2..6d831b098cbb 100644 --- a/drivers/net/wireless/ath/ath10k/usb.c +++ b/drivers/net/wireless/ath/ath10k/usb.c @@ -525,7 +525,7 @@ static int ath10k_usb_submit_ctrl_in(struct ath10k *ar, req, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, index, buf, - size, 2 * HZ); + size, 2000); if (ret < 0) { ath10k_warn(ar, "Failed to read usb control message: %d\n", From patchwork Mon Oct 25 12:05:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12581611 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 444D0C433EF for ; Mon, 25 Oct 2021 12:06:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F2D961057 for ; Mon, 25 Oct 2021 12:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232929AbhJYMIV (ORCPT ); Mon, 25 Oct 2021 08:08:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:48770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232007AbhJYMIL (ORCPT ); Mon, 25 Oct 2021 08:08:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4FD4360FBF; Mon, 25 Oct 2021 12:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635163549; bh=xMgdwVXq0vxWAes60ObugLczjbLvXB6DiTFQdTU8JmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A73Y1ZC7P/77NgTxYISIXh4lHXLBq/YPKLqcl0BJPKYPdpu01/NRDyx2Ds6kPmAVk 9wG5AkiQVLt7OSH1MSb3PY+sDbu6aFLk1l5uQLc/6RIAMFuveMRdtzdCiWDgzQ5rpp Pt763W+GZPQ5qxm/oBT/ik056y0WJz5jhq7vG+3nS+of5GWL1R61VnQA61bDif6Eqs ic4pz3KEvuAJdvJFSV3XvQk1caWFqKdqf2Dm4zABfgyUL6rNXw1tR43v/Lu4ntCCJ9 42YvNuUwm15e062RPcn5LIrcm1awsXxN5laK1/PGrETA/M2QWGnZCn8BDYS2c9IX95 IdnTiMvNNiCNw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1meyjL-0001aT-Sz; Mon, 25 Oct 2021 14:05:31 +0200 From: Johan Hovold To: Kalle Valo Cc: Herton Ronaldo Krzesinski , Hin-Tak Leung , Larry Finger , Amitkumar Karwar , Siva Rebbagondla , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 2/4] ath6kl: fix control-message timeout Date: Mon, 25 Oct 2021 14:05:20 +0200 Message-Id: <20211025120522.6045-3-johan@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211025120522.6045-1-johan@kernel.org> References: <20211025120522.6045-1-johan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes: 241b128b6b69 ("ath6kl: add back beginnings of USB support") Cc: stable@vger.kernel.org # 3.4 Signed-off-by: Johan Hovold --- drivers/net/wireless/ath/ath6kl/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 5372e948e761..bd367b79a4d3 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c @@ -907,7 +907,7 @@ static int ath6kl_usb_submit_ctrl_in(struct ath6kl_usb *ar_usb, req, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, index, buf, - size, 2 * HZ); + size, 2000); if (ret < 0) { ath6kl_warn("Failed to read usb control message: %d\n", ret); From patchwork Mon Oct 25 12:05:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12581609 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4DFAC4332F for ; Mon, 25 Oct 2021 12:06:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8CF1961002 for ; Mon, 25 Oct 2021 12:06:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232699AbhJYMIP (ORCPT ); Mon, 25 Oct 2021 08:08:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:48754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231501AbhJYMIL (ORCPT ); Mon, 25 Oct 2021 08:08:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 49FCA60F9D; Mon, 25 Oct 2021 12:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635163549; bh=mi2YBgOVXZK98qc5s25s+ODSzvYGuyAGSaDUbDTLRq4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IVMfPD9LjVVUFVxAnyH6u4a3mIDrvFPSHcQSpl2gKvzLO8VRTJDa8RwOiouGQt5zJ MlqJJE6u3n0HRwxsl8rX/BoLl+KT/qLk5lUqNi8i4yIhBMopZHDruHeTAULOxX1lxI wNemlNYxFM5I0jKcjazScwGgCBmNVUEt+bBOGXF3lootoLGWoyf8kKqMTBSzcI9lU1 2zHwiemSjSNVwI8097L4bezkGXxm2x3bQ1fSarJKlpEIULGJpbEerqETb4+PNjdjzv eqksDktL5zlWqr6agwgKKbqPtcFw2EFuP06cayrRXSo2R2Ic9Eq/WXuFyftJmQJ0NC gNqWllaYUGt4g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1meyjL-0001aV-Vq; Mon, 25 Oct 2021 14:05:32 +0200 From: Johan Hovold To: Kalle Valo Cc: Herton Ronaldo Krzesinski , Hin-Tak Leung , Larry Finger , Amitkumar Karwar , Siva Rebbagondla , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 3/4] rtl8187: fix control-message timeouts Date: Mon, 25 Oct 2021 14:05:21 +0200 Message-Id: <20211025120522.6045-4-johan@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211025120522.6045-1-johan@kernel.org> References: <20211025120522.6045-1-johan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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@vger.kernel.org # 2.6.23 Signed-off-by: Johan Hovold --- .../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); val = priv->io_dmabuf->bits8; mutex_unlock(&priv->io_mutex); @@ -45,7 +45,7 @@ u16 rtl818x_ioread16_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->bits16, sizeof(val), HZ / 2); + &priv->io_dmabuf->bits16, sizeof(val), 500); val = priv->io_dmabuf->bits16; mutex_unlock(&priv->io_mutex); @@ -62,7 +62,7 @@ u32 rtl818x_ioread32_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->bits32, sizeof(val), HZ / 2); + &priv->io_dmabuf->bits32, sizeof(val), 500); val = priv->io_dmabuf->bits32; mutex_unlock(&priv->io_mutex); @@ -79,7 +79,7 @@ void rtl818x_iowrite8_idx(struct rtl8187_priv *priv, usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0), RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE, (unsigned long)addr, idx & 0x03, - &priv->io_dmabuf->bits8, sizeof(val), HZ / 2); + &priv->io_dmabuf->bits8, sizeof(val), 500); mutex_unlock(&priv->io_mutex); } @@ -93,7 +93,7 @@ void rtl818x_iowrite16_idx(struct rtl8187_priv *priv, usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0), RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE, (unsigned long)addr, idx & 0x03, - &priv->io_dmabuf->bits16, sizeof(val), HZ / 2); + &priv->io_dmabuf->bits16, sizeof(val), 500); mutex_unlock(&priv->io_mutex); } @@ -107,7 +107,7 @@ void rtl818x_iowrite32_idx(struct rtl8187_priv *priv, usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0), RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE, (unsigned long)addr, idx & 0x03, - &priv->io_dmabuf->bits32, sizeof(val), HZ / 2); + &priv->io_dmabuf->bits32, sizeof(val), 500); mutex_unlock(&priv->io_mutex); } @@ -183,7 +183,7 @@ static void rtl8225_write_8051(struct ieee80211_hw *dev, u8 addr, __le16 data) usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0), RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE, addr, 0x8225, &priv->io_dmabuf->bits16, sizeof(data), - HZ / 2); + 500); mutex_unlock(&priv->io_mutex); From patchwork Mon Oct 25 12:05:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12581605 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5238C433F5 for ; Mon, 25 Oct 2021 12:05:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D053B61002 for ; Mon, 25 Oct 2021 12:05:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232628AbhJYMIM (ORCPT ); Mon, 25 Oct 2021 08:08:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:48744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230387AbhJYMIL (ORCPT ); Mon, 25 Oct 2021 08:08:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 473DB60EFE; Mon, 25 Oct 2021 12:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635163549; bh=7mZg2xUAW2p2PFxv1Ub+PcVCpHZ+A2nm8WFFfpdnc9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c05ctGXgIKVs9EOn2onvLzuWeivX0W1V0xN07UrfXT+dKDbfJhFUlsTTNq6tKIUrx dV08DORJYBDnzinfF4GfqNq1v9qQmPiqMqJ7PYb2MjIepQtRi68FipOmZ4neRokWt/ aoeJk4MGV3tyVYRLDLlq+vR19TTWY1+2Qa7hIFqL0Amgb5iUf2dRu/oc+XsQGCrHfz 3NbdlAXCwCgIwbbWeTlUrBqxUM0zDStilK7xQGBGPrXkAMK8NWc+i2mEulgkwnAs7e lOnFY4H9O0EZ2Dzc4yqfH+m6vwx24NEsXyR43+sT8M4beImuNhsNY25MluvuxVMpnn tTB5HL91encPA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1meyjM-0001aX-2R; Mon, 25 Oct 2021 14:05:32 +0200 From: Johan Hovold To: Kalle Valo Cc: Herton Ronaldo Krzesinski , Hin-Tak Leung , Larry Finger , Amitkumar Karwar , Siva Rebbagondla , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 4/4] rsi: fix control-message timeout Date: Mon, 25 Oct 2021 14:05:22 +0200 Message-Id: <20211025120522.6045-5-johan@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211025120522.6045-1-johan@kernel.org> References: <20211025120522.6045-1-johan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Use the common control-message timeout define for the five-second timeout. Fixes: dad0d04fa7ba ("rsi: Add RS9113 wireless driver") Cc: stable@vger.kernel.org # 3.15 Signed-off-by: Johan Hovold --- drivers/net/wireless/rsi/rsi_91x_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c index 416976f09888..e97f92915ed9 100644 --- a/drivers/net/wireless/rsi/rsi_91x_usb.c +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c @@ -61,7 +61,7 @@ static int rsi_usb_card_write(struct rsi_hw *adapter, (void *)seg, (int)len, &transfer, - HZ * 5); + USB_CTRL_SET_TIMEOUT); if (status < 0) { rsi_dbg(ERR_ZONE,