This delay cause 500us loops under splnet() per linkdown port per mii_tick.
It causes periodically drop packets. It's not acceptable for other devices.
Move gphyter and nsphyter specific delay(500) into the drivers from
mii_physubr.c.
-- r1.15
Add some DSP init code for BCM5221's.
Values derived from Apple's GMAC driver, same init
code also exists in Linux's sungem_phy driver.
tested by miod@ pedro@ and otto@ on a few systems.
-- r1.16
Always explicitly set IFM_HDX for half-duplex.
From brad@
--
ether_mediachange() to their own module that we compile only if
the kernel configuration demands support for both MII buses and
ethernet. Thanks to Tom Spindler for suggesting that these routines
move to dev/mii/.
service routine. Add a wrapper for PHY_SERVICE(), called phy_service(),
and check device_is_active() there. Make the mii_*() routines call
the PHY service routines thorugh phy_service() instead of PHY_SERVICE().
In mii_phy_resume(), restore a PHY's state after resetting it by
sending a MII_MEDIACHG command. This change makes bnx(4) resume
more reliably and more quickly; it should help other NICs to resume,
too, if they attach PHYs through MII.
This makes autonegotiation on rlphy(4) at re(4)
on landisk (8139C+) select 100baseTX full-duplex
at boot time (before first ifconfig) properly,
and there is no bad side effect on rlphy(4) at nfe(4).
This may also fix PR kern/34109.
> - Don't set MIIF_NOISOLATE so rgephy(4) can be used in configurations
> with multiple PHYs and un-comment case IFM_NONE in case MII_MEDIACHG
> rgephy_service(). There doesn't seem to be a problem with isolating
> RTL8169S and their internal PHY.
and rev 1.12:
> - Fix some spelling in comments.
> - Remove superfluous returns at the end of void functions.
> - Remove unused static global rgephy_mii_model.
- remove #ifdef'ed out code whcih has also been removed in FreeBSD
- some style cosmetics
- set RGEPHY_1000CTL_AHD in rge_reset()
- reset RGEPHY_MII_BMCR register in rge_reset() too
While here, use proper macro rather than magic numbers for
ANAR and BMCR registers there.
Revision 1.9:
> Make the rgephy driver advertise both 1000_FD and 1000_HD bits in
> autoneg mode. A couple of the devices don't autoneg correctly unless
> configured this way.
Revision 1.11:
> Due to the poor PHY documentation from RealTek I can't sure but I
> think the RealTek PHY needs driver to set RGEPHY_BMCR_AUTOEN bit of
> RGEPHY_MII_BMCR register and proper ANAR register setting for manual
> media type selection.
> This fixes long standing manual media type selection bug in rgephy(4).
newer server chipsets) to wm(4), from the FreeBSD em(4) driver.
While there, add a few other Intel Ethernet controller that should work as
is.
Properly update the RX error and TX collision counters.
Add ikphy(4), a driver for the Intel i82563 Kumeran 10/100/1000 Ethernet PHYs
Sam Leffler, used in various products including AR5312-based designs. This
is not enabled in any configs yet, nor tested by anyone other than Sam. I
will be testing this more later, and adding it to appropriate configs once
I have verified (unless someone else beats me to the punch.)
as Broadcom/Serverworks HT-2000). Following the Broadcom-supplied
Linux driver, update brgphy.c to treat the bcm5780 integral copper PHY
just like the 5714/5715 PHY.
For NetBSB-3 pullup purposes, this commit includes:
src/sys/dev/mii/miidevs revision: 1.65 -> 1.66
src/sys/dev/mii/brgphy.c revision: 1.26 -> 1.27
plus a regen of src/sys/dev/mii/{miidevs.h,miidevs_data.h}.
We need to special case ciphy to ask for RGMII interface at 2.5V for nfe.
This makes Cicada/Vitesse PHYs attached to nfe work.
Many thanks to Bill Paul for diagnosing the problem and suggesting a solution.
of calling rt_ifmsg directly. This allows other parts of the kernel
to change the behaviour depending on the link state and is a
prerequirement for CARP.
Hide mii_phy_statusmsg, mii_phy_update should be used instead.
Don't send routing messages for baudrate changes, if_baudrate is
currently not exported via this interface.
OK tls@
bcm5714, added yesterday to sys/dev/pci/if_bge.c in revision 1.98,
since it appears the 5714 has a new PHY revision. Pending further
details, follow the FreeBSD code (as submitted by
John Cagle <john dot cagle at hp dot com> and committed by
ps@FreeBSD.ORG), and treat the 5714 integral PHY the same way as we
treat the bcm5750 integral PHY.
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
then fail
else
ask device match function
This is handled by config_stdsubmatch() now.
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
comment.
All platforms will now send a change in direction, then the 32 MDO bits
when synchronising with the phy. Rather than sending the change in
direction with the first MDO bit.
Match at > 1 (10) to ensure we get ciphy instead of ukphy.
Use aprint(9) on attach.
Minor stylistic changes.
All from Tomokazu HARADA in PR kern/29705.
bus-independent backend, with PCI and CardBus attachment code.
The committed code has two serious bugs:
1. The driver makes no attempt to recover resources when a (Cardbus)
instance is removed; bus resources are leaked.
2. In testing with a NetGear GA-511, the Cardbus card never responded
to a reset/wakeup if the card is powered down after attachment.
So for now, leave cardbus instances powered up at attachment
(insertion, or at boot if a card is already present).
That aside, it acutally works on my GA-511. Committed as-is despite
the bugs, after repeated requests to make the code available for
further testing. Also requires sys/dev/mii/miidevs rev 1.54 -> 1.55,
and consequent regen of miidevs{,_data}.h.
in two flavours: one with non-IEEE OUI code from FreeSD if_re(4) mii
driver for early 8169S, and a second IEEE-compliant version as
observed on Netgear GA-511 with newer 8196S stepping.
-convert submatch() style functions (passed to config_search() or
config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
on "locators.h"
Fix some non-initialized variables
close the output files when done
Redo the printing for RCS strings so they don't expand in the awk script too
Do proper tests for variables existance before accessing
Verified output from all scripts is identical to original versions
1) This PHY can take an inordinate amount of time to reset if
media is attached. Under fairly normal circumstances, up
to near one second. This is because it appears to go through
an implicit autonegotiation cycle as part of the reset.
2) During reset and autonegotiation, the BMCR will clear the reset
bit before the process is complete. It will return 0 until the
process is complete and it's safe to access the PHY again.
This gets the on-board pcnet + nsphy ethernet working properly for me on
an IBM PC Server/325. Fixes PR/16346.
we start polling the BMCR again. Greg Woods noted on tech-net@
that the DP83840A manual states that there should be a 500us delay
between asserting software reset and attempting MII serial operations.
I've also noted that a DP83815 can get into a bad state on cable
removal and reinsertion if we do not delay here.
This may well address PR/16346, and I seem to recall occasional
reports of auto-negotiation and flaky kinds of errors that this
might also alleviate.
- Only BCM5705M asic rev A1 was tested.
Thanks to Bill Paul (wpaul@freebsd.org) for help and support.
Approved by: Frank van der Linden <fvdl@netbsd.org>
sure the chip implements 100T4 (in BMSR).
The 82562 (which doesn't implement 100T4) has the SCR_T4 bit
(always?) set, which led to wrong media status reports.
approved by thorpej
autonegotiation to take place if IFM_AUTO is selected in mii_media_set.
Make the gem driver use it. (XXX hme probably should use it but I can't
test that).