[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200902012012.23761.bzolnier@gmail.com>
Date: Sun, 1 Feb 2009 20:12:23 +0100
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: linux-ide@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] icside: icside_dma_setup() fixes
Check for ide_build_sglist() return value and re-map sg table if necessary.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
drivers/ide/icside.c | 4 ++++
1 file changed, 4 insertions(+)
Index: b/drivers/ide/icside.c
===================================================================
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -326,6 +326,10 @@ static int icside_dma_setup(ide_drive_t
BUG_ON(dma_channel_active(ec->dma));
hwif->sg_nents = ide_build_sglist(drive, rq);
+ if (hwif->sg_nents == 0) {
+ ide_map_sg(drive, rq);
+ return 1;
+ }
/*
* Ensure that we have the right interrupt routed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists