From nobody@FreeBSD.org  Tue Nov  4 18:50:31 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5EA54106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Nov 2008 18:50:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 4CCB48FC33
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Nov 2008 18:50:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mA4IoUWj028781
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 Nov 2008 18:50:30 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mA4IoUmo028780;
	Tue, 4 Nov 2008 18:50:30 GMT
	(envelope-from nobody)
Message-Id: <200811041850.mA4IoUmo028780@www.freebsd.org>
Date: Tue, 4 Nov 2008 18:50:30 GMT
From: Tom Canich <tcanich@geosc.psu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] ath_hal-20081028 build failure on amd64
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         128585
>Category:       kern
>Synopsis:       [patch] ath_hal-20081028 build failure on amd64
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    sam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 04 19:00:09 UTC 2008
>Closed-Date:    Wed Nov 05 19:37:16 UTC 2008
>Last-Modified:  Wed Nov 05 19:37:16 UTC 2008
>Originator:     Tom Canich
>Release:        7.0-RELEASE-p4
>Organization:
Pennsylvania State University
>Environment:
FreeBSD orion 7.0-RELEASE-p4 FreeBSD 7.0-RELEASE-p4 #11: Wed Oct  1 17:15:23 EDT 2008     root@orion:/usr/obj/usr/src/sys/ORION  amd64
>Description:
Inclusion of ath_hal of 10-28-2008 from http://people.freebsd.org/~sam/ath_hal-20081028.tgz results in a failed "make buildkernel":

/usr/src$ sudo make buildkernel
[...]
cc -c -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror  /usr/src/sys/dev/ath/if_ath.c -I/usr/src/sys/dev/ath
/usr/src/sys/dev/ath/if_ath.c: In function 'ath_dfswait':
/usr/src/sys/dev/ath/if_ath.c:4988: error: 'struct ath_hal' has no member named 'ah_radarWait'
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.


make.conf:
# added by use.perl 2008-02-12 15:38:07
PERL_VER=5.8.8
PERL_VERSION=5.8.8

DWM_CONF=/home/tcanich/config/dwm-config.h
DVTM_CONF=/home/tcanich/config/dvtm-config.h

NO_SENDMAIL=true

>How-To-Repeat:
Remove /usr/src/sys/contrib/dev/ath
Unpack the ath_hal-20081028.tgz archive to /usr/src/sys/contrib/dev/ath
make buildkernel in /usr/src
>Fix:
Modify /usr/src/sys/contrib/dev/ath/ah.h ($Id: ah.h,v 1.10 2008/10/28 21:16:37 sam Exp $) adding line from ath_hal-20080528's ah.h ( $Id: //depot/sw/branches/sam_hal/ah.h#30 $):

/* DFS support */
HAL_BOOL  __ahdecl(*ah_radarWait)(struct ath_hal *, HAL_CHANNEL *);

within struct ath_hal

cd /usr/src; make buildkernel

Patch attached with submission follows:

--- ah.h.orig	2008-11-04 10:34:24.000000000 -0500
+++ ah.h	2008-11-04 10:02:20.000000000 -0500
@@ -704,6 +704,9 @@
 				u_int rtsctsRate, u_int rtsctsDuration,
 				u_int compicvLen, u_int compivLen,
 				u_int comp);
+	/* DFS support */
+	HAL_BOOL  __ahdecl(*ah_radarWait)(struct ath_hal *, HAL_CHANNEL *);
+
 	HAL_BOOL  __ahdecl(*ah_setupXTxDesc)(struct ath_hal *, struct ath_desc*,
 				u_int txRate1, u_int txTries1,
 				u_int txRate2, u_int txTries2,


>Release-Note:
>Audit-Trail:

From: Tom Canich <tcanich@geosc.psu.edu>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: misc/128585: [patch] ath_hal-20081028 build failure on amd64
Date: Wed, 5 Nov 2008 11:55:00 -0500

 --PNTmBPCT7hxwcZjr
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 I didn't test the kernel built with the original patch 
 until this morning.  The kernel panics when the ath 
 module is loaded.
 
 Attached is a patch which produces a (tested) working 
 kernel.
 
 Tom
 -- 
 
 --PNTmBPCT7hxwcZjr
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="ath_hal-20081028.txt"
 
 --- ah.h.orig	2008-11-05 11:17:43.000000000 -0500
 +++ ah.h	2008-11-04 23:32:02.000000000 -0500
 @@ -824,6 +824,9 @@
  	HAL_BOOL  __ahdecl(*ah_getPendingInterrupts)(struct ath_hal*, HAL_INT*);
  	HAL_INT	  __ahdecl(*ah_getInterrupts)(struct ath_hal*);
  	HAL_INT	  __ahdecl(*ah_setInterrupts)(struct ath_hal*, HAL_INT);
 +
 +	/* DFS support */
 +	HAL_BOOL  __ahdecl(*ah_radarWait)(struct ath_hal *, HAL_CHANNEL *);
  };
  
  /* 
 
 --PNTmBPCT7hxwcZjr--
Responsible-Changed-From-To: freebsd-bugs->sam 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Nov 5 18:19:47 UTC 2008 
Responsible-Changed-Why:  
Sam, can you take a look at this? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128585 
State-Changed-From-To: open->closed 
State-Changed-By: sam 
State-Changed-When: Wed Nov 5 19:35:39 UTC 2008 
State-Changed-Why:  
The hal is not released and not part of the system so filing a PR is wrong. 

As to the problem RELENG_7 does not have the necessary changes to 
support hal's newer than the one in cvs/svn.  The patch included 
with the PR is only part of the changes required to get a functioning 
driver. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=128585 
>Unformatted:
