Commit Graph

475 Commits

Author SHA1 Message Date
cegger
add29455bf fix media priorities:
IEEE 802.3 Annex 28B.3 specifies the following relative
priorities of the technologies supported by
802.3 Selector Field value:

1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T

Our drivers give 100BASE-T4 a higher priority than
100BASE-TX full duplex.
Fix this. This patch is based on changes in FreeBSD and OpenBSD.

Patch presented on tech-kern and tech-net:
http://mail-index.netbsd.org/tech-kern/2009/02/15/msg004397.html
http://mail-index.netbsd.org/tech-net/2009/02/15/msg001064.html

got no comments, no objections.
2009-02-16 08:00:42 +00:00
cegger
1ff2d41bea pretty print atphy's supported medias in dmesg. 2009-02-12 13:38:49 +00:00
cegger
e6e201ff78 revert changes in rgephy_reset() done in rev. 1.25.
Should fix PR 40586
2009-02-11 23:01:07 +00:00
cegger
cdc8049f5c Attach atphy(4) on ATTANSIC oui.
ok cube@
2009-02-11 14:44:25 +00:00
cegger
276d5496f2 regen. 2009-02-11 14:42:52 +00:00
cegger
807b74b329 add ATTANSIC and their L1/L2 PHYs
ok cube@
2009-02-11 14:41:56 +00:00
hira
104ce1db3a Fix typo in comment (OUT -> OUI). 2009-01-31 05:44:05 +00:00
jnemeth
059ed7c24a add a comment explaining how to regenerate miidevs.h and miidevs_data.h 2009-01-21 14:08:03 +00:00
mrg
71e27a6efb The PCI revision numbers are unique to a PCI vendor/product
ID pair.  Misuse of the revision numbers was causing some of the chip
features to be disabled on some integrated Intel chips.  So, move the
determination of the features into the bus frontend, where the
vendor/product ID is known.  (Note: sc_rev should be removed.  The
microcode patch stuff is also busted and needs to be fixed.)  Also,
poll the actual flow control status in inphy, rather than making
assumptions.

contributed anonymously.
2009-01-18 10:37:03 +00:00
mrg
dff35a2418 Enable flow control and poll the status appropriately.
contributed anonymously.
2009-01-18 10:00:51 +00:00
cegger
31614b9ad8 add RCSID 2009-01-16 21:47:56 +00:00
cegger
7546e67ddd Driver for Attansic Technology F1 10/100/1000 Ethernet PHY.
Written by Pyun YongHyeon for FreeBSD, ported to OpenBSD by Kevin Lo, ported to
NetBSD by me.
2009-01-16 21:06:24 +00:00
cegger
351ce8ab9a Use mii_anar(). No functional change. 2009-01-16 20:52:20 +00:00
cegger
100faa2cd7 add mii_anar(). From OpenBSD. 2009-01-16 20:51:18 +00:00
cegger
20e2f309c1 regen 2009-01-16 20:42:19 +00:00
cegger
dc7d4d47a4 add ATHEROS F1 and F2 PHYs 2009-01-16 20:41:39 +00:00
cegger
99af9c90e3 pull in changes from FreeBSD:
- reset autonegotation timer if media option is not IFM_AUTO or we got a invalid link.
- Announce link loss right after it happens.
- Autonegotiation is retried every mii_anegticks seconds.
- Report link state changes right after setting autonegotiation.
- use rgephy_reset consistently
- change rgephy_reset to use mii_phy_reset and rgephy_load_dspcode.

These changes give me a speedup from 6.5MB/s to 9.1MB/s on a 100MBit link.
2009-01-14 19:24:32 +00:00
cegger
096c5722ac add flow control support. From OpenBSD. 2009-01-09 22:03:13 +00:00
cegger
f7112a92d1 add support for RTL8211C(L) phy.
From FreeBSD.
2009-01-09 21:56:35 +00:00
tsutsui
d88429017d Regen from miidevs rev 1.80:
> Fix a botched comment.
2008-12-27 10:39:04 +00:00
tsutsui
aa50416355 Fix a botched comment. 2008-12-27 10:38:15 +00:00
jnemeth
7436f169a9 regen for et (Agere) driver 2008-12-27 08:56:50 +00:00
jnemeth
5b59b2b26d PR/39094 - Kaspar Brand -- Add et (Agere ET1310/ET1301) netowrk driver 2008-12-27 08:55:35 +00:00
tsutsui
e4ff32d44c Add RCS Id. 2008-12-03 13:55:20 +00:00
matt
17f430185a u_int32_t -> uint32_t 2008-11-25 22:18:17 +00:00
dyoung
ddbd8176f9 Reduce code duplication: most PHY drivers call mii_phy_add_media()
when they attach to the device tree, so call pmf_device_register(9)
once there instead of once in more than twenty drivers.
2008-11-17 03:04:27 +00:00
apb
96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
bouyer
2837506868 Regen: Add JMicron OUI, and JMC2[56]0 PHYs. 2008-09-28 18:30:47 +00:00
bouyer
d601ac3749 Add JMicron OUI, and JMC2[56]0 PHYs. 2008-09-28 18:30:11 +00:00
cegger
79670c1773 regen. for PR 39241: Add support for Broadcom BCM5906(M) from Karl Uwe Lockhoff 2008-08-25 08:15:46 +00:00
cegger
bdc28ede37 PR 39241: Add support for Broadcom BCM5906(M) from Karl Uwe Lockhoff 2008-08-25 08:15:05 +00:00
tsutsui
b127908947 Rename some softc variables for readability. 2008-05-06 11:35:38 +00:00
tsutsui
44b2bb4cfa Use device_private() where appropriate. 2008-05-05 01:37:56 +00:00
xtraeme
7db0e57765 device_t/softc split for all mii(4) devices, and other related
cosmetic changes.
2008-05-04 17:06:09 +00:00
martin
cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
spz
123ed98aff pretty up if_ex: pmf'ify, device split, and improve printing a bit too.
Reviewed and function-tested on if_ex_cardbus by cube (thanks).
Function-tested on if_ex_pci by myself.
2008-04-14 20:03:13 +00:00
cegger
cf417aad7e use aprint_*_dev and device_xname 2008-04-08 20:08:49 +00:00
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