Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159989 - [RHEL3][PATCH] suppress medum-not-present messages from idefloppy
Summary: [RHEL3][PATCH] suppress medum-not-present messages from idefloppy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brian Maly
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 156320
TreeView+ depends on / blocked
 
Reported: 2005-06-09 21:58 UTC by Tim Burke
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHSA-2005-663
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-28 15:20:15 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:663 qe-ready SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 3 Update 6 2005-09-28 04:00:00 UTC

Description Tim Burke 2005-06-09 21:58:06 UTC
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;
        }

Comment 2 Ernie Petrides 2005-06-10 04:01:30 UTC
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).


Comment 3 Ernie Petrides 2005-06-10 19:56:02 UTC
*** Bug 160093 has been marked as a duplicate of this bug. ***

Comment 9 Red Hat Bugzilla 2005-09-28 15:20:16 UTC
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



Note You need to log in before you can comment on or make changes to this bug.