* [PATCH 09/63] ide-cd: fix 'ireason' reporting in cdrom_pc_intr()
@ 2007-12-20 0:58 Bartlomiej Zolnierkiewicz
2007-12-21 12:01 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-20 0:58 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel
Mask 'ireason' variable so only the valid interrupt reason bits
will be reported on "drive appears confused" error.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-cd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: b/drivers/ide/ide-cd.c
===================================================================
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1440,7 +1440,7 @@ static ide_startstop_t cdrom_pc_intr (id
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);
@@ -1481,7 +1481,7 @@ static ide_startstop_t cdrom_pc_intr (id
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;
@@ -1503,7 +1503,7 @@ static ide_startstop_t cdrom_pc_intr (id
}
/* 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-21 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-20 0:58 [PATCH 09/63] ide-cd: fix 'ireason' reporting in cdrom_pc_intr() Bartlomiej Zolnierkiewicz
2007-12-21 12:01 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).