* [PATCH] icside: icside_dma_setup() fixes
@ 2009-02-01 19:12 Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2009-02-01 19:12 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel
Check for ide_build_sglist() return value and re-map sg table if necessary.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-01 19:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-01 19:12 [PATCH] icside: icside_dma_setup() fixes Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).