aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/pci/pdc202xx_old.c18
-rw-r--r--drivers/ide/setup-pci.c3
-rw-r--r--include/linux/ide.h2
3 files changed, 11 insertions, 12 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 29306121dc4a..d0efe17d8314 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -302,13 +302,6 @@ static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev,
302 302
303static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) 303static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
304{ 304{
305 struct pci_dev *dev = hwif->pci_dev;
306
307 /* PDC20265 has problems with large LBA48 requests */
308 if ((dev->device == PCI_DEVICE_ID_PROMISE_20267) ||
309 (dev->device == PCI_DEVICE_ID_PROMISE_20265))
310 hwif->rqsize = 256;
311
312 hwif->set_pio_mode = &pdc202xx_set_pio_mode; 305 hwif->set_pio_mode = &pdc202xx_set_pio_mode;
313 hwif->set_dma_mode = &pdc202xx_set_mode; 306 hwif->set_dma_mode = &pdc202xx_set_mode;
314 307
@@ -382,7 +375,7 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
382 } 375 }
383} 376}
384 377
385#define DECLARE_PDC2026X_DEV(name_str, udma) \ 378#define DECLARE_PDC2026X_DEV(name_str, udma, extra_flags) \
386 { \ 379 { \
387 .name = name_str, \ 380 .name = name_str, \
388 .init_chipset = init_chipset_pdc202xx, \ 381 .init_chipset = init_chipset_pdc202xx, \
@@ -390,6 +383,7 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
390 .init_dma = init_dma_pdc202xx, \ 383 .init_dma = init_dma_pdc202xx, \
391 .extra = 48, \ 384 .extra = 48, \
392 .host_flags = IDE_HFLAG_ERROR_STOPS_FIFO | \ 385 .host_flags = IDE_HFLAG_ERROR_STOPS_FIFO | \
386 extra_flags | \
393 IDE_HFLAG_OFF_BOARD, \ 387 IDE_HFLAG_OFF_BOARD, \
394 .pio_mask = ATA_PIO4, \ 388 .pio_mask = ATA_PIO4, \
395 .mwdma_mask = ATA_MWDMA2, \ 389 .mwdma_mask = ATA_MWDMA2, \
@@ -410,10 +404,10 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
410 .udma_mask = ATA_UDMA2, 404 .udma_mask = ATA_UDMA2,
411 }, 405 },
412 406
413 /* 1 */ DECLARE_PDC2026X_DEV("PDC20262", ATA_UDMA4), 407 /* 1 */ DECLARE_PDC2026X_DEV("PDC20262", ATA_UDMA4, 0),
414 /* 2 */ DECLARE_PDC2026X_DEV("PDC20263", ATA_UDMA4), 408 /* 2 */ DECLARE_PDC2026X_DEV("PDC20263", ATA_UDMA4, 0),
415 /* 3 */ DECLARE_PDC2026X_DEV("PDC20265", ATA_UDMA5), 409 /* 3 */ DECLARE_PDC2026X_DEV("PDC20265", ATA_UDMA5, IDE_HFLAG_RQSIZE_256),
416 /* 4 */ DECLARE_PDC2026X_DEV("PDC20267", ATA_UDMA5), 410 /* 4 */ DECLARE_PDC2026X_DEV("PDC20267", ATA_UDMA5, IDE_HFLAG_RQSIZE_256),
417}; 411};
418 412
419/** 413/**
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 4fa813b96e72..a1d7efc9eaaf 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -582,6 +582,9 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
582 hwif->drives[0].autotune = 1; 582 hwif->drives[0].autotune = 1;
583 hwif->drives[1].autotune = 1; 583 hwif->drives[1].autotune = 1;
584 584
585 if (d->host_flags & IDE_HFLAG_RQSIZE_256)
586 hwif->rqsize = 256;
587
585 if (d->init_hwif) 588 if (d->init_hwif)
586 /* Call chipset-specific routine 589 /* Call chipset-specific routine
587 * for each enabled hwif 590 * for each enabled hwif
diff --git a/include/linux/ide.h b/include/linux/ide.h
index ff9d293f9ae9..c5b52dd16a89 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1265,6 +1265,8 @@ enum {
1265 IDE_HFLAG_LEGACY_IRQS = (1 << 21), 1265 IDE_HFLAG_LEGACY_IRQS = (1 << 21),
1266 /* force use of legacy IRQs */ 1266 /* force use of legacy IRQs */
1267 IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), 1267 IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22),
1268 /* limit LBA48 requests to 256 sectors */
1269 IDE_HFLAG_RQSIZE_256 = (1 << 23),
1268}; 1270};
1269 1271
1270#ifdef CONFIG_BLK_DEV_OFFBOARD 1272#ifdef CONFIG_BLK_DEV_OFFBOARD