Merge branch 'stable-4.7' of git://git.infradead.org/users/pcmoore/audit
[deliverable/linux.git] / arch / ia64 / sn / kernel / bte_error.c
index f1ec1370b3e37afc87fe9237763b4adc62054e9e..4cb09f3f1efc636b9090adcfd2fe80e07e278760 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2007 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 #include <linux/types.h>
@@ -78,7 +78,7 @@ int shub1_bte_error_handler(unsigned long _nodepda)
                 * There are errors which still need to be cleaned up by
                 * hubiio_crb_error_handler
                 */
-               mod_timer(recovery_timer, HZ * 5);
+               mod_timer(recovery_timer, jiffies + (HZ * 5));
                BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
                            smp_processor_id()));
                return 1;
@@ -95,7 +95,7 @@ int shub1_bte_error_handler(unsigned long _nodepda)
                        icrbd.ii_icrb0_d_regval =
                            REMOTE_HUB_L(nasid, IIO_ICRB_D(i));
                        if (icrbd.d_bteop) {
-                               mod_timer(recovery_timer, HZ * 5);
+                               mod_timer(recovery_timer, jiffies + (HZ * 5));
                                BTE_PRINTK(("eh:%p:%d Valid %d, Giving up\n",
                                            err_nodepda, smp_processor_id(),
                                            i));
@@ -105,7 +105,7 @@ int shub1_bte_error_handler(unsigned long _nodepda)
        }
 
        BTE_PRINTK(("eh:%p:%d Cleaning up\n", err_nodepda, smp_processor_id()));
-       /* Reenable both bte interfaces */
+       /* Re-enable both bte interfaces */
        imem.ii_imem_regval = REMOTE_HUB_L(nasid, IIO_IMEM);
        imem.ii_imem_fld_s.i_b0_esd = imem.ii_imem_fld_s.i_b1_esd = 1;
        REMOTE_HUB_S(nasid, IIO_IMEM, imem.ii_imem_regval);
@@ -148,9 +148,13 @@ int shub2_bte_error_handler(unsigned long _nodepda)
        for (i = 0; i < BTES_PER_NODE; i++) {
                bte = &err_nodepda->bte_if[i];
                status = BTE_LNSTAT_LOAD(bte);
-               if ((status & IBLS_ERROR) || !(status & IBLS_BUSY))
+               if (status & IBLS_ERROR) {
+                       bte->bh_error = BTE_SHUB2_ERROR(status);
                        continue;
-               mod_timer(recovery_timer, HZ * 5);
+               }
+               if (!(status & IBLS_BUSY))
+                       continue;
+               mod_timer(recovery_timer, jiffies + (HZ * 5));
                BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
                            smp_processor_id()));
                return 1;
@@ -243,7 +247,7 @@ bte_crb_error_handler(cnodeid_t cnode, int btenum,
 
        /*
         * The caller has already figured out the error type, we save that
-        * in the bte handle structure for the thread excercising the
+        * in the bte handle structure for the thread exercising the
         * interface to consume.
         */
        bte->bh_error = ioe->ie_errortype + BTEFAIL_OFFSET;
This page took 0.024983 seconds and 5 git commands to generate.