patch-2.3.48 linux/drivers/net/declance.c

Next file: linux/drivers/net/eepro100.c
Previous file: linux/drivers/net/bagetlance.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/drivers/net/declance.c linux/drivers/net/declance.c
@@ -60,6 +60,7 @@
 #include <asm/dec/machtype.h>
 #include <asm/dec/tc.h>
 #include <asm/dec/kn01.h>
+#include <asm/wbflush.h>
 #include <asm/addrspace.h>
 
 #include <linux/config.h>
@@ -301,6 +302,7 @@
 static inline void writereg(volatile unsigned short *regptr, short value)
 {
 	*regptr = value;
+	wbflush();
 }
 
 /* Load the CSR registers */
@@ -380,6 +382,7 @@
 		}
 	}
 
+	wbflush();
 }
 
 void cp_from_buf(void *to, unsigned char *from, int len)
@@ -515,6 +518,7 @@
 		if (i < 3 && ZERO)
 			printk("%d: 0x%8.8x(0x%8.8x)\n", i, leptr, (int) lp->rx_buf_ptr_cpu[i]);
 	}
+	wbflush();
 }
 
 static int init_restart_lance(struct lance_private *lp)
@@ -752,6 +756,7 @@
 			 * re-enable LANCE DMA
 			 */
 			*(unsigned long *) (system_base + IOCTL + SSR) |= (1 << 16);
+			wbflush();
 		}
 		writereg(&ll->rdp, LE_C0_STOP);
 
@@ -1071,6 +1076,7 @@
 		lp->dma_ptr_reg = (unsigned long *) (system_base + IOCTL + LANCE_DMA_P);
 		*(lp->dma_ptr_reg) = PHYSADDR(dev->mem_start) << 3;
 		*(unsigned long *) (system_base + IOCTL + SSR) |= (1 << 16);
+		wbflush();
 
 		break;
 	case PMAD_LANCE:

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