ide: move ->rqsize init from init_irq() to ide_init_port()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:18 +0000 (12:46 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:18 +0000 (12:46 +0100)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-probe.c

index 974067043fba350d0e42656a8860968139791d14..b0510b033d7835e337a12ad1e25e51e1cdd5514a 100644 (file)
@@ -861,14 +861,6 @@ static int init_irq (ide_hwif_t *hwif)
        if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
                goto out_up;
 
-       if (!hwif->rqsize) {
-               if ((hwif->host_flags & IDE_HFLAG_NO_LBA48) ||
-                   (hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA))
-                       hwif->rqsize = 256;
-               else
-                       hwif->rqsize = 65536;
-       }
-
 #if !defined(__mc68000__)
        printk(KERN_INFO "%s at 0x%03lx-0x%03lx,0x%03lx on irq %d", hwif->name,
                io_ports->data_addr, io_ports->status_addr,
@@ -1114,6 +1106,13 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
 
        if (d->max_sectors)
                hwif->rqsize = d->max_sectors;
+       else {
+               if ((hwif->host_flags & IDE_HFLAG_NO_LBA48) ||
+                   (hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA))
+                       hwif->rqsize = 256;
+               else
+                       hwif->rqsize = 65536;
+       }
 
        /* call chipset specific routine for each enabled port */
        if (d->init_hwif)