From: Bartlomiej Zolnierkiewicz Date: Mon, 24 Dec 2007 14:23:43 +0000 (+0100) Subject: ide-cd: add missing 'ireason' masking to cdrom_write_intr() X-Git-Tag: v2.6.24-rc7~35^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=31a71191650dce1bb4a7de6147f1947795826cda;p=linux-2.6-omap-h63xx.git ide-cd: add missing 'ireason' masking to cdrom_write_intr() Mask 'ireason' variable with 0x3 so the valid interrupt reason value is passed to cdrom_write_check_ireason() for checking. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index d4b298eb5ef..30f27585a7d 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1826,7 +1826,7 @@ static ide_startstop_t cdrom_write_intr(ide_drive_t *drive) } /* Read the interrupt reason and the transfer length. */ - ireason = HWIF(drive)->INB(IDE_IREASON_REG); + ireason = HWIF(drive)->INB(IDE_IREASON_REG) & 0x3; lowcyl = HWIF(drive)->INB(IDE_BCOUNTL_REG); highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG);