Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Devin Wittmayer <lucid_duck@justthetip.ca>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: "rtl8821cerfe2@gmail.com" <rtl8821cerfe2@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH rtw-next v2 1/1] wifi: rtw89: usb: Support switching to USB 3 mode
Date: Tue, 12 May 2026 01:35:30 +0000	[thread overview]
Message-ID: <e3ae58133549411e9eeb88c7c6ffbfaa@realtek.com> (raw)
In-Reply-To: <20260511160811.17647-2-lucid_duck@justthetip.ca>

Devin Wittmayer <lucid_duck@justthetip.ca> wrote:
> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>

[...]

> @@ -1027,6 +1032,35 @@ static void rtw89_usb_intf_deinit(struct rtw89_dev *rtwdev,
>         usb_set_intfdata(intf, NULL);
>  }
> 
> +static int rtw89_usb_switch_mode(struct rtw89_dev *rtwdev)
> +{
> +       struct rtw89_usb *rtwusb = rtw89_usb_priv(rtwdev);
> +
> +       if (!rtw89_switch_usb_mode)
> +               return 0;
> +
> +       /* No known USB 3 devices with this chip. */
> +       if (rtwdev->chip->chip_id == RTL8851B)
> +               return 0;

As commit message, only RTL8832BU and RTL8832CU were tested, and WiFi 7
was not neither. I'd give positive list instead.

> +
> +       if (rtwusb->udev->speed == USB_SPEED_SUPER)
> +               return 0;
> +
> +       rtw89_debug(rtwdev, RTW89_DBG_HCI, "%s: pad_ctrl2: %#x %#x\n",
> +                   __func__,
> +                   rtw89_read8(rtwdev, R_AX_PAD_CTRL2 + 1),
> +                   rtw89_read8(rtwdev, R_AX_PAD_CTRL2 + 2));
> +
> +       /* Already tried to switch but it's a USB 2 port. */
> +       if (rtw89_read8(rtwdev, R_AX_PAD_CTRL2 + 1) == USB_SWITCH_DELAY)
> +               return 0;
> +
> +       rtw89_write8(rtwdev, R_AX_PAD_CTRL2 + 1, USB_SWITCH_DELAY);
> +       rtw89_write8(rtwdev, R_AX_PAD_CTRL2 + 2, U2SWITCHU3);
> +
> +       return 1;
> +}
> +
>  int rtw89_usb_probe(struct usb_interface *intf,
>                     const struct usb_device_id *id)
>  {



  parent reply	other threads:[~2026-05-12  1:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  5:44 [PATCH 0/1] wifi: rtw89: usb: Support switching to USB 3 mode Lucid Duck
2026-05-08  5:44 ` [PATCH 1/1] " Lucid Duck
2026-05-08  6:59   ` Zenm Chen
2026-05-11 10:55 ` [PATCH 0/1] " Bitterblue Smith
2026-05-11 16:08 ` [PATCH rtw-next v2 " Devin Wittmayer
2026-05-11 16:08   ` [PATCH rtw-next v2 1/1] " Devin Wittmayer
2026-05-11 17:26     ` Johannes Berg
2026-05-11 18:03       ` Devin Wittmayer
2026-05-12  1:25         ` Ping-Ke Shih
2026-05-11 18:14     ` Bitterblue Smith
2026-05-11 20:03       ` Devin Wittmayer
2026-05-11 22:27         ` Bitterblue Smith
2026-05-12  0:35           ` Devin Wittmayer
2026-05-12  8:48             ` Bitterblue Smith
2026-05-12  1:35     ` Ping-Ke Shih [this message]
2026-05-12  2:54       ` Devin Wittmayer

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=e3ae58133549411e9eeb88c7c6ffbfaa@realtek.com \
    --to=pkshih@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lucid_duck@justthetip.ca \
    --cc=rtl8821cerfe2@gmail.com \
    /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