Skip to content

Commit

Permalink
icside: icside_dma_setup() fixes
Browse files Browse the repository at this point in the history
Check for ide_build_sglist() return value and re-map sg table if necessary.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 27, 2009
1 parent 3937585 commit f7ef124
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ide/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ static int icside_dma_setup(ide_drive_t *drive)
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.
Expand Down

0 comments on commit f7ef124

Please sign in to comment.