Commit Graph

285 Commits

Author SHA1 Message Date
thorpej 9d04a424fe Improve the AMD PHY names. 2001-08-25 01:39:22 +00:00
thorpej b6aa674493 Driver for the Altima AC101 10/100 Ethernet PHY. 2001-08-24 17:54:32 +00:00
thorpej ce0d046061 Regen; recognize the 79c972's 10BASE-T interface mapped onto MII. 2001-08-23 04:47:36 +00:00
thorpej b52818d607 The Am79c972 PCnet-FAST+ has its built-in 10BASE-T interface mapped
onto the MII bus.  Recognize it.
2001-08-23 04:47:05 +00:00
enami 4977f2fb2d Advertize pause capability (802.3x flow control) to peer. 2001-08-06 09:51:40 +00:00
bouyer 10a5470050 Ops, forgot to commit this one:
- kill carrier detection code, it's not that usefull and give false indications
  on loaded ethernet segments
2001-08-04 02:21:24 +00:00
thorpej 7459c35d44 Clean up 1000BASE-SX autonegotiation, and add a way to advertise
PAUSE capability.
2001-07-27 22:44:59 +00:00
thorpej 4333749c7a Use the bit-swapped OUI for the 5221. (Have I mentioned that I really
don't like how the current MII_OUI() works?)
2001-07-27 17:58:20 +00:00
thorpej 773c261d65 Add a 3Com 3c905B internal PHY. 2001-07-27 17:55:34 +00:00
thorpej 3d3c5fa78c Regen; added a 3Com 3c905B internal PHY made by Broadcom. 2001-07-27 17:55:07 +00:00
thorpej 4063cb411b Fixup some Broadcom entries, add an entry for Broadcom PHY that
is built-in to some 3Com 3c905B cards.
2001-07-27 17:54:40 +00:00
thorpej 4a416b823f Fix 1000BASE-X duplex negotiation. That'll teach me to read the
manual more carefully next time.
2001-07-25 22:00:43 +00:00
thorpej bb93036fa9 Regen. 2001-07-20 07:07:28 +00:00
thorpej 959f6ee3f3 Adjust for the corrected Marvell entry. 2001-07-20 07:07:05 +00:00
thorpej 38f94a6fbe Bleh, I don't like the way our miidevs works now. Repair the
Marvell Semiconductor entry.
2001-07-20 07:06:42 +00:00
thorpej 41a68e94a9 Driver for the Level One LXT-1000 10/100/1000 PHY. 2001-07-12 21:54:40 +00:00
thorpej be71426b74 Regen; Add LXT-1000, clean up. 2001-07-12 21:25:31 +00:00
thorpej 6e65eb3c21 Add LevelOne LXT-1000 10/100/1000 PHY, clean up some Gig-E
PHY names.
2001-07-12 21:25:07 +00:00
thorpej aef9e7bea3 Code to handle generic ten-bit interfaces (1000BASE-{LX,SX} fiber
interfaces).
2001-07-12 18:49:38 +00:00
thorpej 0e863b15a6 Driver for the Marvell 88E1000 ``Alaska'' 10/100/1000 PHY. 2001-07-12 17:30:45 +00:00
thorpej 39928114d6 Regen; corrected Marvell entries. 2001-07-12 17:29:49 +00:00
thorpej 511aa23898 Correct Marvell OUI, and 88E1000 model number. 2001-07-12 17:29:18 +00:00
bjh21 8d829065a6 IFM_1000_TX -> IFM_1000_T, as (breifly) discussed on tech-net. 2001-06-30 17:53:58 +00:00
thorpej 0b0010a7c3 When probing for a PHY, look at the EXTSTAT bit in the BMSR, as well,
not just the media mask.  This prevents PHYs/TBIs that only support
Gigabit media from slipping through the cracks.
2001-06-20 01:42:41 +00:00
thorpej 7914a89b02 Add support for the Seeq 80225 10/100 Ethernet PHY. This is just
a stripped-down version of the 80220/80223.
2001-06-19 20:10:54 +00:00
thorpej 93169d8a94 Regen; added Seeq 80225 10/100 PHY. 2001-06-19 19:51:27 +00:00
thorpej 5d3c31d576 Add Seeq 80225 10/100 PHY. 2001-06-19 19:51:04 +00:00
enami 578730c551 Initialize sc->sc_anegticks to 5 on attach to prevent panic due to
assertion failure.
2001-06-08 07:09:40 +00:00
thorpej 9987ee5249 Driver for the Broadcom BCM5201/BCM5202 "Mini-Theta" Ethernet
PHYs.  This is also the same PHY core as in the 3Com 3c905C.
The PHY is documented in the 3c905C manual.
2001-06-02 21:42:10 +00:00
thorpej 424f7a1e65 Make PHY matching all table-driven. 2001-06-02 21:39:38 +00:00
thorpej 33a6994da1 Driver for Broadcom BCM5400-family Gig-E PHYs. Programming
information gleaned from FreeBSD.
2001-06-01 16:49:59 +00:00
thorpej 996df042df Add support for the DP83815 MacPHYTER internal PHY to the DP83843 PHYTER
driver, since for our purposes, they are compatible.
2001-05-31 20:30:21 +00:00
thorpej 1042f830e5 Regen; added several more PHYs. 2001-05-31 19:41:07 +00:00
thorpej 0c94166e28 Add several additional PHYs. 2001-05-31 19:40:33 +00:00
thorpej f752c7d328 On the Gig PHYTER, For whatever reason, the 10baseT-related bits of the
BMSR are wired to 0, yet the PHY supports 10baseT.  So, to get around
this, we test the ANAR 10baseT bits after a PHY reset.  These bits are
set according to input pin 180.  If we see the 10baseT ANAR bits set,
we fake them in the BMSR so that we can actually autonegotiate 10baseT.
2001-05-31 18:47:22 +00:00
thorpej 2128d9199a Enable frobbing the 1000baseT control register on Gig-E PHYs,
used for hard-wiring master mode, and for advertising the 1000baseT
media options during autonegotiation.
2001-05-31 18:44:48 +00:00
thorpej 628a67ab31 Add a driver for the NatSemi DP83891 and DP83861 Gig PHYTER
10/100/1000 PHYs.
2001-05-31 16:06:58 +00:00
thorpej ea1aed7db2 Make the number of ticks between auto-negotiation tries PHY-specific,
and default every PHY to 5 seconds (what we used before).  If we find
Gig-E media on a PHY, bump it to 10 seconds, since it can take 5
seconds just to negotiate a Gig-E link.
2001-05-31 16:02:29 +00:00
thorpej ad090e7062 Regen; added NatSemi DP83891. 2001-05-31 03:32:38 +00:00
thorpej 3ae72855b1 Add product ID for the NatSemi DP83891 1000baseTX PHY. 2001-05-31 03:32:20 +00:00
thorpej 9f63d3cd86 Typo in last. 2001-05-31 03:07:14 +00:00
thorpej f07f44812d The 1000baseT CR and SR are overlapped with the 100base-T2 CR and SR.
Note this in a comment.  Add the 1000baseT CR and SR bits.
2001-05-31 03:06:46 +00:00
soren 79859fb138 Regen. 2001-05-22 16:07:56 +00:00
soren b16ba1d8cd Add i82562ET id. 2001-05-22 16:04:27 +00:00
drochner 199e9f8164 regen 2001-05-17 17:39:30 +00:00
drochner 10aff2d3f0 argh - the OUI of PMC-Sierra is 00-e0-04, according to IEEE.
They managed to mess it up in a new way.
2001-05-17 17:39:00 +00:00
drochner 1ea0cb1ea4 support the fiber output of the PHY device, enabled if the MIIF_HAVEFIBER
flag is passed in from the board driver
2001-05-17 17:29:54 +00:00
drochner 002851041c re-enable mii_flags in attach args - I've found a use for it: tell the
PHY which support it that a fiber interface is present
2001-05-17 17:28:21 +00:00
matt 91d9961f24 Regen 2001-05-15 23:18:16 +00:00
matt 75d77bf185 Add OUI for PMC-Sierra. Add BCM5221 Phy. Add PM8351 Phy. 2001-05-15 23:17:48 +00:00
matt f5d9baae2f Note that extended status is in register 15 2001-05-15 23:16:40 +00:00
thorpej c2ffdccb2b Regen; Add National Semiconductor DP83861 1000baseTX PHY. 2001-05-15 21:37:33 +00:00
thorpej 8fd542b023 Add National Semiconductor DP83861 1000baseTX PHY. 2001-05-15 21:37:04 +00:00
thorpej d3a64bd0d8 Add code to recognize and set media on GMII (Gigabit MII) PHYs.
802.3 doens't specify ANAR or ANLPAR bits for GMII.  Need to
use PHY-specific registers for this, for now, which means we
need specific drivers for the Gigabit-capable PHYs (I think the
most common is the BCM5400).
2001-04-30 19:49:08 +00:00
thorpej 63604adafa Add a bunch of Gig-E definitions. 2001-04-30 19:21:03 +00:00
lukem d2ac513298 remove some lint 2001-04-30 01:19:40 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
augustss b728f196e9 Comment out some flag stuff that isn't used. Someone should take a look
at this.  There is something fishy with the mii code, the last argument to
mii_attach() is not being used in any meaningful way.
2001-04-13 11:14:55 +00:00
augustss 205b10ed17 Add a flag to mii_flags which will cause autonegotiation to use tsleep()
instead of callout.  This way adapters which need a process context for
PHY register access (e.g. USB adapters) have a chance.
2001-04-13 11:12:36 +00:00
jdolecek 372e5956ef Only install headers which are actually used by our userland. This
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.

I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
2001-04-11 07:42:31 +00:00
drochner a6ae0975d5 regen 2001-04-09 09:39:57 +00:00
drochner 552d4c8236 add media options for the Intel UCH2 internal ethernet controller 2001-04-09 09:39:24 +00:00
drochner adf9edcd41 update for miidevs changes 2001-03-28 14:16:49 +00:00
drochner 3752421a75 regen 2001-03-28 14:15:23 +00:00
drochner bf6a2bf86c adapt to corrected OUI calculation 2001-03-28 14:14:57 +00:00
drochner 9e8def737f Reading the IEEE specs shows that the bits have to be reversed when
mapping an OUI to the MII id registers.
Doing this in the MII_OUI() macro would be too complex, so put it into
a helper function and move the MII id register interpretation stuff
into miivar.h.
2001-03-28 14:13:06 +00:00
thorpej a9d20501af Remove a comment; this module has not been compatible w/ BSD/OS's
for quite a long time.
2001-03-24 20:44:26 +00:00
lukem 3aeb5f2f29 whitespace police 2001-02-24 01:59:46 +00:00
augustss 6861904096 Regen. 2001-01-07 15:01:06 +00:00
augustss 55c57a573f Add an Altima PHY. 2001-01-07 15:00:46 +00:00
soren 232e2c5ef9 Regen. 2000-11-07 13:53:59 +00:00
soren 0dc9fd53b9 Just print 'Intel' for their other OUI. 2000-11-07 13:53:42 +00:00
augustss 5a356af882 Regen. 2000-11-06 22:32:49 +00:00
augustss 75367f830a Add some OUIs and models. From OpenBSD. 2000-11-06 22:32:26 +00:00
sommerfeld 2383226766 Silence format warning. 2000-10-11 22:03:33 +00:00
martin 10debdeb9c Fix to autonegotiation problem with some fxp cards. Fix found and reported
by Erich T. Enke et al. on current-users. This fixes PR 10550.
2000-07-27 22:14:48 +00:00
thorpej 49014bf59f Restructure the PHY entry points to use a structure of entry points
instead of discrete function pointers, and extend this to include
a "reset" entry point.  Make sure any PHY-specific reset routine is
always used, and provide one for the LXT-970 which disables MII
interrupts (as is done for a few other PHYs we have drivers for).
2000-07-04 03:28:59 +00:00
sommerfeld ea313649ff defopt MIIVERBOSE 2000-06-11 02:13:34 +00:00
augustss e169e0018c Regen. 2000-05-08 13:26:05 +00:00
augustss 43c5780ae1 Allow a verbose description to be printed with the option MIIVERBOSE. 2000-05-08 13:25:34 +00:00
augustss 56aa5c16d1 Add another AMD chip. 2000-05-08 13:23:21 +00:00
tsutsui fa07b81e43 Make to match also MII_OUI_DAVICOM.
(This seems to work, but any GENERIC does not have dmphy...)
2000-04-02 03:06:19 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
thorpej 411a31adb2 - Go to splimp() when sending the rtsock message regarding link status.
- Would like to notify protocols if a link goes up or down, to e.g.
  restart Duplicate Address Detection, etc.  Add a comment to this
  effect.
2000-03-15 20:34:43 +00:00
thorpej ad61d101be Factor out the tick handling code into a common function, and send
rt_ifmsg's when the link speed or link status changes.
2000-03-06 20:56:56 +00:00
thorpej a084fd2f81 Some PHYs go off into left field for a few seconds if you attempt to kick
autonegotiation while it's already enabled.
2000-02-03 06:11:13 +00:00
thorpej 9ff57fe506 Oops, missing return; 2000-02-03 05:38:57 +00:00
thorpej 22fe15d7b4 Let mii_phy_setmedia() handle the IFM_AUTO case, too. 2000-02-02 23:34:56 +00:00
thorpej 8923ca0b00 Make PHY drivers provide a pointer to their status routine, and add
a generic mii_phy_status() that calls back into the PHY.  It doesn't
do anything interesting yet, but it will soon.
2000-02-02 17:50:43 +00:00
thorpej eed75dbc26 Don't dry to diving MIIF_NOISOLATE in the PHY drivers. Instead, pass
flags down from the parent to child vi mii_attach().
2000-02-02 17:09:38 +00:00
thorpej 84dc99fdea Bring some order to the chaos which was the MII code function naming
"conventions".
2000-02-02 08:05:26 +00:00
thorpej 0738a5d4ac Driver for the Davicom DM9101 10/100 Ethernet PHY. This PHY is found
on several inexpensive 10/100 Ethernet boards (e.g. D-Link DFE-530TX,
Winbond 10/100 boards), and is also the built-in PHY on the DM9102
10/100 Ethernet chip.
2000-02-02 04:29:49 +00:00
thorpej c74e0a8db2 Add detachment support to the MII layer. 2000-01-27 16:44:30 +00:00
augustss 380035a59d Regen. 2000-01-13 20:16:49 +00:00
augustss 81ae0fb432 Add a Broadcom PHy used in the D-Link USB100 adapter.
There's no special driver for this PHY (yet).
2000-01-13 20:16:08 +00:00
pk 03c8221ad0 Use BMSR to test for `negotiation complete'; the alternative bit in the
LXT vendor register 20 is latching high and resets to low on read causing
subsequent status request to return `IFM_NONE'.
1999-12-21 10:47:00 +00:00
thorpej b67d4809ed Add a driver for the National Semiconductor DP83843 `PHYTER' 10/100
Ethernet PHY.
1999-12-07 19:36:37 +00:00
thorpej f1ba0d46a3 Regen. 1999-11-19 18:26:22 +00:00
thorpej 55495ae2e9 Add OUI for Enable Semiconductor. 1999-11-19 18:26:09 +00:00
thorpej 6c50cb64e1 Common module for bit-bang'ing the MII. 1999-11-17 17:47:59 +00:00
thorpej bca88a28c8 Add mii_down(), which is used by MAC drivers to inform PHYs that the
interface is now down.  PHYs use this to cancel pending asynchronous
operations.
1999-11-12 18:12:59 +00:00
thorpej bedeeb9896 Allow mii_phy_probe() to be called multiple times, and allow the caller
to specify either the PHY number or the PHY `offset' (1st, 2nd, 3rd, etc.)
to configure.
1999-11-04 00:22:07 +00:00
thorpej bc82bff1dc Don't add any loopback versions of media, for now. 1999-11-03 22:32:45 +00:00
thorpej 8fc600c3b1 Clean up the code that adds media a little, and make media selection
table-driven in preparation for some other changes to be made.
1999-11-03 22:30:32 +00:00
thorpej 00ba1a42eb Fix a braino in some currently-disabled code. 1999-10-27 19:05:44 +00:00
thorpej be9104dd8d Define ANAR and ANLPAR bits that are used to negotiate the 802.3x PAUSE
feature.
1999-09-29 22:49:33 +00:00
thorpej 45a337e088 Add a PHY `offset' (e.g. "first PHY on bus, second PHY on bus, ...") to
the PHY's softc.
1999-09-25 00:10:13 +00:00
soren 6c591e77d0 Fix botched RCS IDs. 1999-09-16 05:58:18 +00:00
soren 60feba0646 Spacing. 1999-09-07 21:52:06 +00:00
soren cc8ca41376 Install *reg.h 1999-09-07 21:51:49 +00:00
soren 5c44dfbe6a Note 78Q2121. 1999-09-07 19:29:52 +00:00
soren 57f7d3320b Add driver for the TDK Semiconductor 78Q2120 PHY. 1999-09-05 01:26:02 +00:00
soren e0bcd7a71a TDK Semiconductor 78Q2120 PHY, commonly used in low-power Cardbus cards. 1999-09-05 00:48:01 +00:00
soren b8e941e9b0 Add PHY driver the the Intel 82553 found on some fxp's.
Some variants of this chip need a little extra MII fix before
being usable, so this is not yet put into GENERIC's.
1999-09-05 00:40:27 +00:00
soren 0151ffe3d6 Regenerate. 1999-09-04 23:59:32 +00:00
soren 6624cc41e9 Add Intel 82553 and TSC 78Q2120. 1999-09-04 23:58:55 +00:00
drochner f04cb4036f move common support functions for phy drivers from mii.c to mii_physubr.c,
so that they are not includes if no PHY is configured
(avoids code bloat if an interface driver has the "mii" attribute but
mii is not used by the particular version)
1999-08-03 19:41:49 +00:00
thorpej e314d1d844 Correct the sense of the PCR_FLINK100 bit. From Dave Sainty, PR #7832. 1999-07-14 23:57:36 +00:00
thorpej 50f084159c SCTRL2 register number wrong. PR #7756, Johan Danielsson. 1999-06-20 16:42:37 +00:00
drochner 23ddff5688 use the new "xx" prefixed OUIs because the mapping to the ID register
bits differs from the MII_OUI() way
1999-05-14 11:40:28 +00:00
drochner 48c49dcb82 regen 1999-05-14 11:38:05 +00:00
drochner 416a47bc88 Define OUIs in a more uniform way. OUIs are fixed entities registered
with IEEE, so use the "real" OUIs for definitions.
Now unfortunately vendors differ in how the MII ID register bits are
used wrt bit and byte ordering. There is a straightforward way - bits
numbered from LSB to MSB - used by AMD, Intel, NS and QS. This is used
by the current MII_OUI() conversion macro. ICS, Seeq, SiS and TI count
the bits as they appear on the wire, and some differ completely.
Account for these cases by "xx" prefixed OUI definitions which compensate
for this, so the MII_OUI() macro can still be used.
Add AMD (the "real" AMD this time) and the 79c973 PCnet internal PHY.
1999-05-14 11:37:30 +00:00
kleink 5ea46286eb mii_phy_auto(): don't rely on an implicit declaration of the waitfor argument. 1999-04-26 14:48:57 +00:00
thorpej 83f9ab3c87 Implement asynchronous autonegotiation when driven by the MII tick
(one-second clock).  Prevents .5s delays every 5 seconds when the interface
is up but there is no link.  Fixes PR 7361.
1999-04-23 04:24:32 +00:00
thorpej 01ea9a1dd8 Regen. 1999-03-24 21:07:26 +00:00
thorpej 029f0b9d86 Silicon Integrated Systems OUI and the SiS 900 PHY model number. 1999-03-24 21:07:04 +00:00
thorpej 58beb19c16 Regen. 1999-02-05 20:20:04 +00:00
thorpej 53089c1ade Add oui for Davicom Semiconductor, and add Davicom DM9101 10/100 PHY. 1999-02-05 20:19:44 +00:00
thorpej f9467ddb8e Some PHYs are really braindead, and report incorrect IDs. Simplify the
test for this, and probe for PHYs based on media in the BMSR.
1999-02-05 02:46:34 +00:00
pk f9e92fac23 Fix bit test 1999-01-29 07:35:05 +00:00
thorpej 2b695df1dc Common code for media-from-bmcr. 1998-11-05 04:08:01 +00:00
thorpej aabf2a0809 In the status routine, always use the media selected in the BMCR if
autonegotiation is not enabled.  This is more reliable on many PHYs,
and requires fewer register reads.
1998-11-05 04:01:32 +00:00
thorpej c755434d9d Regen. 1998-11-05 03:43:57 +00:00
thorpej 84def70194 Add AMD's OUI, and the model number for the AMD 79C873 10/100 Ethernet PHY. 1998-11-05 03:43:43 +00:00
thorpej 567710942c Add a driver for "generic unknown PHYs", meant as a catch-all for
PHYs we don't have specific drivers for.  While this will not give
optimum operation, it will allow network interface drivers to at least
function while drivers for their specific PHYs are written.
1998-11-05 00:36:48 +00:00
thorpej 7d76571fd1 Tidy up the message from mii_print() somewhat. 1998-11-05 00:30:44 +00:00
thorpej 2a17544c19 Place the essentially common "ticks" and "active" members into the
mii_softc (generic phy goo), and just switch all of the PHY drivers
(except tlphy, which really does have special stuff) to use an mii_softc
instead of a private one.
1998-11-05 00:19:32 +00:00
thorpej f66039cbce Routines common between the Uknown PHY driver (forthcoming) and other
PHY drivers.  This file has ukphy_status(), which is what PHY drivers
should use if media detection is done by decoding NWay.
1998-11-04 23:59:51 +00:00
thorpej ad8b66c7c8 Return a higher-priority match than 1. These are specific drivers. This
allows for a "generic unknown PHY" driver to be implemented.
1998-11-04 23:44:09 +00:00
thorpej 51da8fc39f Factor out the common reset code. Use the NOISOLATE flags as appropriate
to prevent a PHY from being isolated in the event the MAC can't deal with
this.  (3Com 3c905B-TX, and Intel i82557).
1998-11-04 23:28:15 +00:00
thorpej b097394468 Factor out some common code from all the PHY drivers (autonegotiation, for
now.)
1998-11-04 23:07:15 +00:00
thorpej 844622de9c Define and use generic PHY read/write reg macros. 1998-11-04 22:15:40 +00:00
thorpej b5ebc7dd87 Driver for Seeq 80220/80221/80223 10/100 Ethernet PHYs. 1998-11-03 23:51:29 +00:00
thorpej 49d750db09 Regen. 1998-11-03 05:02:25 +00:00
thorpej 8adfcb5246 Define the model ID of the Seeq 84220 10/100 PHY. 1998-11-03 05:01:49 +00:00
thorpej 19fd5d178f 3Com PHY can't be isolated, so don't allow IFM_NONE. 1998-11-03 00:18:18 +00:00
thorpej 3f98e69b07 Driver for the Integrated Circuit Systems ICS1980 10/100 PHY. 1998-11-02 23:46:20 +00:00
thorpej 1f074c785d When doing a media change service request, use the media word from the
current ifmedia_entry, not from the user-supplied media word.  The
user supplied media word may not necessarily match e.g. instance (if
the parent MAC driver is intentionally ignoring instance if its expecting
multiple PHYs with non-overlapping media, e.g. TI ThunderLAN) the media
word we are actually switching to.

Since PHY drivers use `instance' to determine if they should isolate
themselves, the ThunderLAN PHY was sometimes being incorrectly isolated
when in fact the user attempted to select that PHY (for e.g. BNC operation).
1998-11-02 22:31:36 +00:00
thorpej 86fca03a0d Driver for the Level One LXT-970 10/100 Ethernet PHY. 1998-10-24 00:33:17 +00:00
thorpej afbf922a93 Don't print the revision of the 3c905B-TX's internal PHY; it's meaningless. 1998-10-23 01:52:50 +00:00