aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:34 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:34 -0500
commit6b4924962c49655494d2c8e9d3faab0e349a3062 (patch)
tree5236d3ef808f8c781b40b7a6328f65fe3f25891b /drivers/ide
parent7f1ac8c4b9dadc55ec656b368f5f470f2cbe3083 (diff)
ide: add ->max_sectors field to struct ide_port_info
* Add ->max_sectors field to struct ide_port_info to allow host drivers to specify value used for hwif->rqsize (if smaller than the default). * Convert pdc202xx_old to use ->max_sectors and remove no longer needed IDE_HFLAG_RQSIZE_256 flag. There should be no functional changes caused by this patch. Acked-by: Sergei Shtyltov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-probe.c4
-rw-r--r--drivers/ide/pdc202xx_old.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 81f61e8ea97f..f76c22c45086 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1442,8 +1442,8 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
1442 hwif->mate->serialized = hwif->serialized = 1; 1442 hwif->mate->serialized = hwif->serialized = 1;
1443 } 1443 }
1444 1444
1445 if (d->host_flags & IDE_HFLAG_RQSIZE_256) 1445 if (d->max_sectors)
1446 hwif->rqsize = 256; 1446 hwif->rqsize = d->max_sectors;
1447 1447
1448 /* call chipset specific routine for each enabled port */ 1448 /* call chipset specific routine for each enabled port */
1449 if (d->init_hwif) 1449 if (d->init_hwif)
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
index 799557c25eef..624e62e5cc9a 100644
--- a/drivers/ide/pdc202xx_old.c
+++ b/drivers/ide/pdc202xx_old.c
@@ -350,16 +350,17 @@ static const struct ide_dma_ops pdc2026x_dma_ops = {
350 .dma_timeout = pdc202xx_dma_timeout, 350 .dma_timeout = pdc202xx_dma_timeout,
351}; 351};
352 352
353#define DECLARE_PDC2026X_DEV(udma, extra_flags) \ 353#define DECLARE_PDC2026X_DEV(udma, sectors) \
354 { \ 354 { \
355 .name = DRV_NAME, \ 355 .name = DRV_NAME, \
356 .init_chipset = init_chipset_pdc202xx, \ 356 .init_chipset = init_chipset_pdc202xx, \
357 .port_ops = &pdc2026x_port_ops, \ 357 .port_ops = &pdc2026x_port_ops, \
358 .dma_ops = &pdc2026x_dma_ops, \ 358 .dma_ops = &pdc2026x_dma_ops, \
359 .host_flags = IDE_HFLAGS_PDC202XX | extra_flags, \ 359 .host_flags = IDE_HFLAGS_PDC202XX, \
360 .pio_mask = ATA_PIO4, \ 360 .pio_mask = ATA_PIO4, \
361 .mwdma_mask = ATA_MWDMA2, \ 361 .mwdma_mask = ATA_MWDMA2, \
362 .udma_mask = udma, \ 362 .udma_mask = udma, \
363 .max_sectors = sectors, \
363 } 364 }
364 365
365static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = { 366static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
@@ -376,8 +377,8 @@ static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
376 377
377 /* 1: PDC2026{2,3} */ 378 /* 1: PDC2026{2,3} */
378 DECLARE_PDC2026X_DEV(ATA_UDMA4, 0), 379 DECLARE_PDC2026X_DEV(ATA_UDMA4, 0),
379 /* 2: PDC2026{5,7} */ 380 /* 2: PDC2026{5,7}: UDMA5, limit LBA48 requests to 256 sectors */
380 DECLARE_PDC2026X_DEV(ATA_UDMA5, IDE_HFLAG_RQSIZE_256), 381 DECLARE_PDC2026X_DEV(ATA_UDMA5, 256),
381}; 382};
382 383
383/** 384/**