2023-11-25 21:36:16

by Ali Ghandour

[permalink] [raw]
Subject: Lenovo LOQ rtw_8852be

Hi,

Following below thread, rtw_8852be driver fails for Lenovo LOQ:
https://github.com/lwfinger/rtw89/issues/235

rtw89_8852be 0000:09:00.0: loaded firmware rtw89/rtw8852b_fw-1.bin
rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5 (da87cccd), cmd
version 0, type 5
rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5 (da87cccd), cmd
version 0, type 3
rtw89_8852be 0000:09:00.0: MAC has already powered on
rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
rtw89_8852be 0000:09:00.0: [ERR] pcie autok fail -22
rtw89_8852be 0000:09:00.0: failed to setup chip information
tw89_8852be: probe of 0000:09:00.0 failed with error -22

I am running Ubuntu 22.04.3 and kernel 6.2.0-37-generic.

Please advise.
Ali


2023-11-27 01:43:41

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Lenovo LOQ rtw_8852be



> -----Original Message-----
> From: Ali Ghandour <[email protected]>
> Sent: Sunday, November 26, 2023 5:36 AM
> To: [email protected]
> Subject: Lenovo LOQ rtw_8852be
>
> Hi,
>
> Following below thread, rtw_8852be driver fails for Lenovo LOQ:
> https://github.com/lwfinger/rtw89/issues/235
>
> rtw89_8852be 0000:09:00.0: loaded firmware rtw89/rtw8852b_fw-1.bin
> rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5 (da87cccd), cmd
> version 0, type 5
> rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5 (da87cccd), cmd
> version 0, type 3
> rtw89_8852be 0000:09:00.0: MAC has already powered on
> rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
> rtw89_8852be 0000:09:00.0: [ERR] pcie autok fail -22
> rtw89_8852be 0000:09:00.0: failed to setup chip information
> tw89_8852be: probe of 0000:09:00.0 failed with error -22
>
> I am running Ubuntu 22.04.3 and kernel 6.2.0-37-generic.
>

Not very sure why your host can't read PCI configuration space 0x719.
Please provide your PCI host controller by 'lspci -tv'.

And, I wonder if user space tool 'lspci' can dump whole PCI configuration
space on your platform, so please provide full dump by
'sudo lspci -s xx:yy.zz -xxxx'

(you can get the device number followed '-s' by 'lspci', and copy the number, like)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852


After kernel 5.18, we change to use standard pci API to read/write configuration
space, so if possible please downgrade to 5.17 to see if that version works to you.

Ping-Ke

2023-11-27 06:01:41

by Ali Ghandour

[permalink] [raw]
Subject: Re: Lenovo LOQ rtw_8852be

$ lspci -tv
-[0000:00]-+-00.0 Intel Corporation Device a715
+-01.0-[01-05]--+-00.0 NVIDIA Corporation Device 28e0
| \-00.1 NVIDIA Corporation Device 22be
+-02.0 Intel Corporation Device a7a8
+-04.0 Intel Corporation Device a71d
+-06.0-[06]----00.0 Micron Technology Inc Device 5411
+-06.2-[07]----00.0 MAXIO Technology (Hangzhou) Ltd. NVMe
SSD Controller MAP1202
+-0a.0 Intel Corporation Device a77d
+-14.0 Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller
+-14.2 Intel Corporation Alder Lake PCH Shared SRAM
+-15.0 Intel Corporation Alder Lake PCH Serial IO I2C Controller #0
+-16.0 Intel Corporation Alder Lake PCH HECI Controller
+-19.0 Intel Corporation Alder Lake-P Serial IO I2C Controller #0
+-1c.0-[08]----00.0 Realtek Semiconductor Co., Ltd.
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
+-1c.5-[09]----00.0 Realtek Semiconductor Co., Ltd. Device b852
+-1f.0 Intel Corporation Device 519d
+-1f.3 Intel Corporation Device 51ca
+-1f.4 Intel Corporation Alder Lake PCH-P SMBus Host Controller
\-1f.5 Intel Corporation Alder Lake-P PCH SPI Controller


$ sudo lspci -s 09:00.0 -xxxx
09:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852
00: ec 10 52 b8 03 00 10 00 00 00 80 02 10 00 00 00
10: 01 30 00 00 00 00 00 00 04 00 10 52 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 53 48
30: 00 00 00 00 40 00 00 00 00 00 00 00 ff 01 00 00
40: 01 50 c3 c9 08 00 00 00 00 00 00 00 00 00 00 00
50: 05 70 80 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 10 00 02 00 81 8d 90 15 30 20 10 00 11 6c 47 00
80: 43 01 11 10 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 10 08 0c 00 00 04 00 00 02 00 00 00
a0: 02 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00



=============================================

Dr. Ali J. Ghandour
Associate Researcher, GEOspatial Artificial Intelligence (GEOAI) group
National Remote Sensing Center – CNRS
Beirut, Lebanon



Phone: +961 (4)409845
Email: [email protected] - LinkedIn - GoogleScholar


On Mon, Nov 27, 2023 at 3:43 AM Ping-Ke Shih <[email protected]> wrote:
>
>
>
> > -----Original Message-----
> > From: Ali Ghandour <[email protected]>
> > Sent: Sunday, November 26, 2023 5:36 AM
> > To: [email protected]
> > Subject: Lenovo LOQ rtw_8852be
> >
> > Hi,
> >
> > Following below thread, rtw_8852be driver fails for Lenovo LOQ:
> > https://github.com/lwfinger/rtw89/issues/235
> >
> > rtw89_8852be 0000:09:00.0: loaded firmware rtw89/rtw8852b_fw-1.bin
> > rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5 (da87cccd), cmd
> > version 0, type 5
> > rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5 (da87cccd), cmd
> > version 0, type 3
> > rtw89_8852be 0000:09:00.0: MAC has already powered on
> > rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
> > rtw89_8852be 0000:09:00.0: [ERR] pcie autok fail -22
> > rtw89_8852be 0000:09:00.0: failed to setup chip information
> > tw89_8852be: probe of 0000:09:00.0 failed with error -22
> >
> > I am running Ubuntu 22.04.3 and kernel 6.2.0-37-generic.
> >
>
> Not very sure why your host can't read PCI configuration space 0x719.
> Please provide your PCI host controller by 'lspci -tv'.
>
> And, I wonder if user space tool 'lspci' can dump whole PCI configuration
> space on your platform, so please provide full dump by
> 'sudo lspci -s xx:yy.zz -xxxx'
>
> (you can get the device number followed '-s' by 'lspci', and copy the number, like)
> 03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852
>
>
> After kernel 5.18, we change to use standard pci API to read/write configuration
> space, so if possible please downgrade to 5.17 to see if that version works to you.
>
> Ping-Ke
>

2023-11-27 06:19:23

by Ali Ghandour

[permalink] [raw]
Subject: Re: Lenovo LOQ rtw_8852be

seems like the same error persists after downgrading:

$ uname -r
5.17.0-1035-oem

$ sudo dmesg | grep rtw
[ 4.859848] rtw89_8852be 0000:09:00.0: loaded firmware
rtw89/rtw8852b_fw-1.bin
[ 4.860214] rtw89_8852be 0000:09:00.0: enabling device (0000 -> 0003)
[ 4.861546] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 5
[ 4.861550] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 3
[ 4.861556] rtw89_8852be 0000:09:00.0: MAC has already powered on
[ 4.867246] rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
[ 4.867251] rtw89_8852be 0000:09:00.0: [ERR] pcie autok fail -22
[ 4.867254] rtw89_8852be 0000:09:00.0: failed to setup chip information
[ 4.867703] rtw89_8852be: probe of 0000:09:00.0 failed with error -22
[ 5.305458] Modules linked in: fjes(-) rtw_8852be(OE)
x86_pkg_temp_thermal intel_powerclamp rtw_8852b(OE) rtw89pci(OE)
rtw89core(OE) mac80211 libarc4 coretemp binfmt_misc wl(POE) mei_pxp
mei_hdcp intel_rapl_msr snd_hda_codec_hdmi nls_iso8859_1 kvm_intel
snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm
btusb snd_hda_core snd_hwdep btrtl btbcm snd_pcm btintel uvcvideo
btmtk crct10dif_pclmul ghash_clmulni_intel bluetooth snd_seq_midi
videobuf2_vmalloc snd_seq_midi_event videobuf2_memops aesni_intel
videobuf2_v4l2 snd_rawmidi videobuf2_common crypto_simd videodev
snd_seq cryptd ecdh_generic snd_seq_device joydev input_leds
intel_cstate mc ecc serio_raw wmi_bmof cfg80211
nvidia_wmi_ec_backlight snd_timer processor_thermal_device_pci mei_me
processor_thermal_device snd hid_multitouch processor_thermal_rfim mei
processor_thermal_mbox processor_thermal_rapl soundcore
intel_rapl_common ideapad_laptop sparse_keymap platform_profile
int3400_thermal int3403_thermal
[ 5.308233] Modules linked in: fjes(-) rtw_8852be(OE)
x86_pkg_temp_thermal intel_powerclamp rtw_8852b(OE) rtw89pci(OE)
rtw89core(OE) mac80211 libarc4 coretemp binfmt_misc wl(POE) mei_pxp
mei_hdcp intel_rapl_msr snd_hda_codec_hdmi nls_iso8859_1 kvm_intel
snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm
btusb snd_hda_core snd_hwdep btrtl btbcm snd_pcm btintel uvcvideo
btmtk crct10dif_pclmul ghash_clmulni_intel bluetooth snd_seq_midi
videobuf2_vmalloc snd_seq_midi_event videobuf2_memops aesni_intel
videobuf2_v4l2 snd_rawmidi videobuf2_common crypto_simd videodev
snd_seq cryptd ecdh_generic snd_seq_device joydev input_leds
intel_cstate mc ecc serio_raw wmi_bmof cfg80211
nvidia_wmi_ec_backlight snd_timer processor_thermal_device_pci mei_me
processor_thermal_device snd hid_multitouch processor_thermal_rfim mei
processor_thermal_mbox processor_thermal_rapl soundcore
intel_rapl_common ideapad_laptop sparse_keymap platform_profile
int3400_thermal int3403_thermal
[ 5.310330] Modules linked in: rtw_8852be(OE) x86_pkg_temp_thermal
intel_powerclamp rtw_8852b(OE) rtw89pci(OE) rtw89core(OE) mac80211
libarc4 coretemp binfmt_misc wl(POE) mei_pxp mei_hdcp intel_rapl_msr
snd_hda_codec_hdmi nls_iso8859_1 kvm_intel snd_hda_intel
snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm btusb
snd_hda_core snd_hwdep btrtl btbcm snd_pcm btintel uvcvideo btmtk
crct10dif_pclmul ghash_clmulni_intel bluetooth snd_seq_midi
videobuf2_vmalloc snd_seq_midi_event videobuf2_memops aesni_intel
videobuf2_v4l2 snd_rawmidi videobuf2_common crypto_simd videodev
snd_seq cryptd ecdh_generic snd_seq_device joydev input_leds
intel_cstate mc ecc serio_raw wmi_bmof cfg80211
nvidia_wmi_ec_backlight snd_timer processor_thermal_device_pci mei_me
processor_thermal_device snd hid_multitouch processor_thermal_rfim mei
processor_thermal_mbox processor_thermal_rapl soundcore
intel_rapl_common ideapad_laptop sparse_keymap platform_profile
int3400_thermal int3403_thermal acpi_thermal_rel
[ 5.312399] Modules linked in: rtw_8852be(OE) x86_pkg_temp_thermal
intel_powerclamp rtw_8852b(OE) rtw89pci(OE) rtw89core(OE) mac80211
libarc4 coretemp binfmt_misc wl(POE) mei_pxp mei_hdcp intel_rapl_msr
snd_hda_codec_hdmi nls_iso8859_1 kvm_intel snd_hda_intel
snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm btusb
snd_hda_core snd_hwdep btrtl btbcm snd_pcm btintel uvcvideo btmtk
crct10dif_pclmul ghash_clmulni_intel bluetooth snd_seq_midi
videobuf2_vmalloc snd_seq_midi_event videobuf2_memops aesni_intel
videobuf2_v4l2 snd_rawmidi videobuf2_common crypto_simd videodev
snd_seq cryptd ecdh_generic snd_seq_device joydev input_leds
intel_cstate mc ecc serio_raw wmi_bmof cfg80211
nvidia_wmi_ec_backlight snd_timer processor_thermal_device_pci mei_me
processor_thermal_device snd hid_multitouch processor_thermal_rfim mei
processor_thermal_mbox processor_thermal_rapl soundcore
intel_rapl_common ideapad_laptop sparse_keymap platform_profile
int3400_thermal int3403_thermal acpi_thermal_rel
[ 5.507904] Modules linked in: rtw_8852be(OE) x86_pkg_temp_thermal
intel_powerclamp rtw_8852b(OE) rtw89pci(OE) rtw89core(OE) mac80211
libarc4 coretemp binfmt_misc wl(POE) mei_pxp mei_hdcp intel_rapl_msr
snd_hda_codec_hdmi nls_iso8859_1 kvm_intel snd_hda_intel
snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm btusb
snd_hda_core snd_hwdep btrtl btbcm snd_pcm btintel uvcvideo btmtk
crct10dif_pclmul ghash_clmulni_intel bluetooth snd_seq_midi
videobuf2_vmalloc snd_seq_midi_event videobuf2_memops aesni_intel
videobuf2_v4l2 snd_rawmidi videobuf2_common crypto_simd videodev
snd_seq cryptd ecdh_generic snd_seq_device joydev input_leds
intel_cstate mc ecc serio_raw wmi_bmof cfg80211
nvidia_wmi_ec_backlight snd_timer processor_thermal_device_pci mei_me
processor_thermal_device snd hid_multitouch processor_thermal_rfim mei
processor_thermal_mbox processor_thermal_rapl soundcore
intel_rapl_common ideapad_laptop sparse_keymap platform_profile
int3400_thermal int3403_thermal acpi_thermal_rel

=============================================

Dr. Ali J. Ghandour
Associate Researcher, GEOspatial Artificial Intelligence (GEOAI) group
National Remote Sensing Center – CNRS
Beirut, Lebanon



Phone: +961 (4)409845
Email: [email protected] - LinkedIn - GoogleScholar

On Mon, Nov 27, 2023 at 8:01 AM Ali Ghandour <[email protected]> wrote:
>
> $ lspci -tv
> -[0000:00]-+-00.0 Intel Corporation Device a715
> +-01.0-[01-05]--+-00.0 NVIDIA Corporation Device 28e0
> | \-00.1 NVIDIA Corporation Device 22be
> +-02.0 Intel Corporation Device a7a8
> +-04.0 Intel Corporation Device a71d
> +-06.0-[06]----00.0 Micron Technology Inc Device 5411
> +-06.2-[07]----00.0 MAXIO Technology (Hangzhou) Ltd. NVMe
> SSD Controller MAP1202
> +-0a.0 Intel Corporation Device a77d
> +-14.0 Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller
> +-14.2 Intel Corporation Alder Lake PCH Shared SRAM
> +-15.0 Intel Corporation Alder Lake PCH Serial IO I2C Controller #0
> +-16.0 Intel Corporation Alder Lake PCH HECI Controller
> +-19.0 Intel Corporation Alder Lake-P Serial IO I2C Controller #0
> +-1c.0-[08]----00.0 Realtek Semiconductor Co., Ltd.
> RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
> +-1c.5-[09]----00.0 Realtek Semiconductor Co., Ltd. Device b852
> +-1f.0 Intel Corporation Device 519d
> +-1f.3 Intel Corporation Device 51ca
> +-1f.4 Intel Corporation Alder Lake PCH-P SMBus Host Controller
> \-1f.5 Intel Corporation Alder Lake-P PCH SPI Controller
>
>
> $ sudo lspci -s 09:00.0 -xxxx
> 09:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852
> 00: ec 10 52 b8 03 00 10 00 00 00 80 02 10 00 00 00
> 10: 01 30 00 00 00 00 00 00 04 00 10 52 00 00 00 00
> 20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 53 48
> 30: 00 00 00 00 40 00 00 00 00 00 00 00 ff 01 00 00
> 40: 01 50 c3 c9 08 00 00 00 00 00 00 00 00 00 00 00
> 50: 05 70 80 00 00 00 00 00 00 00 00 00 00 00 00 00
> 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 70: 10 00 02 00 81 8d 90 15 30 20 10 00 11 6c 47 00
> 80: 43 01 11 10 00 00 00 00 00 00 00 00 00 00 00 00
> 90: 00 00 00 00 10 08 0c 00 00 04 00 00 02 00 00 00
> a0: 02 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
>
>
> =============================================
>
> Dr. Ali J. Ghandour
> Associate Researcher, GEOspatial Artificial Intelligence (GEOAI) group
> National Remote Sensing Center – CNRS
> Beirut, Lebanon
>
>
>
> Phone: +961 (4)409845
> Email: [email protected] - LinkedIn - GoogleScholar
>
>
> On Mon, Nov 27, 2023 at 3:43 AM Ping-Ke Shih <[email protected]> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Ali Ghandour <[email protected]>
> > > Sent: Sunday, November 26, 2023 5:36 AM
> > > To: [email protected]
> > > Subject: Lenovo LOQ rtw_8852be
> > >
> > > Hi,
> > >
> > > Following below thread, rtw_8852be driver fails for Lenovo LOQ:
> > > https://github.com/lwfinger/rtw89/issues/235
> > >
> > > rtw89_8852be 0000:09:00.0: loaded firmware rtw89/rtw8852b_fw-1.bin
> > > rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5 (da87cccd), cmd
> > > version 0, type 5
> > > rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5 (da87cccd), cmd
> > > version 0, type 3
> > > rtw89_8852be 0000:09:00.0: MAC has already powered on
> > > rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
> > > rtw89_8852be 0000:09:00.0: [ERR] pcie autok fail -22
> > > rtw89_8852be 0000:09:00.0: failed to setup chip information
> > > tw89_8852be: probe of 0000:09:00.0 failed with error -22
> > >
> > > I am running Ubuntu 22.04.3 and kernel 6.2.0-37-generic.
> > >
> >
> > Not very sure why your host can't read PCI configuration space 0x719.
> > Please provide your PCI host controller by 'lspci -tv'.
> >
> > And, I wonder if user space tool 'lspci' can dump whole PCI configuration
> > space on your platform, so please provide full dump by
> > 'sudo lspci -s xx:yy.zz -xxxx'
> >
> > (you can get the device number followed '-s' by 'lspci', and copy the number, like)
> > 03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852
> >
> >
> > After kernel 5.18, we change to use standard pci API to read/write configuration
> > space, so if possible please downgrade to 5.17 to see if that version works to you.
> >
> > Ping-Ke
> >

2023-11-28 01:21:37

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Lenovo LOQ rtw_8852be



> -----Original Message-----
> From: Ali Ghandour <[email protected]>
> Sent: Monday, November 27, 2023 2:19 PM
> To: Ping-Ke Shih <[email protected]>
> Cc: [email protected]
> Subject: Re: Lenovo LOQ rtw_8852be
>
> seems like the same error persists after downgrading:
>
> $ uname -r
> 5.17.0-1035-oem
>
> $ sudo dmesg | grep rtw
> [ 4.859848] rtw89_8852be 0000:09:00.0: loaded firmware
> rtw89/rtw8852b_fw-1.bin
> [ 4.860214] rtw89_8852be 0000:09:00.0: enabling device (0000 -> 0003)
> [ 4.861546] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
> (da87cccd), cmd version 0, type 5
> [ 4.861550] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
> (da87cccd), cmd version 0, type 3
> [ 4.861556] rtw89_8852be 0000:09:00.0: MAC has already powered on
> [ 4.867246] rtw89_8852be 0000:09:00.0: [ERR]pci config read 719

We did changes after 5.18, but your 5.17 print out error with
"pci config read" instead of "dbi_r8_pcie".

- ret = rtw89_dbi_read8(rtwdev, RTW89_PCIE_L1_CTRL, &bdr_ori);
+ ret = rtw89_pci_read_config_byte(rtwdev, RTW89_PCIE_L1_CTRL, &bdr_ori);
if (ret) {
- rtw89_err(rtwdev, "[ERR]dbi_r8_pcie %X\n", RTW89_PCIE_L1_CTRL); // 5.17
+ rtw89_err(rtwdev, "[ERR]pci config read %X\n", RTW89_PCIE_L1_CTRL); // 5.18
return ret;
}

Uh. I know the reason why you see the new one, because 8852be is supported
by kernel 6.2, and distro backport the driver to old kernel.


If you can build driver yourself, please revert below patch and try again.
Fixes: db38d9cd26c9 ("rtw89: use pci_read/write_config instead of dbi read/write")

> >
> > $ lspci -tv
> > -[0000:00]-+-00.0 Intel Corporation Device a715

I will try to Google to see if I can find some information about this PCI host controller.

Can I know the type of your platoform Lenovo LOQ? Is it a regular notebook computer?

> >
> > $ sudo lspci -s 09:00.0 -xxxx
> > 09:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852

[...]

> > f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

In my side, lspci with '-xxxx', it can display PCI configuration space 0 ~ ff0.
In your side, lspci has the same behavior as driver that can't read 0x719.

The PCI EXT capabilities locate from 100h. Not sure if host controller driver
limits to display them?

Ping-Ke

2023-12-02 09:24:15

by Ali Ghandour

[permalink] [raw]
Subject: Re: Lenovo LOQ rtw_8852be

>> Can I know the type of your platoform Lenovo LOQ? Is it a regular notebook computer?

LOQ 15IRH8 - Type 82XV
I am using a dual boot with Windows and Ubuntu 22.04

>> The PCI EXT capabilities locate from 100h. Not sure if host controller driver limits to display them?
I did not get your question. Can you say it again please?


Ali

On Tue, Nov 28, 2023 at 3:21 AM Ping-Ke Shih <[email protected]> wrote:
>
>
>
> > -----Original Message-----
> > From: Ali Ghandour <[email protected]>
> > Sent: Monday, November 27, 2023 2:19 PM
> > To: Ping-Ke Shih <[email protected]>
> > Cc: [email protected]
> > Subject: Re: Lenovo LOQ rtw_8852be
> >
> > seems like the same error persists after downgrading:
> >
> > $ uname -r
> > 5.17.0-1035-oem
> >
> > $ sudo dmesg | grep rtw
> > [ 4.859848] rtw89_8852be 0000:09:00.0: loaded firmware
> > rtw89/rtw8852b_fw-1.bin
> > [ 4.860214] rtw89_8852be 0000:09:00.0: enabling device (0000 -> 0003)
> > [ 4.861546] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
> > (da87cccd), cmd version 0, type 5
> > [ 4.861550] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
> > (da87cccd), cmd version 0, type 3
> > [ 4.861556] rtw89_8852be 0000:09:00.0: MAC has already powered on
> > [ 4.867246] rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
>
> We did changes after 5.18, but your 5.17 print out error with
> "pci config read" instead of "dbi_r8_pcie".
>
> - ret = rtw89_dbi_read8(rtwdev, RTW89_PCIE_L1_CTRL, &bdr_ori);
> + ret = rtw89_pci_read_config_byte(rtwdev, RTW89_PCIE_L1_CTRL, &bdr_ori);
> if (ret) {
> - rtw89_err(rtwdev, "[ERR]dbi_r8_pcie %X\n", RTW89_PCIE_L1_CTRL); // 5.17
> + rtw89_err(rtwdev, "[ERR]pci config read %X\n", RTW89_PCIE_L1_CTRL); // 5.18
> return ret;
> }
>
> Uh. I know the reason why you see the new one, because 8852be is supported
> by kernel 6.2, and distro backport the driver to old kernel.
>
>
> If you can build driver yourself, please revert below patch and try again.
> Fixes: db38d9cd26c9 ("rtw89: use pci_read/write_config instead of dbi read/write")
>
> > >
> > > $ lspci -tv
> > > -[0000:00]-+-00.0 Intel Corporation Device a715
>
> I will try to Google to see if I can find some information about this PCI host controller.
>
> Can I know the type of your platoform Lenovo LOQ? Is it a regular notebook computer?
>
> > >
> > > $ sudo lspci -s 09:00.0 -xxxx
> > > 09:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852
>
> [...]
>
> > > f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> In my side, lspci with '-xxxx', it can display PCI configuration space 0 ~ ff0.
> In your side, lspci has the same behavior as driver that can't read 0x719.
>
> The PCI EXT capabilities locate from 100h. Not sure if host controller driver
> limits to display them?
>
> Ping-Ke
>

2023-12-05 00:40:05

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Lenovo LOQ rtw_8852be



> -----Original Message-----
> From: Ali Ghandour <[email protected]>
> Sent: Saturday, December 2, 2023 5:24 PM
> To: Ping-Ke Shih <[email protected]>
> Cc: [email protected]
> Subject: Re: Lenovo LOQ rtw_8852be
>
> > > > $ lspci -tv
> > > > -[0000:00]-+-00.0 Intel Corporation Device a715
> >> Can I know the type of your platoform Lenovo LOQ? Is it a regular notebook computer?
>
> LOQ 15IRH8 - Type 82XV
> I am using a dual boot with Windows and Ubuntu 22.04

I still can't find information about the device a715 that I also can't find
this ID in kernel source code. I will dig kernel further when I have free time.

>
> >> The PCI EXT capabilities locate from 100h. Not sure if host controller driver limits to display them?
> I did not get your question. Can you say it again please?

I meant offset 100h of PCI configuration space is a standard area [1].

"PCI Express extends the Configuration Space to 4096 bytes per Function as compared to 256 bytes
allowed by PCI Local Bus Specification. PCI Express Configuration Space is divided into a PCI 3.0
compatible region, which consists of the first 256 bytes of a Function’s Configuration Space, and a
PCI Express Extended Configuration Space which consists of the remaining Configuration Space
5 (see Figure 7-3)."

I don't know why the PCI controller in your platform doesn't recognize the region,
and then _possibly_ cause driver failed to access 719h.


[1] https://blog.csdn.net/huangkangying/article/details/50570612


2023-12-05 06:12:55

by Ali Ghandour

[permalink] [raw]
Subject: Re: Lenovo LOQ rtw_8852be

> > > > > $ lspci -tv
> > > > > -[0000:00]-+-00.0 Intel Corporation Device a715
> > >> Can I know the type of your platoform Lenovo LOQ? Is it a regular notebook computer?
> >
> > LOQ 15IRH8 - Type 82XV
> > I am using a dual boot with Windows and Ubuntu 22.04
>
> I still can't find information about the device a715 that I also can't find
> this ID in kernel source code. I will dig kernel further when I have free time.


According to the specs:
1x 13th Generation Intel Core i7-13620H Processor(Core i7-13620H)



>
> >
> > >> The PCI EXT capabilities locate from 100h. Not sure if host controller driver limits to display them?
> > I did not get your question. Can you say it again please?
>
> I meant offset 100h of PCI configuration space is a standard area [1].
>
> "PCI Express extends the Configuration Space to 4096 bytes per Function as compared to 256 bytes
> allowed by PCI Local Bus Specification. PCI Express Configuration Space is divided into a PCI 3.0
> compatible region, which consists of the first 256 bytes of a Function’s Configuration Space, and a
> PCI Express Extended Configuration Space which consists of the remaining Configuration Space
> 5 (see Figure 7-3)."
>
> I don't know why the PCI controller in your platform doesn't recognize the region,
> and then _possibly_ cause driver failed to access 719h.
>
>
> [1] https://blog.csdn.net/huangkangying/article/details/50570612

According to the specs:
2 x M.2 (PCI Express 4.0 x4) (1 free)
512 GB SSD M.2 2242 PCIe 4.0 x4 - NVM Express (NVMe)
and I have actually inserted a second SSD myself

Is the driver compatible with PCI 4.0?

2023-12-06 02:42:14

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Lenovo LOQ rtw_8852be



> -----Original Message-----
> From: Ali Ghandour <[email protected]>
> Sent: Tuesday, December 5, 2023 2:13 PM
> To: Ping-Ke Shih <[email protected]>
> Cc: [email protected]
> Subject: Re: Lenovo LOQ rtw_8852be
>
>
> > > > > > $ lspci -tv
> > > > > > -[0000:00]-+-00.0 Intel Corporation Device a715
> > > >> Can I know the type of your platoform Lenovo LOQ? Is it a regular notebook computer?
> > >
> > > LOQ 15IRH8 - Type 82XV
> > > I am using a dual boot with Windows and Ubuntu 22.04
> >
> > I still can't find information about the device a715 that I also can't find
> > this ID in kernel source code. I will dig kernel further when I have free time.
>
>
> According to the specs:
> 1x 13th Generation Intel Core i7-13620H Processor(Core i7-13620H)
>

I have found the ID in kernel:
arch/x86/events/intel/uncore_snb.c:101:#define PCI_DEVICE_ID_INTEL_RPL_15_IMC 0xA715

But honestly I'm not familiar with PCI. I'll continue to dig to see if I can
find something...

>
>
> >
> > >
> > > >> The PCI EXT capabilities locate from 100h. Not sure if host controller driver limits to display them?
> > > I did not get your question. Can you say it again please?
> >
> > I meant offset 100h of PCI configuration space is a standard area [1].
> >
> > "PCI Express extends the Configuration Space to 4096 bytes per Function as compared to 256 bytes
> > allowed by PCI Local Bus Specification. PCI Express Configuration Space is divided into a PCI 3.0
> > compatible region, which consists of the first 256 bytes of a Function’s Configuration Space, and a
> > PCI Express Extended Configuration Space which consists of the remaining Configuration Space
> > 5 (see Figure 7-3)."
> >
> > I don't know why the PCI controller in your platform doesn't recognize the region,
> > and then _possibly_ cause driver failed to access 719h.
> >
> >
> > [1] https://blog.csdn.net/huangkangying/article/details/50570612
>
> According to the specs:
> 2 x M.2 (PCI Express 4.0 x4) (1 free)
> 512 GB SSD M.2 2242 PCIe 4.0 x4 - NVM Express (NVMe)
> and I have actually inserted a second SSD myself
>
> Is the driver compatible with PCI 4.0?

I think PCI should be backward compatible to older devices.


I did trace PCI code and found pci_dev->cfg_size limit the access, so please try
below hack patch in driver and see pci_dev->cfg_size in your platform.

@@ -2111,6 +2111,11 @@ static int rtw89_pci_auto_refclk_cal(struct rtw89_dev *rtwdev, bool autook_en)
u8 val8, bdr_ori;
bool l1_flag = false;
int ret = 0;
+ struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv;
+ struct pci_dev *pdev = rtwpci->pdev;
+
+ printk("pdev->cfg_size=%d\n", pdev->cfg_size); // in my computer, this is 4096 already
+ pdev->cfg_size = PCI_CFG_SPACE_EXP_SIZE; // 4096

if (chip_id != RTL8852B && chip_id != RTL8851B)
return 0;

Ping-Ke

2023-12-10 06:24:35

by Ali Ghandour

[permalink] [raw]
Subject: Re: Lenovo LOQ rtw_8852be

> I did trace PCI code and found pci_dev->cfg_size limit the access, so please try
> below hack patch in driver and see pci_dev->cfg_size in your platform.
>
> @@ -2111,6 +2111,11 @@ static int rtw89_pci_auto_refclk_cal(struct rtw89_dev *rtwdev, bool autook_en)
> u8 val8, bdr_ori;
> bool l1_flag = false;
> int ret = 0;
> + struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv;
> + struct pci_dev *pdev = rtwpci->pdev;
> +
> + printk("pdev->cfg_size=%d\n", pdev->cfg_size); // in my computer, this is 4096 already
> + pdev->cfg_size = PCI_CFG_SPACE_EXP_SIZE; // 4096
>
> if (chip_id != RTL8852B && chip_id != RTL8851B)
> return 0;
>

It ended up showing 4096.

ali@loq:~$ sudo dmesg | grep rtw
[ 3.153827] rtw89_8852be 0000:09:00.0: loaded firmware
rtw89/rtw8852b_fw-1.bin
[ 3.154264] rtw89_8852be 0000:09:00.0: enabling device (0000 -> 0003)
[ 3.155976] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 5
[ 3.155980] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 3
[ 3.160040] rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
[ 3.160044] rtw89_8852be 0000:09:00.0: [ERR] pcie autok fail -22
[ 3.160046] rtw89_8852be 0000:09:00.0: failed to setup chip information
[ 3.161040] rtw89_8852be: probe of 0000:09:00.0 failed with error -22
[ 760.432807] rtw89_8852be 0000:09:00.0: loaded firmware
rtw89/rtw8852b_fw-1.bin
[ 760.434865] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 5
[ 760.434868] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 3
[ 760.434874] rtw89_8852be 0000:09:00.0: MAC has already powered on
[ 760.440601] rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
[ 760.440602] rtw89_8852be 0000:09:00.0: [ERR] pcie autok fail -22
[ 760.440603] rtw89_8852be 0000:09:00.0: failed to setup chip information
[ 760.441448] rtw89_8852be: probe of 0000:09:00.0 failed with error -22
[ 1765.595921] rtw89_8852be 0000:09:00.0: loaded firmware
rtw89/rtw8852b_fw-1.bin
[ 1765.599918] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 5
[ 1765.599929] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 3
[ 1765.599940] rtw89_8852be 0000:09:00.0: MAC has already powered on
[ 1765.605861] rtw89_8852be 0000:09:00.0: [ERR]pci config read 719
[ 1765.605869] rtw89_8852be 0000:09:00.0: [ERR] pcie autok fail -22
[ 1765.605874] rtw89_8852be 0000:09:00.0: failed to setup chip information
[ 1765.609552] rtw89_8852be: probe of 0000:09:00.0 failed with error -22

ali@loq:~$ sudo dmesg | grep pdev
[ 2.508247] ppdev: user-space parallel port driver
[ 760.440595] pdev->cfg_size=256
[ 1765.605839] pdev->cfg_size=4096


On Wed, Dec 6, 2023 at 4:41 AM Ping-Ke Shih <[email protected]> wrote:
>
>
>
> > -----Original Message-----
> > From: Ali Ghandour <[email protected]>
> > Sent: Tuesday, December 5, 2023 2:13 PM
> > To: Ping-Ke Shih <[email protected]>
> > Cc: [email protected]
> > Subject: Re: Lenovo LOQ rtw_8852be
> >
> >
> > > > > > > $ lspci -tv
> > > > > > > -[0000:00]-+-00.0 Intel Corporation Device a715
> > > > >> Can I know the type of your platoform Lenovo LOQ? Is it a regular notebook computer?
> > > >
> > > > LOQ 15IRH8 - Type 82XV
> > > > I am using a dual boot with Windows and Ubuntu 22.04
> > >
> > > I still can't find information about the device a715 that I also can't find
> > > this ID in kernel source code. I will dig kernel further when I have free time.
> >
> >
> > According to the specs:
> > 1x 13th Generation Intel Core i7-13620H Processor(Core i7-13620H)
> >
>
> I have found the ID in kernel:
> arch/x86/events/intel/uncore_snb.c:101:#define PCI_DEVICE_ID_INTEL_RPL_15_IMC 0xA715
>
> But honestly I'm not familiar with PCI. I'll continue to dig to see if I can
> find something...
>
> >
> >
> > >
> > > >
> > > > >> The PCI EXT capabilities locate from 100h. Not sure if host controller driver limits to display them?
> > > > I did not get your question. Can you say it again please?
> > >
> > > I meant offset 100h of PCI configuration space is a standard area [1].
> > >
> > > "PCI Express extends the Configuration Space to 4096 bytes per Function as compared to 256 bytes
> > > allowed by PCI Local Bus Specification. PCI Express Configuration Space is divided into a PCI 3.0
> > > compatible region, which consists of the first 256 bytes of a Function’s Configuration Space, and a
> > > PCI Express Extended Configuration Space which consists of the remaining Configuration Space
> > > 5 (see Figure 7-3)."
> > >
> > > I don't know why the PCI controller in your platform doesn't recognize the region,
> > > and then _possibly_ cause driver failed to access 719h.
> > >
> > >
> > > [1] https://blog.csdn.net/huangkangying/article/details/50570612
> >
> > According to the specs:
> > 2 x M.2 (PCI Express 4.0 x4) (1 free)
> > 512 GB SSD M.2 2242 PCIe 4.0 x4 - NVM Express (NVMe)
> > and I have actually inserted a second SSD myself
> >
> > Is the driver compatible with PCI 4.0?
>
> I think PCI should be backward compatible to older devices.
>
>
> I did trace PCI code and found pci_dev->cfg_size limit the access, so please try
> below hack patch in driver and see pci_dev->cfg_size in your platform.
>
> @@ -2111,6 +2111,11 @@ static int rtw89_pci_auto_refclk_cal(struct rtw89_dev *rtwdev, bool autook_en)
> u8 val8, bdr_ori;
> bool l1_flag = false;
> int ret = 0;
> + struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv;
> + struct pci_dev *pdev = rtwpci->pdev;
> +
> + printk("pdev->cfg_size=%d\n", pdev->cfg_size); // in my computer, this is 4096 already
> + pdev->cfg_size = PCI_CFG_SPACE_EXP_SIZE; // 4096
>
> if (chip_id != RTL8852B && chip_id != RTL8851B)
> return 0;
>
> Ping-Ke
>

2023-12-11 01:53:35

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Lenovo LOQ rtw_8852be



> -----Original Message-----
> From: Ali Ghandour <[email protected]>
> Sent: Sunday, December 10, 2023 2:24 PM
> To: Ping-Ke Shih <[email protected]>
> Cc: [email protected]
> Subject: Re: Lenovo LOQ rtw_8852be
>
> It ended up showing 4096.

But still not work. PCI code is hard to me.

Please try below workaround patch to ignore the setting. I have tried that, and
in my side it still works without obvious problem. I will check internally to
check how much this can affect. If not, I would ignore this if certain platform
like yours can't access PCI space over 0x100.


@@ -2061,6 +2061,9 @@ static int rtw89_pci_auto_refclk_cal(struct rtw89_dev *rtwdev, bool autook_en)
if (chip_id != RTL8852B && chip_id != RTL8851B)
return 0;

+ printk("no auto_refclk_cal\n");
+ return 0;
+
ret = rtw89_pci_read_config_byte(rtwdev, RTW89_PCIE_PHY_RATE, &val8);
if (ret) {
rtw89_err(rtwdev, "[ERR]pci config read %X\n",


Ping-Ke

2023-12-12 05:36:46

by Ali Ghandour

[permalink] [raw]
Subject: Re: Lenovo LOQ rtw_8852be

> Please try below workaround patch to ignore the setting. I have tried that, and
> in my side it still works without obvious problem. I will check internally to
> check how much this can affect. If not, I would ignore this if certain platform
> like yours can't access PCI space over 0x100.

I was able to connect. Thanks a lot Ping-Ke!

[ 609.484727] rtw89_8852be 0000:09:00.0: loaded firmware
rtw89/rtw8852b_fw-1.bin
[ 609.484998] rtw89_8852be 0000:09:00.0: enabling device (0000 -> 0003)
[ 609.486812] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 5
[ 609.486815] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
(da87cccd), cmd version 0, type 3
[ 609.767891] rtw89_8852be 0000:09:00.0: chip rfe_type is 1
[ 609.796171] rtw89_8852be 0000:09:00.0: failed to set CLKREQ Delay
[ 609.796175] rtw89_8852be 0000:09:00.0: failed to set CLKREQ_L1, ret=-22
[ 609.796177] rtw89_8852be 0000:09:00.0: failed to read ASPM Delay
[ 609.796177] rtw89_8852be 0000:09:00.0: failed to read ASPM Delay
[ 609.796178] rtw89_8852be 0000:09:00.0: failed to set ASPM L1, ret=-22
[ 609.803786] rtw89_8852be 0000:09:00.0 wlp9s0: renamed from wlan0


On Mon, Dec 11, 2023 at 3:53 AM Ping-Ke Shih <[email protected]> wrote:
>
>
>
> > -----Original Message-----
> > From: Ali Ghandour <[email protected]>
> > Sent: Sunday, December 10, 2023 2:24 PM
> > To: Ping-Ke Shih <[email protected]>
> > Cc: [email protected]
> > Subject: Re: Lenovo LOQ rtw_8852be
> >
> > It ended up showing 4096.
>
> But still not work. PCI code is hard to me.
>
> Please try below workaround patch to ignore the setting. I have tried that, and
> in my side it still works without obvious problem. I will check internally to
> check how much this can affect. If not, I would ignore this if certain platform
> like yours can't access PCI space over 0x100.
>
>
> @@ -2061,6 +2061,9 @@ static int rtw89_pci_auto_refclk_cal(struct rtw89_dev *rtwdev, bool autook_en)
> if (chip_id != RTL8852B && chip_id != RTL8851B)
> return 0;
>
> + printk("no auto_refclk_cal\n");
> + return 0;
> +
> ret = rtw89_pci_read_config_byte(rtwdev, RTW89_PCIE_PHY_RATE, &val8);
> if (ret) {
> rtw89_err(rtwdev, "[ERR]pci config read %X\n",
>
>
> Ping-Ke
>

2023-12-12 06:01:57

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Lenovo LOQ rtw_8852be



> -----Original Message-----
> From: Ali Ghandour <[email protected]>
> Sent: Tuesday, December 12, 2023 1:36 PM
> To: Ping-Ke Shih <[email protected]>
> Cc: [email protected]
> Subject: Re: Lenovo LOQ rtw_8852be
>
> > Please try below workaround patch to ignore the setting. I have tried that, and
> > in my side it still works without obvious problem. I will check internally to
> > check how much this can affect. If not, I would ignore this if certain platform
> > like yours can't access PCI space over 0x100.
>
> I was able to connect. Thanks a lot Ping-Ke!
>

Good. Please use it as usual and monitor if it works stable. I would like
take your results as reference to decide how I can modify the driver.

> [ 609.796171] rtw89_8852be 0000:09:00.0: failed to set CLKREQ Delay
> [ 609.796175] rtw89_8852be 0000:09:00.0: failed to set CLKREQ_L1, ret=-22
> [ 609.796177] rtw89_8852be 0000:09:00.0: failed to read ASPM Delay
> [ 609.796177] rtw89_8852be 0000:09:00.0: failed to read ASPM Delay
> [ 609.796178] rtw89_8852be 0000:09:00.0: failed to set ASPM L1, ret=-22

These mean we fail to access more PCI config space over 0x100. I will
consider these cases as well.

Ping-Ke


2023-12-26 03:42:15

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Lenovo LOQ rtw_8852be

Hi Ali,

> -----Original Message-----
> From: Ping-Ke Shih
> Sent: Tuesday, December 12, 2023 2:02 PM
> To: 'Ali Ghandour' <[email protected]>
> Cc: [email protected]
> Subject: RE: Lenovo LOQ rtw_8852be
>
> > -----Original Message-----
> > From: Ali Ghandour <[email protected]>
> > Sent: Tuesday, December 12, 2023 1:36 PM
> > To: Ping-Ke Shih <[email protected]>
> > Cc: [email protected]
> > Subject: Re: Lenovo LOQ rtw_8852be
> >
> > > Please try below workaround patch to ignore the setting. I have tried that, and
> > > in my side it still works without obvious problem. I will check internally to
> > > check how much this can affect. If not, I would ignore this if certain platform
> > > like yours can't access PCI space over 0x100.
> >
> > I was able to connect. Thanks a lot Ping-Ke!
> >
>
> Good. Please use it as usual and monitor if it works stable. I would like
> take your results as reference to decide how I can modify the driver.
>

After internal discussion, people suggest to implement DBI to access PCI config
space as attached patch. Please help to revert workaround and apply this one,
and give us kernel log to see if it works as expected.

Ping-Ke


Attachments:
0001-wifi-rtw89-pci-use-DBI-function-for-8852AE-8852BE-88.patch (3.73 kB)
0001-wifi-rtw89-pci-use-DBI-function-for-8852AE-8852BE-88.patch

2024-01-03 00:13:48

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Lenovo LOQ rtw_8852be



> -----Original Message-----
> From: Ali Ghandour <[email protected]>
> Sent: Wednesday, January 3, 2024 2:09 AM
> To: Ping-Ke Shih <[email protected]>
> Subject: Re: Lenovo LOQ rtw_8852be
>
> Hello Ping-Ke,
>
> > After internal discussion, people suggest to implement DBI to access PCI config
> > space as attached patch. Please help to revert workaround and apply this one,
> > and give us kernel log to see if it works as expected.
>
> 1. I tried first to patch using below commands but it failed:
> $ patch -p 2 -o pci.c pci.h <
> ../0001-wifi-rtw89-pci-use-DBI-function-for-8852AE-8852BE-88.patch
> What should I use instead?

Normally, I use below command

$ patch -p 1 -m -d path_to_rtw89 < xxx.patch

>
> 2. So I manually applied the changes and load the kernel:
> [ 2428.566026] rtw89_8852be 0000:09:00.0: loaded firmware
> rtw89/rtw8852b_fw-1.bin
> [ 2428.568023] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
> (da87cccd), cmd version 0, type 5
> [ 2428.568027] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
> (da87cccd), cmd version 0, type 3
> [ 2428.847820] rtw89_8852be 0000:09:00.0: chip rfe_type is 1
> [ 2428.878840] rtw89_8852be 0000:09:00.0 wlp9s0: renamed from wlan0
>
> rebooted and checked again and still working fine:
> [ 3.227606] rtw89_8852be 0000:09:00.0: loaded firmware
> rtw89/rtw8852b_fw-1.bin
> [ 3.227870] rtw89_8852be 0000:09:00.0: enabling device (0000 -> 0003)
> [ 3.229682] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
> (da87cccd), cmd version 0, type 5
> [ 3.229684] rtw89_8852be 0000:09:00.0: Firmware version 0.29.29.5
> (da87cccd), cmd version 0, type 3
> [ 3.542579] rtw89_8852be 0000:09:00.0: chip rfe_type is 1
> [ 3.574406] rtw89_8852be 0000:09:00.0 wlp9s0: renamed from wlan0
>

Thanks for the help. I will submit this patch to upstream.

Ping-Ke