* [PATCH 1/2] rtw88: fix uninitialized 'tim_offset' warning
@ 2022-04-20 9:30 Ping-Ke Shih
2022-04-20 9:30 ` [PATCH 2/2] rtw88: pci: 8821c: Disable 21ce completion timeout Ping-Ke Shih
2022-04-23 12:47 ` [PATCH 1/2] rtw88: fix uninitialized 'tim_offset' warning Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Ping-Ke Shih @ 2022-04-20 9:30 UTC (permalink / raw)
To: tony0620emma, kvalo; +Cc: linux-wireless, phhuang
From: Po-Hao Huang <phhuang@realtek.com>
This avoids below warning and makes compiler happy.
error: uninitialized symbol 'tim_offset'
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw88/fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c
index c1af2704bb866..3545d51c6951a 100644
--- a/drivers/net/wireless/realtek/rtw88/fw.c
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
@@ -1047,7 +1047,7 @@ static struct sk_buff *rtw_get_rsvd_page_skb(struct ieee80211_hw *hw,
struct rtw_vif *rtwvif;
struct sk_buff *skb_new;
struct cfg80211_ssid *ssid;
- u16 tim_offset;
+ u16 tim_offset = 0;
if (rsvd_pkt->type == RSVD_DUMMY) {
skb_new = alloc_skb(1, GFP_KERNEL);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] rtw88: pci: 8821c: Disable 21ce completion timeout
2022-04-20 9:30 [PATCH 1/2] rtw88: fix uninitialized 'tim_offset' warning Ping-Ke Shih
@ 2022-04-20 9:30 ` Ping-Ke Shih
2022-04-21 3:45 ` Chris Chiu
2022-04-23 12:47 ` [PATCH 1/2] rtw88: fix uninitialized 'tim_offset' warning Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Ping-Ke Shih @ 2022-04-20 9:30 UTC (permalink / raw)
To: tony0620emma, kvalo; +Cc: linux-wireless, phhuang
From: Po-Hao Huang <phhuang@realtek.com>
Disable this capability to avoid timeout errors on certain platforms.
Without it, pci bus might stuck and leads to disconnection.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw88/pci.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
index 33042b63a151e..3ef0de70af328 100644
--- a/drivers/net/wireless/realtek/rtw88/pci.c
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
@@ -1482,12 +1482,15 @@ static void rtw_pci_interface_cfg(struct rtw_dev *rtwdev)
static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev)
{
+ struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;
struct rtw_chip_info *chip = rtwdev->chip;
+ struct pci_dev *pdev = rtwpci->pdev;
const struct rtw_intf_phy_para *para;
u16 cut;
u16 value;
u16 offset;
int i;
+ int ret;
cut = BIT(0) << rtwdev->hal.cut_version;
@@ -1520,6 +1523,15 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev)
}
rtw_pci_link_cfg(rtwdev);
+
+ /* Disable 8821ce completion timeout by default */
+ if (chip->id == RTW_CHIP_TYPE_8821C) {
+ ret = pcie_capability_set_word(pdev, PCI_EXP_DEVCTL2,
+ PCI_EXP_DEVCTL2_COMP_TMOUT_DIS);
+ if (ret)
+ rtw_err(rtwdev, "failed to set PCI cap, ret = %d\n",
+ ret);
+ }
}
static int __maybe_unused rtw_pci_suspend(struct device *dev)
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] rtw88: pci: 8821c: Disable 21ce completion timeout
2022-04-20 9:30 ` [PATCH 2/2] rtw88: pci: 8821c: Disable 21ce completion timeout Ping-Ke Shih
@ 2022-04-21 3:45 ` Chris Chiu
0 siblings, 0 replies; 4+ messages in thread
From: Chris Chiu @ 2022-04-21 3:45 UTC (permalink / raw)
To: Ping-Ke Shih, tony0620emma, kvalo; +Cc: linux-wireless, phhuang
On 2022/4/20 17:30, Ping-Ke Shih wrote:
> From: Po-Hao Huang <phhuang@realtek.com>
>
> Disable this capability to avoid timeout errors on certain platforms.
> Without it, pci bus might stuck and leads to disconnection.
>
> Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
Tested-by: Chris Chiu <chris.chiu@canonical.com>
> drivers/net/wireless/realtek/rtw88/pci.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
> index 33042b63a151e..3ef0de70af328 100644
> --- a/drivers/net/wireless/realtek/rtw88/pci.c
> +++ b/drivers/net/wireless/realtek/rtw88/pci.c
> @@ -1482,12 +1482,15 @@ static void rtw_pci_interface_cfg(struct rtw_dev *rtwdev)
>
> static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev)
> {
> + struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;
> struct rtw_chip_info *chip = rtwdev->chip;
> + struct pci_dev *pdev = rtwpci->pdev;
> const struct rtw_intf_phy_para *para;
> u16 cut;
> u16 value;
> u16 offset;
> int i;
> + int ret;
>
> cut = BIT(0) << rtwdev->hal.cut_version;
>
> @@ -1520,6 +1523,15 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev)
> }
>
> rtw_pci_link_cfg(rtwdev);
> +
> + /* Disable 8821ce completion timeout by default */
> + if (chip->id == RTW_CHIP_TYPE_8821C) {
> + ret = pcie_capability_set_word(pdev, PCI_EXP_DEVCTL2,
> + PCI_EXP_DEVCTL2_COMP_TMOUT_DIS);
> + if (ret)
> + rtw_err(rtwdev, "failed to set PCI cap, ret = %d\n",
> + ret);
> + }
> }
>
> static int __maybe_unused rtw_pci_suspend(struct device *dev)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] rtw88: fix uninitialized 'tim_offset' warning
2022-04-20 9:30 [PATCH 1/2] rtw88: fix uninitialized 'tim_offset' warning Ping-Ke Shih
2022-04-20 9:30 ` [PATCH 2/2] rtw88: pci: 8821c: Disable 21ce completion timeout Ping-Ke Shih
@ 2022-04-23 12:47 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2022-04-23 12:47 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: tony0620emma, linux-wireless, phhuang
Ping-Ke Shih <pkshih@realtek.com> wrote:
> From: Po-Hao Huang <phhuang@realtek.com>
>
> This avoids below warning and makes compiler happy.
> error: uninitialized symbol 'tim_offset'
>
> Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
2 patches applied to wireless-next.git, thanks.
9cbdadf0097f rtw88: fix uninitialized 'tim_offset' warning
9ebacb1e7e75 rtw88: pci: 8821c: Disable 21ce completion timeout
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220420093058.31646-1-pkshih@realtek.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-23 12:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 9:30 [PATCH 1/2] rtw88: fix uninitialized 'tim_offset' warning Ping-Ke Shih
2022-04-20 9:30 ` [PATCH 2/2] rtw88: pci: 8821c: Disable 21ce completion timeout Ping-Ke Shih
2022-04-21 3:45 ` Chris Chiu
2022-04-23 12:47 ` [PATCH 1/2] rtw88: fix uninitialized 'tim_offset' warning Kalle Valo
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.