diff options
-rw-r--r-- | drivers/ide/ide-cd.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 7bbdeb7e3bc4..c84abd6f9f6f 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -312,6 +312,7 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat) | |||
312 | ide_hwif_t *hwif = drive->hwif; | 312 | ide_hwif_t *hwif = drive->hwif; |
313 | struct request *rq = hwif->rq; | 313 | struct request *rq = hwif->rq; |
314 | int err, sense_key; | 314 | int err, sense_key; |
315 | u8 quiet = rq->cmd_flags & REQ_QUIET; | ||
315 | 316 | ||
316 | /* get the IDE error register */ | 317 | /* get the IDE error register */ |
317 | err = ide_read_error(drive); | 318 | err = ide_read_error(drive); |
@@ -354,7 +355,7 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat) | |||
354 | * drive doesn't have that capability. | 355 | * drive doesn't have that capability. |
355 | * cdrom_log_sense() knows this! | 356 | * cdrom_log_sense() knows this! |
356 | */ | 357 | */ |
357 | } else if (!(rq->cmd_flags & REQ_QUIET)) { | 358 | } else if (!quiet) { |
358 | /* otherwise, print an error */ | 359 | /* otherwise, print an error */ |
359 | ide_dump_status(drive, "packet command error", stat); | 360 | ide_dump_status(drive, "packet command error", stat); |
360 | } | 361 | } |
@@ -382,7 +383,8 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat) | |||
382 | cdrom_saw_media_change(drive); | 383 | cdrom_saw_media_change(drive); |
383 | 384 | ||
384 | /* fail the request */ | 385 | /* fail the request */ |
385 | printk(KERN_ERR PFX "%s: tray open\n", | 386 | if (!quiet) |
387 | printk(KERN_ERR PFX "%s: tray open\n", | ||
386 | drive->name); | 388 | drive->name); |
387 | } else { | 389 | } else { |
388 | if (ide_cd_breathe(drive, rq)) | 390 | if (ide_cd_breathe(drive, rq)) |
@@ -405,19 +407,23 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat) | |||
405 | * No point in retrying after an illegal request or data | 407 | * No point in retrying after an illegal request or data |
406 | * protect error. | 408 | * protect error. |
407 | */ | 409 | */ |
408 | ide_dump_status(drive, "command error", stat); | 410 | if (!quiet) |
411 | ide_dump_status(drive, "command error", stat); | ||
409 | do_end_request = 1; | 412 | do_end_request = 1; |
410 | } else if (sense_key == MEDIUM_ERROR) { | 413 | } else if (sense_key == MEDIUM_ERROR) { |
411 | /* | 414 | /* |
412 | * No point in re-trying a zillion times on a bad | 415 | * No point in re-trying a zillion times on a bad |
413 | * sector. If we got here the error is not correctable. | 416 | * sector. If we got here the error is not correctable. |
414 | */ | 417 | */ |
415 | ide_dump_status(drive, "media error (bad sector)", | 418 | if (!quiet) |
416 | stat); | 419 | ide_dump_status(drive, "media error " |
420 | "(bad sector)", stat); | ||
417 | do_end_request = 1; | 421 | do_end_request = 1; |
418 | } else if (sense_key == BLANK_CHECK) { | 422 | } else if (sense_key == BLANK_CHECK) { |
419 | /* disk appears blank ?? */ | 423 | /* disk appears blank ?? */ |
420 | ide_dump_status(drive, "media error (blank)", stat); | 424 | if (!quiet) |
425 | ide_dump_status(drive, "media error (blank)", | ||
426 | stat); | ||
421 | do_end_request = 1; | 427 | do_end_request = 1; |
422 | } else if ((err & ~ATA_ABORTED) != 0) { | 428 | } else if ((err & ~ATA_ABORTED) != 0) { |
423 | /* go to the default handler for other errors */ | 429 | /* go to the default handler for other errors */ |