diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-12-05 20:02:45 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-12-05 20:02:45 +0000 |
commit | c32cda93bb0a38fcd29308dd4bfc8c21cc56270e (patch) | |
tree | 735306ebb035539ac51f1f8bb95ef7df91c93f89 /sys/dev/sf/if_sfreg.h | |
parent | 1dab24f2833c782b1a8539f3be0435f750f97616 (diff) | |
download | FreeBSD-src-c32cda93bb0a38fcd29308dd4bfc8c21cc56270e.zip FreeBSD-src-c32cda93bb0a38fcd29308dd4bfc8c21cc56270e.tar.gz |
Modify the Adaptec "starfire" driver to reset the PHY on the MII bus
before selecting a mode. The Seeq PHY chips on the Adaptec cards that
use the AIC-6915 controller seem to need it in order to get them to
change modes correctly.
This corrects a problem that I noticed where my ANA-62022 board failed
to correctly program the full duplex bit in the macconfig1 register
when the interface was brought up. Running ifconfig sf0 would mask this
problem in some cases because polling the PHY status would cause the
miibus code to notice that full duplex was now needed and the statchg
callback would be invoked to configure the duplex setting. However it
would still get it wrong other times.
Also changed sf_miibus_statchg() to program the IPG register to match
the duplex setting in accordance with Adaptec manual's recommendations
(0x15 for full duplex, 0x11 for half duplex).
Diffstat (limited to 'sys/dev/sf/if_sfreg.h')
-rw-r--r-- | sys/dev/sf/if_sfreg.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/sf/if_sfreg.h b/sys/dev/sf/if_sfreg.h index 085d7f0..49fdd5a 100644 --- a/sys/dev/sf/if_sfreg.h +++ b/sys/dev/sf/if_sfreg.h @@ -613,6 +613,14 @@ #define SF_MACCFG1_SOFTRESET 0x00008000 /* + * There are the recommended IPG nibble counter settings + * specified in the Adaptec manual for full duplex and + * half duplex operation. + */ +#define SF_IPGT_FDX 0x15 +#define SF_IPGT_HDX 0x11 + +/* * RX filter registers 0x6000 to 0x6FFF */ #define SF_RXFILT_PERFECT_BASE 0x6000 @@ -1033,6 +1041,8 @@ struct sf_softc { u_int8_t sf_unit; /* interface number */ struct sf_list_data *sf_ldata; int sf_tx_cnt; + u_int8_t sf_link; + int sf_if_flags; struct callout_handle sf_stat_ch; }; |