Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Dec 1999 21:24:51 -0500 (EST)
From:      Charlie & <root@frabjous.viren.org>
To:        yokota@zodiac.mech.utsunomiya-u.ac.jp
Cc:        freebsd-current@freebsd.org, viren@rstcorp.com
Subject:   Re: Using USB modules with an USB keyboard... 
Message-ID:  <199912080224.VAA00222@frabjous.viren.org>

index | next in thread | raw e-mail

[-- Attachment #1 --]

>>Is there any way to use only the USB KLDs (i.e. remove all the USB
>>options from the kernel config file) on a machine that has an USB
>>keyboard? 
>
>Add "flags 0x100" to syscons.  Note this is still an experimental
>flag.
>device sc0 at isa? flags 0x100
...
>But, if it still bothers you, you may "disable" the atkbd driver
>included in the kernel, by specifying
>
>device atkbd0 at atkbdc? disable irq 1

I added your recommendations above to the kernel config file
(TWELVE). It didn't work. As can be seen from the dmesg below, when
the USB options are present in the kernel, ukbd0 is found. When USB
KLDs are used, uhid0 seems to grab the keyboard.



[This is the dmesg from a kernel (ELEVEN) that works. The config file for this
includes all the USB options except for ums, which is loaded at bootup]

As seen below, I have an USB mouse (ums0), and an USB keyboard (which
seems to register as an USB keyboard and a mouse -- ums1). The
keyboard does have a PS/2  mouse connector on it.

Dec  7 20:38:35 frabjous /kernel.old: ata1 at 0x0170 irq 15 on ata-pci0
Dec  7 20:38:35 frabjous /kernel.old: uhci0: <Intel 82371AB/EB (PIIX4) USB controller> irq 10 at device 7.2 on pci0
Dec  7 20:38:35 frabjous /kernel.old: usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
Dec  7 20:38:35 frabjous /kernel.old: usb0: USB revision 1.0
Dec  7 20:38:35 frabjous /kernel.old: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Dec  7 20:38:35 frabjous /kernel.old: uhub0: 2 ports with 2 removable, self powered
Dec  7 20:38:35 frabjous /kernel.old: ums0: Logitech USB-PS/2 Mouse M-BA47, rev 1.00/1.10, addr 2, iclass 3/1
Dec  7 20:38:35 frabjous /kernel.old: ums0: 4 buttons and Z dir.
Dec  7 20:38:35 frabjous /kernel.old: ukbd0: QTRONIX USB Keyboard and Mouse, rev 1.00/1.10, addr 3, iclass 3/1
Dec  7 20:38:35 frabjous /kernel.old: kbd0 at ukbd0
Dec  7 20:38:35 frabjous /kernel.old: ums1: QTRONIX USB Keyboard and Mouse, rev 1.00/1.10, addr 3, iclass 3/1
Dec  7 20:38:35 frabjous /kernel.old: ums1: 3 buttons
Dec  7 20:38:35 frabjous /kernel.old: chip1: <Intel 82371AB Power management controller> at device 7.3 on pci0
Dec  7 20:38:35 frabjous /kernel.old: pcm0: <AudioPCI ES1370> irq 12 at device 11.0 on pci0
Dec  7 20:38:35 frabjous /kernel.old: pci0: unknown card (vendor=0x10b7, dev=0x9050) at 15.0 irq 11
Dec  7 20:38:35 frabjous /kernel.old: fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f7 irq 6 drq 2 on isa0
Dec  7 20:38:35 frabjous /kernel.old: fdc0: FIFO enabled, 8 bytes threshold
Dec  7 20:38:35 frabjous /kernel.old: fd0: <1440-KB 3.5" drive> on fdc0 drive 0
Dec  7 20:38:35 frabjous /kernel.old: vga0: <Generic ISA VGA> at port 0x3b0-0x3df iomem 0xa0000-0xbffff on isa0
Dec  7 20:38:35 frabjous /kernel.old: sc0: <System console> on isa0
Dec  7 20:38:35 frabjous /kernel.old: sc0: VGA <16 virtual consoles, flags=0x200>




[This is the kernel (TWELVE) that has no USB options. All the USB modules are
loaded at bootup by the loader.conf scripts.]
Dec  7 19:57:33 frabjous /kernel: real memory  = 134217728 (131072K bytes)
Dec  7 19:57:33 frabjous /kernel: avail memory = 127352832 (124368K bytes)
Dec  7 19:57:33 frabjous /kernel: Preloaded elf kernel "kernel" at 0xc02ae000.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "vesa.ko" at 0xc02ae09c.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "cd9660.ko" at 0xc02ae138.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "procfs.ko" at 0xc02ae1d8.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "green_saver.ko" at 0xc02ae278.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "usb.ko" at 0xc02ae31c.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "ugen.ko" at 0xc02ae3b8.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "uhid.ko" at 0xc02ae454.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "ukbd.ko" at 0xc02ae4f0.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "ulpt.ko" at 0xc02ae58c.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "ums.ko" at 0xc02ae628.
Dec  7 19:57:33 frabjous /kernel: Preloaded elf module "umass.ko" at 0xc02ae6c4.
Dec  7 19:57:33 frabjous /kernel: link_elf: symbol cam_simq_alloc undefined
...
Dec  7 19:57:33 frabjous /kernel: uhci0: <Intel 82371AB/EB (PIIX4) USB controller> irq 10 at device 7.2 on pci0
Dec  7 19:57:33 frabjous /kernel: usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
Dec  7 19:57:33 frabjous /kernel: usb0: USB revision 1.0
Dec  7 19:57:33 frabjous /kernel: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Dec  7 19:57:33 frabjous /kernel: uhub0: 2 ports with 2 removable, self powered
Dec  7 19:57:33 frabjous /kernel: ums0: Logitech USB-PS/2 Mouse M-BA47, rev 1.00/1.10, addr 2, iclass 3/1
Dec  7 19:57:33 frabjous /kernel: ums0: 4 buttons and Z dir.
Dec  7 19:57:33 frabjous /kernel: uhid0: QTRONIX USB Keyboard and Mouse, rev 1.00/1.10, addr 3, iclass 3/1
Dec  7 19:57:33 frabjous /kernel: ums1: QTRONIX USB Keyboard and Mouse, rev 1.00/1.10, addr 3, iclass 3/1
Dec  7 19:57:33 frabjous /kernel: ums1: 3 buttons
Dec  7 19:57:33 frabjous /kernel: chip1: <Intel 82371AB Power management controller> at device 7.3 on pci0
Dec  7 19:57:33 frabjous /kernel: pcm0: <AudioPCI ES1370> irq 12 at device 11.0 on pci0
Dec  7 19:57:33 frabjous /kernel: pci0: unknown card (vendor=0x10b7, dev=0x9050) at 15.0 irq 11
Dec  7 19:57:33 frabjous /kernel: fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f7 irq 6 drq 2 on isa0
Dec  7 19:57:33 frabjous /kernel: fdc0: FIFO enabled, 8 bytes threshold
Dec  7 19:57:33 frabjous /kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0
Dec  7 19:57:33 frabjous /kernel: vga0: <Generic ISA VGA> at port 0x3b0-0x3df iomem 0xa0000-0xbffff on isa0
Dec  7 19:57:33 frabjous /kernel: sc0: <System console> at flags 0x100 on isa0
Dec  7 19:57:33 frabjous /kernel: sc0: VGA <16 virtual consoles, flags=0x300>
Dec  7 19:57:33 frabjous /kernel: sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0


I figured that teh uhid module was messing up the ukbd module, so I
booted up TWELVE and loaded only certain USB modules as seen below:


Dec  7 21:02:34 frabjous /kernel: real memory  = 134217728 (131072K bytes)
Dec  7 21:02:34 frabjous /kernel: avail memory = 127483904 (124496K bytes)
Dec  7 21:02:34 frabjous /kernel: Preloaded elf kernel "kernel" at 0xc028e000.
Dec  7 21:02:34 frabjous /kernel: Preloaded elf module "usb.ko" at 0xc028e09c.
Dec  7 21:02:34 frabjous /kernel: Preloaded elf module "ugen.ko" at 0xc028e138.
Dec  7 21:02:34 frabjous /kernel: Preloaded elf module "ukbd.ko" at 0xc028e1d4.
Dec  7 21:02:34 frabjous /kernel: Preloaded elf module "ums.ko" at 0xc028e270.
Dec  7 21:02:34 frabjous /kernel: Preloaded elf module "umass.ko" at 0xc028e30c.
Dec  7 21:02:34 frabjous /kernel: link_elf: symbol cam_simq_alloc undefined
Dec  7 21:02:34 frabjous /kernel: Pentium Pro MTRR support enabled
Dec  7 21:02:34 frabjous /kernel: npx0: <math processor> on motherboard
Dec  7 21:02:34 frabjous /kernel: npx0: INT 16 interface
Dec  7 21:02:34 frabjous /kernel: pcib0: <Intel 82443BX (440 BX) host to PCI bridge> on motherboard
Dec  7 21:02:34 frabjous /kernel: pci0: <PCI bus> on pcib0
Dec  7 21:02:34 frabjous /kernel: pcib1: <Intel 82443BX (440 BX) PCI-PCI (AGP) bridge> at device 1.0 on pci0
Dec  7 21:02:34 frabjous /kernel: pci1: <PCI bus> on pcib1
Dec  7 21:02:34 frabjous /kernel: vga-pci0: <NVidia Riva TNT graphics accelerator> irq 11 at device 0.0 on pci1
Dec  7 21:02:34 frabjous /kernel: isab0: <Intel 82371AB PCI to ISA bridge> at device 7.0 on pci0
Dec  7 21:02:34 frabjous /kernel: isa0: <ISA bus> on isab0
Dec  7 21:02:34 frabjous /kernel: ata-pci0: <Intel PIIX4 IDE controller> at device 7.1 on pci0
Dec  7 21:02:34 frabjous /kernel: ata-pci0: Busmastering DMA supported
Dec  7 21:02:34 frabjous /kernel: ata0 at 0x01f0 irq 14 on ata-pci0
Dec  7 21:02:34 frabjous /kernel: ata1 at 0x0170 irq 15 on ata-pci0
Dec  7 21:02:34 frabjous /kernel: uhci0: <Intel 82371AB/EB (PIIX4) USB controller> irq 10 at device 7.2 on pci0
Dec  7 21:02:34 frabjous /kernel: usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
Dec  7 21:02:34 frabjous /kernel: usb0: USB revision 1.0
Dec  7 21:02:34 frabjous /kernel: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Dec  7 21:02:34 frabjous /kernel: uhub0: 2 ports with 2 removable, self powered
Dec  7 21:02:34 frabjous /kernel: ums0: Logitech USB-PS/2 Mouse M-BA47, rev 1.00/1.10, addr 2, iclass 3/1
Dec  7 21:02:34 frabjous /kernel: ums0: 4 buttons and Z dir.
Dec  7 21:02:34 frabjous /kernel: ums1: QTRONIX USB Keyboard and Mouse, rev 1.00/1.10, addr 3, iclass 3/1
Dec  7 21:02:34 frabjous /kernel: ums1: 3 buttons
Dec  7 21:02:34 frabjous /kernel: chip1: <Intel 82371AB Power management controller> at device 7.3 on pci0
Dec  7 21:02:34 frabjous /kernel: pcm0: <AudioPCI ES1370> irq 12 at device 11.0 on pci0
Dec  7 21:02:34 frabjous /kernel: pci0: unknown card (vendor=0x10b7, dev=0x9050) at 15.0 irq 11
Dec  7 21:02:34 frabjous /kernel: fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f7 irq 6 drq 2 on isa0
Dec  7 21:02:34 frabjous /kernel: fdc0: FIFO enabled, 8 bytes threshold
Dec  7 21:02:34 frabjous /kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0
Dec  7 21:02:34 frabjous /kernel: vga0: <Generic ISA VGA> at port 0x3b0-0x3df iomem 0xa0000-0xbffff on isa0
Dec  7 21:02:34 frabjous /kernel: sc0: <System console> at flags 0x100 on isa0
Dec  7 21:02:34 frabjous /kernel: sc0: VGA <16 virtual consoles, flags=0x300>





Here's the config file for the non-working kernel (TWELVE):


[-- Attachment #2 --]
#
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
#
# For more information read the handbook part System Administration -> 
# Configuring the FreeBSD Kernel -> The Configuration File. 
# The handbook is available in /usr/share/doc/handbook or online as
# latest version from the FreeBSD World Wide Web server 
# <URL:http://www.FreeBSD.ORG/>;
#
# An exhaustive list of options and more detailed explanations of the 
# device lines is present in the ./LINT configuration file. If you are 
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
#	$Id: GENERIC,v 1.156 1999/03/29 17:56:27 ken Exp $

machine		"i386"
cpu		"I686_CPU"
ident		TWELVE
maxusers	64

options		INET			#InterNETworking
options		FFS			#Berkeley Fast Filesystem
options		FFS_ROOT		#FFS usable as root device [keep this!]
options		"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
options		UCONSOLE		#Allow users to grab the console

config		kernel	


controller	isa0
#controller	pnp0			# PnP support for ISA
controller	pci0

controller	fdc0	at isa? port "IO_FD1"  irq 6 drq 2
device		fd0	at fdc0 drive 0

controller     ata0
device         atadisk0        # ATA disk drives
device         atapicd0        # ATAPI CDROM drives
device         atapifd0        # ATAPI floppy drives




device		vga0	at isa? port ? conflicts

# splash screen/screen saver
pseudo-device	splash

# syscons is the default console driver, resembling an SCO console
device		sc0	at isa?  flags 0x100

device		npx0	at nexus? port IO_NPX irq 13
#device          apm0    at nexus? flags 0x31

device		sio0	at isa? port "IO_COM1" flags 0x10  irq 4
#device		sio1	at isa? port "IO_COM2"  irq 3

# Parallel port
device		ppc0	at isa? port?  irq 7
controller	ppbus0
device		lpt0	at ppbus?


pseudo-device	loop
pseudo-device	ether
pseudo-device	pty	16
pseudo-device   speaker
pseudo-device	bpf 	2

# KTRACE enables the system-call tracing facility ktrace(2).
# This adds 4 KB bloat to your kernel, and slightly increases
# the costs of each syscall.
options		KTRACE		#kernel tracing

# This provides support for System V shared memory and message queues.
#
options         SYSVSHM
options         SYSVMSG

# USB support
#controller    uhci0
#controller    ohci0
#controller    usb0
#
# for the moment we have to specify the priorities of the device
# drivers explicitly by the ordering in the list below. This will
# be changed in the future.
#
#device        ums0
#device        ukbd0
#device        ulpt0
#device        uhid0
#device        ugen0


device pcm0 
#at isa? port ?  irq ? drq ? flags 0x0
device pca0 at isa? port "IO_TIMER1" 


options                SOFTUPDATES


options         IDE_DELAY=8000
options		KBD_INSTALL_CDEV


# atkbdc0 controls both the keyboard and the PS/2 mouse
controller	atkbdc0	at isa? port IO_KBD
device		atkbd0	at atkbdc? disable irq 1

[-- Attachment #3 --]



Here's the config file for the working kernel (ELEVEN):


[-- Attachment #4 --]
#
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
#
# For more information read the handbook part System Administration -> 
# Configuring the FreeBSD Kernel -> The Configuration File. 
# The handbook is available in /usr/share/doc/handbook or online as
# latest version from the FreeBSD World Wide Web server 
# <URL:http://www.FreeBSD.ORG/>;
#
# An exhaustive list of options and more detailed explanations of the 
# device lines is present in the ./LINT configuration file. If you are 
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
#	$Id: GENERIC,v 1.156 1999/03/29 17:56:27 ken Exp $

machine		"i386"
cpu		"I686_CPU"
ident		ELEVEN
maxusers	64

options		INET			#InterNETworking
options		FFS			#Berkeley Fast Filesystem
options		FFS_ROOT		#FFS usable as root device [keep this!]
options		"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
options		UCONSOLE		#Allow users to grab the console

config		kernel	


controller	isa0
controller	pnp0			# PnP support for ISA
controller	pci0

controller	fdc0	at isa? port "IO_FD1"  irq 6 drq 2
device		fd0	at fdc0 drive 0

controller     ata0
device         atadisk0        # ATA disk drives
device         atapicd0        # ATAPI CDROM drives
device         atapifd0        # ATAPI floppy drives




device		vga0	at isa? port ? conflicts

# splash screen/screen saver
pseudo-device	splash

# syscons is the default console driver, resembling an SCO console
device		sc0	at isa?  

device		npx0	at nexus? port IO_NPX irq 13
#device          apm0    at nexus? flags 0x31

device		sio0	at isa? port "IO_COM1" flags 0x10  irq 4
#device		sio1	at isa? port "IO_COM2"  irq 3

# Parallel port
device		ppc0	at isa? port?  irq 7
controller	ppbus0
device		lpt0	at ppbus?


pseudo-device	loop
pseudo-device	ether
pseudo-device	pty	16
pseudo-device   speaker
pseudo-device	bpf 	2

# KTRACE enables the system-call tracing facility ktrace(2).
# This adds 4 KB bloat to your kernel, and slightly increases
# the costs of each syscall.
options		KTRACE		#kernel tracing

# This provides support for System V shared memory and message queues.
#
options         SYSVSHM
options         SYSVMSG

# USB support
controller    uhci0
controller    ohci0
controller    usb0
#
# for the moment we have to specify the priorities of the device
# drivers explicitly by the ordering in the list below. This will
# be changed in the future.
#
#device        ums0
device        ukbd0
#device        ulpt0
#device        uhid0
#device        ugen0


device pcm0 
#at isa? port ?  irq ? drq ? flags 0x0
device pca0 at isa? port "IO_TIMER1" 


options                SOFTUPDATES


options         IDE_DELAY=8000
options		KBD_INSTALL_CDEV



[-- Attachment #5 --]




Hope all this information helps.

Viren
viren@rstcorp.com
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912080224.VAA00222>