New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some PCIe cards may not be detected on certain OSes #115

Open
miczyg1 opened this Issue Aug 27, 2018 · 30 comments

Comments

Projects
None yet
4 participants
@miczyg1
Copy link
Contributor

miczyg1 commented Aug 27, 2018

mPCIe extension cards often require correct kernel modules/drivers and/or firmware blobs. If the card is not detected, be sure to check whether all needed modules and drivers are present on the system.

Also have a look at the mPCIe capabilities and connection to mPCIe ports on apu boards:
https://github.com/pcengines/apu2-documentation/blob/master/docs/APU_mPCIe_capabilities.md
Certain cards may require USB signals or SIM cards signals connected to the port. Be sure to match the mPCIe card requirements with correct mPCIe port to enable all features of the module.

@nicklowe

This comment has been minimized.

Copy link

nicklowe commented Aug 27, 2018

Thanks for adding this. There may be other related issues, however. I don't think this covers:

http://pcengines.info/forums/?page=post&id=DB3EE6E0-9ABA-4E0D-9960-9A995DD20B91&fid=DF5ACB70-99C4-4C61-AFA6-4C0E0DB05B2A

http://pcengines.info/forums/?page=post&id=68A48B1E-5F35-40BB-B4B9-10C362A92F3B&fid=DC038CE7-688B-4FD7-A449-014010E444D1

I suspect this is occurring because of a coreboot interoperability issue.

Could the suggestion from QCA be followed up if it is not on the radar currently?

"QCA had helped to look at the problem and found that the incompatible motherboard’s CPU-PCIe-TX signal came out 150ms after PCIe-reset, unlike common Intel motherboards in the market, which had the CPU-PCIe-TX signal out in about 30ms after PCIe-reset. QCA believed that the timing of the CPU-PCIe-TX signal can be altered through BIOS."

https://bugzilla.kernel.org/show_bug.cgi?id=84821#c48

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Aug 27, 2018

@nicklowe thank You for Your feedback. We simply do not possess all possible hardware to test, but now we can consider equiping our apus with those modules to fix the problem, thanks to Your input.

We will try to reproduce and investigate the issue with currently owned Compex mPCIe modules for now. Of course we would gladly continue the thread and publish the information and status of our effort on PC Engines forum.

@pietrushnic FYI.

@miczyg1 miczyg1 added the 4.8.0.5 label Aug 27, 2018

@miczyg1 miczyg1 self-assigned this Aug 27, 2018

@pietrushnic

This comment has been minimized.

Copy link
Member

pietrushnic commented Aug 27, 2018

@nicklowe thanks for contribution. We should publish the hardware matrix that we testing and think about investing in above Compex modules.

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Sep 5, 2018

I'm trying to use a wireless card WLE1216V5-20 7A (source) and its detection is a little tricky and bios related. Maybe related to what @nicklowe described.

For example, with bios version v4.0.7 (came by default) the card is only detected with a second soft reboot. Multiple hard reboots does not allow the card to be detected.

With bios version v4.0.11 legacy and later the card is only detected if at bios F10 is pressed and "setup" is selected, it does not matter if new bios settings are saved or not.

Any thoughts? Is this a SeaBios related issue or Coreboot?

By the way download links for v4.0.9 and v4.0.10 are broken from https://pcengines.github.io/#mr-14

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Sep 5, 2018

@gilfrade thank You for Your feedback. Have a look at CHANGELOG we have added some quirk for mPCIe2 port since v4.0.11. It may be influencing the card detection. Could You try v4.0.10 whether it behaves the same as v4.0.7? Also what slot do You use when connecting the card?

It seems like the older release links expired on pcengines site. I would have to ask person responsible for hosting what happened. For now You may download them here:

I would appreciate if You could check it.

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Sep 6, 2018

@miczyg1 thank you for your quick response. I made another round of tests that i included on the anexed file WLE1216V5-20_APU2.zip

The tests where made using APU2 with the card on slot2, all methods fail on slot1. Changing the bios option of forcing mpcie2 clock quirk when available with no change in results. Also tried changing bios options to match the defaults on v4.0.7 but made no difference.

@pietrushnic

This comment has been minimized.

Copy link
Member

pietrushnic commented Sep 8, 2018

@gilfrade we are a little bit busy with osfc2018 we will take care of that in coming release. Unfortunately, we don't have that card, so probably will rely on WLE{200NX,600VX,900VX} and see if we can improve the situation for all. Please be patient this may take time till v4.8.0.5 or further version. Meanwhile, I have nothing else to offer then using old legacy versions.

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Sep 10, 2018

@pietrushnic i have the following cards WLE{200NX,600VX,900VX,216V5-20,650V5-18}

The cards WLE{200NX,600VX,900VX} have been working great with no issues regarding compatibility with mainboard.
The card WLE{650V5-18} have not been fully tested but it is detected and runs normally.
The card WLE{216V5-20} is the only with detection issues, when detected i have not encountered any issues running it.

The tests were made with APU2C2, but i also have APU3A2. I am available to help you test bios build changes.

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Oct 8, 2018

Any news about this issue? I can help testing.

@pietrushnic

This comment has been minimized.

Copy link
Member

pietrushnic commented Oct 9, 2018

@miczyg1 can we provide debug version of v4.8.0.5, @gilfrade any chance you can use pce-fw-builder to build firmware by yourself?

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Oct 11, 2018

@pietrushnic Yes, i can do that.

@pietrushnic

This comment has been minimized.

Copy link
Member

pietrushnic commented Oct 29, 2018

@gilfrade any luck with building and testing version with verbose logging? Best would be spew level 8 since it is most verbose.

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Nov 2, 2018

@pietrushnic Sorry i was waiting for @miczyg1 answer before proceding. Anyway i tried using pce-fw-builder but it stops when it tries to run "docker run" with error.

./build.sh release v4.8.0.5 apu2
or
./build.sh dev-build `pwd`/release/coreboot apu2

after cloning and downloading docker image it stops at

/bin/bash: /home/coreboot/scripts/pce-fw-builder.sh: Permission denied

I'm using Fedora 28 Workstation. What steps can i use to debug the docker error?

Update: It was a conflict with selinux. Making "sudo setenforce 0" temporary allows the process to continue.

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Nov 5, 2018

@gilfrade have You successfully built the firmware using pce-fw-builder? Any news about WLE{216V5-20}?

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Nov 9, 2018

@gilfrade I have produced debug binary for You:

apu2_v4.8.0.5_debug

This has to be rather PCI initialization problem. I have tried before to figure something out with external PCI devices on apu based on firmware log, but coreboot does not care for non-static PCI devices and does not enable them in early phases (although it does for ethernet controllers). They are later enabled by either SeaBIOS or kernel itself.

Try it and please send me the logs. You may also try to pass amd_iommu=off to kernel cmdline to see if it helps on v4.8.0.3 and later versions.

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Nov 28, 2018

@gilfrade any results?

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Nov 30, 2018

@miczyg1 sorry for the delay, i was waiting for the flash recovery adapter just in case of failure. Here is the bios output with WLE{216V5-20}:

apu2_v4.8.0.5_debug.log

In sum, it did not detect the radio card even with amd_iommu=off. Can you produce a debug bios of v4.0.7? This is the only one that detects the board on a reboot after first boot, maybe we can identify differences.

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Nov 30, 2018

@gilfrade thank You, of course we can try 4.0.7. From the log I can see that coreboot and SeaBIOS both detect a child device on the bridge (PCI 4:0.0) and assign resources, io, memory etc. The PCI ID is 168c:002a which matches the Qualcomm Atheros AR928X. The only thing that bothers me is:

PCI IRQ: Found device 0:02.04 using PIN D
PCI Devfn (0x14) not found in pirq_data table
PCI IRQ: Found device 0:02.05 using PIN A
PCI Devfn (0x15) not found in pirq_data table

I will try to do something about it. For now lets try these two binaries:

Also would You mind sending me also a dmesg output for 4.0.7 both working and not working + 4.8.0.6 working (if hopefully will work) and not working cases?

apu2_v4.8.0.6_debug
apu2_v4.0.7_debug

v4.0.7 may have problems with iPXE, however if You have dhcp server set up properly, it may work. v4.0.7 version is a little bit archaic and support very old build procedure, not maintained anymore, so it may not work exactly the same way as release binary.

Also be aware to not flash the SPI recovery dongle. After booting OS, remove the dongle, before flashing.

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Nov 30, 2018

@miczyg1 forgot to mention that i also have a WLE{200NX} in the board mpcie1, this radio has been working properly with every bios version tested. WLE{216V5-20} is in mpcie2.

apu2_v4.0.7_debug.log
apu2_v4.8.0.6_debug.log

In sum, in v4.0.7 WLE{216V5-20} is detected on reboot right after first boot although in this debug version fails to load ath10k firmware.
In v4.8.0.6 it is not detected.

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Nov 30, 2018

@miczyg1 here is dmesg of stable v4.0.7 and v4.8.0.6_debug

dmesg_v4.0.7.log
dmesg_v4.8.0.6_debug.log

@nicklowe

This comment has been minimized.

Copy link

nicklowe commented Jan 4, 2019

Any update on this?

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Jan 9, 2019

@gilfrade @nicklowe in the logs I can see that the WLE216V5-20 is not detected by coreboot and/or SeaBIOS at all (except 4.0.7 after reboot) and thus PCIe bridge is not being enabled, resources are not assigned etc. This is a firmware problem. I will think what we can do to solve the problem (probably will send some binaries to You for testing). We do not have this particular WiFi card (we only have WLE200NX which works well), so it might be difficult or just take much time to find the root cause.

@nicklowe

This comment has been minimized.

Copy link

nicklowe commented Jan 9, 2019

Hi Michał,

Understood, thanks so much for your efforts here!

As a gift with no obligation or expectations of success on my behalf and purely to try and help out, I have ordered and paid for a WLE1216V5-20 card from compexshop.com to be delivered in your name to the 3mdeb office.

Regards,

Nick

@gilfrade

This comment has been minimized.

Copy link

gilfrade commented Jan 9, 2019

@miczyg1 i'm available to help with testing, send me some binaries whenever you need.

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Jan 10, 2019

Hi Nick,

I bow before Your kindness and generosity. We will put in the best effort to achieve positive results with the WLE1216V5-20.

Best regards,
Michał

@nicklowe

This comment has been minimized.

Copy link

nicklowe commented Jan 14, 2019

Hi Michal,

Please can you let me know if you received the card today? The tracking says it should have been delivered. I just want to check that it has arrived safely! :-)

Cheers,

Nick

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Jan 14, 2019

Hi Nick,

Yes, I have receive the card today. It arrived safely and is already connected for testing. Really appreciate that.

Regards,
Michał

@nicklowe

This comment has been minimized.

Copy link

nicklowe commented Jan 23, 2019

Hi Michał,

Thanks for looking, hopefully it reproduced!

Best,

Nick

@miczyg1

This comment has been minimized.

Copy link
Contributor Author

miczyg1 commented Jan 23, 2019

@nicklowe yes it reproduces well (at least doesn't work for all firmware versions). I have not tried the lucky 4.0.7 firmware yet

@nicklowe

This comment has been minimized.

Copy link

nicklowe commented Feb 12, 2019

Hi Michał,

Thanks for confirming that it reproduces, I am pleased the issue can at least be observed first hand. It's a weird one!

Best,

Nick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment