Subject: Re: How to get the firmware node into the device properties early?
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 09/12/2006 22:29:52
> I am looking for an easy way to retrieve the OpenFirmware node
> (phandle) of a struct device * I get passed in device_register().
> How could I do it for things like scsibus or atapibus?
Depending on why you want this, this may not matter, but...it may not
have one. If a SCSI bus, say, is hot-plug, devices may appear (and be
scsictled into software existence) after the OS is up, and OF thus may
not have had any chance to notice their existence.
I've even treated not-formally-hotplug SCSI buses as hot-plug, and I
find that, provided I'm careful to quiesce the bus first (usually by
breaking to ddb), it generally Just Works.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML firstname.lastname@example.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B