#include <hallo.h>
Brad Hards wrote on Wed Mar 27, 2002 um 09:39:15AM:
> > working while the hardware initialisation at boot time. BUT: If an
> > additional "normal" keyboard is connected, Linux does not have any
> > problem, I can use both keyboards, remove the old keyboard and continue
> > working with USB keyboard.
> It sounds like you have some combination of a BIOS problem, and mismatched
> drivers.
That is the point, I would like to keep keyboard support without
additional drivers. Background: I am working on Debian's boot-floppies,
and the keyboard should work when you change the (first!) installation
disk at boot time. At this point, there is no chance to load modules.
> To understand what is happening:
> 1. When the machine boots under BIOS control, the BIOS can run the usb
> keyboard, and make it appear as a normal keyboard. This is normally optional
> in the BIOS [look for an option called "legacy keyboard" or "USB keyboard
> emulation" or something like that]
Of course. This option is turned on, I can use the keyboard in DOS and
on boot prompt (inc. LILO menu, Syslinux prompt etc.).
> 2. When the Linux USB host controller code comes up, it "takes over" control.
> At that point, you need to have all of the support modules loaded, including
> your keyboard code.
The current work around is loading the modules from an init script when
"grep -i usb /proc/pci" was successfull.
> So you either need to make the modules be loaded automatically (hotplug
> system, some other scripting, whatever) or you need to build your USB support
The problem is, there is this "Insert root floppy and press enter Enter
to continue" prompt, which comes before the modules can be loaded.
> into the kernel, or (if you don't need real USB support), don't load any host
> controller code.
Oh, trying to build input drivers into the kernel, I ran into another
problem - the drivers have been loaded, the keyboard has been
found, but if keeped beeing non-functional. Only forced load of
"keybdev" module (note that the driver has also been compiled into the
kernel!) woke it up.
> > In the first case, when the keyboard is locked, it does help to load the
> > USB driver, ubskbd.o and keybdev.o, and the keyboard is useable again.
> I assume that this is "usbkbd.o"?
It is exactly how I wrote. I load usbkbd, the keyboard does not work. I
load keybdev afterwards, and is iseable. I know, this is confusing, even
for me, but some kind of breakage _is_ there.
Summary with 2.4.18 kernel:
usbkbd + keybdev -> working
hid + keybdev -> working
keybdev only -> non-functional
usbkbd only -> non-functional
> Do you have the hid driver and input driver (hid.o and input.o) either loaded
> as modules or built into the kernel? If so, you shouldn't be using usbkbd.o.
Sure, but even if load both at same time, the first is beeing used.
Oh, and if I compile usb-uhci+hid+input+keybdev into the kernel, it
spews with timeout errors at boot time and the keyboard does not work.
See attachment.
> If you don't (or won't) use the "full HID" support, don't load keybdev.o
That is the point - usbkbd does NOT work without keybdev.
Another thing I noted while experimenting with USB is this
unreproducible Oops that happened sometimes when removing the modules:
Unable to handle kernel paging request at virtual address d8917280
printing eip:
d8917280
*pde = 0176c067
*pte = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[<d8917280>] Tainted: PF
EFLAGS: 00010282
eax: d8917280 ebx: d6a02000 ecx: d6bf3000 edx: c160fc28
esi: d60193f8 edi: d6bf3180 ebp: c1744b80 esp: c4113f14
ds: 0018 es: 0018 ss: 0018
Process rmmod (pid: 4251, stackpage=c4113000)
Stack: d8904a48 d60193f8 d60193f8 d60193f8 c1744b80 00000000 d8904c21 c1744b80
d60193f8 d60193f8 c1744b80 00000001 d8905ef9 d60193f8 d89076c0 d60193f8
c1744b80 d89083c0 d8903000 bfffdf0c d8906b7a c1744b80 00000000 00000001
Call Trace: [<d8904a48>] [<d8904c21>] [<d8905ef9>] [<d89076c0>] [<d89083c0>]
[<d8906b7a>] [<c01fcc5f>] [<d890707a>] [<d89083c0>] [<c0117017>] [<c01163a7>]
[<c0106c5b>]
Code: Bad EIP value.
I get three of this warnings, and from this point a such message all 5
seconds or so:
usb-uhci.c: interrupt, status 20, frame# 0
Another time, I loaded keybdev first, then "hid". I took 20seconds till
modprobe returned, and I saw a bunch of "ust_control/bulk_msg: timeout"
messages.
As far as I can see, there is currently NO WAY to make the keyboard work
without modules.
Gruss/Regards,
Eduard.
--
Plug-and-Play is really nice, unfortunately it only works 50% of the time.
To be specific the "Plug" almost always works. --unknown source
Linux version 2.4.18 (root@coder) (gcc version 2.95.4 20011002 (Debian prerelease)) #3
Wed Mar 27 12:54:05 CET 2002
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e0000 - 00000000000e4000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000000fff0000 (usable)
BIOS-e820: 000000000fff0000 - 000000000fff8000 (ACPI data)
BIOS-e820: 000000000fff8000 - 0000000010000000 (ACPI NVS)
BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
On node 0 totalpages: 65520
zone(0): 4096 pages.
zone(1): 61424 pages.
zone(2): 0 pages.
No local APIC present or hardware disabled
Kernel command line: auto BOOT_IMAGE=Linux ro root=301
Initializing CPU#0
Detected 499.052 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 996.14 BogoMIPS
Memory: 255216k/262080k available (1454k kernel code, 6476k reserved, 394k data, 224k
init, 0k highmem)
Dentry-cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes)
Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
CPU: Before vendor init, caps: 0081f9ff c0c1f9ff 00000000, vendor = 2
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 512K (64 bytes/line)
CPU: After vendor init, caps: 0081f9ff c0c1f9ff 00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: After generic, caps: 0081f9ff c0c1f9ff 00000000 00000000
CPU: Common caps: 0081f9ff c0c1f9ff 00000000 00000000
CPU: AMD-K7(tm) Processor stepping 02
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch ([EMAIL PROTECTED])
mtrr: detected mtrr type: Intel
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Using IRQ router VIA [1106/0686] at 00:07.0
PCI: Disabling Via external APIC routing
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
devfs: v1.10 (20020120) Richard Gooch ([EMAIL PROTECTED])
devfs: boot_options: 0x0
tbxface-0099 [01] Acpi_load_tables : ACPI Tables successfully loaded
Parsing
Methods:..........................................................................................
90 Control Methods found and parsed (294 nodes total)
ACPI Namespace successfully loaded at root c0327820
ACPI: Core Subsystem version [20011018]
evxfevnt-0081 [02] Acpi_enable : Transition to ACPI mode successful
Executing device _INI methods:............ exfldio-0102 [21] Ex_setup_field :
Field access width (4 bytes) too large for region size (1)
exfldio-0113 [21] Ex_setup_field : Field base+offset+width 0+0+4 exceeds
region size (1 bytes) field=cff696e8 region=cff69568
Ps_execute: method failed - \_SB_.PCI0.SBRG.PS2M._STA (cff792e8)
uteval-0337 [05] Ut_execute_STA : _STA on PS2M failed AE_AML_REGION_LIMIT
................
28 Devices found: 27 _STA, 2 _INI
Completing Region and Field initialization:...............
14/18 Regions, 1/1 Fields initialized (294 nodes total)
ACPI: Subsystem enabled
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.10e
block: 128 slots per queue, batch=32
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller on PCI bus 00 dev 39
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt82c686a (rev 14) IDE UDMA66 controller on pci00:07.1
ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:pio, hdd:pio
keyboard: Timeout - AT keyboard not present?(ed)
keyboard: Timeout - AT keyboard not present?(f4)
hda: IBM-DTTA-351010, ATA DISK drive
hdb: Maxtor 90432D3, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: 19807200 sectors (10141 MB) w/466KiB Cache, CHS=1232/255/63, UDMA(33)
hdb: 8440992 sectors (4322 MB) w/256KiB Cache, CHS=525/255/63, UDMA(33)
Partition check:
/dev/ide/host0/bus0/target0/lun0: p1 p2
/dev/ide/host0/bus0/target1/lun0: unknown partition table
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 12:56:36 Mar 27 2002
usb-uhci.c: High bandwidth mode enabled
PCI: Found IRQ 9 for device 00:07.2
PCI: Sharing IRQ 9 with 00:07.3
usb-uhci.c: USB UHCI at I/O 0xc800, IRQ 9
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
usb.c: kmalloc IF cff41b80, numif 1
usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1
usb.c: USB device number 1 default language ID 0x0
Product: USB UHCI Root Hub
SerialNumber: c800
hub.c: USB hub found
hub.c: 2 ports detected
hub.c: standalone hub
hub.c: ganged power switching
hub.c: global over-current protection
hub.c: Port indicators are not supported
hub.c: power on to power good time: 2ms
hub.c: hub controller current requirement: 0mA
hub.c: port removable status: RR
hub.c: local power source is good
hub.c: no over-current condition exists
hub.c: enabling power on all ports
usb.c: hub driver claimed interface cff41b80
usb.c: call_policy add, num 1 -- no FS yet
PCI: Found IRQ 9 for device 00:07.3
PCI: Sharing IRQ 9 with 00:07.2
usb-uhci.c: USB UHCI at I/O 0xcc00, IRQ 9
usb-uhci.c: Detected 2 ports
hub.c: port 1 connection change
hub.c: port 1, portstatus 300, change 3, 1.5 Mb/s
hub.c: port 2 connection change
hub.c: port 2, portstatus 301, change 3, 1.5 Mb/s
usb.c: new USB bus registered, assigned bus number 2
usb.c: kmalloc IF cff41d80, numif 1
usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1
usb.c: USB device number 1 default language ID 0x0
Product: USB UHCI Root Hub
SerialNumber: cc00
hub.c: USB hub found
hub.c: 2 ports detected
hub.c: standalone hub
hub.c: ganged power switching
hub.c: global over-current protection
hub.c: Port indicators are not supported
hub.c: power on to power good time: 2ms
hub.c: hub controller current requirement: 0mA
hub.c: port removable status: RR
hub.c: local power source is good
hub.c: no over-current condition exists
hub.c: enabling power on all ports
usb.c: hub driver claimed interface cff41d80
usb.c: call_policy add, num 1 -- no FS yet
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8 Andreas Gal, Vojtech Pavlik <[EMAIL PROTECTED]>
hid-core.c: USB HID support drivers
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 16384)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 224k freed
hub.c: port 2, portstatus 303, change 0, 1.5 Mb/s
hub.c: USB new device connect on bus1/2, assigned device number 2
usb.c: kmalloc IF cff42ec0, numif 2
usb.c: skipped 1 class/vendor specific interface descriptors
usb.c: skipped 1 class/vendor specific interface descriptors
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
usb.c: USB device number 2 default language ID 0x409
Manufacturer: Compaq
Product: Compaq Internet Keyboard
input0: USB HID v1.00 Keyboard [Compaq Compaq] on usb1:2.0
usb.c: hid driver claimed interface cff42ec0
usb-uhci.c: interrupt, status 2, frame# 884
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,1), internal journal
usb_control/bulk_msg: timeout
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16)
apm: overridden by ACPI.
Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ
SERIAL_PCI ISAPNP enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
usb_control/bulk_msg: timeout
reiserfs: checking transaction log (device 03:02) ...
Using r5 hash to sort names
ReiserFS version 3.6.25
usb_control/bulk_msg: timeout
Installing knfsd (copyright (C) 1996 [EMAIL PROTECTED]).
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
input1,hiddev0: USB HID v1.00 Pointer [Compaq Compaq] on usb1:2.1
usb.c: hid driver claimed interface cff42ed8
usb.c: kusbd: /sbin/hotplug add 2
hub.c: port 1 connection change
hub.c: port 1, portstatus 300, change 3, 1.5 Mb/s
hub.c: port 2 connection change
hub.c: port 2, portstatus 300, change 3, 1.5 Mb/s
hub.c: port 1 enable change, status 300
hub.c: port 1 enable change, status 300
hub.c: port 2 enable change, status 300
8139too Fast Ethernet driver 0.9.24
PCI: Found IRQ 10 for device 00:04.0
eth0: RealTek RTL8139 Fast Ethernet at 0xd08eae00, 00:40:f4:1e:4e:ae, IRQ 10
eth0: Identified 8139 chip type 'RTL-8139C'
eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 45e1.