Subject: port-i386/22393: [rkb] usscanner(4) config line in i386 GENERIC not detailed enough
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rafal@netbsd.org>
List: netbsd-bugs
Date: 08/07/2003 12:57:20
>Number: 22393
>Category: port-i386
>Synopsis: usscanner(4) config line in i386 GENERIC not detailed enough
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-i386-maintainer
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 07 16:58:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Rafal Boni
>Release: NetBSD 1.6W
>Organization:
Lacking
>Environment:
System: NetBSD fearless-vampire-killer.waterside.net 1.6W NetBSD 1.6W (FEARLESS_VAMPIRE_KILLER) #6: Thu Aug 7 12:24:53 EDT 2003 rafal@fearless-vampire-killer.waterside.net:/extra/sparc64/obj/sys/arch/sparc64/compile/FEARLESS_VAMPIRE_KILLER sparc64
Architecture: sparc64
Machine: sparc64
>Description:
Add just 'usscanner* at uhub?' to your kernel config without the
'scsibus* at usscanner?' and 'ss* at scsibus?' because you did
not read usscanner(4) and copied the USB config stuff wholesale
from i386 GENERIC config to your own config file.
config(8) the kernel, and note that while it builds, the final
link dies with the following messages:
scanner.o: In function `usscanner_attach':
usscanner.o(.text+0x368): undefined reference to `scsi_bustype'
usscanner.o(.text+0x374): undefined reference to `scsi_bustype'
usscanner.o(.text+0x3c4): undefined reference to `scsiprint'
usscanner.o(.text+0x3cc): undefined reference to `scsiprint'
While this is likely user-brain-damage, note that it would have
been prevented if there had been (commented out or otherwise),
the config lines mentioned in usscanner(4) in the i386 GENERIC
config.... That config works because of the catchall 'scsibus*
at scsi?' and 'ss* at scsibus? ...' elsewhere in the config
file.
>How-To-Repeat:
In a kernel config with no 'scsibus' declarations, but some USB
devices for it to attach to, add just:
usscanner* at uhub?
config(8) and build the kernel, watch it not link.
>Fix:
(1) Add the follwing to i386 GENERIC:
Index: GENERIC
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/conf/GENERIC,v
retrieving revision 1.566
diff -u -r1.566 GENERIC
--- GENERIC 2003/08/06 12:32:07 1.566
+++ GENERIC 2003/08/07 16:53:26
@@ -901,6 +901,8 @@
# USB scanners that use SCSI emulation, e.g., HP5300
usscanner* at uhub? port ?
+# scsibus* at usscanner?
+# ss* at scsibus? target ? lun ?
# Y@P firmware loader
uyap* at uhub? port ?
(2) Have config either catch the error, or force inclusion of the
SCSI bus code when it catches a `usscanner' entry. Note sure
the second thing is the right thing to do (things still won't
work unless you have a `ss* at scsibus?' line), but the first
would be nice :-)
>Release-Note:
>Audit-Trail:
>Unformatted: