Skip to content

Commit

Permalink
ide: don't BUG() on unsupported transfer modes
Browse files Browse the repository at this point in the history
Fix ide-cris, cs5530, sc1200 and sis5513 host drivers to just return instead
of OOPS-ing for unsupported modes in ->set_dma_mode methods.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Nov 13, 2007
1 parent c1f50cb commit 34c69b6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions drivers/ide/cris/ide-cris.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,7 @@ static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed)
hold = ATA_DMA2_HOLD;
break;
default:
BUG();
break;
return;
}

if (speed >= XFER_UDMA_0)
Expand Down
3 changes: 1 addition & 2 deletions drivers/ide/pci/cs5530.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode)
case XFER_MW_DMA_1: timings = 0x00012121; break;
case XFER_MW_DMA_2: timings = 0x00002020; break;
default:
BUG();
break;
return;
}
basereg = CS5530_BASEREG(drive->hwif);
reg = inl(basereg + 4); /* get drive0 config register */
Expand Down
3 changes: 1 addition & 2 deletions drivers/ide/pci/sc1200.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode)
}
break;
default:
BUG();
break;
return;
}

if (unit == 0) { /* are we configuring drive0? */
Expand Down
1 change: 0 additions & 1 deletion drivers/ide/pci/sis5513.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ static void sis_set_dma_mode(ide_drive_t *drive, const u8 speed)
sis_program_timings(drive, speed);
break;
default:
BUG();
break;
}
}
Expand Down

0 comments on commit 34c69b6

Please sign in to comment.