Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci On the first read of the DEVCONFIG PCI config re...



details:   https://anonhg.NetBSD.org/src/rev/010ae8e7ad6c
branches:  trunk
changeset: 546305:010ae8e7ad6c
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Fri Apr 25 16:02:52 2003 +0000

description:
On the first read of the DEVCONFIG PCI config register, sparc64 systems
seem to return all 1s. The second read is ok, though. So, as a workaround,
read it twice. From Manuel Bouyer.

diffstat:

 sys/dev/pci/ahc_pci.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 20690edb070d -r 010ae8e7ad6c sys/dev/pci/ahc_pci.c
--- a/sys/dev/pci/ahc_pci.c     Fri Apr 25 08:04:14 2003 +0000
+++ b/sys/dev/pci/ahc_pci.c     Fri Apr 25 16:02:52 2003 +0000
@@ -39,7 +39,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: ahc_pci.c,v 1.39 2003/04/19 19:34:23 fvdl Exp $
+ * $Id: ahc_pci.c,v 1.40 2003/04/25 16:02:52 fvdl Exp $
  *
  * //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#57 $
  *
@@ -852,6 +852,12 @@
         */
        ahc_intr_enable(ahc, FALSE);
 
+       /*
+        * XXX somehow reading this once fails on some sparc64 systems.
+        *     This may be a problem in the sparc64 PCI code. Doing it
+        *     twice works around it.
+        */
+       devconfig = pci_conf_read(pa->pa_pc, pa->pa_tag, DEVCONFIG);
        devconfig = pci_conf_read(pa->pa_pc, pa->pa_tag, DEVCONFIG);
 
        /*



Home | Main Index | Thread Index | Old Index