Bug 159989
| Summary: | [RHEL3][PATCH] suppress medum-not-present messages from idefloppy | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 3 | Reporter: | Tim Burke <tburke> |
| Component: | kernel | Assignee: | Brian Maly <bmaly> |
| Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.0 | CC: | petrides, tao |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | RHSA-2005-663 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2005-09-28 15:20:15 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 156320 | ||
A fix for this problem was committed to the RHEL3 U6 patch pool on 22-Apr-2005 (in kernel version 2.4.21-32.2.EL). *** Bug 160093 has been marked as a duplicate of this bug. *** An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2005-663.html |
From: Brian Maly <bmaly> Date: Wed, 13 Apr 2005 04:12:54 -0400 Subject: [RHEL3][PATCH] suppress medum-not-present messages from idefloppy) Tracking: 0957.bmaly.ide-floppy-no-media.patch Archives: 2005-April/msg00231.html Archives: 2005-April/msg00267.html Status: committed in -32.2.EL ------------------------------------------------------------------------ This patch prevents "media not present" messages, e.g. (ide-floppy: hde: I/O error, pc=0, key=2, asc=3a, ascq=0), from spewing to the console and logs when a floppy is absent from the ide-floppy drive. This generally spews to the console until it finally gives up. Certainly non critical, but an annoyance to some. [updated by bmaly on 14-Apr-2005] --- linux-2.4.21/drivers/ide/ide-floppy.c.orig +++ linux-2.4.21/drivers/ide/ide-floppy.c @@ -1026,6 +1026,20 @@ return ide_started; } +/** + * idefloppy_should_report_error() + * + * Supresses error messages resulting from Medium not present + */ +static inline int idefloppy_should_report_error(idefloppy_floppy_t *floppy) +{ + if (floppy->sense_key == 0x02 && + floppy->asc == 0x3a && + floppy->ascq == 0x00) + return 0; + return 1; +} + /* * Issue a packet command */ */ @@ -1058,12 +1072,13 @@ */ if (!test_bit(PC_ABORT, &pc->flags)) { if (!test_bit(PC_SUPPRESS_ERROR, &pc->flags)) { - printk(KERN_ERR "ide-floppy: %s: I/O error, " - "pc = %2x, key = %2x, " - "asc = %2x, ascq = %2x\n", - drive->name, pc->c[0], - floppy->sense_key, - floppy->asc, floppy->ascq); + if (idefloppy_should_report_error(floppy)) + printk(KERN_ERR "ide-floppy: %s: I/O error, " + "pc = %2x, key = %2x, " + "asc = %2x, ascq = %2x\n", + drive->name, pc->c[0], + floppy->sense_key, + floppy->asc, floppy->ascq); } /* Giving up */ pc->error = IDEFLOPPY_ERROR_GENERAL; @@ -1276,14 +1291,16 @@ #endif /* IDEFLOPPY_DEBUG_LOG */ if (rq->errors >= ERROR_MAX) { - if (floppy->failed_pc != NULL) - printk(KERN_ERR "ide-floppy: %s: I/O error, pc = %2x," - " key = %2x, asc = %2x, ascq = %2x\n", - drive->name, floppy->failed_pc->c[0], - floppy->sense_key, floppy->asc, floppy->ascq); + if (floppy->failed_pc != NULL) { + if (idefloppy_should_report_error(floppy)) + printk(KERN_ERR "ide-floppy: %s: I/O error, pc = %2x," + " key = %2x, asc = %2x, ascq = %2x\n", + drive->name, floppy->failed_pc->c[0], + floppy->sense_key, floppy->asc, floppy->ascq); + } else printk(KERN_ERR "ide-floppy: %s: I/O error\n", - drive->name); + drive->name); idefloppy_do_end_request(drive, 0); return ide_stopped; }