[parisc-linux] How retrieving HPA/SPA with the device node

Matthew Wilcox willy@debian.org
Tue, 2 Apr 2002 15:23:36 +0100


On Tue, Apr 02, 2002 at 04:08:16PM +0200, Bruno Vidal wrote:
> 	Hi all.
> I'm still looking for the HPA/SPA of the SCSI/IDE controler of a disk.
> I've found, and able to write the system tree (like ioscan). The starting
> point is "root". Now my problem is to find which controler for which disk.
> The pointer of the disk (/dev/sd??) is the node. Example:
> /dev/sda2 ->> sda2 -> 0x802 -> major:0x8 -> driver "sd" with minor:0x02
> Now how can I link 0x802 to hardware path "2/0/1"
> So where is the link between both ????? Do you have any idea ?????

Hmm.  If you can get to the pci_dev or parisc_device for a scsi disc,
we have functions for returning the hwpath:

print_pci_hwpath
get_pci_node_path
print_pa_hwpath
get_node_path

I'm not sure how to get from `sda2' to the pci_dev of the controlling device.

-- 
Revolutions do not require corporate support.