0003f17
                                                                                                                                                                                                                                                               
0003f17
Delivered-To: jwboyer@gmail.com
0003f17
Received: by 10.76.27.197 with SMTP id v5csp83078oag;
0003f17
        Sun, 26 Jan 2014 17:55:49 -0800 (PST)
0003f17
X-Received: by 10.68.185.1 with SMTP id ey1mr13619314pbc.33.1390787749474;
0003f17
        Sun, 26 Jan 2014 17:55:49 -0800 (PST)
0003f17
Return-Path: <sujith@msujith.org>
0003f17
Received: from bastion.fedoraproject.org (bastion02.fedoraproject.org. [209.132.181.3])
0003f17
        by mx.google.com with ESMTP id va10si9336344pbc.158.2014.01.26.17.55.49
0003f17
        for <jwboyer@gmail.com>;
0003f17
        Sun, 26 Jan 2014 17:55:49 -0800 (PST)
0003f17
Received-SPF: neutral (google.com: 209.132.181.3 is neither permitted nor denied by best guess record for domain of sujith@msujith.org) client-ip=209.132.181.3;
0003f17
Authentication-Results: mx.google.com;
0003f17
       spf=neutral (google.com: 209.132.181.3 is neither permitted nor denied by best guess record for domain of sujith@msujith.org) smtp.mail=sujith@msujith.org
0003f17
Received: by bastion02.phx2.fedoraproject.org (Postfix)
0003f17
	id B18E24013F; Mon, 27 Jan 2014 01:55:48 +0000 (UTC)
0003f17
Delivered-To: jwboyer@fedoraproject.org
0003f17
Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.16])
0003f17
	by bastion02.phx2.fedoraproject.org (Postfix) with ESMTP id A0C3240135
0003f17
	for <jwboyer@fedoraproject.org>; Mon, 27 Jan 2014 01:55:47 +0000 (UTC)
0003f17
Received: from s72.web-hosting.com (s72.web-hosting.com [198.187.29.21])
0003f17
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0R1tk44009597
0003f17
	for <jwboyer@fedoraproject.org>; Sun, 26 Jan 2014 20:55:46 -0500
0003f17
Received: from [117.199.138.156] (port=33797 helo=nako)
0003f17
	by server72.web-hosting.com with esmtpsa (UNKNOWN:AES128-GCM-SHA256:128)
0003f17
	(Exim 4.80.1)
0003f17
	(envelope-from <sujith@msujith.org>)
0003f17
	id 1W7bQI-000GgL-Md; Sun, 26 Jan 2014 20:55:39 -0500
0003f17
From: Sujith Manoharan <sujith@msujith.org>
0003f17
MIME-Version: 1.0
0003f17
Content-Type: text/plain; charset=us-ascii
0003f17
Content-Transfer-Encoding: 7bit
0003f17
Message-ID: <21221.47960.726835.615315@gargle.gargle.HOWL>
0003f17
Date: Mon, 27 Jan 2014 07:20:16 +0530
0003f17
To: Josh Boyer <jwboyer@fedoraproject.org>
0003f17
Cc: "John W. Linville" <linville@tuxdriver.com>,
0003f17
        <ath9k-devel@venema.h4ckr.net>, netdev <netdev@vger.kernel.org>,
0003f17
        "Linux-Kernel\@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
0003f17
Subject: Re: ath9k ARM build error with v3.13-8330-g4ba9920
0003f17
In-Reply-To: <CA+5PVA4fnCo8anT0HZCVu4+AFAseibm=0yD8nL3Lm7Q5dA-qZQ@mail.gmail.com>
0003f17
References: <CA+5PVA4fnCo8anT0HZCVu4+AFAseibm=0yD8nL3Lm7Q5dA-qZQ@mail.gmail.com>
0003f17
X-Mailer: VM 8.2.0b under 24.3.50.1 (x86_64-unknown-linux-gnu)
0003f17
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
0003f17
X-AntiAbuse: Primary Hostname - server72.web-hosting.com
0003f17
X-AntiAbuse: Original Domain - fedoraproject.org
0003f17
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
0003f17
X-AntiAbuse: Sender Address Domain - msujith.org
0003f17
X-Get-Message-Sender-Via: server72.web-hosting.com: authenticated_id: sujith@msujith.org
0003f17
X-Source: 
0003f17
X-Source-Args: 
0003f17
X-Source-Dir: 
0003f17
X-RedHat-Spam-Score: -1.9  (BAYES_00)
0003f17
X-Scanned-By: MIMEDefang 2.68 on 10.5.110.16
0003f17
0003f17
Josh Boyer wrote:
0003f17
> adds a udelay(10000) call to the ath9k driver.  This will cause a
0003f17
> build error on various ARM configs because the value passed to udelay
0003f17
> is too large:
0003f17
> 
0003f17
> ERROR: "__bad_udelay" [drivers/net/wireless/ath/ath9k/ath9k_hw.ko] undefined!
0003f17
> make[1]: *** [__modpost] Error 1
0003f17
> make: *** [modules] Error 2
0003f17
> 
0003f17
> Is the 10000 microsecond udelay really required?  I believe the limit
0003f17
> on ARM is 2000.  Perhaps something else could be done in this case?
0003f17
0003f17
The delay is a workaround for a HW issue. Does this patch fix the problem ?
0003f17
0003f17
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
0003f17
index fbf43c0..11eab9f 100644
0003f17
--- a/drivers/net/wireless/ath/ath9k/hw.c
0003f17
+++ b/drivers/net/wireless/ath/ath9k/hw.c
0003f17
@@ -1316,7 +1316,7 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type)
0003f17
 	if (AR_SREV_9300_20_OR_LATER(ah))
0003f17
 		udelay(50);
0003f17
 	else if (AR_SREV_9100(ah))
0003f17
-		udelay(10000);
0003f17
+		mdelay(10);
0003f17
 	else
0003f17
 		udelay(100);
0003f17
 
0003f17
@@ -2051,9 +2051,8 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah)
0003f17
 
0003f17
 	REG_SET_BIT(ah, AR_RTC_FORCE_WAKE,
0003f17
 		    AR_RTC_FORCE_WAKE_EN);
0003f17
-
0003f17
 	if (AR_SREV_9100(ah))
0003f17
-		udelay(10000);
0003f17
+		mdelay(10);
0003f17
 	else
0003f17
 		udelay(50);
0003f17
 
0003f17
0003f17
Sujith