Subject: Re: port-macppc/12894
To: port-macppc <port-macppc@NetBSD.ORG>
From: Bob Nestor <rnestor@augustmail.com>
List: port-macppc
Date: 05/26/2001 18:59:14
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