Bug 16476

Summary: ATH9K:Linux hangs on multi-core CPU with AR9160-based device
Product: Drivers Reporter: Mike Pithouse (mike.pithouse)
Component: network-wirelessAssignee: John W. Linville (linville)
Severity: high CC: linville, mike.pithouse
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: 0001-ath9k-enable-serialize_regmode-for-non-PCIE-AR9160.patch

Description Mike Pithouse 2010-07-28 11:15:09 UTC
  Com Express module with 1.6GHz core 2 duo processor and 2GB RAM.  Model is COM-840E-L-32 here:
  Atheros AR9160 based miniPCI wi-fi module (802.11abgn).  This one:

  Ubuntu Server 10.04 64-bit 
  root@ucs-cots2:~# cat /proc/version
  Linux version 2.6.32-23-server (buildd@yellow) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #37-Ubuntu SMP Fri Jun 11 09:11:11 UTC 2010

  From the kernel map it looks like this is equivalent to

Linux hangs with no logs when wireless running as AP or Client with ath9k driver.  I don't get the hangs if I disable multi-core processing in BIOS.

It looks like I have this bug (as mentioned in the common problems on the ath9k bugs webpage: http://wireless.kernel.org/en/users/Drivers/ath9k/bugs).

  "Hangs with PCI devices and SMP systems"

The implemented fix is not picked up for my device (an AR9160 basic miniPCI card) as seen from the following debug output:

    kernel: [   52.962332] ath9k: serialize_regmode is 0

I compiled the latest stable version of ath9k (compat-wireless-2.6.35-rc4) using compat-wireless and still got the same problem.

I 'shoe-horned' the fix into the compat-wireless- driver by adding the following line to HW.C:

        if (ah->config.serialize_regmode == SER_REG_MODE_AUTO) {
                if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI ||
                    (AR_SREV_9280(ah) && !ah->is_pciexpress)) {
                        ah->config.serialize_regmode =
                } else {
                        ah->config.serialize_regmode =
        #### New line to force serialisation to ON ####
        ah->config.serialize_regmode = SER_REG_MODE_ON;

        DPRINTF(ah->ah_sc, ATH_DBG_RESET, "serialize_regmode is %d\n",

This forces serialisation on:

    kernel: [   61.449975] ath9k: serialize_regmode is 1

and fixes my issue - I no longer see hangs.

Is it possible to get the fix expanded to cover AR9160-based devices?

Comment 1 Mike Pithouse 2010-07-28 12:22:37 UTC
Following log shows macVersion for our wireless card (AR_SREV_VERSION_9160):

kernel: [    7.767472] phy0: Atheros AR9160 MAC/BB Rev:1 AR5133 RF Rev:b0: mem=0xffffc90021320000, irq=17
Comment 2 John W. Linville 2010-07-28 14:08:38 UTC
Created attachment 27287 [details]

Does this patch work for you (after removing your own change)?
Comment 3 Mike Pithouse 2010-07-28 15:09:37 UTC
It certainly does - thank you.
Comment 4 John W. Linville 2010-08-23 14:54:29 UTC
commit 4c85ab11ca56da1aa59b58c80cc6a356515cc645
Author: John W. Linville <linville@tuxdriver.com>
Date:   Wed Jul 28 10:06:35 2010 -0400

    ath9k: enable serialize_regmode for non-PCIE AR9160
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
    Cc: stable@kernel.org