Skip to content

Commit

Permalink
pata_cs5536: MWDMA fix
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jeff Garzik committed Oct 20, 2007
1 parent aaa092a commit 80f6fd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ata/pata_cs5536.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <asm/msr.h>

#define DRV_NAME "pata_cs5536"
#define DRV_VERSION "0.0.5"
#define DRV_VERSION "0.0.6"

enum {
CFG = 0,
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 80f6fd3

Please sign in to comment.