Skip to content

Commit

Permalink
ide: move hwif->rqsize init from ide_init_queue() to init_irq()
Browse files Browse the repository at this point in the history
Move hwif->rqsize init from ide_init_queue() to init_irq().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
  • Loading branch information
bzolnier committed Feb 2, 2008
1 parent c5d70cc commit 8a0e7e1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,13 +881,6 @@ static int ide_init_queue(ide_drive_t *drive)
q->queuedata = drive;
blk_queue_segment_boundary(q, 0xffff);

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 (hwif->rqsize < max_sectors)
max_sectors = hwif->rqsize;
blk_queue_max_sectors(q, max_sectors);
Expand Down Expand Up @@ -1019,6 +1012,14 @@ static int init_irq (ide_hwif_t *hwif)
goto out_unlink;
}

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;
}

/*
* For any present drive:
* - allocate the block device queue
Expand Down

0 comments on commit 8a0e7e1

Please sign in to comment.