summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arm/cumana_2.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-03-04 20:21:38 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-03-04 20:33:31 +0000
commit23d046f43a05155e050a68f3ad1f19b672713374 (patch)
tree5c32d8fde63c81a76083d2a550d5ba02ba44a873 /drivers/scsi/arm/cumana_2.c
parent6b4df7ee1f636f0dbf3896235582559c86cb18aa (diff)
[ARM] ARM SCSI: Don't try to dma_map_sg too many scatterlist entries
An off-by-one bug meant we were always trying to map one too many scatterlist entries. This was mostly harmless prior to the checks going in to consistent_sync(), but now causes the kernel to BUG. Also, powertec.c was missing an assignment to info->ec. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/scsi/arm/cumana_2.c')
-rw-r--r--drivers/scsi/arm/cumana_2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index d2d51dc51ab..82add77ad13 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -178,10 +178,10 @@ cumanascsi_2_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp,
dma_dir = DMA_MODE_READ,
alatch_dir = ALATCH_DMA_IN;
- dma_map_sg(dev, info->sg, bufs + 1, map_dir);
+ dma_map_sg(dev, info->sg, bufs, map_dir);
disable_dma(dmach);
- set_dma_sg(dmach, info->sg, bufs + 1);
+ set_dma_sg(dmach, info->sg, bufs);
writeb(alatch_dir, info->base + CUMANASCSI2_ALATCH);
set_dma_mode(dmach, dma_dir);
enable_dma(dmach);