提交 34c69b60 编写于 作者: B Bartlomiej Zolnierkiewicz

ide: don't BUG() on unsupported transfer modes

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: NSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 c1f50cbb
...@@ -748,8 +748,7 @@ static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed) ...@@ -748,8 +748,7 @@ static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed)
hold = ATA_DMA2_HOLD; hold = ATA_DMA2_HOLD;
break; break;
default: default:
BUG(); return;
break;
} }
if (speed >= XFER_UDMA_0) if (speed >= XFER_UDMA_0)
......
...@@ -117,8 +117,7 @@ static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode) ...@@ -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_1: timings = 0x00012121; break;
case XFER_MW_DMA_2: timings = 0x00002020; break; case XFER_MW_DMA_2: timings = 0x00002020; break;
default: default:
BUG(); return;
break;
} }
basereg = CS5530_BASEREG(drive->hwif); basereg = CS5530_BASEREG(drive->hwif);
reg = inl(basereg + 4); /* get drive0 config register */ reg = inl(basereg + 4); /* get drive0 config register */
......
...@@ -186,8 +186,7 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) ...@@ -186,8 +186,7 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode)
} }
break; break;
default: default:
BUG(); return;
break;
} }
if (unit == 0) { /* are we configuring drive0? */ if (unit == 0) { /* are we configuring drive0? */
......
...@@ -356,7 +356,6 @@ static void sis_set_dma_mode(ide_drive_t *drive, const u8 speed) ...@@ -356,7 +356,6 @@ static void sis_set_dma_mode(ide_drive_t *drive, const u8 speed)
sis_program_timings(drive, speed); sis_program_timings(drive, speed);
break; break;
default: default:
BUG();
break; break;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册