Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pdc202xx_new: Enable ATAPI DMA

[ bart: the ressurection of 2 years old patch which slipped thru the cracks
(thanks to Sergei Shtylyov for finding it) ]

These is the patch to turn on pdc202xx_new for ATAPI DMA. When testing, it
works fine without the (request_bufflen % 256) workaround as needed in libata.
ide-scsi filters out (pc->request_transfer % 1024) and use PIO, so the pdc202xx
ATAPI DMA problem is avoid. Both ide-cd and ide-scsi won't hit the ATAPI DMA
problem on pdc202xx_new.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

authored by

Albert Lee and committed by
Bartlomiej Zolnierkiewicz
362ebd83 b43c5f3d

+2 -1
+2 -1
drivers/ide/pci/pdc202xx_new.c
··· 255 255 printk(KERN_WARNING "%s reduced to Ultra33 mode.\n", drive->name); 256 256 } 257 257 258 - if (drive->media != ide_disk) 258 + if (drive->media != ide_disk && drive->media != ide_cdrom) 259 259 return 0; 260 260 261 261 if (id->capability & 4) { ··· 545 545 546 546 hwif->drives[0].autotune = hwif->drives[1].autotune = 1; 547 547 548 + hwif->atapi_dma = 1; 548 549 hwif->ultra_mask = 0x7f; 549 550 hwif->mwdma_mask = 0x07; 550 551