diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-test3-pre2/drivers/ide/ide-probe.c linux/drivers/ide/ide-probe.c --- /opt/kernel/linux-2.4.0-test3-pre2/drivers/ide/ide-probe.c Thu Jun 29 16:39:18 2000 +++ linux/drivers/ide/ide-probe.c Sat Jun 24 14:51:05 2000 @@ -580,6 +580,17 @@ #endif /* MAX_HWIFS > 1 */ /* + * init request queue + */ +static void ide_init_queue(ide_drive_t *drive) +{ + request_queue_t *q = &drive->queue; + + q->queuedata = HWGROUP(drive); + blk_init_queue(q, do_ide_request); +} + +/* * This routine sets up the irq for an ide interface, and creates a new * hwgroup for the irq/hwif if none was previously assigned. * @@ -677,6 +688,7 @@ hwgroup->drive = drive; drive->next = hwgroup->drive->next; hwgroup->drive->next = drive; + ide_init_queue(drive); } if (!hwgroup->hwif) { hwgroup->hwif = HWIF(hwgroup->drive); @@ -787,9 +799,6 @@ static int hwif_init (ide_hwif_t *hwif) { - request_queue_t *q; - unsigned int unit; - if (!hwif->present) return 0; if (!hwif->irq) { @@ -839,12 +848,6 @@ blk_dev[hwif->major].queue = ide_get_queue; read_ahead[hwif->major] = 8; /* (4kB) */ hwif->present = 1; /* success */ - - for (unit = 0; unit < MAX_DRIVES; ++unit) { - q = &hwif->drives[unit].queue; - q->queuedata = hwif->hwgroup; - blk_init_queue(q, do_ide_request); - } #if (DEBUG_SPINLOCK > 0) { diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-test3-pre2/drivers/ide/ide.c linux/drivers/ide/ide.c --- /opt/kernel/linux-2.4.0-test3-pre2/drivers/ide/ide.c Thu Jun 29 16:39:18 2000 +++ linux/drivers/ide/ide.c Mon Jun 26 01:22:14 2000 @@ -2023,6 +2023,7 @@ drive->id = NULL; } drive->present = 0; + blk_cleanup_queue(&drive->queue); } if (d->present) hwgroup->drive = d; @@ -2048,7 +2049,6 @@ kfree(blksize_size[hwif->major]); kfree(max_sectors[hwif->major]); kfree(max_readahead[hwif->major]); - blk_cleanup_queue(BLK_DEFAULT_QUEUE(hwif->major)); blk_dev[hwif->major].data = NULL; blk_dev[hwif->major].queue = NULL; blksize_size[hwif->major] = NULL;