patch-2.4.25 linux-2.4.25/drivers/atm/he.c

Next file: linux-2.4.25/drivers/atm/horizon.c
Previous file: linux-2.4.25/drivers/atm/atmdev_init.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/drivers/atm/he.c linux-2.4.25/drivers/atm/he.c
@@ -179,9 +179,7 @@
 								unsigned flags)
 {
 	he_writel(he_dev, val, CON_DAT);
-#ifdef CONFIG_IA64_SGI_SN2
-	(void) he_readl(he_dev, CON_DAT);
-#endif
+	(void) he_readl(he_dev, CON_DAT);		/* flush posted writes */
 	he_writel(he_dev, flags | CON_CTL_WRITE | CON_CTL_ADDR(addr), CON_CTL);
 	while (he_readl(he_dev, CON_CTL) & CON_CTL_BUSY);
 }
@@ -1951,9 +1949,6 @@
 
 		he_writel(he_dev, RBRQ_MASK(he_dev->rbrq_head),
 						G0_RBRQ_H + (group * 16));
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl(he_dev, G0_RBRQ_H + (group * 16));
-#endif
 	}
 
 	return pdus_assembled;
@@ -2047,9 +2042,6 @@
 
 		he_writel(he_dev, TBRQ_MASK(he_dev->tbrq_head),
 						G0_TBRQ_H + (group * 16));
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl(he_dev, G0_TBRQ_H + (group * 16));
-#endif
 	}
 }
 
@@ -2077,12 +2069,8 @@
 		++moved;
 	} 
 
-	if (moved) {
+	if (moved)
 		he_writel(he_dev, RBPL_MASK(he_dev->rbpl_tail), G0_RBPL_T);
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl(he_dev, G0_RBPL_T);
-#endif
-	}
 }
 
 #ifdef USE_RBPS
@@ -2109,12 +2097,8 @@
 		++moved;
 	} 
 
-	if (moved) {
+	if (moved)
 		he_writel(he_dev, RBPS_MASK(he_dev->rbps_tail), G0_RBPS_T);
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl(he_dev, G0_RBPS_T);
-#endif
-	}
 }
 #endif /* USE_RBPS */
 
@@ -2211,7 +2195,7 @@
 			IRQ_SIZE(CONFIG_IRQ_SIZE) |
 			IRQ_THRESH(CONFIG_IRQ_THRESH) |
 			IRQ_TAIL(he_dev->irq_tail), IRQ0_HEAD);
-		(void) he_readl(he_dev, INT_FIFO); /* 8.1.2 controller errata */
+		(void) he_readl(he_dev, INT_FIFO); /* 8.1.2 controller errata; flush posted writes */
 	}
 #ifdef USE_TASKLET
 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
@@ -2252,11 +2236,8 @@
 #else
 		he_tasklet((unsigned long) he_dev);
 #endif
-		he_writel(he_dev, INT_CLEAR_A, INT_FIFO);
-							/* clear interrupt */
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl(he_dev, INT_FIFO);
-#endif
+		he_writel(he_dev, INT_CLEAR_A, INT_FIFO);	/* clear interrupt */
+		(void) he_readl(he_dev, INT_FIFO);		/* flush posted writes */
 	}
 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
 	return IRQ_RETVAL(handled);
@@ -2325,9 +2306,7 @@
 	he_dev->tpdrq_tail = new_tail;
 
 	he_writel(he_dev, TPDRQ_MASK(he_dev->tpdrq_tail), TPDRQ_T);
-#ifdef CONFIG_IA64_SGI_SN2
-	(void) he_readl(he_dev, TPDRQ_T);
-#endif
+	(void) he_readl(he_dev, TPDRQ_T);		/* flush posted writes */
 }
 
 static int
@@ -2482,9 +2461,7 @@
 		he_writel_tsr12(he_dev, 0x0, cid);
 		he_writel_tsr13(he_dev, 0x0, cid);
 		he_writel_tsr14(he_dev, 0x0, cid);
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl_tsr0(he_dev, cid);
-#endif
+		(void) he_readl_tsr0(he_dev, cid);		/* flush posted writes */
 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
 	}
 
@@ -2538,9 +2515,7 @@
 			  the open/closed indication in rsr0 */
 		he_writel_rsr0(he_dev,
 			rsr0 | RSR0_START_PDU | RSR0_OPEN_CONN | aal, cid);
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl_rsr0(he_dev, cid);
-#endif
+		(void) he_readl_rsr0(he_dev, cid);		/* flush posted writes */
 
 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
 	}
@@ -2594,9 +2569,7 @@
 		set_current_state(TASK_UNINTERRUPTIBLE);
 
 		he_writel_rsr0(he_dev, RSR0_CLOSE_CONN, cid);
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl_rsr0(he_dev, cid);
-#endif
+		(void) he_readl_rsr0(he_dev, cid);		/* flush posted writes */
 		he_writel_mbox(he_dev, cid, RXCON_CLOSE);
 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
 
@@ -2646,9 +2619,6 @@
 		spin_lock_irqsave(&he_dev->global_lock, flags);
 		he_writel_tsr4_upper(he_dev, TSR4_FLUSH_CONN, cid);
 					/* also clears TSR4_SESSION_ENDED */
-#ifdef CONFIG_IA64_SGI_SN2
-		(void) he_readl_tsr4(he_dev, cid);
-#endif
 
 		switch (vcc->qos.txtp.traffic_class) {
 			case ATM_UBR:
@@ -2660,6 +2630,7 @@
 				he_writel_tsr14_upper(he_dev, TSR14_DELETE, cid);
 				break;
 		}
+		(void) he_readl_tsr4(he_dev, cid);		/* flush posted writes */
 
 		tpd = __alloc_tpd(he_dev);
 		if (tpd == NULL) {
@@ -2922,9 +2893,7 @@
 
 	spin_lock_irqsave(&he_dev->global_lock, flags);
 	he_writel(he_dev, val, FRAMER + (addr*4));
-#ifdef CONFIG_IA64_SGI_SN2
-	(void) he_readl(he_dev, FRAMER + (addr*4));
-#endif
+	(void) he_readl(he_dev, FRAMER + (addr*4));		/* flush posted writes */
 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
 }
  

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)