devfs
[Top] [All Lists]

ide host/bus numbering

To: devfs@xxxxxxxxxxx
Subject: ide host/bus numbering
From: Bill Comisky <bcomisky@xxxxxxxxx>
Date: Tue, 7 May 2002 02:07:46 -0500 (CDT)
Sender: owner-devfs@xxxxxxxxxxx
I've just upgraded my linux system to kernel 2.4.18-6 using devfs.  After
playing around and looking over the documentation I could find, I still
have a question about the ide device naming scheme.

I have 4 ide connectors on my motherboard (Abit VP6) which are numbered
1-4 in the mobo manual (the connectors are also referred to as
"channels").  They further refer to IDE1 as "primary" and IDE2 as
"secondary".  IDE3 and IDE4 are for ATA-100 devices.  Note in the bootup 
messages these are ide0 - ide3.

My question is, how are the "host" numbers in the ide/host* tree 
determined?  My disk setup from dmesg is as follows (some lines removed 
for sake of brevity):

#============================================
    ide0: BM-DMA at 0xb000-0xb007, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xb008-0xb00f, BIOS settings: hdc:DMA, hdd:pio
    ide2: BM-DMA at 0xe400-0xe407, BIOS settings: hde:DMA, hdf:DMA
    ide3: BM-DMA at 0xe408-0xe40f, BIOS settings: hdg:pio, hdh:pio
hda: WDC WD307AA, ATA DISK drive
hdc: ATAPI 44X CDROM, ATAPI CD/DVD-ROM drive
hde: Maxtor 4D080H4, ATA DISK drive
hdf: Maxtor 4D080H4, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide2 at 0xd400-0xd407,0xd802 on irq 10
hda: 60074784 sectors (30758 MB) w/2048KiB Cache, CHS=3739/255/63, UDMA(33)
hde: 160086528 sectors (81964 MB) w/2048KiB Cache, CHS=158816/16/63, UDMA(100)
hdf: 160086528 sectors (81964 MB) w/2048KiB Cache, CHS=9964/255/63, UDMA(100)
hdc: ATAPI 40X CD-ROM drive, 128kB Cache, UDMA(33)
Partition check:
 /dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 p6 p7 p8 p9 >
 /dev/ide/host2/bus0/target0/lun0: p1 p2 < p5 p6 p7 p8 p9 >
 /dev/ide/host2/bus0/target1/lun0: p1 p2 < p5 p6 p7 p8 p9 >
#============================================

ll /dev/hd? gives:

 /dev/hda -> ide/host0/bus0/target0/lun0/disc
 /dev/hdc -> ide/host0/bus1/target0/lun0/cd
 /dev/hde -> ide/host2/bus0/target0/lun0/disc
 /dev/hdf -> ide/host2/bus0/target1/lun0/disc

So master/slave matches up with the target.  lun is always 0.  I'm just 
not sure how the host/bus numbers are assigned.  My best guess, were I to 
fully populate my system with disks is (guesses in parentheses):

        host    bus     target
hda      0       0       0      
hdb     (0)     (0)     (1)
hdc      0       1       0
hdd     (0)     (1)     (1)
hde      2       0       0
hdf      2       0       1
hdg     (2)     (1)     (0)
hdh     (2)     (1)     (1)

So I lumped the the connectors in (primary/secondary?) pairs.  Is this 
right?  If not, what should the missing entries be?

Also, where is host #1?  There is no /dev/ide/host1 directory.

Thanks for any answers or pointers.

bill

-- 
Bill Comisky
bcomisky@xxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
  • ide host/bus numbering, Bill Comisky <=