aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_pdc202xx_old.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-01-03 19:08:49 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-10 16:52:53 -0500
commit36906d9beab941452cad406cc03f05cc78671256 (patch)
tree7cda44d878ad68e3cf965c5ac47316a409117be6 /drivers/ata/pata_pdc202xx_old.c
parent277d72a37431d200727189693b14488368b7c258 (diff)
pata_pdc202xx_old: Further fixups
Turns out distros always enabled burst mode and it is pretty essential so do the same. Also sort out the post DMA mode restore properly. My 20263 card now seems happy but needs some four drive tests done yet (when I've persuaded the kernel not to hang in the edd boot code if I plug them in ..) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_pdc202xx_old.c')
-rw-r--r--drivers/ata/pata_pdc202xx_old.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index bc7c2d5d8d5e..8f2815601791 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -215,8 +215,8 @@ static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc)
215 /* Flip back to 33Mhz for PIO */ 215 /* Flip back to 33Mhz for PIO */
216 if (adev->dma_mode >= XFER_UDMA_2) 216 if (adev->dma_mode >= XFER_UDMA_2)
217 iowrite8(ioread8(clock) & ~sel66, clock); 217 iowrite8(ioread8(clock) & ~sel66, clock);
218
219 ata_bmdma_stop(qc); 218 ata_bmdma_stop(qc);
219 pdc202xx_set_piomode(ap, adev);
220} 220}
221 221
222/** 222/**
@@ -233,6 +233,17 @@ static void pdc2026x_dev_config(struct ata_device *adev)
233 adev->max_sectors = 256; 233 adev->max_sectors = 256;
234} 234}
235 235
236static int pdc2026x_port_start(struct ata_port *ap)
237{
238 void __iomem *bmdma = ap->ioaddr.bmdma_addr;
239 if (bmdma) {
240 /* Enable burst mode */
241 u8 burst = ioread8(bmdma + 0x1f);
242 iowrite8(burst | 0x01, bmdma + 0x1f);
243 }
244 return ata_sff_port_start(ap);
245}
246
236static struct scsi_host_template pdc202xx_sht = { 247static struct scsi_host_template pdc202xx_sht = {
237 .module = THIS_MODULE, 248 .module = THIS_MODULE,
238 .name = DRV_NAME, 249 .name = DRV_NAME,
@@ -313,7 +324,7 @@ static struct ata_port_operations pdc2026x_port_ops = {
313 .irq_clear = ata_bmdma_irq_clear, 324 .irq_clear = ata_bmdma_irq_clear,
314 .irq_on = ata_irq_on, 325 .irq_on = ata_irq_on,
315 326
316 .port_start = ata_sff_port_start, 327 .port_start = pdc2026x_port_start,
317}; 328};
318 329
319static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) 330static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)