mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
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>
This commit is contained in:
parent
5744a06134
commit
8606ab094c
@ -1446,7 +1446,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
|
|||||||
return ide_stopped;
|
return ide_stopped;
|
||||||
|
|
||||||
/* Read the interrupt reason and the transfer length. */
|
/* 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);
|
lowcyl = HWIF(drive)->INB(IDE_BCOUNTL_REG);
|
||||||
highcyl = HWIF(drive)->INB(IDE_BCOUNTH_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;
|
if (thislen > len) thislen = len;
|
||||||
|
|
||||||
/* The drive wants to be written to. */
|
/* The drive wants to be written to. */
|
||||||
if ((ireason & 3) == 0) {
|
if (ireason == 0) {
|
||||||
if (!rq->data) {
|
if (!rq->data) {
|
||||||
blk_dump_rq_flags(rq, "cdrom_pc_intr, write");
|
blk_dump_rq_flags(rq, "cdrom_pc_intr, write");
|
||||||
goto confused;
|
goto confused;
|
||||||
@ -1509,7 +1509,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Same drill for reading. */
|
/* Same drill for reading. */
|
||||||
else if ((ireason & 3) == 2) {
|
else if (ireason == 2) {
|
||||||
if (!rq->data) {
|
if (!rq->data) {
|
||||||
blk_dump_rq_flags(rq, "cdrom_pc_intr, read");
|
blk_dump_rq_flags(rq, "cdrom_pc_intr, read");
|
||||||
goto confused;
|
goto confused;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user