aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_cs5536.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-16 19:23:43 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-19 22:55:03 -0400
commit80f6fd3828b74ca123083e4fdc28cbe9d865fd64 (patch)
treec537d3c2d8ee0dc1a415fb36460b1c21a927a077 /drivers/ata/pata_cs5536.c
parentaaa092a114696f4425cd57c4d7fa05110007e247 (diff)
pata_cs5536: MWDMA fix
* Fix out-of-bound array access for MWDMA modes. * Bump driver version. Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_cs5536.c')
-rw-r--r--drivers/ata/pata_cs5536.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 53070f6b1fc..d753e568588 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -40,7 +40,7 @@
40#include <asm/msr.h> 40#include <asm/msr.h>
41 41
42#define DRV_NAME "pata_cs5536" 42#define DRV_NAME "pata_cs5536"
43#define DRV_VERSION "0.0.5" 43#define DRV_VERSION "0.0.6"
44 44
45enum { 45enum {
46 CFG = 0, 46 CFG = 0,
@@ -214,7 +214,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev)
214 cs5536_read(pdev, DTC, &dtc); 214 cs5536_read(pdev, DTC, &dtc);
215 215
216 dtc &= ~(IDE_DRV_MASK << dshift); 216 dtc &= ~(IDE_DRV_MASK << dshift);
217 dtc |= mwdma_timings[mode] << dshift; 217 dtc |= mwdma_timings[mode - XFER_MW_DMA_0] << dshift;
218 218
219 cs5536_write(pdev, DTC, dtc); 219 cs5536_write(pdev, DTC, dtc);
220 } 220 }