From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Sascha Hauer <sha@pengutronix.de>
Subject: RE: [PATCH 1/4] wifi: rtw88: Init RX burst length for 8822cu/8822bu/8821cu
Date: Thu, 1 Aug 2024 02:05:34 +0000 [thread overview]
Message-ID: <c9b09d9abf06404a89ebbaebef58c541@realtek.com> (raw)
In-Reply-To: <152dece9-f328-4ad4-95df-5eeae85f6056@gmail.com>
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> On 30/07/2024 06:57, Ping-Ke Shih wrote:
> > Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> >> Init RX burst length according to the USB speed.
> >>
> >> This is needed in order to make USB RX aggregation work.
> >>
> >> Tested with RTL8811CU.
> >
> > Having a throughput after this change would be better.
> >
> >>
> >> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> >> ---
> >> I would mention in the commit message what BIT_DMA_BURST_CNT,
> >> BIT_DMA_MODE, and BIT_DROP_DATA_EN are doing, but I don't know.
> >
> > That will be helpful to other developers. Please put them in second paragraph.
> >
> > [...]
> >
> >> +static void rtw8821cu_init_burst_pkt_len(struct rtw_dev *rtwdev)
> >> +{
> >> + u8 rxdma, burst_size;
> >> +
> >> + rxdma = BIT_DMA_BURST_CNT | BIT_DMA_MODE;
> >> +
> >> + if (rtw_read8(rtwdev, REG_SYS_CFG2 + 3) == 0x20)
> >> + burst_size = BIT_DMA_BURST_SIZE_1024;
> >> + else if ((rtw_read8(rtwdev, REG_USB_USBSTAT) & 0x3) == 0x1)
> >> + burst_size = BIT_DMA_BURST_SIZE_512;
> >> + else
> >> + burst_size = BIT_DMA_BURST_SIZE_64;
> >> +
> >> + u8p_replace_bits(&rxdma, burst_size, BIT_DMA_BURST_SIZE);
> >> +
> >> + rtw_write8(rtwdev, REG_RXDMA_MODE, rxdma);
> >> + rtw_write16_set(rtwdev, REG_TXDMA_OFFSET_CHK, BIT_DROP_DATA_EN);
> >> +}
> >> +
> >
> > All use the same setup.
> > Can we move it to usb.c? Maybe rtw_usb_interface_cfg() is a good place?
> > (still exclude untested chips.)
> >
>
> rtw_usb_interface_cfg() is a good place. I will move it there.
> The other chips will complicate it a bit, but that's okay.
Maybe we can have init_burst_pkt_len_{v1, v2, v3, ...}, but...
>
> I don't understand why we can't just check rtwusb->udev->speed
> instead of reading various registers. Then they could all use
> the same code.
It seems to be better to just use rtwusb->udev->speed.
I ask USB team but no clear answer, but they prefer rtwusb->udev->speed as well.
>
> (By the way, RTL8821AU/RTL8812AU is ready now. I will send
> the patches after this patch set is sorted out. There are about
> 16 smaller patches to prepare things, and then the new driver.)
Nice work!
prev parent reply other threads:[~2024-08-01 2:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-28 19:39 [PATCH 1/4] wifi: rtw88: Init RX burst length for 8822cu/8822bu/8821cu Bitterblue Smith
2024-07-28 19:41 ` [PATCH 2/4] wifi: rtw88: usb: Update the RX stats after every frame Bitterblue Smith
2024-07-30 3:59 ` Ping-Ke Shih
2024-07-28 19:42 ` [PATCH 3/4] wifi: rtw88: usb: Support RX aggregation Bitterblue Smith
2024-07-30 4:33 ` Ping-Ke Shih
2024-07-31 16:58 ` Bitterblue Smith
2024-07-30 6:39 ` Sascha Hauer
2024-07-31 16:58 ` Bitterblue Smith
2024-07-28 19:44 ` [PATCH 4/4] wifi: rtw88: Enable USB RX aggregation for 8822c/8822b/8821c Bitterblue Smith
2024-07-30 5:47 ` Ping-Ke Shih
2024-07-31 17:00 ` Bitterblue Smith
2024-08-01 2:08 ` Ping-Ke Shih
2024-07-30 3:57 ` [PATCH 1/4] wifi: rtw88: Init RX burst length for 8822cu/8822bu/8821cu Ping-Ke Shih
2024-07-31 16:57 ` Bitterblue Smith
2024-08-01 2:05 ` Ping-Ke Shih [this message]
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=c9b09d9abf06404a89ebbaebef58c541@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rtl8821cerfe2@gmail.com \
--cc=sha@pengutronix.de \
/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 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.