Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / ia64 / sn / kernel / huberror.c
index 2bdf684..56ab6ba 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1992 - 1997, 2000,2002-2004 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 1992 - 1997, 2000,2002-2005 Silicon Graphics, Inc. All rights reserved.
  */
 
 #include <linux/types.h>
@@ -32,14 +32,18 @@ static irqreturn_t hub_eint_handler(int irq, void *arg, struct pt_regs *ep)
        ret_stuff.v0 = 0;
        hubdev_info = (struct hubdev_info *)arg;
        nasid = hubdev_info->hdi_nasid;
-       SAL_CALL_NOLOCK(ret_stuff, SN_SAL_HUB_ERROR_INTERRUPT,
+
+       if (is_shub1()) {
+               SAL_CALL_NOLOCK(ret_stuff, SN_SAL_HUB_ERROR_INTERRUPT,
                        (u64) nasid, 0, 0, 0, 0, 0, 0);
 
-       if ((int)ret_stuff.v0)
-               panic("hubii_eint_handler(): Fatal TIO Error");
+               if ((int)ret_stuff.v0)
+                       panic("hubii_eint_handler(): Fatal TIO Error");
 
-       if (!(nasid & 1)) /* Not a TIO, handle CRB errors */
-               (void)hubiio_crb_error_handler(hubdev_info);
+               if (!(nasid & 1)) /* Not a TIO, handle CRB errors */
+                       (void)hubiio_crb_error_handler(hubdev_info);
+       } else 
+               bte_error_handler((unsigned long)NODEPDA(nasid_to_cnodeid(nasid)));
 
        return IRQ_HANDLED;
 }
@@ -73,7 +77,7 @@ void hubiio_crb_free(struct hubdev_info *hubdev_info, int crbnum)
         */
        REMOTE_HUB_S(hubdev_info->hdi_nasid, IIO_ICDR, (IIO_ICDR_PND | crbnum));
        while (REMOTE_HUB_L(hubdev_info->hdi_nasid, IIO_ICDR) & IIO_ICDR_PND)
-               udelay(1);
+               cpu_relax();
 
 }