Commit Graph

637 Commits

Author SHA1 Message Date
tsutsui
467bde0590 Add support for RealTek RTL8211B(L) PHY. From FreeBSD. 2008-04-05 07:52:08 +00:00
dyoung
f612df5fb6 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:38:28 +00:00
markd
975c915750 Add BCM5708C. Treating it like 5750/5780 is a guess but my Dell
PowerEdge 1950 now successfully negotiates 1000baseT full-duplex
where it didn't previously.
2008-02-20 11:26:03 +00:00
markd
83f7182b7b regen. 2008-02-20 11:18:23 +00:00
markd
dd50ec1e06 Add BCM5708C 1000BASE-T media interface, from FreeBSD 2008-02-20 11:17:41 +00:00
tsutsui
6ca5886d93 Add a wakeup instruction which is taken from Realtek driver.
Untested on newer chips, but no bad side effect on my 8169S.
2008-01-26 14:24:14 +00:00
msaitoh
fae0af7902 mii_physubr.c::mii_phy_reset() has gphyter and nsphyter specific delay(500).
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.
2008-01-20 07:58:19 +00:00
dyoung
c329a611cb Add a helper routine for ethernet drivers, mii_ifmedia_change().
Remove an mii_softc from its mii_data in mii_phy_detach(), not in
mii_detach(), so that we do not leave dangling pointers to a PHY
in an mii_data.
2008-01-10 07:29:41 +00:00
jdc
bb4a0543ee Updates from OpenBSD:
-- 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@
    --
2008-01-05 20:33:29 +00:00
dyoung
60e2cd65a0 Fix XEN2_DOMU (and amd64?) builds: move ether_mediastatus(),
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/.
2008-01-02 00:41:07 +00:00
dyoung
401b2c3477 Remove the device_is_active() check from each individual PHY's
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.
2007-12-29 19:34:55 +00:00
wiz
d190819143 Recognize Marvell 88E1116 Gigabit PHY. 2007-12-29 13:09:36 +00:00
wiz
cd80761b22 regen (+ Marvell 88E1116 Gigabit PHY) 2007-12-29 13:08:53 +00:00
wiz
7bfee0e94d Add Marvell 88E1116 Gigabit PHY. 2007-12-29 13:08:28 +00:00
dyoung
f5207c77ac Use LIST_FOREACH(). 2007-12-29 08:19:35 +00:00
perry
9b2b412c19 __FUNCTION__ -> __func__ 2007-12-15 00:39:14 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
uwe
2b2a00534e Add missing aprint_naive("\n"); in rlphyattach. 2007-11-06 00:58:32 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
isaki
e334010e29 Correct indent. 2007-10-13 13:05:19 +00:00
tsutsui
312a218da4 Regen from miidevs rev 1.73:
> Add Realtek RTL8211, which has the same ID with 8169S/8110S internal PHY.
2007-10-12 10:14:03 +00:00
tsutsui
4699c7f1af Add Realtek RTL8211, which has the same ID with 8169S/8110S internal PHY. 2007-10-12 10:13:07 +00:00
msaitoh
7c88b47eff add I82566 2007-08-28 01:11:50 +00:00
msaitoh
7e58a97ba9 regen 2007-08-28 01:11:25 +00:00
msaitoh
a27bb988f0 add Intel I82566 2007-08-28 01:11:05 +00:00
markd
908b67c316 Add support for BCM5754 and BCM5755. From suggestions from Jonathan
Stone.
2007-08-06 12:16:33 +00:00
markd
cd8e0b4a5a Regen for BCM5755 and 5754. 2007-08-06 12:09:26 +00:00
markd
a4e4eb39dc Add BCM5755 and 5754 Gig-E PHYs. 2007-08-06 12:07:00 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
tsutsui
eab20f9c7f Fix wrong softc size (missed in the previous). 2007-05-09 23:16:37 +00:00
tsutsui
d60cbb92f9 Prepare sc_rtl8201l flag in softc and use it in rlphy_status() so that
we don't have to check device names of device_parent(). From FreeBSD.
2007-03-20 10:17:18 +00:00
tsutsui
af7a0c1731 Prepare rlphy_reset() and set BMCR_AUTOEN in it.
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.
2007-03-19 12:23:30 +00:00
msaitoh
9484bc8665 tabify 2007-03-13 06:41:52 +00:00
msaitoh
012c8e5069 Commit from AsiaBSDCon 2007's place
Fix the problem "ifconfig bge0 media auto" negotiates to 100Mbps on 1000BaseT
HUB.
2007-03-10 09:13:07 +00:00
msaitoh
f0a2eb28e5 fix some negotiation problems on wm(4).
will fix PR#30078, PR#30490, PR#30906, PR#33429, PR#35386.
2007-02-23 03:03:10 +00:00
jmcneill
2b24c5c8d5 Regen. 2007-02-17 23:24:44 +00:00
jmcneill
bc130a3a9b Add Marvell 88E6060 10/100 5-port PHY switch 2007-02-17 23:24:32 +00:00
jmcneill
737605ff0b Enable mvphy(4) 2007-02-17 23:24:01 +00:00
jmcneill
046f6fb760 Add a default "dumb" mode, that adds all ports to the same interface. 2007-02-17 23:23:38 +00:00
wiz
ea6266ca87 Spell "threshold" correctly. From Zafer Aydogan. 2006-12-25 18:41:45 +00:00
tsutsui
b0f03bc527 - pull the following fix from FreeBSD's rgephy.c rev 1.14:
> - 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
2006-12-03 03:16:48 +00:00
tsutsui
92dc7b0c2c Fix #ifdef/#endif comment mismatch. 2006-11-29 14:01:53 +00:00
tsutsui
2af93ca79c KNF, ANSIfy, unwrap lines. 2006-11-29 13:57:59 +00:00
tsutsui
da40bfc506 Pull some updates from the Realtek's driver:
- 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.
2006-11-29 13:49:24 +00:00
tsutsui
2e0739074e Pull fixes from FreeBSD's rgephy.c:
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).
2006-11-28 13:36:29 +00:00
tsutsui
e2e881bcd1 Match BCM5752 PHY. From Matthias Drochner and FreeBSD/OpenBSD. 2006-11-26 16:31:48 +00:00
tsutsui
b9957a3cdf Regen from miidevs rev 1.69:
> Add BCM5752 Gig-E PHY. From Matthias Drochner and FreeBSD/OpenBSD.
2006-11-26 16:28:19 +00:00
tsutsui
7437e6f3b5 Add BCM5752 Gig-E PHY. From Matthias Drochner and FreeBSD/OpenBSD. 2006-11-26 16:26:35 +00:00
tsutsui
2b15bbad22 Include <sys/device.h> for struct device. 2006-11-26 15:40:14 +00:00
christos
5e16b7787c - don't hardcode 5, 10 define and use MII_ANEGTICKS{,_GIGE}
- instead of != limit, use <= limit (conservative)
2006-11-16 21:24:06 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
tsutsui
8d3021b407 Add #include <sys/device.h> for struct device.
Fixes compile error on sparc64.
2006-11-09 14:43:10 +00:00
tsutsui
ff1bacae2e Make rlphy also match if parent MII is re(4) for RTL8139C+ case.
Tested by Brian A. Seklecki.
2006-11-03 17:05:16 +00:00
bouyer
76694b5d3f Regen: addded i82563 PHY 2006-10-21 17:19:21 +00:00
bouyer
154d613f0b Add support for the Intel 80003 Gigabit Ethernet controller (found e.g. in
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
2006-10-21 14:10:32 +00:00
bouyer
7bdd26b810 Restart negotiation when we change media even if autoneg is not enabled.
Otherwise switching from a fixed media to another fixed media isn't noticed
by the switch and the effective speed doesn't change.
2006-10-21 13:55:30 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
cube
160fdb0333 Add support for 82562G. 2006-09-27 21:51:48 +00:00
cube
4775d417a1 Regen (Intel 82562G). 2006-09-27 21:50:27 +00:00
cube
f9d66765dd Add Intel 82562G PHY. 2006-09-27 21:50:00 +00:00
christos
b5da945622 comment out unreachable code 2006-09-02 07:06:03 +00:00
gdamore
b846198ad4 Initial implementation for Marvell 88E6060 10/100 5-port PHY switch, from
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.)
2006-07-21 23:55:27 +00:00
elad
2867b68bc3 integrate kauth. 2006-05-14 21:42:26 +00:00
jonathan
c18e4919a2 regen sys/dev/mii/miidevs{,_data}.h from miidevs 1.66 after addition
of  PHY ID for BCM5780 (serverworks HT-2000) integral 1000base-T PHY.
2006-04-27 16:45:04 +00:00
jonathan
ec17638ca8 Add PHY ID for the integral 1000base-T PHY in the bcm5780 (also known
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}.
2006-04-27 16:43:14 +00:00
thorpej
f598845579 Fix an oversight in previous. 2006-03-29 17:18:55 +00:00
thorpej
838ee1e0d9 Use device_private(). 2006-03-29 06:51:47 +00:00
thorpej
6e53f1366a Use device_parent(). 2006-03-25 23:14:58 +00:00
wiz
22817a0282 regen. 2006-03-21 19:07:04 +00:00
wiz
4b610bb2ce Fix typo, reported by seebs in PR 33106. 2006-03-21 19:06:08 +00:00
chs
32d9a1dba7 regen 2006-03-14 04:49:00 +00:00
chs
bf841929a2 add an rlphy clone from IC Plus. from openbsd. 2006-03-14 04:48:44 +00:00
chs
9b48410235 from OpenBSD:
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.
2006-03-12 22:41:41 +00:00
chs
04a5c7d219 fix match for RealTek 8201L. 2006-03-12 22:30:24 +00:00
kleink
f518d0e3f3 Reduce previous (!is(...) != 0) to (!is(...)). 2006-02-28 22:52:34 +00:00
kleink
e9b4cd552f Fix inverted device_is_a() use logic in previous. 2006-02-28 22:40:15 +00:00
thorpej
d1f18238ca Use device_is_a(). 2006-02-27 02:59:24 +00:00
thorpej
cbb0407210 Use device_is_a() more. 2006-02-27 02:58:56 +00:00
thorpej
6a56683d19 Use device_is_a(). 2006-02-27 02:56:19 +00:00
thorpej
3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
joerg
d8f58dca75 Change the link status code in MII to use if_link_state_change instead
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@
2006-02-18 19:51:07 +00:00
thorpej
eac3d8d187 Add the DP83847 PHY. From seebs in kern/32866 2006-02-18 14:17:16 +00:00
xtraeme
d064eae373 Add rlphy(4) (Realtek 8139/8201L PHY) from OpenBSD. 2006-01-04 21:52:17 +00:00
xtraeme
7d3727fd87 regen 2006-01-04 21:46:35 +00:00
xtraeme
531d6a9b45 Add Realtek RTL8201L. From OpenBSD 2006-01-04 21:42:51 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
jonathan
8fdab8c431 Oops! Restore brgphys[]z stanza for bcm5705 integral PHY, somehow
lost in the previous addition of the bcm5714 integral phy.
2005-12-10 03:03:34 +00:00
soren
1747d879bc Regen. 2005-12-08 05:10:39 +00:00
jonathan
a92fde1678 Add PHY mii-id for the Broadcom 1000base-T PHY integral to the
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.
2005-12-08 03:16:43 +00:00
riz
f4ed9745aa Match all model numbers with both Cicada OUIs; this allows the proper PHY to
attach on my ZyXEL GN650-T.
2005-12-01 04:59:53 +00:00
kiyohara
05f9545b7a Fix misstake regen. 2005-08-28 15:39:12 +00:00
kiyohara
4fc12adbbd regen. 2005-08-28 15:01:09 +00:00
kiyohara
3e7c870116 Add DAVICOM DM9102. 2005-08-28 14:59:34 +00:00
drochner
e6a178f21f kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function

This is handled by config_stdsubmatch() now.
2005-08-25 22:33:18 +00:00
drochner
fa3cb84d62 replace the "locdesc_t" structure carrying the number of locators
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
2005-08-25 18:35:38 +00:00
chris
3e566c2bde Remove changes to bitbang code for de devices to work as tlps on cats.
I need to investigate a proper fix that doesn't break other platforms, eg:
PR kern/30952
2005-08-09 19:26:24 +00:00
chris
855ec413d2 Following feedback from thorpej, remove the #ifdef cats block, and update
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.
2005-08-07 17:47:22 +00:00
chris
428f7b8491 Check in cats specific tweak to make older de cards work as tlp devices.
With this tweak I've completed a full install from NFS of 3.99.7, using a
card the previously didn't work as a tlp device.
2005-08-06 23:40:39 +00:00
briggs
7adbaa630a Match Marvell 88E1111 from Dave Huang in PR kern/30556 2005-06-23 19:21:26 +00:00
briggs
6f82cb15e3 Regen for Marvell 88E1111 2005-06-23 19:19:55 +00:00
briggs
5d84927b8c Marvell 88E1111 from Dave Huang in PR kern/30556 2005-06-23 19:19:05 +00:00
wiz
8b14b81426 rgephy(4)'s struct mii_phydesc array doesn't end with NULL.
Fix it. From Satoshi Suetake in PR 29770.
2005-03-23 13:27:20 +00:00
briggs
344246d697 Changes to match xxCICADA 8201B found in a VT6122.
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.
2005-03-16 17:25:32 +00:00
briggs
90cf94f285 regen for xxCICADA 8201B 2005-03-16 17:22:11 +00:00
briggs
a55f55e73a Add new/alternate OUI for CICADA that's been spotted in a VIA VT6122.
Submitted in PR 29705 from Tomokazu HARADA.
2005-03-16 17:20:28 +00:00
perry
e99b3aba69 regen 2005-02-27 14:29:44 +00:00
perry
e153a1758d Don't leave blanks at the end of the "generated from:"
Also, don't print a space after "},"s at the end of line in one of the
files.
2005-02-27 14:29:18 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
jdolecek
517e5bf2be regen: Cicada PHY addition 2005-02-20 16:37:10 +00:00
jdolecek
f8cfdfba75 Add driver for 10/100/1000 copper PHY integrated on VIA Networking Technologies
VT6122 gigabit ethernet chips

From FreeBSD
2005-02-20 16:35:56 +00:00
yamt
7245b8aa0a remove a mysterious printf(" complete\n"). 2005-02-08 05:52:31 +00:00
kanaoka
1054d5cc16 - Deal with status properly,if BMCR_ISO is set.
Fixes kern/29113.
2005-02-04 15:17:31 +00:00
yamt
7ae610b397 remove a duplicated prototype of rgephy_reset. 2005-01-21 11:55:52 +00:00
scw
731215b5bf Support Broadcom BCM5222 dual 10/100 media interface. 2005-01-17 13:17:45 +00:00
scw
24e6317bf7 Regen for Broadcom BCM5222. 2005-01-17 13:16:50 +00:00
scw
68480055b3 Add entry for Broadcom BCM5222 Dual 10/100 media interface. 2005-01-17 13:16:19 +00:00
jonathan
54528c79ad Add rgephy driver to sys/dev/mii/files.mii. Supports integrated PHY
in Realtek 8169S.
2004-12-30 23:03:19 +00:00
jonathan
9d44c4d9b1 Snapshot of incomplete-but-working split of re(4) driver into a
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.
2004-12-23 06:26:30 +00:00
jonathan
6f71266c1d Regen from miidevs rev 1.55, with codes for Realtek RTK8169S builtin PHY. 2004-12-23 06:18:49 +00:00
jonathan
7e6ef09234 Add PHY models for integrated 1000baseT PHYs in Realtek 8169S chips,
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.
2004-12-23 06:13:24 +00:00
heas
14089042f3 Fix a comment. 2004-12-16 03:13:28 +00:00
martin
3aeabb25dc Add BCM 4401 phy (from FreeBSD). 2004-11-24 10:15:54 +00:00
martin
8eb4323ca4 Regen (BCM4401 added) 2004-11-24 10:15:15 +00:00
martin
66839a739e Add BCM4401 phy 2004-11-24 10:14:41 +00:00
cube
64b1795875 Add support for the PHY found with BCM575x chips. Beware the magic
numbers!

From FreeBSD.
2004-10-28 07:26:17 +00:00
cube
d3f031a415 Regen. 2004-10-28 07:23:24 +00:00
cube
69295b9741 Add an entry for the PHY found with BCM575x chips. 2004-10-28 07:23:00 +00:00
thorpej
29a0a6f5d1 Enable the SmartSpeed work-around code for the IGP phy, with some
minor adjustments.
2004-10-05 20:20:00 +00:00
drochner
96b589fc18 a round of autoconf cleanup:
-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"
2004-09-13 12:55:47 +00:00
drochner
789b04b977 include locators.h from .c only, avoids unnecessary dependencies 2004-09-01 20:59:30 +00:00
thorpej
1efb3da0fb Make use of static. 2004-08-23 06:16:06 +00:00
thorpej
8aa1e65090 De-__P 2004-08-23 06:05:30 +00:00
yamt
a92a80cf63 for offloc, use MII_OFFSET_ANY rather than abusing MII_PHY_ANY. 2004-08-20 15:21:24 +00:00
thorpej
bfd469cd6f If the PHY has 1000BASE-T capability, check to see if a 1000BASE-T speed
was negotiated, and check if we ended up mastering the clock if so.
2004-05-17 00:17:28 +00:00
thorpej
74543d4812 Get flow control negotiation status. 2004-05-16 23:55:58 +00:00
thorpej
a85c2a8f12 mii_phy_flowstatus(): short-circuit processing if both sides advertise
symmetric pause capability.  From HITOSHI Osada.
2004-04-11 15:47:33 +00:00
thorpej
ad35f1d6fa Add a comment describing why we force renegotiation when PAUSE is being
used.  From HITOSHI Osada.
2004-04-11 15:42:48 +00:00
thorpej
08645d15fe gmii_phy_getflowcontrol() -> mii_phy_flowstatus(). From HITOSHI Osada. 2004-04-11 15:40:56 +00:00
thorpej
a6d603afd1 gmii_phy_getflowcontrol(): Bail out early if the MAC didn't tell us to
do flow control processing.
2004-04-10 18:54:46 +00:00
thorpej
84694bb5fa Fetch negotiated flow control parameters. From HITOSHI Osada. 2004-04-10 18:47:56 +00:00
thorpej
44ec17557f Flow-control advertisement and parsing support. From HITOSHI Osada.
Slightly modified by me.
2004-04-10 02:32:10 +00:00
thorpej
296c51f110 Correct pause related bits in ANAR and ANLPAR.
From HITOSHI Osada.
2004-04-09 20:39:44 +00:00
matt
c62861525c Regen. 2004-02-07 00:51:45 +00:00
matt
f70be9035f Add LXT973/974/975 PHYs 2004-02-07 00:51:05 +00:00
jmc
43bf89bfc6 Fixes from PR#23177. Various lint/logic fixes:
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
2003-12-15 07:32:20 +00:00
wiz
c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
briggs
1d2bfa591d Implement a separate nsphy_reset(). There are two reasons for this:
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.
2003-11-02 01:42:28 +00:00
fvdl
44954feab8 Add a driver for the Intel IGPE1000 PHY as found on 82541 and 82547 chips.
Not yet enabled anywhere.
2003-10-28 00:15:40 +00:00
fvdl
4784db999a Regen after clarifying IGPE1000 name. 2003-10-26 22:25:53 +00:00
fvdl
4589fc061f Make the name of the IGPE1000 a bit clearer. 2003-10-26 22:24:58 +00:00
fvdl
7ec692e7d5 Regen after adding IGP01E1000. 2003-10-26 21:35:13 +00:00
fvdl
065b2aa956 Add Intel IGP01E1000 phy. 2003-10-26 21:34:44 +00:00
tron
9340e9d695 Fix build problem caused by integration of new I2C framework. 2003-09-30 09:35:15 +00:00
briggs
7f9445d14a It is best to allow a little time for the reset to settle in before
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.
2003-09-10 05:25:22 +00:00
tsutsui
4189ddf652 Remove advertising clauses from code written by Shingo WATANABE.
He has kindly consented it.
2003-09-04 15:17:38 +00:00
hannken
b32066575d Regen. 2003-07-17 12:40:56 +00:00
hannken
7b247f3812 Add support for the BCM5705:
- 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>
2003-07-17 11:44:26 +00:00
msaitoh
74b3acef2e - last commit (rev. 1.36) add a entry to keep model number of the PHY in
mii_softc. There are some situations to want to check model number.
- add comment
2003-07-01 22:58:48 +00:00
msaitoh
d8a4a08a24 - last commit (rev. 1.32) fixes icsphy_reset()'s problem. ICSphys don't
restart auto negotiation, so it kick.
- add comment in icsphy_reset()
2003-07-01 22:51:13 +00:00
msaitoh
5af1b6934b Add ICS1889 and 1892 2003-07-01 22:46:08 +00:00
martin
b464a5b71f Only read media status bits when they are valid.
From Makoto Fujiwara in PR kern/21810.
2003-06-06 23:22:56 +00:00
scw
37a9b25563 Match Broadcom's BCM5214 Quad 10/100 media interface. 2003-05-02 19:42:35 +00:00
scw
4c6f8bfaa7 Regen 2003-05-02 19:39:47 +00:00
scw
5f24295efa Add entry for Broadcom's BCM5214 Quad 10/100 media interface. 2003-05-02 19:39:29 +00:00
thorpej
c31f87a5cb Use aprint*(). 2003-04-29 01:49:33 +00:00
kristerw
b8943cbf89 Save some text segment space by not defining URLPHY_DEBUG. 2003-04-04 22:21:39 +00:00
drochner
ba0f309a91 Before checking the (Intel specific) SCR_T4 register, make
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
2003-03-27 19:36:49 +00:00
matt
52f7db1beb Fix C&P tpyo. 2003-03-07 00:14:38 +00:00
matt
c4d8a6226e Make the intel phy match the i82562 phys. 2003-03-06 22:38:09 +00:00
matt
4630a8e7f3 Add a MIIF_FORCEANEG flag to be passed to mii_attach. This forces an
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).
2003-02-20 00:55:21 +00:00
matt
ee04df9a4d Add support for Am79C87[45]. 2003-01-26 06:25:08 +00:00
matt
5ade701481 Regen. 2003-01-26 06:21:03 +00:00
matt
b9f79bf02f Add AMD Am79C87[45] (which use the Altima OUI). 2003-01-26 06:20:30 +00:00
gendalia
1f71c142cd Add altima (broadcom) AC101L, phy for 3com 3c905cx-tx on nForce2 MCP-T 2003-01-17 06:23:52 +00:00
gendalia
6672d83048 regenerate to match miidevs, added ac101L phy 2003-01-17 06:21:13 +00:00
gendalia
3f50762f0c Add altima (broadcom) AC101L, phy for 3com 3c905cx-tx on nForce2 MCP-T. 2003-01-17 06:20:07 +00:00
jonathan
1556fd569d Update first 16-bit word of 5401 DSP patch to match latest Linux drivers.
Add comment  saying what the magic values do: disable tap power management.
2003-01-16 20:02:05 +00:00
jonathan
0ecaf20a9d regen machine-generated files from miidevs rev 1.44 (bcm5704 phy) 2003-01-16 18:46:08 +00:00
jonathan
4b1bc17628 Add PHY entry for bcm5704c (copper) integral phy to miidevs.
Add 5704 phy and dsp patch, and untestsed dsp patch for 5703, to brgphy.c.
2003-01-16 18:43:40 +00:00
thorpej
72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
matt
78b64fd232 Recognize BCM5703 phy. (with this and the bge changes, the bge0 on my
ASUS P4PE m/b is now working)
2002-12-27 03:15:52 +00:00
matt
9d04e25e82 Regen. 2002-12-27 03:14:23 +00:00
matt
2860168d98 Add BCM5703. 2002-12-27 03:14:06 +00:00
martin
e750674637 Regen (MYSON MTD803 added) 2002-11-07 20:37:03 +00:00
martin
d407db9cfd Add MYSON MTD803 2002-11-07 20:35:55 +00:00
thorpej
d52f5f8ecb Make mii_media_active unsigned. 2002-11-07 07:45:03 +00:00
thorpej
499a491929 Fix signed/unsigned comparison warnings. 2002-11-07 07:41:22 +00:00
perry
43ed640ca5 fix lint warnings about things being stringified under cpp -traditional 2002-10-23 01:50:11 +00:00
fair
03f1a009cb If pnaphy attaches, make sure the mii_flags has MIIF_IS_HPNA in it. 2002-10-13 06:28:01 +00:00
thorpej
c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej
71adb76f75 Use CFATTACH_DECL(). 2002-09-30 21:57:46 +00:00
wiz
b1c7ac0e6d "definitions" has lots of 'i's, but that's not reason to leave one out. 2002-09-29 23:23:56 +00:00
thorpej
0720e04052 Remove a debugging printf. 2002-09-28 19:07:43 +00:00
scw
cbc5db835b Try a little harder to work around the "Isolated After Reset" lossage. 2002-09-28 10:27:21 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej
6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej
d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
scw
ce2ec9e63e Add support for the SMsC LAN83C183 PHY, which actually probes as a
Seeq 84220.

Also add an 84220-specific work-around for some braindamage (at least
in the PHY I'm working with) where the PHY always comes out of reset
isolated, regardless of the previous state of the BMCR_ISO bit. This
happens even if the PHY has address zero, which is contrary to the
part's datasheet...

The work-around is only applied if we notice BMCR_ISO is set when it
should be clear following reset. The fix is to wait 30mS and clear
it manually. (The change doesn't stick if it's cleared sooner than this)
2002-08-26 11:13:13 +00:00
fvdl
660edcbaff Match 881011 PHY. 2002-08-08 00:04:57 +00:00
fvdl
86710d1b0a Regen after addition of marvell 881011. 2002-08-08 00:04:28 +00:00
fvdl
b068d9297a Add ID for Marvell 881011 phy found on newer i8254x-based gig-e cards. 2002-08-08 00:03:42 +00:00
thorpej
7d85789f0a Move the BCM5401 DSP patch out of the bge driver and into
the brgphy driver; all users of the BCM5400 and BCM5401 need
the DSP patch and the sledgehammer-reset-at-media-set-time.

Also add a DSP patch for the BCM5411 gleaned from Apple's
GMAC driver for Darwin.

Tested with a 3Com 3c996-T (BCM5700 + BCM5401).
2002-07-13 01:23:27 +00:00
thorpej
b13f958c53 Match the BCM5421, found on the Apple Xserve. From Matt Thomas. 2002-07-12 04:00:10 +00:00
matt
97f6bca3e2 Regen. 2002-07-09 23:25:07 +00:00
matt
537e1f17d9 Add Broadcom BCM5421 2002-07-09 23:24:33 +00:00
simonb
c19a094675 Don't include <malloc.h> - no memory management style functions are use
in any of the MII drivers.
2002-07-03 06:25:49 +00:00
drochner
8d07c19c5e regen 2002-06-25 12:26:28 +00:00
drochner
4ded79cbb4 After I found a press release of 1998 which states that AMD sold
Davicom PHY chips, merge the identical entries for DM9101 and Am79c873
into one.
Should also fix PR kern/17369 by Dave Huang.
2002-06-25 12:25:56 +00:00
fvdl
64fc3ae071 Match BCM5701 2002-06-22 14:38:34 +00:00
fvdl
bc97012696 Add more register definitions. From FreeBSD. 2002-06-22 14:37:58 +00:00
fvdl
506d548f6c Regen. 2002-06-22 14:36:26 +00:00
fvdl
3cfd73048b Aff BCM 5701 PHY Id. 2002-06-22 14:35:52 +00:00
matt
1f4c6f5868 Regen. 2002-05-15 22:48:42 +00:00
matt
0bfea741e8 Correct/add more PMC-Sierra PHYs 2002-05-15 22:48:17 +00:00
matt
57752d8c7f Regen. 2002-05-15 21:25:28 +00:00
matt
5a4d71be86 Add another PMC-SIERRA phy 2002-05-15 21:24:59 +00:00
thorpej
c1f51e00c0 Back out change accidentally committed. 2002-05-12 21:39:46 +00:00
thorpej
0cc96b0fbe Make sure ifp->if_baudrate is valid when the parent's statchg
callback is made.

Pointed out by Matt Thomas.
2002-05-10 20:45:05 +00:00
uwe
41e6fbc398 Delint somewhat. 2002-05-07 04:52:49 +00:00
wiz
b9abd324c6 Fix typo in comment. kern/16382 by Sean Davis. 2002-04-17 09:14:21 +00:00
thorpej
e1f3e69604 * Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
  the magic "files include order" dance in N machine-dependent
  configuration definitions.
2002-04-17 00:35:04 +00:00
mycroft
aa878fabc4 For 78Q2120 revisions 3 and earlier, punt to ukphy, as our special media status
routine does not work on those chips.
2002-04-15 16:50:52 +00:00
ichiro
2aa38fbf8b add urlphy 2002-03-29 02:05:05 +00:00
ichiro
8e2f0b253e Add a driver for the Realtek RL8150L Ethernet PHY. 2002-03-28 21:07:53 +00:00
thorpej
b017898534 Get flags passed down to PHY drivers correctly. This was done on
an adhoc basis in a couple of PHY drivers, this fixes it more generally.

Per a discussion w/ Cliff Neighbors <cliff@allegronetworks.com>.
2002-03-25 20:51:24 +00:00
chs
4b6d0e2df5 lxtphy needs the ukphy_subr attribute now. 2002-03-17 01:34:48 +00:00
chs
e444e2ddd4 regen 2002-03-14 04:41:09 +00:00
chs
dc3bc0c490 add support for LXT971 PHYs. 2002-03-14 04:40:26 +00:00
wiz
5c800297c6 Match ICS 1893. 2002-02-10 17:09:41 +00:00
wiz
c48956e61c Regen [ICS 1893] 2002-02-10 17:09:08 +00:00
wiz
9f4c1b7c26 Add ICS 1893 2002-02-10 17:08:24 +00:00
thorpej
edd394b53e Update for 88E1000 model number changes. 2002-01-15 21:01:59 +00:00
thorpej
60ed1aba47 Regen; add another Marvell 88E1000 PHY model number. 2002-01-15 21:00:50 +00:00
thorpej
dcc3d13f0d Add another Marvell 88E1000 PHY model number. 2002-01-15 20:59:52 +00:00
augustss
c6df7d4358 Regen. 2001-12-15 00:31:43 +00:00
augustss
385b05e2f9 Add another Altima PHY. From Peter Seebach. 2001-12-15 00:31:03 +00:00
lukem
ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
lukem
0fa231134c - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
2001-11-20 14:34:18 +00:00
lukem
8b7bb91219 add RCSID 2001-11-13 07:38:28 +00:00
perry
82540eeaca fix a couple of signed->unsigned warnings lint found 2001-11-11 00:25:23 +00:00
thorpej
89893e42b7 ANSI'ify. 2001-08-25 18:04:01 +00:00
thorpej
11be81ff63 Regen. 2001-08-25 06:00:01 +00:00
thorpej
c783391d0a Note compatibility with the Am79c874, and document some more
registers.
2001-08-25 05:57:12 +00:00
thorpej
9d50e2e95a Back out previous; closer inspection of the manual reveals that the
Am79c874 has the same ID register contents as the AC101.
2001-08-25 05:55:19 +00:00
thorpej
820809faec Regen; added AMD Am79c874 NetPHY-1LP. 2001-08-25 05:45:25 +00:00
thorpej
05e4fb8e6c Add AMD Am79c874 NetPHY-1LP. 2001-08-25 05:44:59 +00:00
thorpej
85a7cdc261 Driver for the 10BASE-T portion of the AMD 79c901 PHY. 2001-08-25 04:06:26 +00:00
thorpej
158cb83996 Add a driver for generic HomePNA PHYs. Currently supports the HomePNA
portion of the AMD Am79c901.
2001-08-25 03:21:38 +00:00
thorpej
9fe2378664 For HomePNA PHYs, don't register it w/ ifmedia as 10BASE-T, but
rather as HomePNA1.
2001-08-25 01:57:56 +00:00