[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: ide-cd: fix 'ireason' reporting in cdrom_pc_intr()
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2007-12-26 5:00:59
Message-ID: 200712260500.lBQ50xHQ009302 () hera ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8606ab094cfe909f83deedf1fac86993d7c9a9ad
Commit: 8606ab094cfe909f83deedf1fac86993d7c9a9ad
Parent: 5744a06134c8f4e77ad14016420aac308c763454
Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Mon Dec 24 15:23:44 2007 +0100
Committer: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Mon Dec 24 15:23:44 2007 +0100
ide-cd: fix 'ireason' reporting in cdrom_pc_intr()
Mask 'ireason' variable so only the valid interrupt reason bits
will be reported on "drive appears confused" error.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-cd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 522580f..c7d77f0 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1446,7 +1446,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
return ide_stopped;
/* 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);
@@ -1487,7 +1487,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
if (thislen > len) thislen = len;
/* The drive wants to be written to. */
- if ((ireason & 3) == 0) {
+ if (ireason == 0) {
if (!rq->data) {
blk_dump_rq_flags(rq, "cdrom_pc_intr, write");
goto confused;
@@ -1509,7 +1509,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
}
/* Same drill for reading. */
- else if ((ireason & 3) == 2) {
+ else if (ireason == 2) {
if (!rq->data) {
blk_dump_rq_flags(rq, "cdrom_pc_intr, read");
goto confused;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic