driver athn crash on hostap mode since OpenBSD 6.5 release

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

driver athn crash on hostap mode since OpenBSD 6.5 release

Stéphane Guedon
>Synopsis: Atheros card AR5B91 crash on mode hostap on OBSD 6.5
>Category: driver
>Environment:
        System      : OpenBSD 6.5
        Details     : OpenBSD 6.5 (GENERIC.MP) #0: Wed Apr 24 23:38:54 CEST 2019
                         [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:
        As OpenBSD 6.5 was released and installed, the athn driver on the card (AR5B91) kept crashing.
        The driver would simply echo "device timeout" on the console and eventually, kernel would crash.
        It reveals after tests that the hostap mode is guilty. Note that no previous release made any trouble with this hardware.
>How-To-Repeat:
        Putting the device up on hostap mode.
>Fix:
        Putting the device down (ifconfig athn0 down) would stop it.
        Putting the device out of the hostap mode (ifconfig athn0 media -mediaopt hostap) while running.


dmesg:
OpenBSD 6.5 (GENERIC.MP) #0: Wed Apr 24 23:38:54 CEST 2019
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2098520064 (2001MB)
avail mem = 2025345024 (1931MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7e16d820 (7 entries)
bios0: vendor coreboot version "4.0" date 09/08/2014
bios0: PC Engines APU
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP SPCR HPET APIC HEST SSDT SSDT SSDT
acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PE20(S4) PE21(S4) PE22(S4) PE23(S4) PIBR(S4) UOH1(S3) UOH2(S3) UOH3(S3) UOH4(S3) UOH5(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD G-T40E Processor, 1000.13 MHz, 14-02-00
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 16-way L2 cache
cpu0: 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD G-T40E Processor, 1000.00 MHz, 14-02-00
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 16-way L2 cache
cpu1: 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 21, 24 pins
acpiprt0 at acpi0: bus -1 (AGPB)
acpiprt1 at acpi0: bus -1 (HDMI)
acpiprt2 at acpi0: bus 1 (PBR4)
acpiprt3 at acpi0: bus 2 (PBR5)
acpiprt4 at acpi0: bus 3 (PBR6)
acpiprt5 at acpi0: bus 4 (PBR7)
acpiprt6 at acpi0: bus 6 (PE20)
acpiprt7 at acpi0: bus -1 (PE21)
acpiprt8 at acpi0: bus -1 (PE22)
acpiprt9 at acpi0: bus -1 (PE23)
acpiprt10 at acpi0: bus 0 (PCI0)
acpiprt11 at acpi0: bus 5 (PIBR)
acpicpu0 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
acpicmos0 at acpi0
acpibtn0 at acpi0: PWRB
cpu0: 1000 MHz: speeds: 1000 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 14h Host" rev 0x00
ppb0 at pci0 dev 4 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address 00:0d:b9:3e:a8:10
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ppb1 at pci0 dev 5 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci2 at ppb1 bus 2
re1 at pci2 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address 00:0d:b9:3e:a8:11
rgephy1 at re1 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ppb2 at pci0 dev 6 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci3 at ppb2 bus 3
re2 at pci3 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address 00:0d:b9:3e:a8:12
rgephy2 at re2 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ppb3 at pci0 dev 7 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci4 at ppb3 bus 4
ral0 at pci4 dev 0 function 0 "Ralink RT2790" rev 0x00: apic 2 int 19, address 00:15:af:bc:a9:5b
ral0: MAC/BBP RT2872 (rev 0x0200), RF RT2720 (MIMO 1T2R)
ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x40: apic 2 int 19, AHCI 1.2
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, KINGSTON SMS200S, 60AA> SCSI3 0/direct fixed naa.50026b726b02a8b8
sd0: 28626MB, 512 bytes/sector, 58626288 sectors, thin
ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
ohci1 at pci0 dev 19 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x42: polling
iic0 at piixpm0
pcib0 at pci0 dev 20 function 3 "ATI SB700 ISA" rev 0x40
ppb4 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x40
pci5 at ppb4 bus 5
ohci2 at pci0 dev 20 function 5 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support
ppb5 at pci0 dev 21 function 0 "ATI SB800 PCIE" rev 0x00
pci6 at ppb5 bus 6
athn0 at pci6 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 2 int 16
athn0: AR9280 rev 2 (1T2R), ROM rev 16, address 00:24:2b:72:d1:df
ohci3 at pci0 dev 22 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support
ehci2 at pci0 dev 22 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17
usb2 at ehci2: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
pchb1 at pci0 dev 24 function 0 "AMD AMD64 14h Link Cfg" rev 0x43
pchb2 at pci0 dev 24 function 1 "AMD AMD64 14h Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 14h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 14h Misc Cfg" rev 0x00
pchb4 at pci0 dev 24 function 4 "AMD AMD64 14h CPU Power" rev 0x00
pchb5 at pci0 dev 24 function 5 "AMD AMD64 14h Reserved" rev 0x00
pchb6 at pci0 dev 24 function 6 "AMD AMD64 14h NB Power" rev 0x00
pchb7 at pci0 dev 24 function 7 "AMD AMD64 14h Reserved" rev 0x00
usb3 at ohci0: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb4 at ohci1: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "ATI OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x2e/2: NCT5104D rev 0x52
usb5 at ohci2: USB revision 1.0
uhub5 at usb5 configuration 1 interface 0 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb6 at ohci3: USB revision 1.0
uhub6 at usb6 configuration 1 interface 0 "ATI OHCI root hub" rev 1.00/1.00 addr 1
vmm0 at mainbus0: SVM/RVI
umass0 at uhub2 port 1 configuration 1 interface 0 "Generic Flash Card Reader/Writer" rev 2.01/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: <Multiple, Card Reader, 1.00> SCSI2 0/direct removable serial.058f6366058F63666485
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd0a (f8a6915e5f899293.a) swap on sd0b dump on sd0b

usbdevs:
Controller /dev/usb0:
addr 01: 1002:0000 ATI, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub0
Controller /dev/usb1:
addr 01: 1002:0000 ATI, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub1
Controller /dev/usb2:
addr 01: 1002:0000 ATI, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub2
addr 02: 058f:6366 Generic, Flash Card Reader/Writer
         high speed, power 100 mA, config 1, rev 1.00, iSerial 058F63666485
         driver: umass0
Controller /dev/usb3:
addr 01: 1002:0000 ATI, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub3
Controller /dev/usb4:
addr 01: 1002:0000 ATI, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub4
Controller /dev/usb5:
addr 01: 1002:0000 ATI, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub5
Controller /dev/usb6:
addr 01: 1002:0000 ATI, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub6

It did happen one or two times during tests that just as I put the device out of hostap, then a kernel crash would occur.

Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stefan Sperling-5
On Fri, May 03, 2019 at 09:37:31PM +0200, [hidden email] wrote:

> >Synopsis: Atheros card AR5B91 crash on mode hostap on OBSD 6.5
> >Category: driver
> >Environment:
> System      : OpenBSD 6.5
> Details     : OpenBSD 6.5 (GENERIC.MP) #0: Wed Apr 24 23:38:54 CEST 2019
> [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Architecture: OpenBSD.amd64
> Machine     : amd64
> >Description:
> As OpenBSD 6.5 was released and installed, the athn driver on the card (AR5B91) kept crashing.
> The driver would simply echo "device timeout" on the console and eventually, kernel would crash.

Crash how? You must include a ddb trace when reporting kernel crashes.

> It reveals after tests that the hostap mode is guilty. Note that no previous release made any trouble with this hardware.
> >How-To-Repeat:
> Putting the device up on hostap mode.
> >Fix:
> Putting the device down (ifconfig athn0 down) would stop it.
> Putting the device out of the hostap mode (ifconfig athn0 media -mediaopt hostap) while running.

> athn0 at pci6 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 2 int 16
> athn0: AR9280 rev 2 (1T2R), ROM rev 16, address 00:24:2b:72:d1:df

I have the same device running in hostap mode on 6.5 and I am
continously using it without issues.

I don't see this problem locally.

Can you please try to narrow down the circumstances which trigger
the problem a bit further?

"device timeout" means that a frame could not be sent.
Are you somehow creating conditions where the this could occur?
is this problem triggered by particular client devices?

Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stéphane Guedon

Le 04.05.2019 à 18.34, Stefan Sperling a écrit :

> On Fri, May 03, 2019 at 09:37:31PM +0200, [hidden email] wrote:
>>> Synopsis: Atheros card AR5B91 crash on mode hostap on OBSD 6.5
>>> Category: driver
>>> Environment:
>> System      : OpenBSD 6.5
>> Details     : OpenBSD 6.5 (GENERIC.MP) #0: Wed Apr 24 23:38:54 CEST 2019
>> [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>>
>> Architecture: OpenBSD.amd64
>> Machine     : amd64
>>> Description:
>> As OpenBSD 6.5 was released and installed, the athn driver on the card (AR5B91) kept crashing.
>> The driver would simply echo "device timeout" on the console and eventually, kernel would crash.
> Crash how? You must include a ddb trace when reporting kernel crashes.

First time I encourted it, I had at least three crashs. But when I
indeed made the report, I could not provide a ddb.

Now, I reproduce the bug, the kernel indeed does not crash but hold on
stubbornly. This is annoying.

>> It reveals after tests that the hostap mode is guilty. Note that no previous release made any trouble with this hardware.
>>> How-To-Repeat:
>> Putting the device up on hostap mode.
>>> Fix:
>> Putting the device down (ifconfig athn0 down) would stop it.
>> Putting the device out of the hostap mode (ifconfig athn0 media -mediaopt hostap) while running.
>> athn0 at pci6 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 2 int 16
>> athn0: AR9280 rev 2 (1T2R), ROM rev 16, address 00:24:2b:72:d1:df
> I have the same device running in hostap mode on 6.5 and I am
> continously using it without issues.
>
> I don't see this problem locally.
>
> Can you please try to narrow down the circumstances which trigger
> the problem a bit further?
>
> "device timeout" means that a frame could not be sent.
> Are you somehow creating conditions where the this could occur?
> is this problem triggered by particular client devices?

Not that I am aware of.

This happens as soon as I do anything with the device (Yes I know, I
wish I could provide more info).

Actually, for the whole purpose of testing, I disabled the two actions I
thought could trigger : I disabled dhcpcd ipv6 address assignement (I
put the address statically in config' instead) and I did not start dnsmasq.

I also changed physically the card into the other card slot, still timeout.

Clients outside cannot actually connect to the wifi.

Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stefan Sperling-5
On Sun, May 05, 2019 at 10:52:41AM +0200, Stéphane Guedon wrote:
> > "device timeout" means that a frame could not be sent.
> > Are you somehow creating conditions where the this could occur?
> > is this problem triggered by particular client devices?
>
> Not that I am aware of.
>
> This happens as soon as I do anything with the device (Yes I know, I wish I
> could provide more info).

You can provide more info but it will require you to do some work.

We need to find out which commit to sys/dev/ic/athn.c broke things for you.

You can narrow down the timeframe by booting and testing kernels from
http://ftp.hostserver.de/archive/

Commits are listed at https://cvsweb.openbsd.org/src/sys/dev/ic/athn.c
If you are familiar with diff/patch/cvs then you already know how to back
out a commit and build a new kernel to test. If you aren't, I will try
to help once you have identified the timeframe of the breaking change.

Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stéphane Guedon

Le 08.05.2019 à 22.28, Stefan Sperling a écrit :

> On Wed, May 08, 2019 at 10:19:48PM +0200, Stéphane Guedon wrote:
>> Actually, just to check, you ask me to download kernels from the past and
>> try to boot them. Just like that.
>> Right ?
> Yes.
>
>> I did that with two kernels : first the one from the 1st of February. Then
>> one from the 6th of January and they both react this way (device timeout)
>> when I activate the device with ifconfig. Either I do it wrong, or I should
>> find kernels from November-ish times.
>>
>> (I wish to help and not being too annoying. :) )
> Does a 6.4 kernel actually still work?
>
> If you can't find binaries please try to build old kernels and test them.
> You can also try back-dating the files I have changed in my athn commits.
> How exactly you go about this isn't important; we need to find out somehow
> which commit broke things.

I have some answers !

Today, I downloaded via cvs kernel sources of various dates and compiled.

A kernel build from sources of 15 weeks ago boots without trouble,
whereas a kernel from sources 14 weeks ago produces the bug !


Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Theo de Raadt-2
Stéphane Guedon <[hidden email]> wrote:

>
>
> Le 08.05.2019 à 22.28, Stefan Sperling a écrit :
> > On Wed, May 08, 2019 at 10:19:48PM +0200, Stéphane Guedon wrote:
> >> Actually, just to check, you ask me to download kernels from the past and
> >> try to boot them. Just like that.
> >> Right ?
> > Yes.
> >
> >> I did that with two kernels : first the one from the 1st of February. Then
> >> one from the 6th of January and they both react this way (device timeout)
> >> when I activate the device with ifconfig. Either I do it wrong, or I should
> >> find kernels from November-ish times.
> >>
> >> (I wish to help and not being too annoying. :) )
> > Does a 6.4 kernel actually still work?
> >
> > If you can't find binaries please try to build old kernels and test them.
> > You can also try back-dating the files I have changed in my athn commits.
> > How exactly you go about this isn't important; we need to find out somehow
> > which commit broke things.
>
> I have some answers !
>
> Today, I downloaded via cvs kernel sources of various dates and compiled.
>
> A kernel build from sources of 15 weeks ago boots without trouble,
> whereas a kernel from sources 14 weeks ago produces the bug !
>
>

Please provide exact dates.  If you want to really have a moment of joy,
you are 90% of the way so 10% more effort should find the specific commit!


Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stéphane Guedon

Le 12.05.2019 à 22.14, Theo de Raadt a écrit :

> Stéphane Guedon <[hidden email]> wrote:
>
>>
>> Le 08.05.2019 à 22.28, Stefan Sperling a écrit :
>>> On Wed, May 08, 2019 at 10:19:48PM +0200, Stéphane Guedon wrote:
>>>> Actually, just to check, you ask me to download kernels from the past and
>>>> try to boot them. Just like that.
>>>> Right ?
>>> Yes.
>>>
>>>> I did that with two kernels : first the one from the 1st of February. Then
>>>> one from the 6th of January and they both react this way (device timeout)
>>>> when I activate the device with ifconfig. Either I do it wrong, or I should
>>>> find kernels from November-ish times.
>>>>
>>>> (I wish to help and not being too annoying. :) )
>>> Does a 6.4 kernel actually still work?
>>>
>>> If you can't find binaries please try to build old kernels and test them.
>>> You can also try back-dating the files I have changed in my athn commits.
>>> How exactly you go about this isn't important; we need to find out somehow
>>> which commit broke things.
>> I have some answers !
>>
>> Today, I downloaded via cvs kernel sources of various dates and compiled.
>>
>> A kernel build from sources of 15 weeks ago boots without trouble,
>> whereas a kernel from sources 14 weeks ago produces the bug !
>>
>>
> Please provide exact dates.  If you want to really have a moment of joy,
> you are 90% of the way so 10% more effort should find the specific commit!

So I actually did it again with exact dates this time. And narrowed the
thing just a bit more (sic).

I have a kernel built from the sources from the 1st of february running
now, no trouble (cvs status for the Makefile in amd64/compile/GENERIC.MP
indicate Sticky Date: 2019.01.31.23.00.00 ).

The kernel running from the 3rd of february sources is buggy (athn
device timeout).

I hope it can help.

Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stefan Sperling-5
On Sun, May 12, 2019 at 11:30:24PM +0200, Stéphane Guedon wrote:
> So I actually did it again with exact dates this time. And narrowed the
> thing just a bit more (sic).
>
> I have a kernel built from the sources from the 1st of february running now,
> no trouble (cvs status for the Makefile in amd64/compile/GENERIC.MP indicate

> Sticky Date: 2019.01.31.23.00.00 ).
>
> The kernel running from the 3rd of february sources is buggy (athn device
> timeout).
>
> I hope it can help.

Please show the first lines ($OpenBSD ...$) of the following files
for both your working, and non-working, kernels:

sys/dev/ic/athn.c
sys/dev/ic/athnvar.h
sys/dev/ic/ar5008.c
sys/dev/ic/ar5416.c
sys/dev/ic/ar5416reg.h
sys/dev/ic/ar9280.c
sys/dev/ic/ar928reg.h

Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stéphane Guedon
13 mai 2019 01:06 "Stefan Sperling" <[hidden email]> a écrit:

> On Sun, May 12, 2019 at 11:30:24PM +0200, Stéphane Guedon wrote:
>
>> So I actually did it again with exact dates this time. And narrowed the
>> thing just a bit more (sic).
>>
>> I have a kernel built from the sources from the 1st of february running now,
>> no trouble (cvs status for the Makefile in amd64/compile/GENERIC.MP indicate
>>
>> Sticky Date: 2019.01.31.23.00.00 ).
>>
>> The kernel running from the 3rd of february sources is buggy (athn device
>> timeout).
>>
>> I hope it can help.
>
> Please show the first lines ($OpenBSD ...$) of the following files
> for both your working, and non-working, kernels:

working
non-working

> sys/dev/ic/athn.c

/* $OpenBSD: athn.c,v 1.100 2019/01/31 11:38:52 stsp Exp $ */
/* $OpenBSD: athn.c,v 1.101 2019/02/01 16:15:07 stsp Exp $ */

> sys/dev/ic/athnvar.h

/* $OpenBSD: athnvar.h,v 1.38 2019/01/31 11:38:52 stsp Exp $ */
/* $OpenBSD: athnvar.h,v 1.39 2019/02/01 16:15:07 stsp Exp $ */

> sys/dev/ic/ar5008.c

/* $OpenBSD: ar5008.c,v 1.46 2017/11/28 04:35:39 stsp Exp $ */
/* $OpenBSD: ar5008.c,v 1.47 2019/02/01 16:15:07 stsp Exp $ */

> sys/dev/ic/ar5416.c

/* $OpenBSD: ar5416.c,v 1.20 2017/01/12 16:32:28 stsp Exp $ */
/* $OpenBSD: ar5416.c,v 1.21 2019/02/01 16:15:07 stsp Exp $ */

> sys/dev/ic/ar5416reg.h

/* $OpenBSD: ar5416reg.h,v 1.6 2016/01/05 18:41:15 stsp Exp $ */
/* $OpenBSD: ar5416reg.h,v 1.7 2019/02/01 16:15:07 stsp Exp $ */

> sys/dev/ic/ar9280.c

/* $OpenBSD: ar9280.c,v 1.26 2017/01/12 16:32:28 stsp Exp $ */
/* $OpenBSD: ar9280.c,v 1.27 2019/02/01 16:15:07 stsp Exp $ */

> sys/dev/ic/ar928reg.h

/* $OpenBSD: ar9280reg.h,v 1.7 2016/01/05 18:41:15 stsp Exp $ */
/* $OpenBSD: ar9280reg.h,v 1.8 2019/02/01 16:15:07 stsp Exp $ */

Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stefan Sperling-5
On Mon, May 13, 2019 at 07:58:18AM +0000, [hidden email] wrote:

> 13 mai 2019 01:06 "Stefan Sperling" <[hidden email]> a écrit:
> > Please show the first lines ($OpenBSD ...$) of the following files
> > for both your working, and non-working, kernels:
>
> working
> non-working
>
> > sys/dev/ic/athn.c
>
> /* $OpenBSD: athn.c,v 1.100 2019/01/31 11:38:52 stsp Exp $ */
> /* $OpenBSD: athn.c,v 1.101 2019/02/01 16:15:07 stsp Exp $ */
>
> > sys/dev/ic/athnvar.h
>
> /* $OpenBSD: athnvar.h,v 1.38 2019/01/31 11:38:52 stsp Exp $ */
> /* $OpenBSD: athnvar.h,v 1.39 2019/02/01 16:15:07 stsp Exp $ */
>
> > sys/dev/ic/ar5008.c
>
> /* $OpenBSD: ar5008.c,v 1.46 2017/11/28 04:35:39 stsp Exp $ */
> /* $OpenBSD: ar5008.c,v 1.47 2019/02/01 16:15:07 stsp Exp $ */
>
> > sys/dev/ic/ar5416.c
>
> /* $OpenBSD: ar5416.c,v 1.20 2017/01/12 16:32:28 stsp Exp $ */
> /* $OpenBSD: ar5416.c,v 1.21 2019/02/01 16:15:07 stsp Exp $ */
>
> > sys/dev/ic/ar5416reg.h
>
> /* $OpenBSD: ar5416reg.h,v 1.6 2016/01/05 18:41:15 stsp Exp $ */
> /* $OpenBSD: ar5416reg.h,v 1.7 2019/02/01 16:15:07 stsp Exp $ */
>
> > sys/dev/ic/ar9280.c
>
> /* $OpenBSD: ar9280.c,v 1.26 2017/01/12 16:32:28 stsp Exp $ */
> /* $OpenBSD: ar9280.c,v 1.27 2019/02/01 16:15:07 stsp Exp $ */
>
> > sys/dev/ic/ar928reg.h
>
> /* $OpenBSD: ar9280reg.h,v 1.7 2016/01/05 18:41:15 stsp Exp $ */
> /* $OpenBSD: ar9280reg.h,v 1.8 2019/02/01 16:15:07 stsp Exp $ */
>

Thank you. Please try this patch against -current:

diff d0dbe0f38d03dd61d4cc879f0883aa49fa2a5814 /usr/src
blob - b7a5e3f2081706f32317c6f2ad02e93db9fa99d3
file + sys/dev/ic/athn.c
--- sys/dev/ic/athn.c
+++ sys/dev/ic/athn.c
@@ -1303,7 +1303,7 @@ athn_filter_noisefloor(struct athn_softc *sc)
  int nf_ext_vals[ATHN_NF_CAL_HIST_MAX];
  int i, cur, n;
 
- for (i = 0; i < sc->ntxchains; i++) {
+ for (i = 0; i < sc->nrxchains; i++) {
  if (sc->nf_hist_cur > 0)
  cur = sc->nf_hist_cur - 1;
  else

Reply | Threaded
Open this post in threaded view
|

Re: driver athn crash on hostap mode since OpenBSD 6.5 release

Stefan Sperling-5
On Tue, May 14, 2019 at 11:26:22PM +0200, Stéphane Guedon wrote:
> Works. It can boot.
>
> Wifi works good in hostap 11n, just like before.

Thanks for helping with tracking this down. I have committed the fix.