Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Put some delay in the loops that poll for MII tr...



details:   https://anonhg.NetBSD.org/src/rev/7b301943a524
branches:  trunk
changeset: 533336:7b301943a524
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jun 27 22:31:30 2002 +0000

description:
Put some delay in the loops that poll for MII transaction
completion.  Without this, reading the PHY can hang the bus
on a sufficiently fast CPU.

diffstat:

 sys/dev/pci/if_bge.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r d747dcd061ce -r 7b301943a524 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Thu Jun 27 22:10:11 2002 +0000
+++ b/sys/dev/pci/if_bge.c      Thu Jun 27 22:31:30 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.4 2002/06/27 22:10:11 fvdl Exp $  */
+/*     $NetBSD: if_bge.c,v 1.5 2002/06/27 22:31:30 thorpej Exp $       */
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -427,6 +427,7 @@
                val = CSR_READ_4(sc, BGE_MI_COMM);
                if (!(val & BGE_MICOMM_BUSY))
                        break;
+               delay(2);
        }
 
        if (i == BGE_TIMEOUT) {
@@ -456,6 +457,7 @@
        for (i = 0; i < BGE_TIMEOUT; i++) {
                if (!(CSR_READ_4(sc, BGE_MI_COMM) & BGE_MICOMM_BUSY))
                        break;
+               delay(2);
        }
 
        if (i == BGE_TIMEOUT) {



Home | Main Index | Thread Index | Old Index