[CUWiN-Dev] Re: ath0: hardware error

David Young dyoung at pobox.com
Thu Aug 25 19:17:26 CDT 2005


On Thu, Aug 25, 2005 at 03:29:16PM -0500, Bill Comisky wrote:
> On Sun, 21 Aug 2005, David Young wrote:
> 
> >I added some debug messages as I tried to track down the source of
> >"ath0: hardware error; resetting".  The debug messages have not shown
> >me any obvious problem, but they do seriously slow down some nodes,
> >so I am taking them out.
> >
> >Apply these patches to your NetBSD sources.  They take out the noisy
> >debug messages:
> >
> >Apply ath-undo-1 in sys/dev/ic/, ath-undo-2 in sys/dev/:
> >
> >% cd your-netbsd-sources/src/sys/dev/ic
> >% patch < ath-undo-1
> >% cd -
> >% cd your-netbsd-sources/src/sys/dev
> >% patch < ath-undo-2
> >
> >Dave
> 
> Should I be seeing any "ath0: hardware error..." messages after these 
> patches have been reverse applied?  I'm still seeing them, sometimes a lot 
> of them.  I can see the CPU "% interrupt" in top shoot up when they're 
> spewing to about 60% (with hw.ath0.debug=0x80000000 commented out in 
> sysctl.conf).  I feel like my build broke somehow, though I deleted the 
> build directory and unpacked the source fresh before "patch -R".

You may still see "ath0: hardware error...", but they should not come
with the Rn and Tn lines that you used to see.

I don't know what causes ath0: hardware error.  The author of the driver
tells me that I may need a PCI bus analyzer to figure it out. :-(

I am a PCI novice, but I strongly suspect that the error has something
to do with PCI bus contention:

1) I get a lot more "ath0: hardware error" indications on my Soekris
net4521 when it carries one or two Cardbus WiFi cards in addition to
the MiniPCI Atheros card.  I scarcely get any such indications when the
MiniPCI cards are not in there.

2) The madwifi driver (Linux version of ath, also by
Sam Leffler) sets an unusually large PCI Latency Timer,
<http://cvs.sourceforge.net/viewcvs.py/madwifi/madwifi/ath/if_ath_pci.c?only_with_tag=HEAD&view=markup>.

Madwifi may also set some other parameters differently from NetBSD,
which accepts defaults---I will check a little later.

3) A discussant at
<http://www.broadbandreports.com/forum/remark,9086546~mode=flat> mentions
that changing his PCI Latency Timer from 32 to 64 helped prevent some
system lockups when his Atheros card was activated.

4) The Soekris BIOS does not set PCI minimum grant, maximum latency,
or latency timer that make any sense according to the explanation given
at <http://www.reric.net/linux/pci_latency.html>.

Bill, will you do me a favor, and send me both dmesg(8) and pcictl(8)
output for your Atheros card?  Here is how I got the pcictl info I wanted:

# pcictl pci0 list
000:00:0: Advanced Micro Devices Elan SC520 System Controller (host bridge)
000:16:0: Atheros Communications AR5212 Wireless LAN (ethernet network, revision 0x01)
000:18:0: National Semiconductor DP83815 10/100 Ethernet (ethernet network)

(Aha!  The Atheros card is device 16!)

# pcictl pci0 dump -d 16
PCI configuration registers:
  Common header:
    0x00: 0x0013168c 0x02900116 0x02000001 0x00003c10

    Vendor Name: Atheros Communications (0x168c)
    Device Name: AR5212 Wireless LAN (0x0013)
    Command register: 0x0116
      I/O space accesses: off
      Memory space accesses: on
      Bus mastering: on
      Special cycles: off
      MWI transactions: on
      Palette snooping: off
      Parity error checking: off
      Address/data stepping: off
      System error (SERR): on
      Fast back-to-back transactions: off
    Status register: 0x0290
      Capability List support: on
      66 MHz capable: off
      User Definable Features (UDF) support: off
      Fast back-to-back capable: on
      Data parity error detected: off
      DEVSEL timing: medium (0x1)
      Slave signaled Target Abort: off
      Master received Target Abort: off
      Master received Master Abort: off
      Asserted System Error (SERR): off
      Parity error detected: off
    Class Name: network (0x02)
    Subclass Name: ethernet (0x00)
    Interface: 0x00
    Revision ID: 0x01
    BIST: 0x00
    Header Type: 0x00 (0x00)
    Latency Timer: 0x3c
    Cache Line Size: 0x10

  Type 0 ("normal" device) header:
    0x10: 0xa0000000 0x00000000 0x00000000 0x00000000
    0x20: 0x00000000 0x00000000 0x00005001 0x2027168c
    0x30: 0x00000000 0x00000044 0x00000000 0x1c0a010a

    Base address register at 0x10
      type: 32-bit nonprefetchable memory
      base: 0xa0000000, not sized
    Base address register at 0x14
      not implemented(?)
    Base address register at 0x18
      not implemented(?)
    Base address register at 0x1c
      not implemented(?)
    Base address register at 0x20
      not implemented(?)
    Base address register at 0x24
      not implemented(?)
    Cardbus CIS Pointer: 0x00005001
    Subsystem vendor ID: 0x168c
    Subsystem ID: 0x2027
    Expansion ROM Base Address: 0x00000000
    Capability list pointer: 0x44
    Reserved @ 0x38: 0x00000000
    Maximum Latency: 0x1c
    Minimum Grant: 0x0a
    Interrupt pin: 0x01 (pin A)
    Interrupt line: 0x0a

  Capability register at 0x44
    type: 0x01 (Power Management, rev. 1.0)

  Device-dependent header:
    0x40: 0x00000000 0x00020001 0xc6004000 0x00000000
    0x50: 0x00000000 0x00000000 0x00000000 0x00000000
    0x60: 0x00000000 0x00000000 0x00000000 0x00000000
    0x70: 0x00000000 0x00000000 0x00000000 0x00000000
    0x80: 0x00000000 0x00000000 0x00000000 0x00000000
    0x90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf0: 0x00000000 0x00000000 0x00000000 0x00000000

Dave

-- 
David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933


More information about the CU-Wireless-Dev mailing list