2019-07-10 04:41:31

by Ján Veselý

[permalink] [raw]
Subject: [5.2 regression] rtwpci + amd iommu

Hi,

after updating to 5.2 the wi-fi driver stopped working when the iommu
is enabled.
It fails to list the available wi-fi networks or connect to a known one.
booting with amd_iommu=off works around the problem.
The staging version in 5.1 and older worked OK with the iommu enabled

The device is:
04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE
802.11a/b/g/n/ac WiFi adapter

I do see an IOMMU error in dmesg, but the originating device does not
match the nics pci location:
Jul 08 15:03:14 host kernel: rtw_pci 0000:04:00.0: start vif
xx:xx:xx:xx:xx:xx on port 0
Jul 08 15:03:14 host kernel: iommu ivhd0: AMD-Vi: Event logged
[INVALID_DEVICE_REQUEST device=00:00.1 pasid=0x00000
address=0xfffffffdf8140200 flags=0x0a00]
Jul 08 15:03:14 host kernel: rtw_pci 0000:04:00.0: stop vif
xx:xx:xx:xx:xx:xx on port 0
Jul 08 15:03:14 host NetworkManager[790]: <info> [1562612594.8992]
device (wlp4s0): set-hw-addr: set MAC address to yy:yy:yy:yy:yy:yy
(scanning)
Jul 08 15:03:15 host kernel: rtw_pci 0000:04:00.0: start vif
yy:yy:yy:yy:yy:yy on port 0

let me know if I should provide any further info.
thanks,
Jan


2019-07-10 05:19:36

by Tony Chuang

[permalink] [raw]
Subject: RE: [5.2 regression] rtwpci + amd iommu

> Hi,
>
> after updating to 5.2 the wi-fi driver stopped working when the iommu
> is enabled.
> It fails to list the available wi-fi networks or connect to a known one.
> booting with amd_iommu=off works around the problem.
> The staging version in 5.1 and older worked OK with the iommu enabled
>
> The device is:
> 04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE
> 802.11a/b/g/n/ac WiFi adapter
>
> I do see an IOMMU error in dmesg, but the originating device does not
> match the nics pci location:
> Jul 08 15:03:14 host kernel: rtw_pci 0000:04:00.0: start vif
> xx:xx:xx:xx:xx:xx on port 0
> Jul 08 15:03:14 host kernel: iommu ivhd0: AMD-Vi: Event logged
> [INVALID_DEVICE_REQUEST device=00:00.1 pasid=0x00000
> address=0xfffffffdf8140200 flags=0x0a00]
> Jul 08 15:03:14 host kernel: rtw_pci 0000:04:00.0: stop vif
> xx:xx:xx:xx:xx:xx on port 0
> Jul 08 15:03:14 host NetworkManager[790]: <info> [1562612594.8992]
> device (wlp4s0): set-hw-addr: set MAC address to yy:yy:yy:yy:yy:yy
> (scanning)
> Jul 08 15:03:15 host kernel: rtw_pci 0000:04:00.0: start vif
> yy:yy:yy:yy:yy:yy on port 0
>
> let me know if I should provide any further info.
> thanks,
> Jan
>


Hi,

I am not sure if enabling MSI interrupt is going to help.
You can try the patch attached, if it works, I will send it to upstream.
Thanks

Yan-Hsuan


Attachments:
0001-rtw88-pci-add-MSI-interrupt-support.patch (4.96 kB)
0001-rtw88-pci-add-MSI-interrupt-support.patch

2019-07-10 06:13:01

by Ján Veselý

[permalink] [raw]
Subject: Re: [5.2 regression] rtwpci + amd iommu

Hi,

thanks for a prompt reply.
the patch applies with minor changes (the LPS mod param message and -2
lines offsets), but it works.
The system now lists available wi-fi networks and connects to known
networks all while the iommu is enabled.

feel free to add my tested-by,
regards,
Jan

On Wed, Jul 10, 2019 at 1:12 AM Tony Chuang <[email protected]> wrote:
>
> > Hi,
> >
> > after updating to 5.2 the wi-fi driver stopped working when the iommu
> > is enabled.
> > It fails to list the available wi-fi networks or connect to a known one.
> > booting with amd_iommu=off works around the problem.
> > The staging version in 5.1 and older worked OK with the iommu enabled
> >
> > The device is:
> > 04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE
> > 802.11a/b/g/n/ac WiFi adapter
> >
> > I do see an IOMMU error in dmesg, but the originating device does not
> > match the nics pci location:
> > Jul 08 15:03:14 host kernel: rtw_pci 0000:04:00.0: start vif
> > xx:xx:xx:xx:xx:xx on port 0
> > Jul 08 15:03:14 host kernel: iommu ivhd0: AMD-Vi: Event logged
> > [INVALID_DEVICE_REQUEST device=00:00.1 pasid=0x00000
> > address=0xfffffffdf8140200 flags=0x0a00]
> > Jul 08 15:03:14 host kernel: rtw_pci 0000:04:00.0: stop vif
> > xx:xx:xx:xx:xx:xx on port 0
> > Jul 08 15:03:14 host NetworkManager[790]: <info> [1562612594.8992]
> > device (wlp4s0): set-hw-addr: set MAC address to yy:yy:yy:yy:yy:yy
> > (scanning)
> > Jul 08 15:03:15 host kernel: rtw_pci 0000:04:00.0: start vif
> > yy:yy:yy:yy:yy:yy on port 0
> >
> > let me know if I should provide any further info.
> > thanks,
> > Jan
> >
>
>
> Hi,
>
> I am not sure if enabling MSI interrupt is going to help.
> You can try the patch attached, if it works, I will send it to upstream.
> Thanks
>
> Yan-Hsuan

2019-07-26 19:39:38

by Brian Norris

[permalink] [raw]
Subject: Re: [5.2 regression] rtwpci + amd iommu

Hi Tony,

Can you please submit that patch upstream soon?

Thanks,
Brian

On Tue, Jul 9, 2019 at 11:10 PM Ján Veselý <[email protected]> wrote:
...
> feel free to add my tested-by,
...

> On Wed, Jul 10, 2019 at 1:12 AM Tony Chuang <[email protected]> wrote:
...
> > I am not sure if enabling MSI interrupt is going to help.
> > You can try the patch attached, if it works, I will send it to upstream.
> > Thanks
> >
> > Yan-Hsuan

2019-07-30 04:56:04

by Tony Chuang

[permalink] [raw]
Subject: RE: [5.2 regression] rtwpci + amd iommu


> Hi Tony,
>
> Can you please submit that patch upstream soon?
>
> Thanks,
> Brian
>

Sure! I can submit it today.

Yan-Hsuan