diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:32 -0400 |
commit | f7ef12482b17a015906cf74afe655e691b5fa2cb (patch) | |
tree | 9a10f00f8bca32d1c7300fca2ee3642d2a85251b | |
parent | 39375853d77bea48b7b334daa3698277af8d33f4 (diff) |
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@gmail.com>
-rw-r--r-- | drivers/ide/icside.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 0cf47e6e9793..cf0522f937c1 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
@@ -326,6 +326,10 @@ static int icside_dma_setup(ide_drive_t *drive) | |||
326 | BUG_ON(dma_channel_active(ec->dma)); | 326 | BUG_ON(dma_channel_active(ec->dma)); |
327 | 327 | ||
328 | hwif->sg_nents = ide_build_sglist(drive, rq); | 328 | hwif->sg_nents = ide_build_sglist(drive, rq); |
329 | if (hwif->sg_nents == 0) { | ||
330 | ide_map_sg(drive, rq); | ||
331 | return 1; | ||
332 | } | ||
329 | 333 | ||
330 | /* | 334 | /* |
331 | * Ensure that we have the right interrupt routed. | 335 | * Ensure that we have the right interrupt routed. |