Commit Graph

525 Commits

Author SHA1 Message Date
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