Skip to contentSkip to conversation

2.6.0-test1-ac2 issues / Toshiba Laptop keyboard

DISCUSSION Ralf Hildebrandt 7 participants 16 messages Jul 17, 2003 – Jul 19, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Finally, I was able to get 2.6.0-test1-ac2 working.

Some issues I found:

* eepro100 is b0rked:

eepro100: Unknown symbol mii_ethtool_sset
eepro100: Unknown symbol mii_link_ok
eepro100: Unknown symbol mii_check_link
eepro100: Unknown symbol mii_nway_restart
eepro100: Unknown symbol mii_ethtool_gset

but by switchin to e100 instead, I got my NIC working

* The kernel reports itself as "Linux version 2.6.0-test1-ac1" but IS ac2!

* The IDE ATA disk works, but upon reboot, the machine does NOT find the IDE harddisk anymore! Tis means I have to turn the machine off and on again (since it has no reset button)

Details:

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH3M: IDE controller at PCI slot 0000:00:1f.1
ICH3M: chipset revision 2
ICH3M: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xcfa0-0xcfa7, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xcfa8-0xcfaf, BIOS settings: hdc:DMA, hdd:pio

hda: TOSHIBA MK4019GAX, ATA DISK drive anticipatory scheduling elevator
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: TOSHIBA DVD-ROM SD-R2102, ATAPI CD/DVD-ROM drive ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: host protected area => 1
hda: 78140160 sectors (40008 MB), CHS=77520/16/63, UDMA(100)
/dev/ide/host0/bus0/target0/lun0: p1 p2 p3
hdc: ATAPI 24X DVD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

* The module "sg" doesn't work:

sg: Unknown symbol scsi_do_req
sg: Unknown symbol scsi_device_get
sg: Unknown symbol scsi_block_when_processing_errors
sg: Unknown symbol scsi_ioctl
sg: Unknown symbol scsi_device_put
sg: Unknown symbol scsi_sleep
sg: Unknown symbol scsi_reset_provider
sg: Unknown symbol scsi_register_interface
sg: Unknown symbol scsi_ioctl_send_command
sg: Unknown symbol scsi_release_request
sg: Unknown symbol scsi_allocate_request
sg: Unknown symbol proc_scsi
sg: Unknown symbol print_req_sense

* ide_scsi doesn't work:

ide_scsi: Unknown symbol scsi_remove_host
ide_scsi: Unknown symbol scsi_host_put
ide_scsi: Unknown symbol scsi_sleep
ide_scsi: Unknown symbol scsi_add_host
ide_scsi: Unknown symbol scsi_adjust_queue_depth
ide_scsi: Unknown symbol scsi_host_alloc

* usb_storage barfs:

usb_storage: Unknown symbol scsi_remove_host
usb_storage: Unknown symbol scsi_host_put
usb_storage: Unknown symbol scsi_add_host
usb_storage: Unknown symbol scsi_host_alloc

* and the most interesting issue is related to the keyboard of this Toshiba laptop (Satellite Pro 6100):

The Kernel reports:

atkbd.c: Unknown key (set 2, scancode 0xb2, on isa0060/serio0) pressed. atkbd.c: Unknown key (set 2, scancode 0xae, on isa0060/serio0) pressed. atkbd.c: Unknown key (set 2, scancode 0xb1, on isa0060/serio0) pressed. atkbd.c: Unknown key (set 2, scancode 0x97, on isa0060/serio0) pressed. atkbd.c: Unknown key (set 2, scancode 0xa2, on isa0060/serio0) pressed. atkbd.c: Unknown key (set 2, scancode 0x92, on isa0060/serio0) pressed.

when I type. Back in 2.4.x, I submitted a patch to AC that fixed an issue with the VERY SAME Laptop and bouncing keys. This patch was included into 2.4.x sometime (keyboard.c). Maybe it's realted to the strange kernel message I'm seeing now?

Signature · 4 lines
Ralf Hildebrandt (Im Auftrag des Referat V a)   [email protected]
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
AIM: ralfpostfix
#1 lore raw
Quoted 2 lines · Ralf Hildebrandt

* The kernel reports itself as "Linux version 2.6.0-test1-ac1" but IS ac2!

This is due to Alan Cox forgetting to increment the number; He is already aware of it.

Signature · 2 lines
Med Venlig Hilsen/Best Regards/Mit freundlichen Grüßen
Michael Kristensen <[email protected]>
#2 lore raw

* Michael Kristensen <[email protected]>:

Quoted 6 lines · Ralf Hildebrandt
Quoted 2 lines

* The kernel reports itself as "Linux version 2.6.0-test1-ac1" but IS ac2!

This is due to Alan Cox forgetting to increment the number; He is already aware of it.

I thought so. This happens all the time, but I thought I'd mention it.

Signature · 4 lines
Ralf Hildebrandt (Im Auftrag des Referat V a)   [email protected]
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
AIM: ralfpostfix
#3 lore raw
In reply to Ralf Hildebrandt
Quoted 11 lines · Ralf Hildebrandt

Finally, I was able to get 2.6.0-test1-ac2 working.

Some issues I found:

* eepro100 is b0rked:

eepro100: Unknown symbol mii_ethtool_sset
eepro100: Unknown symbol mii_link_ok
eepro100: Unknown symbol mii_check_link
eepro100: Unknown symbol mii_nway_restart
eepro100: Unknown symbol mii_ethtool_gset

You must load mii as well. The module tools should be doing that if you are using modprobe

Quoted 2 lines

* The kernel reports itself as "Linux version 2.6.0-test1-ac1" but IS ac2!

Yep

Quoted 3 lines

* The IDE ATA disk works, but upon reboot, the machine does NOT find the IDE harddisk anymore! Tis means I have to turn the machine off and on again (since it has no reset button)

Curious. Could be the BIOS doesn't know how to do hard disk power management especially if its quite an old PC

#4 lore raw

* Alan Cox <[email protected]>:

Quoted 10 lines
Quoted 7 lines

* eepro100 is b0rked:

eepro100: Unknown symbol mii_ethtool_sset
eepro100: Unknown symbol mii_link_ok
eepro100: Unknown symbol mii_check_link
eepro100: Unknown symbol mii_nway_restart
eepro100: Unknown symbol mii_ethtool_gset

You must load mii as well. The module tools should be doing that if you are using modprobe

I see.

Quoted 6 lines
Quoted 3 lines

* The IDE ATA disk works, but upon reboot, the machine does NOT find the IDE harddisk anymore! Tis means I have to turn the machine off and on again (since it has no reset button)

Curious. Could be the BIOS doesn't know how to do hard disk power management especially if its quite an old PC

It's last year's model. Not quite old I'd say.

Signature · 4 lines
Ralf Hildebrandt (Im Auftrag des Referat V a)   [email protected]
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
AIM: ralfpostfix
#5 lore raw
Quoted 11 lines

* Alan Cox <[email protected]>:

Quoted 5 lines
Quoted 5 lines

* The IDE ATA disk works, but upon reboot, the machine does NOT find the IDE harddisk anymore! Tis means I have to turn the machine off and on again (since it has no reset button)

Quoted 9 lines
Quoted 4 lines

Curious. Could be the BIOS doesn't know how to do hard disk power management especially if its quite an old PC

It's last year's model. Not quite old I'd say.

I have the same problem here with a toshiba satellite (with 2.6.0-test1). It boots ok, then when I reboot it stops before loading lilo (pure blank screen with only cursor on it). If I switch off/on it goes OK.

This wasn't happening in 2.5.66. ACPI S3 suspend/resume is working fine though. Could this be related to ACPI in any way?

Álvaro Lopes

#6 lore raw

* Alvaro Lopes <[email protected]>:

Quoted 4 lines

I have the same problem here with a toshiba satellite (with 2.6.0-test1). It boots ok, then when I reboot it stops before loading lilo (pure blank screen with only cursor on it). If I switch off/on it goes OK.

Exactly the same here. Note: Alan, you already had to work around one issue with that controller in the Toshiba notebooks; they wouldn't find the disks after you added the new IDE driveres back in 2.4.20-acX.

Signature · 4 lines
Ralf Hildebrandt (Im Auftrag des Referat V a)   [email protected]
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
AIM: ralfpostfix
#7 lore raw
In reply to Ralf Hildebrandt
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ralf" == Ralf Hildebrandt <[email protected]> writes:

Ralf> * and the most interesting issue is related to the keyboard of this
Ralf> Toshiba laptop (Satellite Pro 6100):

Ralf> The Kernel reports:

Ralf> atkbd.c: Unknown key (set 2, scancode 0xb2, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0xae, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0xb1, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0x97, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0xa2, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0x92, on isa0060/serio0) pressed.

I've been hacking through a similar issue on some Dell laptops.

You need to add entries to the atkbd_set2_keycode[] array in drivers/input/keyboard/atkbd.h. Look at the #defines in inlucde/linux/input.h for stuff that matches the keys that five the unknown key printk()s, and put those values in the Nth entry of the array, where N is the scancode reported in the printk().

Eg, if the first key mentioned above were a VolumeUp key, you would want to add the value 115 to the 0xb2'th entry in the array.

Once you do that, you can run xev(1x) to see what X keycode they get, look in xkb/keycodes/xfree86 for the symbol associated with each keycode, and in xkb/symbols/* for something that associates that xkb symbol with an X11 keysym.

-JimC

#8 lore raw

* James H. Cloos Jr. <[email protected]>:

Quoted 16 lines

Ralf> atkbd.c: Unknown key (set 2, scancode 0xb2, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0xae, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0xb1, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0x97, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0xa2, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0x92, on isa0060/serio0) pressed.

I've been hacking through a similar issue on some Dell laptops.

You need to add entries to the atkbd_set2_keycode[] array in drivers/input/keyboard/atkbd.h. Look at the #defines in inlucde/linux/input.h for stuff that matches the keys that five the unknown key printk()s, and put those values in the Nth entry of the array, where N is the scancode reported in the printk().

Quoted 3 lines

Eg, if the first key mentioned above were a VolumeUp key, you would want to add the value 115 to the 0xb2'th entry in the array.

But this happened while typing NORMALLY, with no frills :) I mean, I was just typing in some unix commands - so I never even came close to the keys I never use anyway...

Signature · 4 lines
Ralf Hildebrandt (Im Auftrag des Referat V a)   [email protected]
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
AIM: ralfpostfix
#9 lore raw
Quoted 7 lines · Ralf Hildebrandt

* James H. Cloos Jr. <[email protected]>:

Quoted 2 lines

Ralf> atkbd.c: Unknown key (set 2, scancode 0xa2, on isa0060/serio0) pressed. Ralf> atkbd.c: Unknown key (set 2, scancode 0x92, on isa0060/serio0) pressed.

But this happened while typing NORMALLY, with no frills :) I mean, I was just typing in some unix commands - so I never even came close to the keys I never use anyway...

I noticed the same oddity on my Toshiba Sattelite Pro 6100 and choosed to silece it with the following (trivial) patch. No side effects so far..

Signature · 1 line
Cioby
drivers/input/keyboard/atkbd.c renamed from drivers/input/keyboard/atkbd.c.original +2 -2
@@ -191,8 +191,8 @@
 		case ATKBD_KEY_NULL:
 			break;
 		case ATKBD_KEY_UNKNOWN:
-			printk(KERN_WARNING "atkbd.c: Unknown key (set %d, scancode %#x, on %s) %s.\n",
-				atkbd->set, code, serio->phys, atkbd->release ? "released" : "pressed");
+/*			printk(KERN_WARNING "atkbd.c: Unknown key (set %d, scancode %#x, on %s) %s.\n", 
+				atkbd->set, code, serio->phys, atkbd->release ? "released" : "pressed"); */
 			break;
 		default:
 			input_regs(&atkbd->dev, regs);
#10 lore raw

* Dumitru Ciobarcianu <[email protected]>:

Quoted 3 lines

I noticed the same oddity on my Toshiba Sattelite Pro 6100 and choosed to silece it with the following (trivial) patch. No side effects so far..

That removes the symptom, but not the cause.

Signature · 4 lines
Ralf Hildebrandt (Im Auftrag des Referat V a)   [email protected]
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
AIM: ralfpostfix
#11 lore raw
Quoted 4 lines · Ralf Hildebrandt

* Dumitru Ciobarcianu <[email protected]>:

Quoted 10 lines
Quoted 5 lines

I noticed the same oddity on my Toshiba Sattelite Pro 6100 and choosed to silece it with the following (trivial) patch. No side effects so far..

That removes the symptom, but not the cause.

I believe this is caused by hardware itself. The key bounces and the keyboard hw generates spurious keypressings.

Álvaro

#12 lore raw

* Alvaro Lopes <[email protected]>:

Quoted 4 lines
Quoted 1 line

That removes the symptom, but not the cause.

I believe this is caused by hardware itself. The key bounces and the keyboard hw generates spurious keypressings.

Nope. This happens with all laptops of that series. We have 4 of them here.

Signature · 4 lines
Ralf Hildebrandt (Im Auftrag des Referat V a)   [email protected]
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
AIM: ralfpostfix
#13 lore raw
In reply to Ralf Hildebrandt
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ralf" == Ralf Hildebrandt <[email protected]> writes:

Ralf> atkbd.c: Unknown key (set 2, scancode 0xb2, on isa0060/serio0) pressed.

Ralf> But this happened while typing NORMALLY, with no frills :) I Ralf> mean, I was just typing in some unix commands - so I never even Ralf> came close to the keys I never use anyway...

Interesting.

The one example I quoted above, atkbd_set2_keycode[0xb2] is in fact 0.

Perhaps your kb is doing something unusual w/ the key release events.

If the kb is, eg, |=ing w/ 0x80 rather than preceding w/ 0xf0 then 0xb2 would be the release event for 0x32. atkbd_set2_keycode[0x32] is 48 (KEY_B in input.h).

So if you get unknown scancode 0xb2 from hitting the B key, that is the cause.

Otherwise, perhaps a list of some keys and what they printk() might help debug it.

-JimC

#14 lore raw

* James H. Cloos Jr. <[email protected]>:

Quoted 3 lines

The one example I quoted above, atkbd_set2_keycode[0xb2] is in fact 0.

Perhaps your kb is doing something unusual w/ the key release events.

I would think so!

The patch that fixed the issue with the key release events was this - I submitted it to Alan who then put it into ac and then it went into 2.4.x...

Details: http://www.informatik.uni-freiburg.de/~leibl/lol/

Patch excerpt:

+ /* The following 'if' is a workaround for hardware
+ * which sometimes send the key release event twice */
+ unsigned char next_scancode = scancode|up_flag;
+ if (up_flag && next_scancode==prev_scancode) {
+ /* unexpected 2nd release event */
+ } else {
+ prev_scancode=next_scancode;
+ put_queue(next_scancode);
+ }

I haven't checked if 2.6.0 already has this!

Signature · 4 lines
Ralf Hildebrandt (Im Auftrag des Referat V a)   [email protected]
Charite Campus Mitte                            Tel.  +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
AIM: ralfpostfix
#15 lore raw
Quoted 18 lines

The patch that fixed the issue with the key release events was this - I submitted it to Alan who then put it into ac and then it went into 2.4.x...

Details: http://www.informatik.uni-freiburg.de/~leibl/lol/

Patch excerpt:

(quoted diff) +9 -0
+                /* The following 'if' is a workaround for hardware
+                 * which sometimes send the key release event twice */
+                unsigned char next_scancode = scancode|up_flag;
+                if (up_flag && next_scancode==prev_scancode) {
+                       /* unexpected 2nd release event */
+                } else {
+                        prev_scancode=next_scancode;
+                        put_queue(next_scancode);
+                }
Quoted 1 line

I haven't checked if 2.6.0 already has this!

This patch went into 2.4.21, and we immediately got a bug report! See http://www.ussg.iu.edu/hypermail/linux/kernel/0306.1/1871.html

I wrote another patch (better, I hope), which is now in 2.4.22-pre6-ac1. It is included below. I would appreciate it if it got some testing on both Toshiba laptops and other machines.

I am also interested in helping fix it in 2.6, but let's see if the fix for 2.4 works first.

Chris

drivers/char/keyboard.c +19 -7
@@ -198,6 +198,7 @@
 	unsigned char keycode;
 	char up_flag = down ? 0 : 0200;
 	char raw_mode;
+	char have_keycode;
 
 	pm_access(pm_kbd);
 	add_keyboard_randomness(scancode | up_flag);
@@ -214,16 +215,30 @@
 		tty = NULL;
 	}
 	kbd = kbd_table + fg_console;
-	if ((raw_mode = (kbd->kbdmode == VC_RAW))) {
+	/*
+	 *  Convert scancode to keycode
+	 */
+	raw_mode = (kbd->kbdmode == VC_RAW);
+	have_keycode = kbd_translate(scancode, &keycode, raw_mode);
+	if (raw_mode) {
 		/*
 		 *	The following is a workaround for hardware
 		 *	which sometimes send the key release event twice 
 		 */
 		unsigned char next_scancode = scancode|up_flag;
-		if (up_flag && next_scancode==prev_scancode) {
+		if (have_keycode && up_flag && next_scancode==prev_scancode) {
 			/* unexpected 2nd release event */
 		} else {
-			prev_scancode=next_scancode;
+			/* 
+			 * Only save previous scancode if it was a key-up
+			 * and had a single-byte scancode.  
+			 */
+			if (!have_keycode)
+				prev_scancode = 1;
+			else if (!up_flag || prev_scancode == 1)
+				prev_scancode = 0;
+			else
+				prev_scancode = next_scancode;
 			put_queue(next_scancode);
 		}
 		/* we do not return yet, because we want to maintain
@@ -231,10 +246,7 @@
 		   values when finishing RAW mode or when changing VT's */
 	}
 
-	/*
-	 *  Convert scancode to keycode
-	 */
-	if (!kbd_translate(scancode, &keycode, raw_mode))
+	if (!have_keycode)
 		goto out;
 
 	/*