Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34c69b60 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent c1f50cbb
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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)
+1 −2
Original line number Diff line number Diff line
@@ -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 */
+1 −2
Original line number Diff line number Diff line
@@ -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? */
+0 −1
Original line number Diff line number Diff line
@@ -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;
	}
}