Subject: port-mac68k/9787: iwm LKM won't compile (partially timeout/callout related)
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 04/05/2000 03:04:09
>Number:         9787
>Category:       port-mac68k
>Synopsis:       iwm LKM won't compile (partially timeout/callout related)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-mac68k-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 05 01:13:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Dave Huang
>Release:        NetBSD-current as of April 4, 2000
>Organization:
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 24 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Environment:
	
System: NetBSD gedd.metonymy.com 1.4W NetBSD 1.4W (GEDD) #599: Sat Mar 25 18:21:55 CST 2000 khym@dahan.metonymy.com:/usr/src.local/sys/arch/mac68k/compile/GEDD mac68k


>Description:
	The mac68k iwm lkm fails to compile:
cc -g -O -m68020-40 -pipe -D_KERNEL -D_LKM -I. -I/usr/src/sys/lkm/arch/mac68k/iwm -I/usr/src/sys -I/usr/src/sys/arch -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Werror  -DDIAGNOSTIC -DDDB -nostdinc -Dmc68020 -Dmac68k -c /usr/src/sys/arch/mac68k/obio/iwm_fd.c
cc1: warnings being treated as errors
/usr/src/sys/arch/mac68k/obio/iwm_fd.c:539: warning: no previous prototype for `fd_mod_init'
/usr/src/sys/arch/mac68k/obio/iwm_fd.c:561: warning: no previous prototype for `fd_mod_free'
/usr/src/sys/arch/mac68k/obio/iwm_fd.c: In function `fd_mod_free':
/usr/src/sys/arch/mac68k/obio/iwm_fd.c:582: request for member `motor_ch' in something not a structure or union
*** Error code 1

>How-To-Repeat:
>Fix:
--- /usr/src/sys/arch/mac68k/obio/iwm_fd.c	Thu Mar 23 06:27:11 2000
+++ iwm_fd.c	Wed Apr  5 03:05:17 2000
@@ -59,6 +59,9 @@
 #include <mac68k/obio/iwmreg.h>
 #include <mac68k/obio/iwm_fdvar.h>
 
+#ifdef _LKM
+#include "iwm_mod.h"
+#endif
 
 /**
  **	Private functions
@@ -569,7 +572,7 @@
 			 * Let's hope there is only one task per drive,
 			 * see timeout(9). 
 			 */
-			callout_stop(&iwm->fd[unit].motor_ch);
+			callout_stop(&iwm->fd[unit]->motor_ch);
 			disk_detach(&iwm->fd[unit]->diskInfo);
 			free(iwm->fd[unit], M_DEVBUF);
 			iwm->fd[unit] = NULL;
>Release-Note:
>Audit-Trail:
>Unformatted: