提交 80f6fd38 编写于 作者: B Bartlomiej Zolnierkiewicz 提交者: Jeff Garzik

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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 aaa092a1
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <asm/msr.h> #include <asm/msr.h>
#define DRV_NAME "pata_cs5536" #define DRV_NAME "pata_cs5536"
#define DRV_VERSION "0.0.5" #define DRV_VERSION "0.0.6"
enum { enum {
CFG = 0, CFG = 0,
...@@ -214,7 +214,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev) ...@@ -214,7 +214,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev)
cs5536_read(pdev, DTC, &dtc); cs5536_read(pdev, DTC, &dtc);
dtc &= ~(IDE_DRV_MASK << dshift); dtc &= ~(IDE_DRV_MASK << dshift);
dtc |= mwdma_timings[mode] << dshift; dtc |= mwdma_timings[mode - XFER_MW_DMA_0] << dshift;
cs5536_write(pdev, DTC, dtc); cs5536_write(pdev, DTC, dtc);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册