Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14249 closed bug (fixed)

Upgrade atheroswifi driver to FreeBSD 11.1

Reported by: waddlesplash Owned by: waddlesplash
Priority: normal Milestone: Unscheduled
Component: Drivers/Network/atheroswifi Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Attachments (10)

AsusUX31_2018-07-07_23-17-12_driver not seen.png (177.8 KB ) - added by starsseed 6 years ago.
screenshot showing the driver is not visible in PackageFS
syslog (297.9 KB ) - added by starsseed 6 years ago.
syslog
syslog.2 (128.4 KB ) - added by khallebal 6 years ago.
atheroswifi (1.1 MB ) - added by waddlesplash 6 years ago.
v3; for x86_gcc2
previous_syslog (114.0 KB ) - added by khallebal 6 years ago.
previous_syslog-x86_64 (163.6 KB ) - added by return_0e 6 years ago.
atheroswifi_64 (1.3 MB ) - added by waddlesplash 6 years ago.
v4; for x86_64
syslog-x86_64-v4 (512.0 KB ) - added by return_0e 6 years ago.
syslog-x86_64-ar9485 (512.0 KB ) - added by return_0e 6 years ago.
previous_syslog.2 (262.3 KB ) - added by khallebal 6 years ago.

Change History (42)

comment:1 by starsseed, 6 years ago

  • I disabled the packaged old atheroswifi driver (it doesn't appear any more)
  • I copied the new atheroswifi driver in /system/non-packaged/add-ons/kernel/drivers/bin
  • chmod 755 atheroswifi
  • reboot

and the drivers doesn't appears in the PackageFS /boot/system/add-ons/kernel/drivers/bin directory. (see attached screenshot)

any idea ?

by starsseed, 6 years ago

screenshot showing the driver is not visible in PackageFS

comment:2 by waddlesplash, 6 years ago

It will not appear in packagefs, the kernel will load it from non-packaged. But you need to copy it *after* rebooting; please follow my instructions from the post more closely.

comment:3 by starsseed, 6 years ago

Of course I copy it *after* rebooting (since I checked for the packaged atheroswifi driver for being disabled )

Now, if I execute listimage, the new driver is not listed. however the syslog contains the following lines

KERN: driver "atheroswifi" added
KERN: [atheroswifi] () couldn't find symbol __fbsd_ath_pci
KERN: Last message repeated 12 times.

NB : I updated my system to hrev52080 just before installing the new driver.

comment:4 by waddlesplash, 6 years ago

OK, sorry about that, please try this new build.

comment:5 by starsseed, 6 years ago

  • The new atheroswifi driver seems to be detected at boot.
  • When I execute listimage, the new driver is not listed. (I join my syslog)

Did you add the pciid [168c:0032] to the driver ?

comment:6 by waddlesplash, 6 years ago

If the driver is in non-packaged/bin, it will not be loaded at boot. Are you sure you blacklisted the old driver correctly? Again, you should be copying the driver in after boot.

comment:7 by starsseed, 6 years ago

Are you sure you blacklisted the old driver correctly?

yes sure, both add-ons/kernel/drivers/bin/atheroswifi and add-ons/kernel/drivers/dev/net/atheroswifi.

Again, you should be copying the driver in after boot.

Here is what I do :

  • I check for atheroswifi not in /boot/system/add-ons/kernel/drivers/bin.
  • I check for atheroswifi not in /boot/system/add-ons/kernel/drivers/dev/net.
  • I check that /boot/system/non-packaged/add-ons/kernel/drivers/bin is empty.
  • I reboot.
  • I move atheroswifi into /boot/system/non-packaged/add-ons/kernel/drivers/bin.
  • KERN: driver "atheroswifi" added is instantly added to the syslog file. Nothing more appends.
  • listimage|grep atheroswifi doesn't show anything (except the command itself).
  • I reboot.
  • nothing more appends.
  • if I remove atheroswifi from /boot/system/non-packaged/add-ons/kernel/drivers/binthen KERN: driver "atheroswifi" removed is instantly added to the syslog.

(syslog updated)

by starsseed, 6 years ago

Attachment: syslog added

syslog

comment:8 by korli, 6 years ago

weird, I thought the binary should be moved to /boot/system/non-packaged/add-ons/kernel/drivers/dev/net.

comment:9 by waddlesplash, 6 years ago

Nope, that's actually not necessary.

by khallebal, 6 years ago

Attachment: syslog.2 added

comment:10 by khallebal, 6 years ago

For me copying the driver to the non-packaged location results in KDL

PANIC: _mutex_lock(): called with interrupts disabled for lock 0xd02f90d0

Tried several times with both locations sys & user one, it gets everytime to KDL.

Syslog attached.

comment:11 by waddlesplash, 6 years ago

Aha, that's useful; it looks like a bug on my part. I'll take a look later today.

comment:12 by v.vill, 6 years ago

Greetings,
for what it's worth, I have the exact same problem as star's seed above. Except my card is an Atheros/Qualcomm QCA9565/AR9565, with hrev52088 on x86_64.
(And unlike you guys, I can't find any detailed info in the syslog, other than "driver atheroswifi removed/reloaded" when I move it in- and outside of the kernel tree. I'm not sure how I can increase verbosity/debugging output here...)

by waddlesplash, 6 years ago

Attachment: atheroswifi added

v3; for x86_gcc2

comment:13 by waddlesplash, 6 years ago

@khaled, I believe I've fixed that error; try this driver.

in reply to:  13 comment:14 by khallebal, 6 years ago

Replying to waddlesplash:

@khaled, I believe I've fixed that error; try this driver.

Unfortunately it still makes the system crash, with a somewhat different panic msg.

PANIC: _mutex_lock(): double lock of 0xd04067c4 by thread 561

the full log included.

by khallebal, 6 years ago

Attachment: previous_syslog added

by return_0e, 6 years ago

Attachment: previous_syslog-x86_64 added

in reply to:  10 comment:15 by return_0e, 6 years ago

Replying to khaled:

For me copying the driver to the non-packaged location results in KDL

PANIC: _mutex_lock(): called with interrupts disabled for lock 0xd02f90d0

Tried several times with both locations sys & user one, it gets everytime to KDL.

The same issue happens on x86_64 in hrev52092 when copying the renamed atheroswifi driver to the non-packaged directory. I've attached the syslog of this here.

comment:16 by waddlesplash, 6 years ago

Component: Drivers/NetworkDrivers/Network/atheroswifi
Summary: Upgrade WiFi drivers to FreeBSD 11.1Upgrade atheroswifi driver to FreeBSD 11.1

by waddlesplash, 6 years ago

Attachment: atheroswifi_64 added

v4; for x86_64

comment:17 by return_0e, 6 years ago

I'm able to connect to several access points on this Atheros card (AR928X) and it appears that v4 on x86_64 works fine on it. Tested on hrev52092. Attached syslog of the driver running on my machine.

by return_0e, 6 years ago

Attachment: syslog-x86_64-v4 added

comment:18 by waddlesplash, 6 years ago

Resolution: fixed
Status: assignedclosed

Merged in hrev52093. Thanks for testing!

@vvill, @starsseed: I wonder if your issues might be related to #6423. Try the workaround(s) in that ticket after updating to hrev52093 or later.

in reply to:  18 comment:19 by starsseed, 6 years ago

Replying to waddlesplash:

@starsseed: I wonder if your issues might be related to #6423. Try the workaround(s) in that ticket after updating to hrev52093 or later.

I will test Saturday (when I will be home). But, reading your patch hrev52093, I was thinking to a few things:
V.Vill's AR9565 and my AR9485 (like all post-AR9300 chipsets added since FreeBSD 10) require a firmware and I don't see anything related to that in the patch. So, how does it work? Do we need to copy a firmware file somewhere?

comment:20 by waddlesplash, 6 years ago

Oh, I missed that. But if they do, there should have been an error message in the syslog stating that a firmware was needed, and what its name was. I can add those pretty easily once we know what they are.

comment:21 by waddlesplash, 6 years ago

Ah, it seems I missed adding the AR9300+ HAL, which would explain why there is no messages besides "driver loaded." I'll do that when I get home today.

in reply to:  21 comment:22 by starsseed, 6 years ago

Replying to waddlesplash
Note, I'm not sure about the firmware, I've found conflicting informations.

comment:23 by waddlesplash, 6 years ago

I've merged the AR9300 HAL in hrev52095. Please try again after that.

comment:24 by return_0e, 6 years ago

I can also confirm that the AR9485 on Haiku hrev52097 x86_64 is successfully recognized and connects to the internet. Attached a syslog of the wifi card working on my PC.

by return_0e, 6 years ago

Attachment: syslog-x86_64-ar9485 added

comment:25 by khallebal, 6 years ago

Resolution: fixed
Status: closedreopened

After updating my system to hrev52094 the driver does work but renders the audio playback slower and sttutering, to make sure that it's not something else causing this behaviour, i extracted the driver to an earlier hrev52084 and the result is the same, the syslog is fludded with kernel messages. See syslog below.

by khallebal, 6 years ago

Attachment: previous_syslog.2 added

comment:26 by waddlesplash, 6 years ago

Resolution: fixed
Status: reopenedclosed

Technically that is a new issue; please open a new ticket for that.

Probably the audio stuttering is directly caused by the syslog spam; it appears to be writing a new line every 90-100ms or so, which would certainly eat up a lot of time writing to disk. I'll disable the print when I have time later today.

comment:27 by khallebal, 6 years ago

New ticket #14270 created

comment:28 by starsseed, 6 years ago

Thank you Waddlesplash. The AR9485 adapter runs fine for me under hrev52097.
And many thanks to Adrian Chadd for his huge work on the FreeBSD wifi Drivers!

posted from webpositive thru an Atheros AR9485 wifi adapter

comment:29 by v.vill, 6 years ago

Yes!! I can add that the AR9565 chip is working fine as well, even though it did take me a few tries (and a few KDL moments).

@waddlesplash: you were right, even when the atheroswifi (with your latest commit) began to actually be recognized and loaded, I ran into issues related to #6423 and I had to reset all previously known (i.e. wired) interfaces.

Many, many thanks!

comment:30 by v.vill, 6 years ago

Darn. For the last dozen boots, I've been stuck with a KDL kernel panic (the only way I could finish booting was by blacklisting the atheroswifi driver and using a wired connection again). The relevant line appears to be a
vm_page_fault: unhandled page fault in kernel space
exception.

Furthermore, the syslog includes many lines such as:

KERN: [atheroswifi] (ath_pci) ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
KERN: [atheroswifi] (ath_pci) ath_edma_rxbuf_alloc: nothing on rxbuf?!

Here's whatever KDL output I could photograph:

If there's anything I can provide for more detailed info, please let me know.

Last edited 6 years ago by v.vill (previous) (diff)

comment:31 by waddlesplash, 6 years ago

Please open a new ticket for that, and attach (not link) to those photos. Please also run the "syslog" command at the KDL prompt, press Space until the output stops, and take a picture of that screen.

in reply to:  31 comment:32 by v.vill, 6 years ago

Replying to waddlesplash:

Please open a new ticket for that

Thanks! Added as #14282.

Note: See TracTickets for help on using tickets.