Subject: port-macppc/20260: macppc can't find root device in some cases
To: None <gnats-bugs@gnats.netbsd.org>
From: None <monroe@pobox.com>
List: netbsd-bugs
Date: 02/09/2003 01:34:50
>Number: 20260
>Category: port-macppc
>Synopsis: macppc can't find root device in some cases
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-macppc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 09 01:35:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Monroe Williams
>Release: 1.6 or current (seeen on 1.6K and 1.6N)
>Organization:
>Environment:
NetBSD macppc.indirect.org 1.6K NetBSD 1.6K (INDIRECT) #11: Sun Feb 9 00:50:26 PST 2003 monroe@macppc.indirect.org:/usr/local/netbsd/oldsrc/sys/arch/macppc/compile/INDIRECT macppc
>Description:
The last thing done by the function canonicalize_bootpath() in src/sys/arch/macppc/macppc/autoconf.c:
/* XXX Does this belong here, or device_register()? */
if ((p = strrchr(cbootpath, ',')) != NULL)
*p = 0;
can truncate the boot path and cause the kernel to fail to find the device in certain cases. Specifically, on an OF 1.0.x or 3.x machine where the PCI card the machine is booting from has a comma in its OF name (which is relatively common). I've seen this problem with at least two different SCSI cards and now with the Sonnet Tempo Trio ATA card.
Before hitting this piece of code, the bootpath looks like this:
/bandit@F2000000/pci-bridge@D/UltraTek100+@2/FrmTk-0@10,0/sd@0
After this section it looks like this:
/bandit@F2000000/pci-bridge@D/UltraTek100+@2/FrmTk-0@10
and the kernel can't find the root device.
I reported this problem on the port-macppc mailing list some time ago:
http://mail-index.netbsd.org/port-macppc/2001/10/20/0000.html
but submitting a PR somehow fell off my list.
(It turns out that even after fixing this problem the Tempo Trio card still can't be found as the root device. I'm investigating further.)
>How-To-Repeat:
Boot any 1.6 or current kernel on an OF 1.0.x or OF 3.x machine from an ATA disk attached to a Tempo Trio card or a scsi disk on any of several Adaptec or ATTO scsi cards that have OF names containing a comma (i.e. most of them).
>Fix:
I don't know the full fix.
Removing the two lines of code noted in the full description fixes things on an OF 1.0.x or 3.x machine, but since the CVS log notes that the code was added to fix a problem with OF 2.x machines, this probably isn't good enough.
Since I don't have an OF 2.x machine to test with, I don't know exactly what this code is trying to do.
>Release-Note:
>Audit-Trail:
>Unformatted: