NetBSD Problem Report #12894
Received: (qmail 12092 invoked from network); 10 May 2001 12:25:02 -0000
Message-Id: <20010510122602.AE90F1110F@www.netbsd.org>
Date: Thu, 10 May 2001 05:26:02 -0700 (PDT)
From: rrnesttor@augustmail.com
Reply-To: rnestor@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: Early G3 and iMac USB keyboards don't work since the USB cleanup
X-Send-Pr-Version: www-1.0
>Number: 12894
>Category: port-macppc
>Synopsis: Early G3 and iMac USB keyboards don't work since the USB cleanup
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-macppc-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 10 12:26:00 +0000 2001
>Closed-Date: Thu Apr 15 03:11:36 +0000 2004
>Last-Modified: Thu Apr 15 03:11:36 +0000 2004
>Originator: Bob Nestor
>Release: 1.4, 1.5.1, -current (May 2001)
>Organization:
>Environment:
>Description:
Since the USB cleanup right after 1.4.2 the USB keyboard doesn't work on early model B&W G3s and iMacs. It does work in 1.4.2 and 1.4.3. While booting the OF code notes that neither ADB nor USB ihandles were found and the system in -current now defaults to USB. The prompts for root devices and dump device now works in -current but when the system goes multi-user the USB keyboard is dead.
>How-To-Repeat:
Attempt booting any version of NetBSD/macppc past 1.4.3 on an early model B&W G3 or iMac.
>Fix:
Unknown
>Release-Note:
>Audit-Trail:
From: Bob Nestor <rnestor@augustmail.com>
To: <gnats-bugs@netbsd.org>,
"port-macppc" <port-macppc@NetBSD.ORG>
Cc:
Subject: Re: port-macppc/12894
Date: Sat, 26 May 2001 11:31:34 -0500
The USB keyboard on early model G3s and iMacs stopped working after the
USB code was cleaned up sometime between 1.4.2 and 1.5. There is an open
PR on this problem (12894) and I have discovered some additional behavour
that may help isolate the source of the bug.
Testing with -current (as of 5/25/2001) on a G3 with both ADB and USB
capability I have observed:
With both ADB and USB keyboards installed the ADB is dead during boot but
the USB is responsive, however both are dead after the system has booted
to the login prompt.
With only the ADB keyboard installed the ADB works during boot but is
dead after the system gets to the login prompt. The USB keyboard is
usable if it is plugged in _AFTER_ the system gets to the login prompt.
With only the USB keyboard installed the USB works during boot but is
dead after the system gets to the login prompt. The ADB is also unusable
if it is plugged in at this time. Unplugging the USB and plugging it
back in produces the expected USB events which are logged on the console,
but the keyboard is still unusable.
It appears there is some undesired interaction between the ADB and USB
keyboard designation in the system. Possibly some flag variable is
reversed?
Hope this helps someone with a better understanding of the code. As
always I'm happy to test patches if anyone has an idea.
-bob
From: Bob Nestor <rnestor@augustmail.com>
To: <gnats-bugs@netbsd.org>,
"port-macppc" <port-macppc@NetBSD.ORG>
Cc:
Subject: Re: port-macppc/12894
Date: Sat, 26 May 2001 18:59:14 -0500
I've done a bit more digging into the USB problem on early model G3s and
iMacs. It appears to be a problem caused by the order devices are probed
and how the wscons devices are glued to physical devices. That logic
changed quite a bit between 1.4.3 and 1.5x/-current.
Under 1.4.3A I see the line:
wscons: wskbd1 glued to wsdisplay0 (console)
this occurs after the ofb0 probe near the very end of the boot sequence.
Under 1.5 (-current) I don't see anything similar but didn't expect to
since the wscons_glue logic has been totally rewritten. What appears to
be missing is any line that indicates the keyboard is tied to the
display. If I boot with an ADB keyboard then switch to USB after the
system issues the login prompt I see the line:
wskbd1 at ukbd0: console keyboard, using wsdisplay0
and the USB keyboard is fully usable. Looking at the order the devices
are probed it appears that ofb0/wsdiplay0 was probed and configured early
in the boot sequence, long before the eligible keyboard devices. I'm not
sure, but this looks like it is where the problem might be. On the iMac,
that doesn't have an ADB, a similar thing is probably happening.
As a side note, the change in machdep.c that added the default call to
"ukbd_cnattach()" if the keyboard configuration couldn't be determined
from OpenFirmware isn't correct for systems with an ADB keyboard. I'm not
sure how to find out which keyboard is present, but on a system with old
firmware and no USB this will not configure a working console.
-bob
From: Bob Nestor <rnestor@augustmail.com>
To: <gnats-bugs@netbsd.org>,
"port-macppc" <port-macppc@NetBSD.ORG>
Cc:
Subject: Re: port-macppc/12894
Date: Mon, 28 May 2001 12:49:04 -0500
Discovered a bit more information on this problem. The wscons glue code
logic was rewritten between 1.4.3 and 1.5 and this contributes to the
console keyboard and display not getting glued together. In the old code
it was nessary to force a reattachment by calling wsdisplay_set_cons_kbd
in cninit in the machdep.c file. This was done to delay wscons
associations until all the parent devices were configured.
Under 1.5 the glue logic automatically defers associations if the parent
device(s) aren't yet configured. The hacked call to
wsdisplay_set_cons_kbd in machdep.c is stepping on the information used
in the deferred processing. By eliminating the hack the data isn't
getting trashed and the new deferred processing code in wscons works
correctly creating the proper associations between the console keyboard
and display.
This still doesn't fix the problem of being able to use the USB keyboard
after the system displays the login prompt though. It appears that the
USB keyboard interrupts are enabled during boot as evidenced by the
messages "ignored interrupt while polling" when the system is asking for
the boot device. However once the system comes up and prompts for user
login the USB keyboard is dead. The USB doesn't respond to
disconnect/connect interrupts either as it does if the system is brought
up with an ADB keyboard. It appears this remaining problem is due to
interrupts being disabled on the USB, probably due to some timing error
during initialization.
Can someone verify that the call in machdep.c to wsdisplay_set_cons_kbd
is no longer needed and remove it? Does anyone have any ideas on the USB
interrupt problem?
Thanks,
-bob
From: Bob Nestor <rnestor@augustmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-macppc/12894
Date: Sat, 31 May 2003 18:40:52 -0500
Testing with 1.6 and 1.6I (9/28/02 sources) shows the problem has been
resolved on the B&W G3 (early model).
Attempts to test with 1.6T (5/29/03 sources) shows a problem with
ofwboot on the B&W G3 (default catch) so it is impossible to say the
problem hasn't returned on this system.
The 12"PB (867 G4) shows the problem described in this PR with 1.6 and
1.6I. Unable to test the 1.6T snapshot on this system as ofwboot threw
a "decrementer exception" error.
All these tests were run booting from CD using the command:
"boot cd:,ofwboot.xcf netbsd.macppc"
From: Evgeni Dobrev <evgeni_dobrev@developer.bg>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-macppc/12894
Date: Sat, 13 Dec 2003 22:40:14 +0100
The problem described in this PR occurs also on the iBook G4 with
1.6.1. Seems like the USB devices also do not work since the LED on my
mouse would not light up.
I booted the CD with the command :
"boot cd:,ofwboot.xcf netbsd.macppc"
State-Changed-From-To: open->feedback
State-Changed-By: mrg
State-Changed-When: Fri Apr 2 14:28:58 UTC 2004
State-Changed-Why:
does it seem that this problem is fixed in -current?
thanks
From: Bob Nestor <rnestor@augustmail.com>
To: gnats-bugs@gnats.netbsd.org
Cc: port-macppc-maintainer@netbsd.org, mrg@netbsd.org
Subject: Re: port-macppc/12894
Date: Fri, 2 Apr 2004 18:27:44 -0600
On Apr 2, 2004, at 8:29 AM, mrg@netbsd.org wrote:
> Synopsis: Early G3 and iMac USB keyboards don't work since the USB
> cleanup
>
> State-Changed-From-To: open->feedback
> State-Changed-By: mrg
> State-Changed-When: Fri Apr 2 14:28:58 UTC 2004
> State-Changed-Why:
> does it seem that this problem is fixed in -current?
>
> thanks
I tried this with a 2.0A system built from sources fetched on March 28,
2004. The USB keyboard still doesn't work. Also the Openfirmware boot
code is reporting Default Catch errors and the IDE disk reports lost
interrupt errors. The last version that had a working USB, Boot code
and IDE disk for this system (B&W G3) was 1.6K.
I'd be happy to run tests and try things, but I'm not of much use in
tracking down Boot code, USB or IDE disk handler errors. I'm more of
an applications-type coder.
-bob
State-Changed-From-To: feedback->open
State-Changed-By: mrg
State-Changed-When: Sat Apr 3 08:16:14 UTC 2004
State-Changed-Why:
problem still exists.
From: Bob Nestor <rnestor@augustmail.com>
To: mrg@netbsd.org
Cc: port-macppc-maintainer@netbsd.org, gnats-bugs@gnats.netbsd.org
Subject: Re: port-macppc/12894
Date: Wed, 14 Apr 2004 20:29:58 -0500
On Apr 2, 2004, at 6:27 PM, Bob Nestor wrote:
> On Apr 2, 2004, at 8:29 AM, mrg@netbsd.org wrote:
>
>> Synopsis: Early G3 and iMac USB keyboards don't work since the USB
>> cleanup
>>
>> State-Changed-From-To: open->feedback
>> State-Changed-By: mrg
>> State-Changed-When: Fri Apr 2 14:28:58 UTC 2004
>> State-Changed-Why:
>> does it seem that this problem is fixed in -current?
>>
>> thanks
>
> I tried this with a 2.0A system built from sources fetched on March
> 28, 2004. The USB keyboard still doesn't work. Also the Openfirmware
> boot code is reporting Default Catch errors and the IDE disk reports
> lost interrupt errors. The last version that had a working USB, Boot
> code and IDE disk for this system (B&W G3) was 1.6K.
>
> I'd be happy to run tests and try things, but I'm not of much use in
> tracking down Boot code, USB or IDE disk handler errors. I'm more of
> an applications-type coder.
I have an updated status on this problem. A 2.0C kernel built from
sources of April 13th has a working USB on my B&W G3. I'm no longer
seeing the IDE lost interrupt errors and it appears I can actually
access the disk -- "disklabel wd0" doesn't cause an endless stream of
errors, I hear the disk seeking and I get printed results consistent
with the disk partitioning.
Version 1.9 of ofwboot has a problem booting from CDROM, but it works
over the network. I haven't tried from disk as the IDE disk was
non-functional under NetBSD (for me) until this build.
All in all this is fantastic progress! At this point I believe the PR
should be closed and the original problem is no longer present.
-bob
State-Changed-From-To: open->closed
State-Changed-By: mrg
State-Changed-When: Thu Apr 15 03:11:27 UTC 2004
State-Changed-Why:
problem solved, thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.