kernel/4961: hifn7751.c comments and code do not match

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

kernel/4961: hifn7751.c comments and code do not match

Jochen Eisinger
>Number:         4961
>Category:       kernel
>Synopsis:       hifn7751.c comments and code do not match
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 02 14:20:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Jochen
>Release:        3.8
>Organization:
net
>Environment:
       
        System      : OpenBSD 3.8
        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
        revision 1.149 of hifn7751.c introduced a work around for certain
        interrupt related problems. The comment block surrounding the
        updated block of code, however, remained untouched.

        The result is that the comment states the exact opposite of
        what the code does.
>How-To-Repeat:
>Fix:
        Apply the following patch to update the comment as well:

--- hifn7751.c.orig     2004-08-13 22:53:26.000000000 +0200
+++ hifn7751.c  2004-08-13 22:57:21.000000000 +0200
@@ -1561,9 +1561,10 @@
  }

  /*
- * We don't worry about missing an interrupt (which a "command wait"
- * interrupt salvages us from), unless there is more than one command
- * in the queue.
+ * Always enable the command wait interrupt.  We are obviously
+ * missing an interrupt or two somewhere. Enabling the command wait
+ * interrupt will guarantee we get called periodically until all
+ * of the queues are drained and thus work around this.
  */
  sc->sc_dmaier |= HIFN_DMAIER_C_WAIT;
  WRITE_REG_1(sc, HIFN_1_DMA_IER, sc->sc_dmaier);
@@ -2562,9 +2563,10 @@
  }

  /*
- * We don't worry about missing an interrupt (which a "command wait"
- * interrupt salvages us from), unless there is more than one command
- * in the queue.
+ * Always enable the command wait interrupt.  We are obviously
+ * missing an interrupt or two somewhere. Enabling the command wait
+ * interrupt will guarantee we get called periodically until all
+ * of the queues are drained and thus work around this.
  */
  sc->sc_dmaier |= HIFN_DMAIER_C_WAIT;
  WRITE_REG_1(sc, HIFN_1_DMA_IER, sc->sc_dmaier);


>Release-Note:
>Audit-Trail:
>Unformatted: