IDE 2.3.51 (end earlier) problems

From: Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Date: Sun Mar 12 2000 - 18:42:35 EST


Hi,
   Current IDE driver does not allow to use more than a single IDE hwif
if "Generic PCI IDE chipset support" is NOT set. I get:

Uniform Multi-Platform E-IDE driver Revision: 6.30
ide: Assuming 30MHz system bus speed for PIO modes
hda: WDC AC34300L, ATA DISK drive
ide1: ports already in use, skipping probe
ide2: ports already in use, skipping probe
ide3: ports already in use, skipping probe
ide4: ports already in use, skipping probe
ide5: ports already in use, skipping probe
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: WDC AC34300L, 4104MB w/256kB Cache, CHS=523/255/63
Partition check:
 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4 < p5 >

The reason is probably that ide_init_hwif_port does not set
hwif->io_ports[IDE_IRQ_OFFSET] (unlike ide_setup_ports), which probably
should be unused on i386 architecture. In effect it contains a random value:

0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
02e8-02ef : serial(set)
02f8-02ff : serial(auto)
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)
c022-c022 : ide0 <------------- random value of hwif->io_ports[IDE_IRQ_OFFSET]

ec80-ecff : Digital Equipment Corporation DECchip 21041 [Tulip Pass 3]
ffa0-ffaf : Acer Laboratories Inc. [ALi] M5229 IDE

It should be fixed, IMHO, by either
- setting hwif->io_ports[IDE_IRQ_OFFSET] to 0 in ide_init_hwif_port() (for
  i386; I don't know if it should be also done for other architectures),
  or
- replacing all uses of ide_init_hwif_port() by ide_setup_ports() and
  drop ide_init_hwif_port() as obsolete...

The following patch fixes the problem for me using the first method, and only
for i386:
*******************************************************
--- include/asm-i386/ide.h.old Mon Mar 13 00:21:35 2000
+++ include/asm-i386/ide.h Mon Mar 13 00:22:18 2000
@@ -67,6 +67,7 @@
         } else {
                 hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
         }
+ hw->io_ports[IDE_IRQ_OFFSET] = 0;
         if (irq != NULL)
                 *irq = 0;
 }
*******************************************************

Another observed problem for the same configuration is that the kernel
attempts to load ide-probe (probably during ide_setup())even if ide-probe.c
is compiled into the kernel. Why? It should not.

Detected 233297841 Hz processor.
ide_setup: idebus=30<3>request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted
request_module[ide-probe-mod]: Root fs not mounted

Console: colour VGA+ 80x25
...

Appropriate parts of my testing .config follows.

Regards
    Andrzej

**************************************************
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y

CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_NAMES=y

CONFIG_BLK_DEV_IDE=y

# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDETAPE=m
CONFIG_BLK_DEV_IDEFLOPPY=m
CONFIG_BLK_DEV_IDESCSI=m

# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
CONFIG_IDE_CHIPSETS=y

CONFIG_BLK_DEV_ALI14XX=y
...

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:23 EST