Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3649c06e66ad3589374e8765ed69eda65658735c Commit: 3649c06e66ad3589374e8765ed69eda65658735c Parent: 4728d546d7137ad5350cc2e53d4748fd26f61a60 Author: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> AuthorDate: Wed May 16 00:51:46 2007 +0200 Committer: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> CommitDate: Wed May 16 00:51:46 2007 +0200
ide: add missing validity checks for identify words 62 and 63 Check validity of identify words 62 and 63 before using them in ide_get_mode_mask(). Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- drivers/ide/ide-dma.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index de33e6f..ada2a3e 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -731,10 +731,12 @@ static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base) mask &= 0x07; break; case XFER_MW_DMA_0: - mask = id->dma_mword & hwif->mwdma_mask; + if (id->field_valid & 2) + mask = id->dma_mword & hwif->mwdma_mask; break; case XFER_SW_DMA_0: - mask = id->dma_1word & hwif->swdma_mask; + if (id->field_valid & 2) + mask = id->dma_1word & hwif->swdma_mask; break; default: BUG(); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html