VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / arch / ia64 / sn / io / sn2 / bte_error.c
index 799532f..b77e9e2 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 
@@ -90,6 +90,7 @@ bte_error_handler(unsigned long _nodepda)
        ii_icrb0_d_u_t icrbd;   /* II CRB Register D */
        ii_ibcr_u_t ibcr;
        ii_icmr_u_t icmr;
+       ii_ieclr_u_t ieclr;
 
 
        BTE_PRINTK(("bte_error_handler(%p) - %d\n", err_nodepda,
@@ -177,6 +178,14 @@ bte_error_handler(unsigned long _nodepda)
        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);
 
+       /* Clear IBLS0/1 error bits */
+       ieclr.ii_ieclr_regval = 0;
+       if (err_nodepda->bte_if[0].bh_error != BTE_SUCCESS)
+               ieclr.ii_ieclr_fld_s.i_e_bte_0 = 1;
+       if (err_nodepda->bte_if[1].bh_error != BTE_SUCCESS)
+                ieclr.ii_ieclr_fld_s.i_e_bte_1 = 1;
+       REMOTE_HUB_S(nasid, IIO_IECLR, ieclr.ii_ieclr_regval);
+
        /* Reinitialize both BTE state machines. */
        ibcr.ii_ibcr_regval = REMOTE_HUB_L(nasid, IIO_IBCR);
        ibcr.ii_ibcr_fld_s.i_soft_reset = 1;
@@ -199,7 +208,7 @@ bte_error_handler(unsigned long _nodepda)
                err_nodepda->bte_if[i].cleanup_active = 0;
                BTE_PRINTK(("eh:%p:%d Unlocked %d\n", err_nodepda,
                            smp_processor_id(), i));
-               spin_unlock(&pda->cpu_bte_if[i]->spinlock);
+               spin_unlock(&err_nodepda->bte_if[i].spinlock);
        }
 
        del_timer(recovery_timer);