2.4.21(-ac) ide-disk and hpt366 modules problem

Jan Rekorajski (baggins@sith.mimuw.edu.pl)
Sun, 29 Jun 2003 19:04:09 +0200


Hi,
There is a chicken-egg problem between ide-disk and hpt366 modules.
ide-disk should be loaded after chipset driver to detect what disks are
connected, but hpt366 needs ide-disk loaded because of 372N tricks and
__ide_do_rw_disk symbol.

I used the following hack to avoid the problem, but I think maybe
something better is needed.

--- linux-2.4.21/drivers/ide/ide-disk.c~ Fri Jun 13 16:51:33 2003
+++ linux-2.4.21/drivers/ide/ide-disk.c Sun Jun 29 18:48:33 2003
@@ -698,12 +698,9 @@
{
ide_hwif_t *hwif = HWIF(drive);
if (hwif->rw_disk)
- return hwif->rw_disk(drive, rq, block);
- else
- return __ide_do_rw_disk(drive, rq, block);
+ hwif->rw_disk(drive, rq, block);
+ return __ide_do_rw_disk(drive, rq, block);
}
-
-EXPORT_SYMBOL_GPL(__ide_do_rw_disk);

static int idedisk_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
{
--- linux-2.4.21/drivers/ide/pci/hpt366.c~ Sun Jun 29 15:09:43 2003
+++ linux-2.4.21/drivers/ide/pci/hpt366.c Sun Jun 29 18:50:33 2003
@@ -742,7 +742,7 @@
hpt372n_set_clock(drive, wantclock);
HWIF(drive)->config_data = wantclock;
}
- return __ide_do_rw_disk(drive, rq, block);
+ return ide_started;
}

/*

Jan

-- 
Jan Rêkorajski            |  ALL SUSPECTS ARE GUILTY. PERIOD!
baggins<at>mimuw.edu.pl   |  OTHERWISE THEY WOULDN'T BE SUSPECTS, WOULD THEY?
BOFH, MANIAC              |                   -- TROOPS by Kevin Rubio
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/