Commit Graph

730 Commits

Author SHA1 Message Date
sekiya 6b83ab5379 Regen. 2011-11-12 11:11:07 +00:00
sekiya 51e7e579b6 Add support for makphy 0x0029 variation found on most recent Globalscale Dreamplug. 2011-11-12 11:10:49 +00:00
jakllsch c8c51f7341 regen. 2011-11-02 19:56:40 +00:00
jakllsch 5522663c66 Add Broadcom BCM5325 and BCM5365. 2011-11-02 19:55:57 +00:00
jmcneill de012e9fef Attansic L2 is 10/100 but the status registers report 1000 Mbps, so don't
bother reading MII_EXTSR for this part. Also use MII_ANEGTICKS instead of
MII_ANEGTICKS_GIGE for this part.
2011-10-02 21:42:19 +00:00
cegger be9c987bdd add BCM5785 phy:
brgphy0 at bge0 phy 1: BCM5785 1000BASE-T media interface, rev. 3
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FD , auto
2011-06-07 10:10:44 +00:00
cegger 25591d12b1 regen. 2011-06-07 09:26:27 +00:00
cegger add8d199ec add BCM5785 2011-06-07 09:24:17 +00:00
matt 80fa5b26d0 Regen. 2011-05-28 05:56:15 +00:00
matt 144a4dfeef Fix CS8244 entry (changed to VSC8244). 2011-05-28 05:55:58 +00:00
msaitoh e43e4777a3 82579 support. 2011-05-20 06:06:59 +00:00
msaitoh 6687e6b65a regen 2011-05-20 00:47:11 +00:00
msaitoh 8552d6843d Add Intel 82579 2011-05-20 00:46:53 +00:00
jym a30b258c9c Fix BCM5709 PHY detection for ethernet PHYs (the SerDes case being already
handled):
- export bge(4) and bnx(4) CHIP ID and PHY flags to brgphy(4). Move to
"unsigned int" rather than "int", and reuse the same softc members for
chipid and phyflags (behavior controlled by the sc_isbge/isbnx boolean).
- apply bug fix for revisions A and B, so that autonegotiation can
complete (from OpenBSD).

Bug reported by Rivo Nurges via private mail, patch tested and
confirmed working by him (with thanks!)
2011-05-02 09:03:10 +00:00
jmcneill c2a7a21fae match on MII_MODEL_ATTANSIC_L2
alc0 at pci3 dev 0 function 0: Atheros AR8152 v2.0 PCIe Fast Ethernet
alc0: ioapic0 pin 17
alc0: Ethernet address 00:26:6c:9e:d4:c1
atphy0 at alc0 phy 0: L2 10/100 PHY, rev. 5
atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
2011-02-23 03:22:44 +00:00
bouyer 4ca29e6bc3 Add a driver for the RDC Semiconductor RDC R6040 10/100 Ethernet controller,
as found in the vortex86 SoCs (http://www.vortex86dx.com).
Ported from freebsd.
Not added to amd64's GENERIC because this CPU is 32bit only.

thanks to DM&P Electronics, Inc for providing documentation and sample
devices for this work.
2011-01-26 18:48:11 +00:00
bouyer 948baca81d Regen: Add RDC Semiconductor R6040 10/100 integrated PHY 2011-01-26 18:39:25 +00:00
bouyer a24cf481d2 Add RDC Semiconductor R6040 10/100 integrated PHY 2011-01-26 18:39:04 +00:00
cegger 498b8c6e14 fix comment. from PR kern/44395 2011-01-22 18:26:12 +00:00
cegger c970166801 Fixes from PR kern/44395 Masanori Kanaoka:
- Fix register address in ale_phy_reset(). from linux
- Fix mask value in ale_stop_mac().
- Fix multicast handling. from openbsd
- Fix phy reset handling.
2011-01-22 08:13:47 +00:00
pooka db460c0fb8 Match only first instance of rlphy, following suite from Free/OpenBSD.
should fix PR kern/42950, variant of patch from "js" on irc
2011-01-20 14:26:11 +00:00
matt 85cd343175 Match Marvell E1145 2010-12-11 18:10:42 +00:00
matt 67a6d6d4c5 Recognize AR8021 2010-12-11 18:10:16 +00:00
matt d1f7edc5af Regen. 2010-12-11 18:09:33 +00:00
matt 09b2af815f Add two phys (Atheros 8021 and Marvell 88E1145) 2010-12-11 18:09:13 +00:00
jym 8cad040aa0 Add support for BCM5709S (SerDes PHY) in brgphy(4).
From FreeBSD, via OpenBSD, with some minor adaptations.

No comments, no objections on tech-kern@.

The driver was tested on a Dell M710. Access was kindly provided by
Uwe Toenjes, whom I thank for this.

See also http://mail-index.netbsd.org/tech-kern/2010/12/01/msg009478.html
2010-12-09 23:25:49 +00:00
jym eac44f9a19 Fix typo. 2010-11-29 23:04:42 +00:00
christos 1bb8c93e5d regen 2010-11-27 20:15:43 +00:00
christos e5ce60b3e7 PR/44080: Grégoire Sutre: Support for the i82577 ethernet PHY 2010-11-27 20:15:27 +00:00
jym b105d52289 regen. 2010-11-27 18:03:33 +00:00
jym 10ac0f2ef5 Correct string for BCM5709S.
(Yup, sorry, fix was supposed to be for miidevs and not miidevs.h)
2010-11-27 18:01:40 +00:00
jym 2ef59c6010 Use device_private() instead of casting softc to (void *). 2010-11-27 17:42:04 +00:00
jym 4fb46d6208 Correct string for BCM5709S. 2010-11-27 17:38:49 +00:00
mlelstv f9c11ac3ae rlphy fails to work without autonegotiation.
Reason is that ifm_data does not store BMCR data but a media index
that gets poked into the BMCR register.

Setting the BMCR and ANAR registers is correctly handled by the
generic function mii_phy_setmedia.
2010-11-14 13:40:36 +00:00
jnemeth 512709b547 PR/39094 - Kaspar Brand -- Add et (Agere ET1310/ET1301) network driver
The et(4) driver supports PCI Express Ethernet adapters based on
the Agere/LSI ET1310/ET1301 integrated MAC/PHY.

The et(4) driver was written by Sepherosa Ziehau for DragonFlyBSD,
ported to OpenBSD by Jonathan Gray and subsequently ported to NetBSD
by Kaspar Brand.
2010-11-13 00:47:23 +00:00
pgoyette f05cff10bd Update the various xxx_verbose modules to conform to the module subsystem's
new locking protocol.
2010-08-21 13:18:35 +00:00
kiyohara 8f52632eee Add Marvell E1116R. 2010-08-01 09:54:12 +00:00
pgoyette 3dcc05c105 Move setting of mii_verbose_loaded flag into the module's init routine.
This ensures that the flag is set even if the module was manually loaded
by the user rather than just auto-loaded.
2010-07-25 14:44:34 +00:00
jakllsch 393ce9b83e Use standard MII register definitions from mii.h. No binary change. 2010-07-18 03:00:39 +00:00
pgoyette 90f0882b7a Update miiverbose module to use module_autoload() rather than module_load().
Load the module right before each attempt to use its features, and let the
module subsystem handle unloading.
2010-06-06 18:58:22 +00:00
martin bcf37d6abe Move all miiverbose/module related functions from ukphy.c to mii_physubr.c -
ukphy is not included in all kernels, but mii_physubr.c should be in every
kernel that has a phy.
2010-06-02 19:47:34 +00:00
pgoyette 700e1731f0 Extract MIIVERBOSE into a kernel module. The module can be builtin
by defining 'options MIIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.
2010-05-30 17:44:07 +00:00
pgoyette a26d53cca0 Include support for BCM5481. From OpenBSD and confirmed to work by
myself on XFX nForce 790i motherboard.
2010-05-02 13:49:17 +00:00
pgoyette e3643c0afa Regen 2010-05-02 12:43:05 +00:00
pgoyette 9054e40691 Add Broadcom BCM5481 and BCM5709S - From OpenBSD 2010-05-02 12:38:06 +00:00
dyoung 082ca23a21 For a couple of flags, use bool/true/false instead of int/1/0. 2010-04-27 18:52:45 +00:00
kiyohara 7b15e91671 Add Broadcom BCM5482.
It tested on OpenBlockS600. (coming soon ;-)
And reorder.
2010-03-13 12:57:23 +00:00
kiyohara 8617f5a119 Regen. 2010-03-13 12:54:03 +00:00
kiyohara a7e3a896d7 Add Broadcom BCM5482. 2010-03-13 12:52:29 +00:00
mrg ebc9e23316 various aprint_* fixes. 2010-03-11 03:54:56 +00:00
msaitoh 844288483e Add forgotten commit (IGP3_KMRN_DIAG_PCS_LOCK_LOSS). 2010-03-07 11:07:01 +00:00
msaitoh b15cf397d8 - Add code for WOL, ASF, IPMI and Intel AMT.
- wm_enable_wakeup() is disabled by default. If you want to use WOL with
      the Magic Packet, define WM_WOL.
    - Add the following flags:
        WM_F_ASF_FIRMWARE_PRESENT
        WM_F_ARC_SUBSYSTEM_VALID
        WM_F_HAS_AMT
        WM_F_HAS_MANAGE
        WM_F_WOL
    - Add wm_suspend() and wm_resume(). Give/get the control to/from the
      firmware.
    - Need more work for PCH. See wm_enable_phy_wakeup().
- Enable wm_get_hw_control() for 82574 and 82583.
- Add Yet another workaround for ICH8.
    - Add wm_igp3_phy_powerdown_workaround_ich8lan() for power down problem
      on D3.
2010-03-07 09:05:19 +00:00
msaitoh c70d45b7a4 Add two workarounds for ICH8 with igp3.
- Workaround for 82566 Kumeran PCS lock loss.
- WOL from S5 stops working.
2010-03-07 07:53:37 +00:00
martin 9e8ef1a77b Before destroying a autonegotiation callout, make sure it is quiet 2010-03-02 08:30:40 +00:00
dyoung c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
msaitoh b7f2eb1a7e Add support for BCM5461,BCM5784 and BCM5761.
Enable brgphy_jumbo_settings().
Enable the Ethernet@Wirespeed function.
2010-01-24 16:26:09 +00:00
msaitoh e12ed2e395 regen. 2010-01-24 16:23:16 +00:00
msaitoh c1c40d3128 Add BCM5461,BCM5784 and BCM5761. 2010-01-24 16:22:40 +00:00
msaitoh 86ff2cac75 Fixes the rx stall problem on 82578 by MANY workaround code.
We need more work for 82577.
2010-01-14 18:56:01 +00:00
msaitoh 1540dbd923 Add some macros 2010-01-12 21:48:26 +00:00
dyoung cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
jdc 5af9c30746 Regenerate for:
Add NS DP83865
2010-01-07 09:31:44 +00:00
jdc dda409f914 Add NS DP83865. 2010-01-07 09:31:19 +00:00
jdc 54137b1918 Add DP83865 to the supported PHY list (from OpenBSD). 2010-01-07 09:30:28 +00:00
msaitoh 05b467b58c Sync with Intel's original em driver:
- Add dspcode for igp3 and use it when the EEPROM isn't available.
- Add some delays.
- Stop the PHY transmitter before patching the DSP code and restart it after wrote.
- Save and restore register 0x2f5b.
2009-12-16 14:37:26 +00:00
msaitoh f03b836566 Re-enable igphy's 82566 support.
- Patch for the DSP code is only for 8254[17] and we have to apply the
   different patches between rev. 1 and rev. 2.
 - The workaround for analog fuse is only for 82547 rev. 1.
 - The workaround for smartspeed is only for 8254[17]

see http://mail-index.netbsd.org/tech-net/2009/08/05/msg001546.html
2009-12-16 04:50:35 +00:00
enami 29aefd28c2 Regen so that makphy.c compiles. 2009-12-14 01:48:34 +00:00
matt 95fa9f87c8 Add E1149 Phy. 2009-12-14 00:51:06 +00:00
matt 0a60906620 Add Marvel 88E1149 2009-12-13 19:20:17 +00:00
dyoung 2c7081ae8a Delete unused function mii_activate(). 2009-12-04 22:37:35 +00:00
bouyer e864a44956 Support BCM5709CAX and BCM5709C PHYs. 2009-11-18 23:02:12 +00:00
bouyer 037713ff86 Regen: Add BCM5709CAX and BCM5709C PHYs. 2009-11-18 23:01:47 +00:00
bouyer d4753b2acd Add BCM5709CAX and BCM5709C PHYs. 2009-11-18 23:00:46 +00:00
dyoung b5d9476c14 Simplify activation hook. 2009-11-12 19:38:35 +00:00
dyoung 1a15725cd0 Simplify mii_phy_activate(). Remark in mii_phy_activate() and
mii_phy_detach() comments that we may need to invalidate the parent's
media setting.  No functional change intended.
2009-11-06 18:41:25 +00:00
bouyer 6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
jmcneill 389d010be4 Save a line of dmesg by printing the OUI/model after the locators. 2009-08-23 15:26:42 +00:00
tsutsui 0e2d8f9be7 Remove duplicated PHY_READ() against RGEPHY_MII_BMSR
that FreeBSD said a copy/paste error.
2009-08-23 13:41:06 +00:00
simonb 598bb4aec3 Match the Broadcom BCM5464 PHY. 2009-08-12 13:34:34 +00:00
simonb 7971cd7c5f Regen. 2009-08-12 13:33:42 +00:00
simonb 1bb23ef36e Add Broadcom BCM5464 PHY. 2009-08-12 13:33:02 +00:00
kml 20115c22f9 Later generation 82566 IGP PHYs have problems with media changes to 100Mb and
10Mb; it appears that the SmartSpeed workaround and dspcode in this PHY are
aimed at earlier generation IGPs.  Remove reference to 82566s, allowing
them to fall through to choose other PHYs.
2009-08-06 04:58:48 +00:00
cegger 22b735eb9f - replace magic number with proper define from mii.h. From OpenBSD.
- fix typo in comment. From OpenBSD.
2009-07-25 16:25:13 +00:00
rjs 805ebb2dbd Regen. 2009-06-18 11:33:31 +00:00
rjs 6f27b61c89 Add Marvell 88E1116R PHY. 2009-06-18 11:32:29 +00:00
rjs 4cd376c68b Make it compile. Change a commented out printf() to aprint_error_dev(). 2009-06-18 08:40:26 +00:00
tsutsui a36955c23e Unwrap not so long lines. 2009-06-17 15:43:16 +00:00
tsutsui a86f73dc93 - no need to use device_parent() because device_t parent is passed
via config_attach(9)
- use device_is_a() rather than strcmp() for readability
2009-06-17 15:42:00 +00:00
cegger 99747a8099 struct device * -> device_t, no functional changes intended. 2009-05-12 14:28:22 +00:00
cegger d16a259fe3 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 13:15:24 +00:00
tsutsui da88f224b7 Remove magic reset sequence except wakeup for rev 2 chips which breaks 8111D.
Problem reported and fix confirmed by Thomas Bieg on current-users.

Also tested on 8111C (no bad side effect) by several users privately.
2009-04-28 13:25:17 +00:00
msaitoh e447a613d9 use proplib 2009-04-23 10:47:43 +00:00
msaitoh 3322726436 regen. 2009-04-19 11:18:07 +00:00
msaitoh 2449d3efc1 Oooops. Back out some of previous my commit. 2009-04-19 11:17:46 +00:00
msaitoh 4d9e9f6912 Some fixes and enhancements:
Both if_bge* and brgphy.[ch]:
    Check the parent's MAC and use the quirk code for the bug like OpenBSD and
    FreeBSD. Some bugs can't identify the PHY ID. For example, 5704 Ax has the
    ADC bug, but 5704 A3 and 5704 B0 have the same PHY ID and revision. Add
    BGE_PHY_CRC_BUG, BGE_PHY_ADC_BUG, BGE_PHY_5704_A0_BUG, BGE_PHY_JITTER_BUG,
    BGE_PHY_ADJUST_TRIM and BGE_PHY_BER_BUG for this flag. Some of the DSP
    patches are newly taken from OpenBSD and FreeBSD.

  if_bge*:
    Remove duplicated BGE_CHIPID_BCM5714_A0 entry in the known CHIPID table.
    Fix obsolete comments.

  brgphy.[ch]:
    Add some PHY IDs.

TODO:
  Add more three quirk code into bge and brgphy (the brgphy side's are
  currently #if0'ed).
  Add support for bnx into brgphy (currently #if0'ed)
2009-04-19 11:10:36 +00:00
msaitoh 559b0165b6 Add mii_mpd_rev to keep MII PHY revision. 2009-04-19 10:47:48 +00:00
msaitoh ed6e698500 regen 2009-04-19 10:25:48 +00:00
msaitoh a57ebfe2e5 Add some boradcom's PHYs.
Sort.
2009-04-19 10:25:25 +00:00
dyoung 63a5e91969 Detach brgphy(4) at shutdown. 2009-04-07 18:05:54 +00:00
dyoung 03c2f978e8 In mii_phy_detach(), destroy the NWay callout. 2009-04-07 18:05:02 +00:00
dyoung 0d1ba3e899 During shutdown, detach devices in an orderly fashion.
Call the detach routine for every device in the device tree, starting
with the leaves and moving toward the root, expecting that each
(pseudo-)device driver will use the opportunity to gracefully commit
outstandings transactions to the underlying (pseudo-)device and to
relinquish control of the hardware to the system BIOS.

Detaching devices is not suitable for every shutdown: in an emergency,
or if the system state is inconsistent, we should resort to a fast,
simple shutdown that uses only the pmf(9) shutdown hooks and the
(deprecated) shutdownhooks.  For now, if the flag RB_NOSYNC is set in
boothowto, opt for the fast, simple shutdown.

Add a device flag, DVF_DETACH_SHUTDOWN, that indicates by its presence
that it is safe to detach a device during shutdown.  Introduce macros
CFATTACH_DECL3() and CFATTACH_DECL3_NEW() for creating autoconf
attachments with default device flags.  Add DVF_DETACH_SHUTDOWN
to configuration attachments for atabus(4), atw(4) at cardbus(4),
cardbus(4), cardslot(4), com(4) at isa(4), elanpar(4), elanpex(4),
elansc(4), gpio(4), npx(4) at isa(4), nsphyter(4), pci(4), pcib(4),
pcmcia(4), ppb(4), sip(4), wd(4), and wdc(4) at isa(4).

Add a device-detachment "reason" flag, DETACH_SHUTDOWN, that tells the
autoconf code and a device driver that the reason for detachment is
system shutdown.

Add a sysctl, kern.detachall, that tells the system to try to detach
every device at shutdown, regardless of any device's DVF_DETACH_SHUTDOWN
flag.  The default for kern.detachall is 0.  SET IT TO 1, PLEASE, TO
HELP TEST AND DEBUG DEVICE DETACHMENT AT SHUTDOWN.

This is a work in progress.  In future work, I aim to treat
pseudo-devices more thoroughly, and to gracefully tear down a stack of
(pseudo-)disk drivers and filesystems, including cgd(4), vnd(4), and
raid(4) instances at shutdown.

Also commit some changes that are not easily untangled from the rest:

(1) begin to simplify device_t locking: rename struct pmf_private to
device_lock, and incorporate device_lock into struct device.

(2) #include <sys/device.h> in sys/pmf.h in order to get some
definitions that it needs.  Stop unnecessarily #including <sys/device.h>
in sys/arch/x86/include/pic.h to keep the amd64, xen, and i386 releases
building.
2009-04-02 00:09:32 +00:00
cegger 8c5327a270 use auto-negotiation for manual media type selection.
This should fix establishment of 10/100Mbps link on L1E.
Helpful to reduce watchdog timeout problems on L1 (age(4)) reported by Jochen Kunz.
From FreeBSD via OpenBSD.
2009-03-27 04:42:50 +00:00
cegger 798c21064c regen. 2009-03-25 06:51:12 +00:00
cegger 753abffbcf add some CICADA PHYs. from FreeBSD. 2009-03-25 06:49:56 +00:00
dsl 454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
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
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