summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorandreas <andreas@FreeBSD.org>1999-03-09 17:30:12 +0000
committerandreas <andreas@FreeBSD.org>1999-03-09 17:30:12 +0000
commitf90c5027c22d0fb4f82d1b6f4d8b4d0459f4be95 (patch)
tree622102e6524fa5072de9d7d544accf0cf8b56941 /sys
parent68a0ddeab681f5dab271973909b4b4c28266031d (diff)
downloadFreeBSD-src-f90c5027c22d0fb4f82d1b6f4d8b4d0459f4be95.zip
FreeBSD-src-f90c5027c22d0fb4f82d1b6f4d8b4d0459f4be95.tar.gz
Fix from author of the driver:
The i++ loop from 1..1000 is too small on very fast machines like PII 450 MHz. Increasing the loop from 1..100000 lets the machine access PHY. After this patch it's possible to use a SMC PCI card on a HP Kayak XA series PC Workstation. Workaround until this fix was to enable debugging in the driver (#define EPIC_DEBUG 1). Without that patch you get an undefined state: while true do ifconfig -a | grep status: done The status messages flaps between twwo values, but not "connected". Obtained from: Ustimenko Semen <semen@iclub.nsu.ru>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/tx/if_tx.c6
-rw-r--r--sys/pci/if_tx.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c
index a79ebeb..1519ba4 100644
--- a/sys/dev/tx/if_tx.c
+++ b/sys/dev/tx/if_tx.c
@@ -1,5 +1,5 @@
/* $OpenBSD: if_tx.c,v 1.3 1998/10/10 04:30:09 jason Exp $ */
-/* $Id: if_tx.c,v 1.19 1998/12/09 01:12:18 eivind Exp $ */
+/* $Id: if_tx.c,v 1.20 1998/12/14 06:32:56 dillon Exp $ */
/*-
* Copyright (c) 1997 Semen Ustimenko (semen@iclub.nsu.ru)
@@ -1815,7 +1815,7 @@ epic_read_phy_register __P((
CSR_WRITE_4( sc, MIICTL, ((loc << 4) | 0x0601) );
- for( i=0;i<0x1000;i++) if( !(CSR_READ_4( sc, MIICTL )&1) ) break;
+ for( i=0;i<0x100000;i++) if( !(CSR_READ_4( sc, MIICTL )&1) ) break;
return CSR_READ_4( sc, MIIDATA );
}
@@ -1831,7 +1831,7 @@ epic_write_phy_register __P((
CSR_WRITE_4( sc, MIIDATA, val );
CSR_WRITE_4( sc, MIICTL, ((loc << 4) | 0x0602) );
- for( i=0;i<0x1000;i++) if( !(CSR_READ_4( sc, MIICTL )&2) ) break;
+ for( i=0;i<0x100000;i++) if( !(CSR_READ_4( sc, MIICTL )&2) ) break;
return;
}
diff --git a/sys/pci/if_tx.c b/sys/pci/if_tx.c
index a79ebeb..1519ba4 100644
--- a/sys/pci/if_tx.c
+++ b/sys/pci/if_tx.c
@@ -1,5 +1,5 @@
/* $OpenBSD: if_tx.c,v 1.3 1998/10/10 04:30:09 jason Exp $ */
-/* $Id: if_tx.c,v 1.19 1998/12/09 01:12:18 eivind Exp $ */
+/* $Id: if_tx.c,v 1.20 1998/12/14 06:32:56 dillon Exp $ */
/*-
* Copyright (c) 1997 Semen Ustimenko (semen@iclub.nsu.ru)
@@ -1815,7 +1815,7 @@ epic_read_phy_register __P((
CSR_WRITE_4( sc, MIICTL, ((loc << 4) | 0x0601) );
- for( i=0;i<0x1000;i++) if( !(CSR_READ_4( sc, MIICTL )&1) ) break;
+ for( i=0;i<0x100000;i++) if( !(CSR_READ_4( sc, MIICTL )&1) ) break;
return CSR_READ_4( sc, MIIDATA );
}
@@ -1831,7 +1831,7 @@ epic_write_phy_register __P((
CSR_WRITE_4( sc, MIIDATA, val );
CSR_WRITE_4( sc, MIICTL, ((loc << 4) | 0x0602) );
- for( i=0;i<0x1000;i++) if( !(CSR_READ_4( sc, MIICTL )&2) ) break;
+ for( i=0;i<0x100000;i++) if( !(CSR_READ_4( sc, MIICTL )&2) ) break;
return;
}
OpenPOWER on IntegriCloud