Module Name:    src
Committed By:   matt
Date:           Fri May 14 22:48:46 UTC 2010

Modified Files:
        src/sys/arch/mips/sibyte/pci [matt-nb5-mips64]: sbbrz_pci.c

Log Message:
Do the sync before the badaddr in pci_conf_read so make no other PCI
transactions are pending before we probe.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/sibyte/pci/sbbrz_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/sibyte/pci/sbbrz_pci.c
diff -u src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.1.2.6 src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.1.2.7
--- src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.1.2.6	Fri May 14 22:26:00 2010
+++ src/sys/arch/mips/sibyte/pci/sbbrz_pci.c	Fri May 14 22:48:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sbbrz_pci.c,v 1.1.2.6 2010/05/14 22:26:00 matt Exp $ */
+/* $NetBSD: sbbrz_pci.c,v 1.1.2.7 2010/05/14 22:48:46 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -64,7 +64,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.1.2.6 2010/05/14 22:26:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.1.2.7 2010/05/14 22:48:46 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -184,14 +184,12 @@
 	addr = A_PHYS_LDTPCI_CFG_MATCH_BITS + tag + offset;
 	addr = MIPS_PHYS_TO_XKPHYS(MIPS3_TLB_ATTR_UNCACHED, addr);
 
+	__asm volatile("sync");
+
 	if (badaddr64(addr, 4) != 0)
 		return 0xffffffff;
 
-	pcireg_t rv = mips3_lw_a64(addr);
-#ifdef __mips_o32
-	__asm volatile("sync");
-#endif
-	return rv;
+	return mips3_lw_a64(addr);
 }
 
 void

Reply via email to