]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Modify the Adaptec "starfire" driver to reset the PHY on the MII bus
authorwpaul <wpaul@FreeBSD.org>
Sun, 5 Dec 1999 20:02:45 +0000 (20:02 +0000)
committerwpaul <wpaul@FreeBSD.org>
Sun, 5 Dec 1999 20:02:45 +0000 (20:02 +0000)
commitc32cda93bb0a38fcd29308dd4bfc8c21cc56270e
tree735306ebb035539ac51f1f8bb95ef7df91c93f89
parent1dab24f2833c782b1a8539f3be0435f750f97616
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).
sys/dev/sf/if_sf.c
sys/dev/sf/if_sfreg.h
sys/pci/if_sf.c
sys/pci/if_sfreg.h