lkml.org 
[lkml]   [2005]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 6/42]: ppc64: avoid PCI error reporting for empty slots
    06-eeh-empty-slot-error.patch

    Performing PCI config-space reads to empty PCI slots can lead to reports of
    "permanent failure" from the firmware. Ignore permanent failures on empty slots.

    Signed-off-by: Linas Vepstas <linas@linas.org>

    Index: linux-2.6.14-git3/arch/ppc64/kernel/eeh.c
    ===================================================================
    --- linux-2.6.14-git3.orig/arch/ppc64/kernel/eeh.c 2005-10-31 12:13:09.282168648 -0600
    +++ linux-2.6.14-git3/arch/ppc64/kernel/eeh.c 2005-10-31 12:15:26.162962756 -0600
    @@ -617,7 +617,32 @@
    * In any case they must share a common PHB.
    */
    ret = read_slot_reset_state(pdn, rets);
    - if (!(ret == 0 && rets[1] == 1 && (rets[0] == 2 || rets[0] == 4))) {
    +
    + /* If the call to firmware failed, punt */
    + if (ret != 0) {
    + printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n",
    + ret, dn->full_name);
    + __get_cpu_var(false_positives)++;
    + return 0;
    + }
    +
    + /* If EEH is not supported on this device, punt. */
    + if (rets[1] != 1) {
    + printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n",
    + ret, dn->full_name);
    + __get_cpu_var(false_positives)++;
    + return 0;
    + }
    +
    + /* If not the kind of error we know about, punt. */
    + if (rets[0] != 2 && rets[0] != 4 && rets[0] != 5) {
    + __get_cpu_var(false_positives)++;
    + return 0;
    + }
    +
    + /* Note that config-io to empty slots may fail;
    + * we recognize empty because they don't have children. */
    + if ((rets[0] == 5) && (dn->child == NULL)) {
    __get_cpu_var(false_positives)++;
    return 0;
    }
    @@ -650,7 +675,7 @@
    /* Most EEH events are due to device driver bugs. Having
    * a stack trace will help the device-driver authors figure
    * out what happened. So print that out. */
    - dump_stack();
    + if (rets[0] != 5) dump_stack();
    schedule_work(&eeh_event_wq);

    return 0;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-11-04 02:08    [W:0.031 / U:31.344 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site