diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:00 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:00 -0400 |
commit | 1ab6d7451684078bfc4fbabc432f0ef8a809e975 (patch) | |
tree | cb9c9d23ac6720285fd50d01e4ccde72e41a6f8c /drivers/ide/ide-cd.c | |
parent | 13eae6a48fc57495eb9e733430b8fc20df7bf415 (diff) |
ide-cd: remove needless ide_dump_status_no_sense() wrapper
It makes no sense to check for BSY bit being set as earlier OK_STAT()
check in cdrom_end_request() makes sure that BSY bit is cleared.
There should be no functional changes caused by this patch.
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 4a289711c551..19ccadead5e8 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -290,13 +290,6 @@ static void cdrom_end_request(ide_drive_t *drive, int uptodate) | |||
290 | ide_complete_rq(drive, uptodate ? 0 : -EIO, nsectors << 9); | 290 | ide_complete_rq(drive, uptodate ? 0 : -EIO, nsectors << 9); |
291 | } | 291 | } |
292 | 292 | ||
293 | static void ide_dump_status_no_sense(ide_drive_t *drive, const char *msg, u8 st) | ||
294 | { | ||
295 | if (st & 0x80) | ||
296 | return; | ||
297 | ide_dump_status(drive, msg, st); | ||
298 | } | ||
299 | |||
300 | /* | 293 | /* |
301 | * Returns: | 294 | * Returns: |
302 | * 0: if the request should be continued. | 295 | * 0: if the request should be continued. |
@@ -439,21 +432,19 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | |||
439 | * No point in retrying after an illegal request or data | 432 | * No point in retrying after an illegal request or data |
440 | * protect error. | 433 | * protect error. |
441 | */ | 434 | */ |
442 | ide_dump_status_no_sense(drive, "command error", stat); | 435 | ide_dump_status(drive, "command error", stat); |
443 | do_end_request = 1; | 436 | do_end_request = 1; |
444 | } else if (sense_key == MEDIUM_ERROR) { | 437 | } else if (sense_key == MEDIUM_ERROR) { |
445 | /* | 438 | /* |
446 | * No point in re-trying a zillion times on a bad | 439 | * No point in re-trying a zillion times on a bad |
447 | * sector. If we got here the error is not correctable. | 440 | * sector. If we got here the error is not correctable. |
448 | */ | 441 | */ |
449 | ide_dump_status_no_sense(drive, | 442 | ide_dump_status(drive, "media error (bad sector)", |
450 | "media error (bad sector)", | 443 | stat); |
451 | stat); | ||
452 | do_end_request = 1; | 444 | do_end_request = 1; |
453 | } else if (sense_key == BLANK_CHECK) { | 445 | } else if (sense_key == BLANK_CHECK) { |
454 | /* disk appears blank ?? */ | 446 | /* disk appears blank ?? */ |
455 | ide_dump_status_no_sense(drive, "media error (blank)", | 447 | ide_dump_status(drive, "media error (blank)", stat); |
456 | stat); | ||
457 | do_end_request = 1; | 448 | do_end_request = 1; |
458 | } else if ((err & ~ATA_ABORTED) != 0) { | 449 | } else if ((err & ~ATA_ABORTED) != 0) { |
459 | /* go to the default handler for other errors */ | 450 | /* go to the default handler for other errors */ |