Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci * Hard-code EXTSR_1000XFDX|EXTSR_1000XHDX for re...



details:   https://anonhg.NetBSD.org/src/rev/e9c1a7985163
branches:  trunk
changeset: 535350:e9c1a7985163
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Aug 16 07:10:56 2002 +0000

description:
* Hard-code EXTSR_1000XFDX|EXTSR_1000XHDX for reads of the MII_EXTSR
  in the TBI case.
* Force BMSR_ANEG | BMSR_EXTCAP to be returned for reads of the MII_BMSR
  in the TBI case.

diffstat:

 sys/dev/pci/if_sip.c |  24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r 47feab902d7e -r e9c1a7985163 sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c      Fri Aug 16 04:55:48 2002 +0000
+++ b/sys/dev/pci/if_sip.c      Fri Aug 16 07:10:56 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sip.c,v 1.63 2002/08/10 22:57:15 thorpej Exp $      */
+/*     $NetBSD: if_sip.c,v 1.64 2002/08/16 07:10:56 thorpej Exp $      */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.63 2002/08/10 22:57:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.64 2002/08/16 07:10:56 thorpej Exp $");
 
 #include "bpfilter.h"
 
@@ -2859,7 +2859,16 @@
                case MII_ANAR:          tbireg = SIP_TANAR; break;
                case MII_ANLPAR:        tbireg = SIP_TANLPAR; break;
                case MII_ANER:          tbireg = SIP_TANER; break;
-               case MII_EXTSR:         tbireg = SIP_TESR; break;
+               case MII_EXTSR:
+                       /*
+                        * Don't even bother reading the TESR register.
+                        * The manual documents that the device has
+                        * 1000baseX full/half capability, but the
+                        * register itself seems read back 0 on some
+                        * boards.  Just hard-code the result.
+                        */
+                       return (EXTSR_1000XFDX|EXTSR_1000XHDX);
+
                default:
                        return (0);
                }
@@ -2874,6 +2883,15 @@
                                rv |= BMSR_LINK;
                        if (val & TBISR_MR_AN_COMPLETE)
                                rv |= BMSR_ACOMP;
+
+                       /*
+                        * The manual claims this register reads back 0
+                        * on hard and soft reset.  But we want to let
+                        * the gentbi driver know that we support auto-
+                        * negotiation, so hard-code this bit in the
+                        * result.
+                        */
+                       rv |= BMSR_ANEG | BMSR_EXTCAP;
                }
 
                return (rv);



Home | Main Index | Thread Index | Old Index