From 23d046f43a05155e050a68f3ad1f19b672713374 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 4 Mar 2007 20:21:38 +0000 Subject: [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 --- drivers/scsi/arm/eesox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/arm/eesox.c') diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index d4136524fc46..ed06a8c19ad6 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c @@ -175,10 +175,10 @@ eesoxscsi_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp, map_dir = DMA_FROM_DEVICE, dma_dir = DMA_MODE_READ; - 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); set_dma_mode(dmach, dma_dir); enable_dma(dmach); return fasdma_real_all; -- cgit v1.2.3