From: Bartlomiej Zolnierkiewicz Date: Tue, 16 Oct 2007 23:23:43 +0000 (+0200) Subject: pata_cs5536: MWDMA fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=80f6fd3828b74ca123083e4fdc28cbe9d865fd64;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git pata_cs5536: MWDMA fix * Fix out-of-bound array access for MWDMA modes. * Bump driver version. Cc: "Martin K. Petersen" Cc: Jeff Garzik Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index 53070f6b1fc4..d753e568588e 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c @@ -40,7 +40,7 @@ #include #define DRV_NAME "pata_cs5536" -#define DRV_VERSION "0.0.5" +#define DRV_VERSION "0.0.6" enum { CFG = 0, @@ -214,7 +214,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev) cs5536_read(pdev, DTC, &dtc); dtc &= ~(IDE_DRV_MASK << dshift); - dtc |= mwdma_timings[mode] << dshift; + dtc |= mwdma_timings[mode - XFER_MW_DMA_0] << dshift; cs5536_write(pdev, DTC, dtc); }