Bug 173336

Summary: [ath] Atheros card improper device poweroff handling on Eee PC 900
Product: Base System Reporter: ADAM David Alan Martin <adamartin>
Component: wirelessAssignee: freebsd-wireless (Nobody) <wireless>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: 8.2-RELEASE   
Hardware: Any   
OS: Any   

Description ADAM David Alan Martin freebsd_committer freebsd_triage 2012-11-03 20:10:00 UTC
Atheros network 802.11 device:

ath0@pci0:1:0:0:        class=0x020000 card=0x10261a3b chip=0x001c168c rev=0x01 hdr=0x00
    vendor     = 'Atheros Communications Inc.'
    device     = 'AR5006 family 802.11abg Wireless NIC'
    class      = network
    subclass   = ethernet

can be disabled by "Fn-F2" on the Eee-PC, which causes a device power-off.  BAR registers seem to not be properly initialized when the device is restored from poweroff.  This problem persists until the next full reboot.  (Suspend/Resume does not reset the BAR registers correctly.)

Fix: 

Not a fix, but these are the pci configuration space register dumps via "pciconf -r ath0@pci0:1:0:0 0:255":

Correctly initialized registers:

001c168c 00100007 02000001 00000004
fbef0004 00000000 00000000 00000000
00000000 00000000 00005001 10261a3b
00000000 00000040 00000000 00000112
01c25001 00000000 00000000 00000000
00006005 00000000 00000000 00000000
00119010 00280cc0 000a2010 00033c11
10110048 00000000 000003c0 00000000
00000000 00000000 00000000 00000000
00000011 00000000 00000000 00000000
00000004 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000


After the problem:

001c168c 00100406 02000001 00000000
00000004 00000000 00000000 00000000
00000000 00000000 00005001 10261a3b
00000000 00000040 00000000 00000112
01c25001 00000000 00000000 00000000
00006005 00000000 00000000 00000000
00119010 00280cc0 000a2010 00033c11
10110008 00000000 000003c0 00000000
00000000 00000000 00000000 00000000
00000011 00000000 00000000 00000000
00000004 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000


When the device is off, all "ffffffff" is shown for the configuration space.
How-To-Repeat: Remove the driver, or make sure it's not loaded.  Power off the wifi (with Fn-F2).  Load the driver.  Power on the card.  All future driver loads, with or without the driver loaded are going to not find "ath0".
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-11-03 22:10:40 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-wireless

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:41:06 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.