tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: watching dynamic device attachment?



>> Even some way to inspect the current device tree would help; [...]

> Device properties:

>       drvctl -p

That's close.

I don't have an easy way to test it in the particular case at issue
(umass -> scsibus -> sd), since the machine in question is running a
kernel based on GENERIC, so drvctl means a new kernel, and, as a
production machine, I can't casually reboot it now.  But I do have
another 4.0.1 machine I can play with; I built a new kernel for it with
drvctl(4) in it and poked around with drvctl(8).

It doesn't look suitable.  For example, my test machine's disk attaches
via

pci0 at mainbus0 bus 0: configuration mode 1
...
piixide0 at pci0 dev 31 function 2
...
atabus0 at piixide0 channel 0
...
wd0 at atabus0 drive 0: <ST9500420AS>

but drvctl -p on pci0, piixide0, and atabus0 print, essentially,
nothing - they print output, but it contains an empty dict.  Nothing
that would let me walk the device tree down from the umass attachment
to the relevant sd.

Or is there an option I'm missing?  Neither the manpage nor the source
lead me to think so.

I may be able to extend it a little, to include parent and/or child
data in the result, but if there's something already present that will
let me get the info I want I'd prefer that.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index