From patchwork Fri Oct 9 19:16:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Halasa X-Patchwork-Id: 52795 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n99JMdVB021797 for ; Fri, 9 Oct 2009 19:22:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933853AbZJITR3 (ORCPT ); Fri, 9 Oct 2009 15:17:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761268AbZJITR3 (ORCPT ); Fri, 9 Oct 2009 15:17:29 -0400 Received: from khc.piap.pl ([195.187.100.11]:59838 "EHLO khc.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760089AbZJITR2 convert rfc822-to-8bit (ORCPT ); Fri, 9 Oct 2009 15:17:28 -0400 Received: from intrepid.localdomain (intrepid.localdomain [10.0.0.2]) by khc.piap.pl (Postfix) with ESMTP id EF863931F; Fri, 9 Oct 2009 21:16:49 +0200 (CEST) From: Krzysztof Halasa To: linux-wireless@vger.kernel.org, ath5k-devel@venema.h4ckr.net, Subject: Ath5k data aborts Date: Fri, 09 Oct 2009 21:16:49 +0200 Message-ID: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --- a/drivers/net/wireless/ath5k/reset.c +++ b/drivers/net/wireless/ath5k/reset.c @@ -476,7 +476,7 @@ static void ath5k_hw_set_sleep_clock(struct ath5k_hw *ah, bool enable) (ah->ah_mac_version == (AR5K_SREV_AR2417 >> 4))) { ath5k_hw_reg_write(ah, 0x26, AR5K_PHY_SLMT); ath5k_hw_reg_write(ah, 0x0d, AR5K_PHY_SCAL); - ath5k_hw_reg_write(ah, 0x07, AR5K_PHY_SCLOCK); + ath5k_hw_reg_write(ah, 0x0C, AR5K_PHY_SCLOCK); ath5k_hw_reg_write(ah, 0x3f, AR5K_PHY_SDELAY); AR5K_REG_WRITE_BITS(ah, AR5K_PCICFG, AR5K_PCICFG_SLEEP_CLOCK_RATE, 0x02); @@ -490,8 +490,10 @@ static void ath5k_hw_set_sleep_clock(struct ath5k_hw *ah, bool enable) } /* Enable sleep clock operation */ +#if 0 AR5K_REG_ENABLE_BITS(ah, AR5K_PCICFG, AR5K_PCICFG_SLEEP_CLOCK_EN); +#endif } else { The AR5K_PHY_SCLOCK brings the old value (before the commit in question) back, I have no idea what is it. Leaving the new value causes the second run of hostapd to make the driver fail, the chip seems to not respond. It seems the value itself may be correct (as it works with 2.6.31+) but there is some additional bug fixed after 2.6.30, gitk show several candidate patches for this. Only disabling AR5K_PCICFG write makes the data abort go away. ---------------------------------------------- 2.6.31 and Linus-current only need the AR5K_PCICFG change: --- a/drivers/net/wireless/ath/ath5k/reset.c +++ b/drivers/net/wireless/ath/ath5k/reset.c @@ -489,9 +489,10 @@ static void ath5k_hw_set_sleep_clock(struct ath5k_hw *ah, bool enable) } /* Enable sleep clock operation */ +#if 0 AR5K_REG_ENABLE_BITS(ah, AR5K_PCICFG, AR5K_PCICFG_SLEEP_CLOCK_EN); - +#endif } else { /* Disable sleep clock operation and