359843 |
13-Apr-2020 |
jhibbits |
MFC r359756:
Add support for BCM54618SE PHY
Sponsored by: Juniper Networks, Inc |
337755 |
14-Aug-2018 |
markj |
MFC r337425: Recognize ICS1893C PHYs. |
331722 |
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re) |
330897 |
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg |
323415 |
11-Sep-2017 |
ian |
MFC r319817: Add a driver for the Vitesse/Microsemi VSC8501 PHY. |
323414 |
11-Sep-2017 |
ian |
MFC r319814, r319815, r319818:
Add a set of constants describing the ways a MAC and PHY can be connected. While the initial need for this is to help support phy drivers which are configured with FDT data, there is nothing devicetree-specific about the concept or the names, so they are available for use even on non-FDT systems.
Add some utility functions to help a PHY driver on an FDT-configured system retrieve its config data from the fdt data.
Convert if_ffec from local code and constants for mac<->phy connection type to new common fdt helper code. |
323408 |
11-Sep-2017 |
ian |
MFC r316995: Add support for the Micrel KSZ8081 ethernet PHY. |
310852 |
30-Dec-2016 |
loos |
MFC of r303230, r303253 and r303420:
Add support for the Microchip/Micrel KSZ9031 Gigabit Ethernet PHY.
Enable the build of micphy as part of generic miibus build, but only for FDT enabled systems.
The Micrel PHYs reads the optional external delays from DTB.
Tested on uBMC and uFW.
Sponsored by: Rubicon Communications (Netgate) |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
301632 |
08-Jun-2016 |
bapt |
Add support for Atmel at25df641 flash
Submitted by: Grégory Soutadé <soutade@gmail.com> (via github pull request)
|
297793 |
10-Apr-2016 |
pfg |
Cleanup unnecessary semicolons from the kernel.
Found with devel/coccinelle.
|
291676 |
03-Dec-2015 |
yongari |
Disable EEE(Energy Efficient Ethernet) for RTL8211F PHY. It seems the EEE made RX MAC enter LPI(Low Power Idle) mode such that dwc(4) was not able to receive packets. Ideally dwc(4) should be able to use EEE to save power during periods of low link utilization(i.e. gating off clock). Due to lack of dwc(4) datasheet it's not easy to take required steps for EEE on LPI enter/exit events. Disabling EEE in PHY seems to be easy workaround until dwc(4) supports EEE.
Updating EEE advertisement register on RTL8211F seems to have no effect until reprogramming MII_ANAR, MII_100T2CR and MII_BMCR with auto-negotiation. It's not clear whether it's related with mii_phy_reset()'s BMCR_ISO handling for RTL8211F though. It seems rgephy_reset() needs careful investigation for newer RealTek PHYs.
Ganbold submitted working version based on NetBSD change and tested lots of changes I made. Thanks a lot!
Submitted by: ganbold (initial version) In collaboration with: ganbold
|
287470 |
04-Sep-2015 |
sbruno |
Add more BCM gigabit PHYs
Gleaned from a public header file. 5402 and 5404 look like they may be used on embedded devices. 5478 and 5488 are switch PHYs. 5754 change is just to note a product alias.
Differential Revision: https://reviews.freebsd.org/D3338 Submitted by: kevin.bowling@kev009.com
|
286041 |
29-Jul-2015 |
sbruno |
Add support for BCM5466 PHY
Differential Revision: D3232 Submitted by: kevin.bowling@kev009.com
|
284552 |
18-Jun-2015 |
marius |
Fix yet another comment typo in NetBSD rev. 1.16, missed when merging it in r284447.
Submitted by: yongari Sponsored by: genua mbh
|
284447 |
16-Jun-2015 |
marius |
Merge from NetBSD: o rev. 1.10: Nuke trailing whitespace. o rev. 1.15: Fix typo in comment. o rev. 1.16: Add the following registers from IEEE 802.3-2009 Clause 22: - PSE control register (0x0b) - PSE status register (0x0c) - MMD access control register (0x0d) - MMD access address data register (0x0e) o rev. 1.17 (comments only): The bit location of link ability is different between 1000Base-X and others (see Annex 28B.2 and 28D). o rev. 1.18: Nuke dupe word.
Obtained from: NetBSD MFC after: 1 week Sponsored by: genua mbh
|
281877 |
23-Apr-2015 |
yongari |
Add another variant of BCM5708S controller to IBM HS21 workaround list.
PR: 118238 MFC after: 2 weeks
|
281821 |
21-Apr-2015 |
glebius |
Instead of storing mii_media_table array index in ifm_data, determine it in mii_phy_setmedia() functionally.
Sponsored by: Nginx, Inc.
|
281819 |
21-Apr-2015 |
glebius |
The comment on BMCR data in if_media entry is wrong. The ifm_data stores the index array, not a value for BMCR register. In case of IFM_10_T there could be either MII_MEDIA_10_T or MII_MEDIA_10_T_FDX, which are 1 and 2, accordingly. Neither matches a valid BMCR value. My guessing is that this write is harmless, since later mii_phy_setmedia() would write a proper value there.
The code is here since the initial checkin. Note that case IFM_100_TX has the same comment, but a proper value of BMCR_ISO is written. So, collapse two cases into one, always writing there BMCR_ISO.
Sponsored by: Nginx, Inc.
|
281817 |
21-Apr-2015 |
glebius |
Since xmphy doesn't call mii_phy_setmedia(), there is no reason to set ifm_data.
Sponsored by: Nginx, Inc.
|
281816 |
21-Apr-2015 |
glebius |
Since brgphy doesn't call mii_phy_setmedia(), there is no reason to set any value to ifm_data. If brgphy ever to call mii_phy_setmedia(), then the value of BRGPHY_S1000 | BRGPHY_BMCR_FDX will trigger KASSERT.
While here, remove the obfuscating macro and wrap long lines.
Sponsored by: Nginx, Inc.
|
279941 |
13-Mar-2015 |
yongari |
Restore auto MDIX for RTL8211B and newer revision PHYs which was broken in r279903.
Reported by: john <> feith . com
|
279903 |
12-Mar-2015 |
yongari |
Add RTL8211F gigabit PHY support.
PR: 197265 MFC after: 2 weeks
|
277481 |
21-Jan-2015 |
kevlo |
Typo: ivalid -> invalid.
|
277176 |
14-Jan-2015 |
glebius |
Clean some dead code.
|
277108 |
13-Jan-2015 |
glebius |
Remove unused variables.
CID: 1262431 CID: 1262430
|
277105 |
13-Jan-2015 |
glebius |
- Remove unused variable. - Wrap long line.
|
277104 |
13-Jan-2015 |
glebius |
Remove unused fields.
|
277093 |
12-Jan-2015 |
glebius |
In miibus(4) drivers provide functions that allow to get NIC driver name and NIC driver softc via the device(9) tree, instead of going dirty through the ifnet(9) layer.
Differential Revision: D1506 Reviewed by: imp, jhb
|
276885 |
09-Jan-2015 |
glebius |
Use nitems().
|
275676 |
10-Dec-2014 |
br |
o Put () for p to avoid unexpected macro expansion o style(9) fix
Submitted by: Yonghyeon PYUN <pyunyh@gmail.com>
|
273380 |
21-Oct-2014 |
br |
Add driver for Micrel KSZ9021 Gigabit Ethernet Transceiver (PHY).
Sponsored by: DARPA, AFRL
|
273174 |
16-Oct-2014 |
davide |
Follow up to r225617. In order to maximize the re-usability of kernel code in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv(). This fixes a namespace collision with libc symbols.
Submitted by: kmacy Tested by: make universe
|
271864 |
19-Sep-2014 |
glebius |
Move rl(4) to dev/rl.
|
271073 |
04-Sep-2014 |
yongari |
Do not blindly announce 1000baseT half-duplex capability in autonegotiation. Some controllers like cgem(4) do not support half-duplex at gigabit speeds.
|
270876 |
31-Aug-2014 |
glebius |
It is actually possible to have if_t a typedef to non-void type, and keep both converted to drvapi and non-converted drivers compilable.
o Make if_t typedef to struct ifnet *. o Remove shim functions.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
266974 |
02-Jun-2014 |
marcel |
Introduce a procedural interface to the ifnet structure. The new interface allows the ifnet structure to be defined as an opaque type in NIC drivers. This then allows the ifnet structure to be changed without a need to change or recompile NIC drivers.
Put differently, NIC drivers can be written and compiled once and be used with different network stack implementations, provided of course that those network stack implementations have an API and ABI compatible interface.
This commit introduces the 'if_t' type to replace 'struct ifnet *' as the type of a network interface. The 'if_t' type is defined as 'void *' to enable the compiler to perform type conversion to 'struct ifnet *' and vice versa where needed and without warnings. The functions that implement the API are the only functions that need to have an explicit cast.
The MII code has been converted to use the driver API to avoid unnecessary code churn. Code churn comes from having to work with both converted and unconverted drivers in correlation with having callback functions that take an interface. By converting the MII code first, the callback functions can be defined so that the compiler will perform the typecasts automatically.
As soon as all drivers have been converted, the if_t type can be redefined as needed and the API functions can be fix to not need an explicit cast.
The immediate benefactors of this change are: 1. Juniper Networks - The network stack implementation in Junos is entirely different from FreeBSD's one and this change allows Juniper to build "stock" NIC drivers that can be used in combination with both the FreeBSD and Junos stacks. 2. FreeBSD - This change opens the door towards changing ifnet and implementing new features and optimizations in the network stack without it requiring a change in the many NIC drivers FreeBSD has.
Submitted by: Anuranjan Shukla <anshukla@juniper.net> Reviewed by: glebius@ Obtained from: Juniper Networks, Inc.
|
257751 |
06-Nov-2013 |
nwhitehorn |
Add definition for the Atheros 8021 gigabit PHY.
MFC after: 1 week
|
257304 |
29-Oct-2013 |
yongari |
Add support for new Gigabit PHY of RealTek. I don't have a copy of data sheet so I'm not sure exact PHY model name. Vendor's web page indicates RTL8251 is latest PHY so I used the name. This PHY is used with RTL8168G, RTL8168GU and RTL8411B.
|
257184 |
26-Oct-2013 |
glebius |
The MII layer shouldn't care about administrative status of an interface. Make MII drivers forget about 'struct ifnet'.
Later plan is to provide an administrative downcall from ifnet layer into drivers, to inform them about administrative status change. If someone thinks that processing MII events for an administratively down interface is a big problem, then drivers would turn MII processing off.
The following MII drivers do evil things, like strcmp() on driver name, so they still need knowledge of ifnet and thus include if_var.h. They all need to be fixed:
sys/dev/mii/brgphy.c sys/dev/mii/e1000phy.c sys/dev/mii/ip1000phy.c sys/dev/mii/jmphy.c sys/dev/mii/nsphy.c sys/dev/mii/rgephy.c sys/dev/mii/truephy.c
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
257176 |
26-Oct-2013 |
glebius |
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
253481 |
20-Jul-2013 |
yongari |
Recognize BCM5725C PHY.
|
248542 |
20-Mar-2013 |
yongari |
For RTL8211B or later PHYs, enable crossover detection and auto-correction. This change makes re(4) establish a link with a system using non-crossover UTP cable.
Tested by: Michael BlackHeart < amdmiek <> gmail dot com >
|
244482 |
20-Dec-2012 |
yongari |
Recognize 5720S PHY and treat it as 5708S PHY. Unfortunately 5720S uses 5709S PHY id so add a hack to detect 5720S PHY by checking parent device name. 5720S PHY does not support 2500SX.
Tested by: Geans Pin < geanspin <> broadcom dot com >
|
244481 |
20-Dec-2012 |
yongari |
For fiber PHYs, BRGPHY_MII_1000CTL register is not defined at all so do not touch it.
|
242625 |
05-Nov-2012 |
dim |
Remove duplicate const specifiers in many drivers (I hope I got all of them, please let me know if not). Most of these are of the form:
static const struct bzzt_type { [...list of members...] } const bzzt_devs[] = { [...list of initializers...] };
The second const is unnecessary, as arrays cannot be modified anyway, and if the elements are const, the whole thing is const automatically (e.g. it is placed in .rodata).
I have verified this does not change the binary output of a full kernel build (except for build timestamps embedded in the object files).
Reviewed by: yongari, marius MFC after: 1 week
|
242272 |
29-Oct-2012 |
jmallett |
Recognize the Marvell 88E1145 Quad Gigabit PHY.
|
241437 |
11-Oct-2012 |
yongari |
For 5717C/5719C/5720C and 57765 PHYs, do not perform any special handling(jumbo, wire speed etc) in brgphy_reset(). Touching BRGPHY_MII_AUXCTL register seems to confuse APE firmware such that it couldn't establish a link.
|
240851 |
23-Sep-2012 |
kevlo |
Remove unused variable ma.
|
239275 |
15-Aug-2012 |
gonzo |
Merging of projects/armv6, part 5
- Driver for SMSC LAN95XX and LAN8710A ethernet controllers - Driver for LAN8710A PHY
Submitted by: Ben Gray, Damjan Marion, Tim Kientzle
|
238874 |
28-Jul-2012 |
hrs |
Add support for 88E1116R.
Sponsored by: Plat'Home, Co.,Ltd.
|
235999 |
25-May-2012 |
raj |
More Cicada/Vitesse PHY ids.
Obtained from: Semihalf
|
232246 |
28-Feb-2012 |
yongari |
Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to extract a link status of PHY when parent driver is re(4). RGEPHY_MII_SSR register does not seem to report correct PHY status on some integrated PHYs used with re(4). Unfortunately, RealTek PHYs have no additional information to differentiate integrated PHYs from external ones so relying on PHY model number is not enough to know that. However, it seems RGEPHY_MII_SSR register exists for external RealTek PHYs so checking parent driver would be good indication to know which PHY was used. In other words, for non-re(4) controllers, the PHY is external one and its revision number is greater than or equal to 2. This change fixes intermittent link UP/DOWN messages reported on RTL8169 controller.
Also, mii_attach(9) is tried after setting interface name since rgephy(4) have to know parent driver name.
PR: kern/165509
|
232015 |
23-Feb-2012 |
yongari |
Add Seeq Technology 80220 PHY support to smcphy(4). This PHY is found on Adaptec AIC-6915 Starfire ethernet controller. While here, use status register to know resolved speed/duplex. With this change, sf(4) correctly reports speed/duplex of established link.
Reviewed by: marius
|
231914 |
19-Feb-2012 |
marius |
Probe the National DP83849, which is a dual-port version of the PHYTER.
Obtained from: NetBSD
|
231913 |
19-Feb-2012 |
marius |
- Probe BCM57780. - In case the parent is bge(4), don't set the Jumbo frame settings unless the MAC actually is Jumbo capable as otherwise the PHY might not have the corresponding registers implemented. This is also in line with what the Linux tg3 driver does.
PR: 165032 Submitted by: Alexander Milanov Obtained from: OpenBSD MFC after: 3 days
|
228290 |
05-Dec-2011 |
marius |
- In mii_attach(9) just set the driver for a newly added miibus(4) instance before calling bus_enumerate_hinted_children(9) (which is the minimum for this to work) instead of fully probing it so later on we can just call bus_generic_attach(9) on the parent of the miibus(4) instance. The latter is necessary in order to work around what seems to be a bzzarre race in newbus affecting a few machines since r227687, causing no driver being probed for the newly added miibus(4) instance. Presumably this is the same race that was the motivation for the work around done in r215348. Reported and tested by: yongari - Revert the removal of a static in r221913 in order to help compilers to produce more optimal code.
|
227913 |
23-Nov-2011 |
marius |
Wrap BCM5785 in #ifdef notyet for now. According to yongari@ there are issues probably needing workarounds in bge(4) when brgphy(4) handles this PHY. Letting ukphy(4) handle it instead results in a working configuration, although likely with performance penalties.
|
227908 |
23-Nov-2011 |
marius |
Use DEVMETHOD_END.
|
227907 |
23-Nov-2011 |
marius |
Probe the BCM5785.
Obtained from: NetBSD
|
227906 |
23-Nov-2011 |
marius |
Sync with NetBSD rev. 1.104
Obtained from: NetBSD
|
227848 |
22-Nov-2011 |
marius |
s,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mention of kobj(9) from device drivers.
|
227843 |
22-Nov-2011 |
marius |
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
|
227842 |
22-Nov-2011 |
yongari |
For IP1001 PHY, do not set multi-port device(MASTER). Ideally this bit should not affect link establishment process of auto-negotiation if manual configuration is not used, which is true in auto-negotiation. However it seems setting this bit interfere with IP1001 PHY's down-shifting feature such that establishing a 10/100Mbps link failed when 1000baseT link is not available during auto-negotiation process.
Tested by: Andrey Smagin <samspeed <> mail dot ru >
|
227688 |
18-Nov-2011 |
marius |
There's no need export the device interface methods of miibus(4).
|
227687 |
18-Nov-2011 |
marius |
- Add a hint.miibus.X.phymask hint, allowing do individually exclude PHY addresses from being probed and attaching something including ukphy(4) to it. This is mainly necessarily for PHY switches that create duplicate or fake PHYs on the bus that can corrupt the PHY state when accessed or simply cause problems when ukphy(4) isolates the additional instances. - Change miibus(4) to be a hinted bus, allowing to add child devices via hints and to set their attach arguments (including for automatically probed PHYs). This is mainly needed for PHY switches that violate IEEE 802.3 and don't even implement the basic register set so we can't probe them automatically. However, the ability to alter the attach arguments for automatically probed PHYs is also useful as for example it allows to test (or tell a user to test) new variant of a PHY with a specific driver by letting an existing driver attach to it via manipulating the IDs without the need to touch the source code or to limit a Gigabit Ethernet PHY to only announce up to Fast Ethernet in order to save energy by limiting the capability mask. Generally, a driver has to be hinted via hint.phydrv.X.at="miibusY" and hint.phydrv.X.phyno="Z" (which already is sufficient to add phydrvX at miibusY at PHY address Z). Then optionally the following attach arguments additionally can be configured: hint.phydrv.X.id1 hint.phydrv.X.id2 hint.phydrv.X.capmask - Some minor cleanup.
Reviewed by: adrian, ray
|
226995 |
01-Nov-2011 |
marius |
- Import the common MII bitbang'ing code from NetBSD and convert drivers to take advantage of it instead of duplicating it. This reduces the size of the i386 GENERIC kernel by about 4k. The only potential in-tree user left unconverted is xe(4), which generally should be changed to use miibus(4) instead of implementing PHY handling on its own, as otherwise it makes not much sense to add a dependency on miibus(4)/mii_bitbang(4) to xe(4) just for the MII bitbang'ing code. The common MII bitbang'ing code also is useful in the embedded space for using GPIO pins to implement MII access. - Based on lessons learnt with dc(4) (see r185750), add bus barriers to the MII bitbang read and write functions of the other drivers converted in order to ensure the intended ordering. Given that register access via an index register as well as register bank/window switching is subject to the same problem, also add bus barriers to the respective functions of smc(4), tl(4) and xl(4). - Sprinkle some const.
Thanks to the following testers: Andrew Bliznak (nge(4)), nwhitehorn@ (bm(4)), yongari@ (sis(4) and ste(4)) Thanks to Hans-Joerg Sirtl for supplying hardware to test stge(4).
Reviewed by: yongari (subset of drivers) Obtained from: NetBSD (partially)
|
226870 |
28-Oct-2011 |
yongari |
Recognize BCM5720C PHY.
|
226154 |
08-Oct-2011 |
marius |
- Follow the lead of dcphy(4) and pnphy(4) and move the reminder of the PHY drivers that only ever attach to a particular MAC driver, i.e. inphy(4), ruephy(4) and xlphy(4), to the directory where the respective MAC driver lives and only compile it into the kernel when the latter is also there, also removing it from miibus.ko and moving it into the module of the respective MAC driver. - While at it, rename exphy.c, which comes from NetBSD where the MAC driver it corresponds to also is named ex(4) instead of xl(4) but that in FreeBSD actually identifies itself as xlphy(4), and its function names accordingly for consistency. - Additionally while at it, fix some minor style issues like whitespace in the register headers and add multi-inclusion protection to inphyreg.h.
|
225014 |
19-Aug-2011 |
marius |
r221812 reveals that at least some Broadcom PHYs default to being not only isolated but also powered down after a reset and while they just work fine [sic] when both is the case they don't if they are only deisolate but still powered down. So in order to put PHYs in an overall normal operation mode for the common case, ensure in mii_phy_reset() that they are not powered down after a reset. Unfortunately, this only helps in case of BCM5421, while BCM5709S apparently only work when they remain isolated and powered down after a reset. So don't call mii_phy_reset() in brgphy_reset() and implement the reset locally leaving the problematic bits alone. Effectively this bypasses r221812 for brgphy(4). Thanks to Justin Hibbits for doing a binary search in order to identify the problematic commit.
PR: 157405, 158156 Reviewed by: yongari (mii_phy_reset() part) Approved by: re (kib) MFC after: 3 days
|
223688 |
30-Jun-2011 |
imp |
Add detection for the Marvel 88E1149R and treat it just like the 88E1149.
|
221913 |
14-May-2011 |
marius |
- There's no need for nibbletab to be static, it's const however. - Fix whitespace.
|
221817 |
12-May-2011 |
yongari |
Explicitly clear 1000baseT control register for F1 PHY used in AR8132 FastEthernet controller. The PHY has no ability to establish a gigabit link. Previously only link parters which support down-shifting was able to establish link. This change should fix a long standing link establishment issue of AR8132.
PR: kern/156935 MFC after: 1 week
|
221812 |
12-May-2011 |
marius |
Some PHYs like the Level One LXT970 optionally can default to isolation after rest, in which case we may need to deisolate it. Tested by: nwhitehorn
MFC after 1 week
|
221747 |
10-May-2011 |
marius |
Fix whitespace.
|
221746 |
10-May-2011 |
marius |
Fix a bug in r221407; this driver doesn't add the media itself.
PR: 156893
|
221713 |
09-May-2011 |
yongari |
Recognize BCM5719C PHY.
Submitted by: Geans Pin at Broadcom
|
221468 |
05-May-2011 |
yongari |
Enable Ethernet@WireSpeed for BCM5718/BCM57765 family. While I'm here inverse meaning of PHY flag as Ethernet@WireSpeed is enabled for most PHYs.
|
221407 |
03-May-2011 |
marius |
- Remove attempts to implement setting of BMCR_LOOP/MIIF_NOLOOP (reporting IFM_LOOP based on BMCR_LOOP is left in place though as it might provide useful for debugging). For most mii(4) drivers it was unclear whether the PHYs driven by them actually support loopback or not. Moreover, typically loopback mode also needs to be activated on the MAC, which none of the Ethernet drivers using mii(4) implements. Given that loopback media has no real use (and obviously hardly had a chance to actually work) besides for driver development (which just loopback mode should be sufficient for though, i.e one doesn't necessary need support for loopback media) support for it is just dropped as both NetBSD and OpenBSD already did quite some time ago. - Let mii_phy_add_media() also announce the support of IFM_NONE. - 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 lxtphy(4) which disables MII interrupts (as is done for a few other PHYs we have drivers for). This includes changing NIC drivers which previously just called the generic mii_phy_reset() to now actually call the PHY-specific reset routine, which might be crucial in some cases. While at it, the redundant checks in these NIC drivers for mii->mii_instance not being zero before calling the reset routines were removed because as soon as one PHY driver attaches mii->mii_instance is incremented and we hardly can end up in their media change callbacks etc if no PHY driver has attached as mii_attach() would have failed in that case and not attach a miibus(4) instance. Consequently, NIC drivers now no longer should call mii_phy_reset() directly, so it was removed from EXPORT_SYMS. - Add a mii_phy_dev_attach() as a companion helper to mii_phy_dev_probe(). The purpose of that function is to perform the common steps to attach a PHY driver instance and to hook it up to the miibus(4) instance and to optionally also handle the probing, addition and initialization of the supported media. So all a PHY driver without any special requirements has to do in its bus attach method is to call mii_phy_dev_attach() along with PHY-specific MIIF_* flags, a pointer to its PHY functions and the add_media set to one. All PHY drivers were updated to take advantage of mii_phy_dev_attach() as appropriate. Along with these changes the capability mask was added to the mii_softc structure so PHY drivers taking advantage of mii_phy_dev_attach() but still handling media on their own do not need to fiddle with the MII attach arguments anyway. - Keep track of the PHY offset in the mii_softc structure. This is done for compatibility with NetBSD/OpenBSD. - Keep track of the PHY's OUI, model and revision in the mii_softc structure. Several PHY drivers require this information also after attaching and previously had to wrap their own softc around mii_softc. NetBSD/OpenBSD also keep track of the model and revision on their mii_softc structure. All PHY drivers were updated to take advantage as appropriate. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - According to IEEE 802.3-2002 the bits actually have to be reversed when mapping an OUI to the MII ID registers. All PHY drivers and miidevs where changed as necessary. Actually this now again allows to largely share miidevs with NetBSD, which fixed this problem already 9 years ago. Consequently miidevs was synced as far as possible. - Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that weren't explicitly converted to support flow control before. It's unclear whether flow control actually works with these but typically it should and their net behavior should be more correct with these changes in place than without if the MAC driver sets MIIF_DOPAUSE.
Obtained from: NetBSD (partially) Reviewed by: yongari (earlier version), silence on arch@ and net@
|
221341 |
02-May-2011 |
marius |
Probe the PHY accompanying BCM57765. Tested by: Paul Thornton
MFC after: 1 week
|
220938 |
22-Apr-2011 |
marius |
Correct spelling in comments.
Submitted by: brucec
|
217910 |
26-Jan-2011 |
yongari |
Add Realtek RTL8201E 10/100 PHY found in RTL8105E controller. The exact model name is not clear yet. All previous RTL8201 10/100 PHYs used 0x8201 in MII_PHYIDR2 which in turn makes model number 0x20 but this PHY used new model number 0x08.
|
217415 |
14-Jan-2011 |
marius |
- Allow IFM_FLAG0 to be set indicating that auto-negotiation with manual configuration, which is used to work around issues with certain setups (see r161237) by default, should not be triggered as it may in turn cause harm in some edge cases. - Even after masking the media with IFM_GMASK the result may have bits besides the duplex ones set so just comparing it with IFM_FDX may lead to false negatives. - Announce PAUSE support also for manually selected 1000BASE-T, but for all manually selected media types only in full-duplex mode. Announce asymmetric PAUSE support only for manually selected 1000BASE-T. - Simplify setting the manual configuration bits to only once after we have figured them all out. This also means we no longer unnecessarily update the hardware along the road. - Remove a stale comment.
Reviewed by: yongari (plus additional testing) MFC after: 3 days
|
217414 |
14-Jan-2011 |
marius |
- Don't announce PAUSE support for half-duplex when MIIF_FORCEPAUSE is set. - Let mii_phy_auto() also announce PAUSE support for 10baseT-FDX.
MFC after: 1 week
|
217413 |
14-Jan-2011 |
marius |
- Even after masking the media with IFM_GMASK the result may have bits besides the duplex ones set so just comparing it with IFM_FDX may lead to false negatives. - Simplify ciphy_service() to only set the manual configuration bits once after we have figured them all out. This also means we no longer unnecessarily update the hardware along the road.
MFC after: 1 week
|
217412 |
14-Jan-2011 |
marius |
- Masking IFM_GMASK when also masking IFM_FDX is redundant and just complicates the code. - Don't let atphy_setmedia() announce PAUSE support for half-duplex when MIIF_FORCEPAUSE is set. - Simplify e1000phy_service() and ip1000phy_service() to only set the manual configuration bits once after we have figured them all out. For ip1000phy_service() this also means we no longer unnecessarily update the hardware along the road.
MFC after: 1 week
|
216828 |
31-Dec-2010 |
yongari |
Add RDC Semiconductor R6040 10/100 PHY driver.
|
216623 |
21-Dec-2010 |
marius |
- Add a comment regarding the fact that as documented in the datasheet manual 1000BASE-T modes of DP83865 only work together with other National Semiconductor PHYs. - Spell 10BASE-T correctly - Remove some redundant braces.
|
216551 |
19-Dec-2010 |
yongari |
Add support for JMicron JMC251/JMC261 Gigabit/Fast ethernet controller with Card Read Host Controller. These controllers are multi-function devices and have the same ethernet core of JMC250/JMC260. Starting from REVFM 5(chip full mask revision) controllers have the following features. o eFuse support o PCD(Packet Completion Deferring) o More advanced PHY power saving
Because these controllers started to use eFuse, station address modified by driver is permanent as if it was written to EEPROM. If you have to change station address please save your controller default address to safe place before reprogramming it. There is no way to restore factory default station address.
Many thanks to JMicron for continuing to support FreeBSD.
HW donated by: JMicron
|
215923 |
27-Nov-2010 |
marius |
Allow pause support advertisement to be turned off again.
Submitted by: yongari (ip1000phy(4))
|
215905 |
26-Nov-2010 |
marius |
Ensure Bay flow control is disabled as we're going to use IEEE 802.3 annex 31B full duplex flow control instead.
|
215720 |
22-Nov-2010 |
marius |
- Also probe BCM5214 and BCM5222. - Add some DSP init code for BCM5221. The values derived from Apple's GMAC driver and the same init code also exists in Linux's sungem_phy driver. - Only read media status bits when they are valid.
Obtained from: NetBSD, OpenBSD
|
215716 |
22-Nov-2010 |
marius |
Add support for flow control.
Obtained from: NetBSD (partially)
|
215714 |
22-Nov-2010 |
marius |
Given that unlike f.e. rgephy(4) these drivers doen't explicitly start an autonegotiation along with manual media selection and also only report flow control status when BMCR_AUTOEN is set (at least with gentbi(4) determining the flow control status results in false-positives when not set), use MIIF_NOMANPAUSE.
|
215713 |
22-Nov-2010 |
marius |
Given that unlike f.e. rgephy(4) this driver doesn't explicitly start an autonegotiation along with manual media selection and ukphy_status() also only reports flow control status when BMCR_AUTOEN is set (at least with gentbi(4) determining the flow control status results in false-positives when not set), use MIIF_NOMANPAUSE.
|
215711 |
22-Nov-2010 |
marius |
Add missing newlines.
MFC after: 3 days
|
215459 |
18-Nov-2010 |
marius |
Fix a bug introduced with r215298; when atphy_reset() is called from atphy_attach() the current media has not been set, yet, leading to a NULL-dereference in atphy_setmedia().
Submitted by: jkim (initial version)
|
215355 |
15-Nov-2010 |
jkim |
Restore the previous behaviour of substring match.
|
215353 |
15-Nov-2010 |
jkim |
Plug memory leakage introduced in r204989.
Reported by: yongari
|
215348 |
15-Nov-2010 |
marius |
Return from mii_attach() after calling bus_generic_attach(9) on the device_t of the MAC driver in order to attach miibus(4) on the first pass instead of falling through to also calling it on the device_t of miibus(4). The latter code flow was intended to attach the PHY drivers the same way regardless of whether it's the first or a repeated pass, modulo the bus_generic_attach() call in miibus_attach() which shouldn't be there. However, it turned out that these variants cause miibus(4) to be attached twice under certain conditions when using MAC drivers as modules.
Submitted by: yongari MFC after: 3 days
|
215302 |
14-Nov-2010 |
marius |
Move the limiting of the PHY to 10/100 modes of operation due to limitations of certain MAC models from brgphy(4) to bge(4) where it belongs. While at it, update the list of models having that restriction to what OpenBSD uses, which in turn seems to have obtained that information from the Linux tg3 driver.
|
215300 |
14-Nov-2010 |
marius |
Remove redundant cases and a style(9) bug.
|
215298 |
14-Nov-2010 |
marius |
- Change these drivers to take advantage and use the generic IEEE 802.3 annex 31B full duplex flow control as well as the IFM_1000_T master support committed in r215297. For atphy(4) and jmphy(4) this includes changing these PHY drivers to no longer unconditionally advertise support for flow control but only if the selected media has IFM_FLOW set (or MIIF_FORCEPAUSE is set). - Rename {atphy,jmphy}_auto() to {atphy,jmphy}_setmedia() as these handle other media types as well.
Reviewed by: yongari (plus additional testing) Obtained from: NetBSD (partially), OpenBSD (partially) MFC after: 2 weeks
|
215297 |
14-Nov-2010 |
marius |
o Flesh out the generic IEEE 802.3 annex 31B full duplex flow control support in mii(4): - Merge generic flow control advertisement (which can be enabled by passing by MIIF_DOPAUSE to mii_attach(9)) and parsing support from NetBSD into mii_physubr.c and ukphy_subr.c. Unlike as in NetBSD, IFM_FLOW isn't implemented as a global option via the "don't care mask" but instead as a media specific option this. This has the following advantages: o allows flow control advertisement with autonegotiation to be turned on and off via ifconfig(8) with the default typically being off (though MIIF_FORCEPAUSE has been added causing flow control to be always advertised, allowing to easily MFC this changes for drivers that previously used home-grown support for flow control that behaved that way without breaking POLA) o allows to deal with PHY drivers where flow control advertisement with manual selection doesn't work or at least isn't implemented, like it's the case with brgphy(4), e1000phy(4) and ip1000phy(4), by setting MIIF_NOMANPAUSE o the available combinations of media options are readily available from the `ifconfig -m` output - Add IFM_FLOW to IFM_SHARED_OPTION_DESCRIPTIONS and IFM_ETH_RXPAUSE and IFM_ETH_TXPAUSE to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so these are understood by ifconfig(8). o Make the master/slave support in mii(4) actually usable: - Change IFM_ETH_MASTER from being implemented as a global option via the "don't care mask" to a media specific one as it actually is only applicable to IFM_1000_T to date. - Let mii_phy_setmedia() set GTCR_MAN_MS in IFM_1000_T slave mode to actually configure manually selected slave mode (like we also do in the PHY specific implementations). - Add IFM_ETH_MASTER to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so it is understood by ifconfig(8). o Switch bge(4), bce(4), msk(4), nfe(4) and stge(4) along with brgphy(4), e1000phy(4) and ip1000phy(4) to use the generic flow control support instead of home-grown solutions via IFM_FLAGs. This includes changing these PHY drivers and smcphy(4) to no longer unconditionally advertise support for flow control but only if the selected media has IFM_FLOW set (or MIIF_FORCEPAUSE is set) and implemented for these media variants, i.e. typically only for copper. o Switch brgphy(4), ciphy(4), e1000phy(4) and ip1000phy(4) to report and set IFM_1000_T master mode via IFM_ETH_MASTER instead of via IFF_LINK0 and some IFM_FLAGn. o Switch brgphy(4) to add at least the the supported copper media based on the contents of the BMSR via mii_phy_add_media() instead of hardcoding them. The latter approach seems to have developed historically, besides causing unnecessary code duplication it was also undesirable because brgphy_mii_phy_auto() already based the capability advertisement on the contents of the BMSR though. o Let brgphy(4) set IFM_1000_T master mode on all supported PHY and not just BCM5701. Apparently this was a misinterpretation of a workaround in the Linux tg3 driver; BCM5701 seem to require RGPHY_1000CTL_MSE and BRGPHY_1000CTL_MSC to be set when configuring autonegotiation but this doesn't mean we can't set these as well on other PHYs for manual media selection. o Let ukphy_status() report IFM_1000_T master mode via IFM_ETH_MASTER so IFM_1000_T master mode support now is generally available with all PHY drivers. o Don't let e1000phy(4) set master/slave bits for IFM_1000_SX as it's not applicable there.
Reviewed by: yongari (plus additional testing) Obtained from: NetBSD (partially), OpenBSD (partially) MFC after: 2 weeks
|
215015 |
08-Nov-2010 |
jmallett |
Recognize the BCM5482S.
|
214608 |
31-Oct-2010 |
marius |
Turn a panic into a printf so IFM_ETH_MASTER on !IFM_1000_T is complained about but otherwise ignored. When allowing the master to be set manually via ifconfig(8) by adding the former to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS (as it should be) it seems to be unfavorable that a machine can be made to panic with a simple ifconfig(8) invocation.
|
214606 |
31-Oct-2010 |
marius |
Try to make the style consistent (including regarding NetBSD bits not yet merged) and adhere style(9).
|
214605 |
31-Oct-2010 |
marius |
Make a comment reflect reality.
|
214566 |
30-Oct-2010 |
marius |
Correct a bug in r213893; within a PHY driver MIIF_PHYPRIVn should be used instead of MIIF_MACPRIVn. This didn't make a functional difference though.
|
214427 |
27-Oct-2010 |
yongari |
Add BCM5717C 10/100/1000TX PHY id.
|
214265 |
24-Oct-2010 |
marius |
- Given that as of r214264 all PHY drivers using mii(4) finally have been converted to use the mii_phy_add_media()/mii_phy_setmedia() pair instead of mii_add_media()/mii_anar() remove the latter. - Declare mii_media mii_media_table static as it shouldn't be used outside of mii_physubr.c.
MFC after: never
|
214264 |
24-Oct-2010 |
marius |
- Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respective interface also has such connectors. - In tl_attach() unify three different ways of obtaining the device and vendor IDs and remove the now obsolete tl_dinfo from tl_softc. - Given that tlphy(4) only handles the integrated PHYs of NICs driven by tl(4) make it only probe on the latter. - Switch mlphy(4) and tlphy(4) to use mii_phy_add_media()/mii_phy_setmedia(). - Simplify looking for the respective companion PHY in mlphy(4) and tlphy(4) by ignoring the native one by just comparing the device_t's directly rather than the device name.
|
214263 |
24-Oct-2010 |
marius |
Take advantage of mii_phy_add_media()/mii_phy_setmedia().
|
214262 |
24-Oct-2010 |
marius |
- Take advantage of mii_phy_dev_probe(). - Use mii_phy_add_media() instead of mii_add_media(). I'm not sure how this driver actually managed to work before as mii_add_media() is intended to be used to gether with mii_anar() while mii_phy_add_media() is intended to be used with mii_phy_setmedia(), however this driver mii_add_media() along with mii_phy_setmedia().
|
214012 |
18-Oct-2010 |
marius |
Revert r213867; while this driver really doesn't use any of the generic subroutines, at least mii_capabilities is used within itself.
|
213900 |
15-Oct-2010 |
marius |
Now that all previous users of mii_phy_probe() have been converted in r213893 and r213894 to use mii_attach() instead remove the former and along with it the "EVIL HACK".
MFC after: never
|
213893 |
15-Oct-2010 |
marius |
Convert the PHY drivers to honor the mii_flags passed down and convert the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags.
While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es).
Reviewed by: jhb, yongari
|
213878 |
14-Oct-2010 |
marius |
Add a NetBSD-compatible mii_attach(), which is intended to eventually replace mii_phy_probe() altogether. Compared to the latter the advantages of mii_attach() are: - intended to be called multiple times in order to attach PHYs in multiple passes (f.e. in order to only use sub-ranges of the 0 to MII_NPHY - 1 range) - being able to pass along the capability mask from the NIC to the PHY drivers - being able to specify at which address (phyloc) to probe for a PHY (instead of always probing at all addresses from 0 to MII_NPHY - 1) - being able to specify which PHY instance (offloc) to attach - being able to pass along MIIF_* flags from the NIC to the PHY drivers (f.e. as required to indicated to the PHY drivers that flow control is supported by the NIC driver, which actually is the motivation for this change).
While at it, I used the opportunity to get rid of some hacks in mii(4) like miibus_probe() generally doing work besides sheer probing and the "EVIL HACK" (which will vanish entirely along with mii_phy_probe()) by passing the struct ifnet pointer via an argument of mii_attach() as well as to fix some resource leaks in mii(4) in case something fails. Commits which will update the PHY drivers to honor the MII flags passed down from the NIC drivers and take advantage of mii_attach() to get rid of certain types of hacks in NIC and PHY drivers as well as a conversion of the remaining uses of mii_phy_probe() will follow shortly.
Reviewed by: jhb, yongari Obtained from: NetBSD (partially)
|
213867 |
14-Oct-2010 |
marius |
Just like xmphy(4) this driver doesn't use any of the generic subroutines so there's no need to fill mii_{ext,}capabilities either.
|
213464 |
05-Oct-2010 |
yongari |
Separate common flags into controller specific and PHY related flags. There should be no functional changes. This change will make it easy to add more quirk/flags in future.
Reviewed by: davidch
|
213385 |
03-Oct-2010 |
marius |
Remove an header that apart from the license is empty.
|
213384 |
03-Oct-2010 |
marius |
Consistently always explicitly set IFM_HDX for half-duplex.
Obtained from: OpenBSD (mostly)
|
213364 |
02-Oct-2010 |
marius |
- In the spirit of previous simplifications factor out the checks for a different PHY instance being selected and isolation out into the wrappers around the service methods rather than duplicating them over and over again (besides, a PHY driver shouldn't need to care about which instance it actually is). - Centralize the check for the need to isolate a non-zero PHY instance not supporting isolation in mii_mediachg() and just ignore it rather than panicing, which should sufficient given that a) things are likely to just work anyway if one doesn't plug in more than one port at a time and b) refusing to attach in this case just leaves us in a unknown but most likely also not exactly correct configuration (besides several drivers setting MIIF_NOISOLATE didn't care about these anyway, probably due to setting this flag for no real reason). - Minor fixes like removing unnecessary setting of sc->mii_anegticks, using sc->mii_anegticks instead of hardcoded values etc.
|
213361 |
02-Oct-2010 |
marius |
Try to adhere to style(9) and be consistent within this file.
|
213229 |
27-Sep-2010 |
marius |
Use the mii_data provided via mii_attach_args and mii_pdata respectively instead of reaching out for the softc of the parent.
|
213188 |
26-Sep-2010 |
marius |
- Remove clause 3 and 4 from TNF licenses. - Remove closes 3 & 4 from Manuel Bouyer's license.
Obtained from: NetBSD
|
212342 |
08-Sep-2010 |
yongari |
Correct definition of T2 mode bit of MRBE Message Page 5 Next Page Control Register.
|
212307 |
07-Sep-2010 |
yongari |
Consistently use tab characters instead of tab + space characters. No functional changes.
|
212306 |
07-Sep-2010 |
yongari |
Remove trailing CR at EOL.
|
211103 |
09-Aug-2010 |
yongari |
Add F1 PHY found on Atheros AR8151 v2.0 PCIe gigabit ethernet controller.
|
211046 |
07-Aug-2010 |
yongari |
Marvell model number 0x06 is 88E1101 PHY.
|
207446 |
30-Apr-2010 |
yongari |
Add Marvell PHYG65G Gigabit PHY which is found on 88E8059 Yukon Optima.
Tested by: James LaLagna < jameslalagna <> gmail dot com > MFC after: 5 days
|
207391 |
29-Apr-2010 |
davidch |
- Pass flow control settings back to bce(4).
MFC after: Two weeks
|
206563 |
13-Apr-2010 |
yongari |
Add Agere ET1011 PHY which is found on Belkin F5D5055 USB controller. Unlike Agere ET1011C, Agere ET1011 does not seem to need special DSP programming to workaround silicon bug.
|
205299 |
18-Mar-2010 |
davidch |
- Added support for 5709S/5716S PHYs.
Submitted by: pyunyh MFC after: 2 weeks
|
205275 |
18-Mar-2010 |
ed |
Remove an unneeded variable.
Reported by: tinderbox
|
205270 |
17-Mar-2010 |
imp |
Remove two instances of the evil hack to get the ifnet. mii_ifp is set early enough that we don't need to do these hacks anymore.
|
205268 |
17-Mar-2010 |
qingli |
Set the device capabilities to include dynamic link-state for those modern drivers.
Reviewed by: imp (and suggested by imp) MFC after: 3 days
|
204990 |
10-Mar-2010 |
sobomax |
Fix style(9) bugs in the previous revision.
|
204989 |
10-Mar-2010 |
sobomax |
further narrow down no carrier workaround, since it appears to only affect very specific IBM hardware and other machines with the same BCM ASIC chip id 0x57081021 are just fine.
MFC after: 1 month
|
204941 |
10-Mar-2010 |
sobomax |
Provide workaround for the ages old bug affecting certain BCM5708S chip revision often found in the blades and resulting in interfaces not sensing carrier signal. Looking at all problem reports it appears that it only affects some very specific silicon revision (ASIC (0x57081021); Rev (B2)) and version of the PHY that supports 1000baseSX-FDX media only. Therefore, narrow the scope of workaround to combination of that revision and media type. Given that the first report on this issue is dated back to 2007, there is not much hope that this issue will ever be properly resolved.
Among affected systems are IBM HS21, Intel SBXD132 and HP BL460c.
PR: 118238, 122551, 140970 MFC after: 1 month
|
204647 |
03-Mar-2010 |
yongari |
Remove programming LED register and enable 25MHz TX clock for 88E1149 PHY. This will fix intermittent watchdog timeouts as well as very slow network performance on 88E8072 Yukon Extreme.
PR: kern/144148 MFC after: 1 week
|
204646 |
03-Mar-2010 |
joel |
The NetBSD Foundation has granted permission to remove clause 3 and 4 from the software.
Obtained from: NetBSD
|
204144 |
20-Feb-2010 |
marius |
Add support for BCM54K2 found in combination with Apple K2 GMAC.
Submitted by: Andreas Tobler Obtained from: OpenBSD MFC after: 1 week
|
202294 |
14-Jan-2010 |
yongari |
Add check for fiber mode for BCM5714 PHY. This PHY supports both copper and fiber interfaces over GMII so an explicit check is necessary to know whether it was configured for fiber interface. This change make BCM5715S work.
Tested by: olli MFC after: 1 week
|
202269 |
14-Jan-2010 |
yongari |
Add BCM5754 PHY id that is found on Dell Studio XPS 16.
Tested by: scf MFC after: 1 week
|
201453 |
03-Jan-2010 |
imp |
cardbus -> CardBus
|
200693 |
18-Dec-2009 |
yongari |
Make sure to enable Next Page bit for IP1001. Otherwise the PHY fails to re-establishe 1000baseT link after downgrading to 10/100Mbps link.
|
198813 |
02-Nov-2009 |
yongari |
Add BCM5761 PHY id.
|
197590 |
28-Sep-2009 |
yongari |
Add hack to pass controller specific information to phy driver. Unlike most other PHYs there is no easy way to know which media type the PHY supports on Marvell PHYs. MIIF_HAVEFIBER flags is now passed via bus-specific instance variable of a device. While I'm here add 88E1112 specific work around to set SIGDET polarity low. Many thanks "Eugene Perevyazko <john <> dnepro dot net>" who kindly gave remote access to system with DGE-560SX.
|
197588 |
28-Sep-2009 |
yongari |
Some fiber PHY(88E1112) does not seem to set resolved speed so always assume we've got IFM_1000_SX.
|
197587 |
28-Sep-2009 |
yongari |
Don't encode model id twice.
Reported by: Kristof Provost <kristof <> sigsegv dot be>
|
196366 |
18-Aug-2009 |
yongari |
Backout r193289. r193289 restored page select bits to previous value instead of blindly resetting it to 0. However, it seems page select bits of some 88E1116 PHY is initialized to invalid one such that restoring page select bits after programming broke MII register access. The correct solution would be reset page select bits to 0 in PHY attach stage but it would require more testing. Since we're in BETA stage such a change would be dangerous so just back it out. This change should fix nfe(4) breakage on NVIDIA MCP55.
Reported by: Ryan Rogers < webmaster <> doghouserepair dot com > Sam Fourman Jr. < sfourman <> gmail dot com > Tested by: Ryan Rogers < webmaster <> doghouserepair dot com > Sam Fourman Jr. < sfourman <> gmail dot com > Approved by: re (kib)
|
194134 |
13-Jun-2009 |
marius |
- Also probe DP83865, which is an is an ultra low power version of the DP83861 and DP83891. - Reset the PHY during attach so it's in a known state. - Add a comment describing why we hardwire 10baseT support in the BMSR. - Always explicitly set IFM_HDX for half-duplex. [1]
Obtained from: OpenBSD [1] MFC after: 2 weeks
|
193291 |
02-Jun-2009 |
yongari |
Program LED registers for 88E1116/88E1149 PHYs. These PHYs are found on Marvell Yukon Ultra, Marvell Yukon Extreme controllers. While I'm here explicitly issue 'powerup' command for 88E1149 PHY.
Tested by: jhb, Warren Block ( wblock <> wonkity dot com )
|
193289 |
02-Jun-2009 |
yongari |
Don't assume page register value is 0 and restore previous page register after issuing 'powerup'.
|
192713 |
25-May-2009 |
yongari |
Add driver support for 88E3016 PHY which is found on Marvell Yukon FE+ controller. Due to the severe silicon bugs for Yukon FE+, 88E3016 seems to require more workarounds. However I'm not sure whether the workaround is PHY specific or only applicable to Yukon FE+. The datasheet for the PHY is publicly available but it lacks several details for the workaround used in this change. The workaround information was obtained from Linux. Many thanks to Yukon FE+ users who helped me add 88E3016 support.
Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com ) Bruce Cran ( bruce <> cran dot org dot uk ) Michael Reifenberger ( mike <> reifenberger dot com ) Stephen Montgomery-Smith ( stephen <> missouri dot edu )
|
192711 |
25-May-2009 |
yongari |
Do not ignore NEXT Page capability of auto-negotiation advertisement register. Some PHYs such as 88E3016 requires NEXT Page capability to establish valid link. Also set protocol selector field which is read only but it makes the intention clearer.
|
192710 |
25-May-2009 |
yongari |
Don't read unnecessary PHY registers. Speed/duplex resolution bit is valid only for auto-negotiation case so check the bit if we know auto-negotiation is active. While I'm here explicitly checks current speed with speed mask and set IFM_NONE if resolved speed is unknown.
|
192709 |
25-May-2009 |
yongari |
Report current link state while auto-negotiation is in progress.
|
192708 |
25-May-2009 |
yongari |
Use mii_phy_add_media() and remove usage of local macro ADD. Also checks extended status register to see whether the PHY is fast ethernet or not. This removes a lot of checks for specific PHY models and it makes easy to add more PHYs to e1000phy(4).
While I'm here remove setting mii_anegticks as it is set with mii_phy_add_media().
|
190558 |
30-Mar-2009 |
imp |
New PHY driver for the internal PHY found in the AX88790. There's a number of quirks for this device, and this implements just the basics. The 2.5s powerdown recommended in the datasheet will be next...
|
190538 |
30-Mar-2009 |
imp |
Add PHY entry for the ASIX 88x90 internal PHYs.
|
189567 |
09-Mar-2009 |
yongari |
For IP1001 PHYs, read auto-negotiation advertisement register to get default next page configuration. While I'm here explicitly set IP1000PHY_ANAR_CSMA bit. This bit is read-only and always set by hardware so setting it has no effect but it would clear the intention. With this change controllers that couldn't establish 1000baseT link should work.
PR: kern/130846
|
189566 |
09-Mar-2009 |
yongari |
Use mii_phy_add_media() and remove setting each media type. While I'm here, don't set mii_anegticks as it's set by mii_phy_add_media().
|
189565 |
09-Mar-2009 |
yongari |
For unknown speed, explicitly set IFM_NONE.
|
189564 |
09-Mar-2009 |
yongari |
Report current link state while auto-negotiation is in progress.
|
185421 |
28-Nov-2008 |
bz |
Renamed the FRAMELEN macro to TRUEPHY_FRAMELEN as for powerpc it seems to be possible to collide with FRAMELEN from machine/frame.h.
Found by: zec
|
184253 |
25-Oct-2008 |
yongari |
Use auto-negotiation for manual media type selection. This fixes establishment of 10/100Mbps link on Atheros AR8121(L1E).
|
184192 |
23-Oct-2008 |
yongari |
Correct PHY description and OUI of VSC8211. Previously VSC8211 was not recognized by ciphy(4) due to the incorrect OUI.
Reported by: nork Tested by: nork
|
183966 |
17-Oct-2008 |
yongari |
Some 88E1149 PHY's page select is initialized to point to other bank instead of copper/fiber bank which in turn resulted in wrong registers were accessed during PHY operation. It is believed that page 0 should be used for copper PHY so reinitialize E1000_EADR to select default copper PHY. This fixes link establishment issue of nfe(4) on Sun Fire X4140.
OpenBSD also has similimar patch but they just reset the E1000_EADR register to page 0. However some Marvell PHYs((88E3082, 88E1000) don't have the extended address register and the meaning of the register is quite different for each PHY model. So selecting copper PHY is limited to 88E1149 PHY which seems to be the only one that exhibits link establishment problem. If parent device know the type of PHY(either copper or fiber) that information should be notified to PHY driver but there is no good way to pass this information yet.
Reported by: thompsa Reviewed by: thompsa
|
183567 |
03-Oct-2008 |
stas |
- Add driver for Attansic L2 FastEthernet controller found on Asus EeePC and some Asus mainboards.
Reviewed by: yongari, rpaulo, jhb Tested by: many Approved by: kib (mentor) MFC after: 1 week
|
183493 |
30-Sep-2008 |
yongari |
Save extended address register prior to switching to 1000BASE-X only mode and restore original value of extended address register instead of overwriting it with page 1. There are still instance information passing issue(e.g configured media type: fiber or copper) from driver to PHY layer but this change make the selected PHY work with 88E1112 PHY.
Reported by: Krzysztof Jedruczyk < beaker <at> hot dot pl > Tested by: Krzysztof Jedruczyk < beaker <at> hot dot pl >
|
183492 |
30-Sep-2008 |
yongari |
Add Vitesse VSC8211 PHY which is found on Planex GU-1000T.
HW donated by: nork
|
183491 |
30-Sep-2008 |
yongari |
Explicitly mark IFM_HDX for half-duplex media.
|
183490 |
30-Sep-2008 |
yongari |
Report current link state while auto-negotiation is in progress.
|
183489 |
30-Sep-2008 |
yongari |
Use mii_anegticks instead of hardcoded MII_ANEGTICKS.
|
183488 |
30-Sep-2008 |
yongari |
Announce link loss right after it happens.
|
182751 |
04-Sep-2008 |
raj |
Recognize 88E1116R phy variation. This part is found on some embedded devices.
Obtained from: Semihalf
|
182067 |
23-Aug-2008 |
imp |
Move the code that looks for the companion phy to a subroutine to make sure we get the error handling right in both places. This also simplifies the code somewhat.
|
182064 |
23-Aug-2008 |
imp |
It turns out that my analysis of the error handling here was wrong. When there's an error, we don't want to free the children, since it will be stack garbage. While we did fail to dereference it by setting devs to 0, we didn't fail to call free. We never failed to fail, it was the easiest thing to do.
|
182038 |
23-Aug-2008 |
imp |
Revert bogusly committed file.
|
182037 |
23-Aug-2008 |
imp |
Set devs to 0 in case device_get_children return an error. The right thing to do here is nothing in that case...
|
181619 |
12-Aug-2008 |
yongari |
Restore link state handling which was broken in rev 1.69. Also report current link state while auto-negotiation is in progress. With this change link loss should be reported within a second and drivers that rely on link state should work.
Reported by: Pete French < petefrench at ticketswitch dot com > Tested by: Pete French < petefrench at ticketswitch dot com > MFC after: 1 week
|
181618 |
12-Aug-2008 |
yongari |
Remove 'cr' at the end of line.
|
181617 |
12-Aug-2008 |
yongari |
Remove whitespace at the end of line.
|
181343 |
06-Aug-2008 |
kevlo |
Fix a copy/paste error
|
180178 |
02-Jul-2008 |
yongari |
Add RTL8211C(L) support. Disable advanced link-down power saving in phy reset.
Reported by: nork Tested by: nork
|
179896 |
20-Jun-2008 |
delphij |
Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabit Ethernet device driver, written by sephe@
Obtained from: DragonFly Sponsored by: iXsystems MFC after: 2 weeks
|
179895 |
20-Jun-2008 |
delphij |
Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabit Ethernet device driver, written by sephe@
Obtained from: DragonFly Sponsored by: iXsystems MFC after: 2 weeks
|
179772 |
13-Jun-2008 |
davidch |
- Added support for BCM5709 and BCM5716.
MFC after: 2 weeks
|
179645 |
07-Jun-2008 |
marcel |
Add support for the Apple Big Mac (BMAC) Ethernet controller, found on various Apple G3 models.
Submitted by: Nathan Whitehorn
|
179592 |
06-Jun-2008 |
benno |
This is a rewritten driver for the SMSC LAN91C111. It's based in part on the sn(4) driver and also looking at newer drivers. The reason for the rewrite is to support MII and to try and resolve some performance issues found when trying to use the sn(4) driver on the Gumstix network boards.
For reference, the SMSC LAN91C111 is a non-PCI ethernet part whose lineage dates back to Ye Olde Days of ISA. It seems to get some use in the embedded space these days on parts lacking on-board MACs or on-board PCI controllers, such as the XScale PXA line of ARM CPUs.
This also includes a driver for the SMSC LAN83C183 10/100 PHY.
Man page to follow.
|
179335 |
27-May-2008 |
yongari |
Add JMicron JMP202/JMP211 PHY driver.
|
179098 |
19-May-2008 |
yongari |
Add Attansic/Atheros F1 PHY driver.
|
178667 |
29-Apr-2008 |
jhb |
Add support for the BCM5906[M] adapters. These adapters only support 10/100 operation and place the mailbox registers at a different offset. They also do not have an EEPROM, so the MAC address must be read from NVRAM instead.
MFC after: 1 month PR: kern/118975 Submitted by: benjsc, Thomas Nyström thn at saeab dot se Submitted by: sephe (original patch for DragonflyBSD)
|
178598 |
26-Apr-2008 |
raj |
Recognize Cicada CS8244 phy chip (among others, can be found on MPC8572DS development systems).
Obtained from: Freescale, Semihalf
|
177930 |
05-Apr-2008 |
yongari |
Add support for IC Plus IP1001 PHY.
Tested by: Stuart Fraser < stuart AT stuartfraser DOT net >
|
176881 |
06-Mar-2008 |
jhb |
Flesh out support for the BCM5722 by recognizing the phy on the 5722 and the specific ASIC revision.
MFC after: 1 week Obtained from: OpenBSD (mii/phy bits)
|
176850 |
05-Mar-2008 |
davidch |
- Add PHY ID for BCM5709C 1000Base-T controllers.
MFC after: 1 week
|
176809 |
05-Mar-2008 |
yongari |
Add detection of isolation state.
PR: kern/76710
|
176773 |
03-Mar-2008 |
raj |
Recognize the quad-port Cicada (Vitesse) CS8204 10/100/1000TX PHY.
This PHY is found on many embedded development boards: among others MPC8555CDS evaluation systems use it.
Approved by: cognet (mentor) MFp4: e500
|
175705 |
27-Jan-2008 |
marius |
- Fix a typo in a comment. - Fix whitespace according to style(9). - Sync the comment describing why we have to wait in nsphy_reset() with nsphyter_reset(). It's true that the manual tells to not do a reset within 500us of applying power but that's unlikely the cause of problems seen here. Generally having to wait 500us after a reset however is.
|
175703 |
27-Jan-2008 |
marius |
Fix a typo in a comment.
|
175702 |
27-Jan-2008 |
marius |
Add a driver for the National Semiconductor DP83815, DP83843 and DP83847 PHYs. The main reason for using a specific driver for these PHYs are reset quirks similar to the nsphy(4) driven DP83840A.
PR: 112654 Obtained from: NetBSD MFC after: 2 weeks Thanks to: mlaier for testing w/ DP83815
|
175466 |
18-Jan-2008 |
jkim |
Add a flag for Ethernet@WireSpeed capability and correct chip revisions. The idea was taken from OpenBSD and cross-referenced with Linux driver.
|
173667 |
16-Nov-2007 |
yongari |
Reset autonegotation timer if media option is not IFM_AUTO. Make mii_ticks advance, autonegiation is retried every mii_anegticks seconds.
|
173665 |
16-Nov-2007 |
yongari |
IEEE 802.3 Annex 28B.3 explicitly 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
However PHY drivers didn't honor the order such that 100BASE-T4 had higher priority than 100BASE-TX full duplex. Fix that long standing bugs such that have PHY drivers choose the highest common denominator ability. Fix a bug in dcphy which inadvertently aceepts 100BASE-T4.
PR: 92599
|
173164 |
30-Oct-2007 |
yongari |
Setting sc->mii_anegticks to MII_ANEGTICKS_GIGE in rgephy_attach() is redundant. mii_phy_add_media() already takes care of that.
Pointed out by: marius
|
173157 |
29-Oct-2007 |
marius |
- Remove MIIF_NOISOLATE; there's generally no reason to let gentbi(4) set this flag and it was more or less just copied and pasted from another FreeBSD driver while porting this driver from NetBSD, whose gentbi(4) doesn't set MIIF_NOISOLATE either. - Fix spelling in a comment.
OK'ed by: yongari MFC after: 3 months
|
173133 |
29-Oct-2007 |
yongari |
Add 88E1116/88E1116R PHY support code that takes the PHY out of power-down mode.
PR: kern/114086 MFC after: 3 days
|
173130 |
29-Oct-2007 |
yongari |
Add a newer RTL8211B(L) PHY.
|
173129 |
29-Oct-2007 |
yongari |
Add support for RealTek RTL8211B(L) PHY. It's based on the patch made by Michael Eisele and the patch was slightly modified by me. With this change several NVIDIA ethernet controllers(e.g. MCP61) works.
RTL8211B(L) is RealTek's new gigabit PHY. The PHY has several features including crossover correction, polarity correction as well as supporting triple speed(10/100/1000bps). Data transfer between MAC and PHY is via RGMII for 1000baseT, MII for 10baseT/100baseTX. Unfortunately, RealTek used the same model number for RTL8211B(L) PHY so there is no way to discriminate between RTL8211B(L) and its predecessors. ATM RTL8211B uses revision number 2 so checking the revision number seems to be only way to identify it.
Obtained from: Michael Eisele [1] Tested by: clemens fischer < ino-qc AT spotteswoode DOT de DOT eu DOT org >
|
173128 |
29-Oct-2007 |
yongari |
o RTL8169S/8110S integrated PHY and RTL8211B are gigabit PHYs so set mii_anegticks to MII_ANEGTICKS_GIGE and use it. Previously it used to MII_ANEGTICKS which may not be enough to wait before retrying autonegotiation process at 1000bps. o Reset autonegotation timer if media option is not IFM_AUTO or we got a valid link. o Announce link loss right after it happends. o Autonegiation is retried every mii_anegticks seconds. o Report link state changes right after setting autonegotiation.
|
170525 |
11-Jun-2007 |
yongari |
Add icsphy(4), Integrated Circuit Systems PHY driver, ported from NetBSD. ATM the only consumer of the PHY is XBox with nfe(4) driver.
Submitted by: Ed Schouten <ed@fxq.nl> Tested by: Ed Schouten <ed@fxq.nl>
|
170524 |
11-Jun-2007 |
yongari |
Add ICS1889/ICS1892/ICS1893 PHY.
Submitted by: Ed Schouten <ed@fxq.nl>
|
170417 |
08-Jun-2007 |
davidch |
- Fixed a problem that caused autonegotiation failures.
Submitted by: tor.egge@cvsup.no.freebsd.org MFC after: 4 weeks
|
170391 |
07-Jun-2007 |
davidch |
New features: - Moved BCM5706S/5708S SerDes support to brgphy (since they are not technically TBI interfaces) - Added 2.5G support for BCM5708S
Comments: Since this driver is shared with bge I tested several available controllers supported by bge and all worked as expected, however the list was not exhaustive. Need wider testing.
MFC after: 4 weeks
|
170367 |
06-Jun-2007 |
yongari |
Add support IC Plus IP101 10/100 PHY that is found on nVidia network adapters.
Submitted by: Shigeaki Tagashira < shigeaki AT se DOT hiroshima-u DOT ac DOT jp >
|
170366 |
06-Jun-2007 |
yongari |
Add IC Plus IP101 PHY
|
170365 |
06-Jun-2007 |
yongari |
Add support Vitesse VSC8601 PHY that is found on nVidia network adapters.
Submitted by: Shigeaki Tagashira < shigeaki AT se DOT hiroshima-u DOT ac DOT jp > Tested by: Yuri Pankov < yuri.pankov AT gmail DOT com>, Rainer Hurling <rhurlin AT gwdg DOT de >
|
170364 |
06-Jun-2007 |
yongari |
Add OUI for Vitesse Semiconductor. Add Vitesse VSC8601 PHY.
|
169184 |
01-May-2007 |
marcel |
Define the miibus ivars as a structure, instead of as a vector of pointers. A structure is more readable and less error-prone. It also avoids problems when a function pointer doesn't have the same width as a void pointer.
|
169153 |
30-Apr-2007 |
marius |
- Take advantage of mii_phy_add_media() for adding media and setting sc->mii_anegticks according to whether the respective BGE chip supports Fast Ethernet only or also Gigabit Ethernet. - At least the BGE chips I've tested with wedge when isolating them so document this as the reason for setting MIIF_NOISOLATE and remove the unused (and partially even #ifdef'ed out) isolation related code. Add code that panics if we encounter a non-zero MII instance as generally there's no way a PHY requiring MIIF_NOISOLATE can be handled gracefully in a multi-PHY configuration (it's ok for the internal PHY of single-PHY-only-NIC to not support isolation though). - Additionally set MIIF_NOLOOP as loopback doesn't seem to work either and remove the #ifdef'ed out code for adding respective media. The MIIF_NOLOOP flag currently triggers nothing but hopefully will be respected by mii_phy_setmedia() later on.
Reviewed by: jkim, yongari MFC after: 1 month
|
168601 |
10-Apr-2007 |
marius |
Let brgphy(4) attach for the Broadcom BCM5755 ASIC based chipsets as well.
Obtained from: OpenBSD MFC after: 1 week
|
167728 |
19-Mar-2007 |
jkim |
Revert couple of changes from 1.51 and 1.52. Reading link status with BMSR is okay for most of the chipsets but BCM5701 PHY does not seem to like it. Set media to IFM_NONE if link is not up instead of the previous value.
Reported by: Goran Lowkrantz (goran dot lowkrantz at ismobile dot com)
|
167008 |
26-Feb-2007 |
imp |
mii_phy_dev_probe returns its third argument on match, not 0, so pass 0 in if we're going to test against 0.
Noticed by: marius@
|
166876 |
21-Feb-2007 |
jhb |
Restore support for the 5706C bce(4) phy that was broken during the addition of SerDes support. According to the docs, the 5706C and 5708C phys are supposed to use the same MII model that is separate from the SerDes parts, but the 5706C actually uses the MII model of the SerDes parts. To fix this, readd the old 5706C entry to miidevs and add a special check in brgphy_probe() for phys that match the 5706C ID. If the phy is supported by the gentbi(4) driver, then it's a SerDes phy, so we fail the probe and let gentbi(4) grab it. Otherwise, it's a 5706C phy, so we let brgphy(4) grab it.
In coordination with: dwhite
|
166716 |
14-Feb-2007 |
jkim |
Fix a typo from the previous commit.
Pointed out by: brad@openbsd.org
|
166680 |
13-Feb-2007 |
jkim |
Fix typos in comments while I am here.
|
166677 |
12-Feb-2007 |
jkim |
Add BCM5701 A0/B0 CRC bug workaround. Magic values taken from Linux driver.
|
166676 |
12-Feb-2007 |
jkim |
Fix style(9).
Pointed out by: many
|
166673 |
12-Feb-2007 |
jkim |
Add PHY DSP code for BCM5755M.
Obtained from: OpenBSD
|
166666 |
12-Feb-2007 |
jkim |
BCM5701 PHY cannot read-modify-write. Just re-use the magic number from DSP init code.
|
166665 |
12-Feb-2007 |
jkim |
Replace magic numbers with corresponding definitions.
|
166572 |
08-Feb-2007 |
imp |
Fix problem with RTL8201L PHY. From submitter:
Bugfix for the Realtek PHY driver... an RTL8201L standalone PHY needs different handling than the integrated ones in terms of speed detection. There was a bogus test based on the parent device driver name string controlling which speed register to query. That test began failing when the rl driver was split into separate rl and re drivers some time ago. Apparently nobody ever noticed because the buggy code only executes if NWAY negotiation failed. Since we happen to be testing with an ancient dumb hub rather than a modern switch, we found it.
To fix it all, have the attach() routine notice whether we're dealing with an integrated PHY or an RTL8201L and store that info in a struct accessible to the status() routine that needs to know which register to query.
I touched up the fixes because they were relative to RELENG_6 and to bring a few nits into line with style(9).
MFC After: 2 weeks Submitted by: Ian Lepore
|
166263 |
26-Jan-2007 |
dwhite |
Add missing MIIBUS_MEDIAINIT() call.
|
166262 |
26-Jan-2007 |
dwhite |
Collapse 5706C and 5708C PHYs into one entry. ID 0x15 is actually used for the SERDES PHY on these chips and we want gentbi to pick this up, not brgphy.
|
166164 |
21-Jan-2007 |
marius |
Correct a logic bug in the previous change.
|
166112 |
20-Jan-2007 |
marius |
- In miibus_attach() remove IFM_IMASK from the dontcare_mask of the ifmedia_init() invocation. IFM_IMASK makes only sense here when all of the maxium of 32 PHYs on each one MII bus support disjoint sets of media, which generally isn't the case (though it would be nice if we had a way to let NIC drivers indicate that for the few card models where the PHY configuration is known/fixed and IFM_IMASK actually makes sense). - Add and use a miibus_print_child() for the bus_print_child method which additionally prints the PHY number (which actually is the PHY address) so one can figure out the media instance <-> PHY number mapping from the PHY driver attach output. This is intented to be usefull in situations where the addresses of the PHYs on the bus are known (f.e. of internal/ integrated PHYs) so one can feed the appropriate media instance number to ifconfig(8) (with the upcoming change for ifconfig(8)). This is more or less inspired by the NetBSD mii_print().
|
166111 |
20-Jan-2007 |
marius |
- Don't set MIIF_NOISOLATE so ukphy(4) can be used in configurations with multiple PHYs. In case some PHYs currently driven by ukphy(4) exhibit problems when isolating due to incomplete implementations or silicon bugs we'll need to add specific drivers for these. Looking at NetBSD and OpenBSD I don't expect problems here though (quite the contrary; we still seem to set MIIF_NOISOLATE without good reason in a bunch of PHY drivers). - Fix a style(9) whitespace nit.
|
166049 |
16-Jan-2007 |
jkim |
Correct driver_t brgphy_driver, which was forgotten from the last commit.
|
166037 |
16-Jan-2007 |
jkim |
Move MII model and revision into softc.
|
166032 |
15-Jan-2007 |
jkim |
- Move Ethernet@WireSpeed and jumbo frame configurations to separate functions. The idea is taken from OpenBSD. - Set/clear jumbo frame configurations for bge(4). - Re-add BCM5750 PHY workaround for bce(4), which was mistakenly removed from the previous commit.
|
166031 |
15-Jan-2007 |
jkim |
- Fix BCM5754 support found in Dell PowerEdge SC440. - Move some PHY bug detections from brgphy.c to if_bge.c. - Do not penalize working PHYs. - Re-arrange bge_flags roughly by their categories. - Fix minor style(9) nits.
PR: kern/107257 Obtained from: OpenBSD Tested by: Mike Hibler <mike at flux dot utah dot edu>
|
165991 |
13-Jan-2007 |
marius |
After another thought there is another nail for the mii_phy_dev_probe()- hammer.
|
165990 |
13-Jan-2007 |
marius |
Remove mii_media_from_bmcr(); all previous users have been converted to use mii_phy_add_media()/mii_phy_setmedia().
|
165989 |
13-Jan-2007 |
marius |
- Take advantage of mii_phy_dev_probe() and mii_phy_setmedia(). - Set MIIF_NOLOOP as loopback doesn't work with this PHY. The MIIF_NOLOOP flag currently triggers nothing but hopefully will be respected by mii_phy_setmedia() later on. - Use MII_ANEGTICKS instead of 5. - Remove an unused macro. - Fix some whitespace nits.
MFC after: 1 week
|
165988 |
12-Jan-2007 |
marius |
- Take advantage of mii_phy_dev_probe(). - In exphy_service() for the MII_TICK case don't bother to check whether the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - Remove #if 0'ed unapplicable code. - Fix some whitespace nits.
MFC after: 1 week
|
165987 |
12-Jan-2007 |
marius |
Set MIIF_HAVE_FIBER and add IFM_100_FX media when the AC_MCTL_FX_SEL and thus the FX_DIS pin indicates fibre media. This is part 1/2 of adding support for the 100baseFX interface/port of AT-2700 series adaptors.
Idea from: NetBSD MFC after: 1 week
|
165986 |
12-Jan-2007 |
marius |
- Correct the AC_MCTL_BYP_PCS constant. - Correct whitespace nits (use #define<tab>, remove trailing whitespace).
|
165985 |
12-Jan-2007 |
marius |
Use mii_phy_add_media()/mii_phy_setmedia()-compatible media table indices when manually adding media. Some of these I've missed while converting drivers to take advantage of said fuctions recently, others where longstanding bugs.
|
165782 |
05-Jan-2007 |
ticso |
MFp4: add basic driver for RTL8305SC switch in PHY emulation
|
165361 |
20-Dec-2006 |
jkim |
Use BMSR for link status in one more place and clean up more.
|
165360 |
20-Dec-2006 |
jkim |
- Do not depend on auto negotiation for link speed/duplex status. - Read link status from BMSR instead of auxilary status register. - Clean up style(9) nits.
|
165343 |
19-Dec-2006 |
oleg |
- Fix autonegotiation timer. - Use MII_ANEGTICKS/MII_ANEGTICKS_GIGE defines instead of hardcoded value. - Fix some comments. - style(9)
MFC after: 2 month
|
165313 |
18-Dec-2006 |
marius |
Correct the previous change: - If we want mii_phy_add_media() to add 1000baseT media, we need to supply sc->mii_extcapabilities. - Fix formatting when announcing autonegotiation support.
|
165099 |
11-Dec-2006 |
yongari |
o Add support code for newer Marvell PHYs. o Remove unused static global variable e1000phy_debug. o Take advantage of mii_phy_dev_probe(). o Use MII_ANEGTICKS/MII_ANEGTICKS_GIGE instead of magic number 5. o Add IFM_NONE as e1000phy(4) supports it without issues. o Nuke magic PHY programming sequence in PHY reset and follow correct reset sequence. [1] o Make manual media selection work for all supported media types. o Don't set MIIF_NOISOLATE so e1000phy(4) can be used in configurations with multiple PHYs. o In 1000baseT, when setting the link manually, one side must be the master and the other the slave. If LINK0 is set, program the PHY to be a master, otherwise it's a slave. o When we lost a link, reset mii_ticks immediately so it correctly check number of seconds elapsed in autonegotiation phase. o Announce link loss right after it happens. o After kicking autonegotiation, report PHY status instead of returning immediatly. o When link state check is in progress, check auto negotiation completion bit only when auto negotiation is enbaled. o When PHY is resolved to a master, show it with IFM_FLAG2.
Special thanks to marius who fixed several nits in original patch. In half-duplex mode, nfe(4) fails to send packets. I think it's a bug in nfe(4) as the same PHY works without problems on msk(4).
Obtained from: em(4) [1] Reviewed by: marius Tested by: bz
|
165097 |
11-Dec-2006 |
yongari |
Add additional Marvell PHY registers.
|
165096 |
11-Dec-2006 |
yongari |
Add a bunch of new Marvell PHY ids.
|
165095 |
11-Dec-2006 |
yongari |
style(9)
|
165090 |
11-Dec-2006 |
scottl |
Teach the brgphy about some new Broadcom IDs.
Submitted by: David Christenson Sponsored by: www.UIA.net
|
164835 |
02-Dec-2006 |
marius |
- Probe Davicom DM9102 PHYs. - Don't set MIIF_NOISOLATE so amphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating AM79c873 and workalikes per se nor in combination with the NICs they're used with and amphy(4) was already adding IFM_NONE anyway. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). - Fix a whitespace nit.
Obtained from: NetBSD dmphy(4) (except for the last item) MFC after: 2 weeks
|
164834 |
02-Dec-2006 |
marius |
- In acphy_service() for the MII_TICK case don't bother to check whether the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - Fix a whitespace nit. - Probe another Altima PHY, which is a AC101 workalike and integrated in at least ADMtek ADM8511 but apparently is not mentioned in any publically available data sheet so the actual identifier is unknown. - Don't set MIIF_NOISOLATE so acphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating AC101 and workalikes per se nor in combination with the NICs they're used with. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia().
Obtained from: NetBSD (except for the first and second item) MFC after: 2 weeks
|
164833 |
02-Dec-2006 |
marius |
- Add another Altima PHY, which is a AC101 workalike and integrated in at least ADMtek ADM8511 but apparently is not mentioned in any publically available data sheet so the actual identifier is unknown. - Add Davicom DM9102 PHY. - Add DM9101 to the description of AMD 79C873 as at least some Davicom DM9101F identify identical to AMD 79C873.
Obtained from: NetBSD MFC after: 2 weeks
|
164832 |
02-Dec-2006 |
marius |
- Don't set MIIF_NOISOLATE so tdkphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating 78Q2120 per se nor in combination with the NICs they're used with and tdkphy(4) was already adding IFM_NONE anyway. - Set MIIF_NOLOOP as loopback doesn't work with this PHY. The MIIF_NOLOOP flag currently triggers nothing but hopefully will be respected by mii_phy_setmedia() later on. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia().
Thanks to Hans-Joerg Sirtl for lending me test hardware.
Obtained from: NetBSD tqphy(4) MFC after: 2 weeks
|
164831 |
02-Dec-2006 |
marius |
- 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. - Take advantage of mii_phy_add_media(). [1]
Obtained from: NetBSD [1] Tested by: yongari MFC after: 2 weeks
|
164830 |
02-Dec-2006 |
marius |
Some style changes to a couple of PHY drivers: - Fix some whitespace nits. - Fix some spelling in comments. - Use MII_ANEGTICKS instead of 5. - Don't define variables in nested scope. - Remove superfluous returns at the end of void functions. - Remove unused static global rgephy_mii_model. - Remove dupe $Id$ in tdkphy(4). - Sort brgphys table.
MFC after: 2 weeks
|
164827 |
02-Dec-2006 |
marius |
Add a helper function mii_phy_dev_probe(), which wraps around the mii_phy_match() API and takes care of the PHY device probe based on the struct mii_phydesc array and the match return value provided. Convert PHY drivers to take advantage of mii_phy_dev_probe(), converting drivers to provide a mii_phydesc table in the first place where necessary.
Reviewed by: yongari MFC after: 2 weeks
|
164711 |
28-Nov-2006 |
marius |
- In rlphy_service() for the MII_TICK case don't bother to check whether the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - In rlphy_status() just use if_dname instead of determining the name of the parent NIC via device_get_name(device_get_parent(sc->mii_dev)). - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). - Fix some whitespace nits and remove commented out code that just can't be used with RealTek PHYs.
MFC after: 2 weeks
|
164710 |
28-Nov-2006 |
marius |
- In qsphy_service() for the MII_TICK case don't bother to check whether the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - Don't set MIIF_NOISOLATE so qsphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating QS6612 per se nor in combination with the NICs they're used with. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia().
Obtained from: NetBSD (except for the first item) MFC after: 2 weeks
|
164708 |
28-Nov-2006 |
marius |
- Don't add IFM_NONE when used in combination with pcn(4) as for MII loopback to work PCnet chips additionally need to be placed into external loopback mode which pcn(4) doesn't do so far. - In nsphy_service() just use if_dname instead of determining the name of the parent NIC via device_get_name(device_get_parent(sc->mii_dev)). - Don't set MIIF_NOISOLATE, except for when used in combination with a NIC that wedges when isolating the PHYs, so nsphy(4) can be used in configurations with multiple PHYs. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia() (requires the MIIF_FORCEANEG added in sys/dev/mii/mii_physubr.c 1.26, sys/dev/mii/miivar.h 1.19). - 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 nearly one second. This is because it appears to go through an implicit auto- negotiation cycle as part of the reset. 2) During reset and auto-negotiation, 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 is the first of two changes required to make the combination of Am79c971 and DP83840A found on certain HP cards and on-board in IBM machines work. - Fix some whitespace nits.
Based on: NetBSD (except for the first and second item) MFC after: 2 weeks
|
164707 |
28-Nov-2006 |
marius |
- Rely on mii_phy_add_media() setting mii_anegticks as appropriate. - Fix some whitespace nits.
MFC after: 2 weeks
|
164706 |
28-Nov-2006 |
marius |
- Don't set MIIF_NOISOLATE so lxtphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating LXT970 per se nor in combination with the NICs they're used with and lxtphy(4) was already adding IFM_NONE anyway. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). - Fix some whitespace nits.
Obtained from: NetBSD MFC after: 2 weeks
|
164705 |
28-Nov-2006 |
marius |
- Remove a dupe $FreeBSD$. - Fix some whitespace nits.
|
164703 |
27-Nov-2006 |
marius |
Analogous to mii_add_media(), factor out the code for checking whether the BMSR contains any media at all to mii_phy_add_media(). The majority of the drivers currently using mii_phy_add_media() were missing such a check anyway though.
MFC after: 2 weeks
|
164702 |
27-Nov-2006 |
marius |
- Add a MIIF_FORCEANEG flag which forces an auto-negotiation to always take place if IFM_AUTO is selected. This allows drivers like nsphy(4), which need to force writing the ANAR according to the BMSR, to take advantage of mii_phy_setmedia(). [1] - In mii_phy_reset() once the current media is set don't isolate the PHY corresponding to the instance of the currently selected media rather than unconditionally not isolating the PHY corresponding to instance 0. This saves a isolation-unisolation-cycle of the PHY corresponding to the currently selected media for the case were it isn't instance 0. - Fix some whitespace nits. [1]
Obtained from: NetBSD [1] MFC after: 2 weeks
|
161750 |
31-Aug-2006 |
yongari |
Add PHY support for BCM5752.
Tested by: delphij, Ganbold < ganbold AT micom DOT mng DOT net >
|
161749 |
31-Aug-2006 |
yongari |
Add Broadcom BCM5752 PHY id.
|
161551 |
23-Aug-2006 |
glebius |
Pack several boolean fields into single bge_flags field.
|
161237 |
12-Aug-2006 |
yongari |
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).
Reported by: Jelte Jansen <jelte AT NLnetLabs DOT nl> Tested by: Jelte Jansen <jelte AT NLnetLabs DOT nl>
|
160638 |
25-Jul-2006 |
yongari |
Add ip1000 PHY driver for IC Plus IP1000A integrated PHY.
|
160637 |
25-Jul-2006 |
yongari |
Add IC Plus IP1000A integrated PHY id.
|
160636 |
25-Jul-2006 |
yongari |
Add gentbi, a generic TBI(teb-bit interface) PHY driver ported from NetBSD.
|
160082 |
03-Jul-2006 |
oleg |
Reset autonegotiation timer if current media is not 'auto'.
Approved by: glebius (mentor) MFC after: 2 weeks
|
160078 |
03-Jul-2006 |
yongari |
Use mii_phy_match to reduce duplicated code.
Reviewed by: glebius
|
160076 |
03-Jul-2006 |
yongari |
Replace hard-coded magic constants to system defined constants (BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc). There is no functional changes.
Reviewed by: oleg, scottl
|
159962 |
26-Jun-2006 |
wpaul |
Add support for the RealTek 8169SC/8110SC and RTL8101E devices. The latter is a PCIe 10/100 chip.
Finally fix the EEPROM reading code so that we can access the EEPROMs on all devices. In order to access the EEPROM, we must select 'EEPROM programming' mode, and then set the EEPROM chip select bit. Previously, we were setting both bits simultaneously, which doesn't work: they must be set in the right sequence.
Always obtain the station address from the EEPROM, now that EEPROM reading works correctly.
Make the TX interrupt moderation code based on the internal timer optional and turned off by default.
Make the re_diag() routine conditional and off by default. When it is on, only use it for the original 8169, which was the only device that that really needed it.
Modify interrupt handling to use a fast interrupt handler and fast taskqeueue.
Correct the rgephy driver so that it only applies the DSP fixup for PHY revs 0 and 1. Later chips are fixed and don't need the fixup.
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.
|
158744 |
19-May-2006 |
yongari |
If the PHY has 1000BASE-T capability, check to see if a 1000BASE-T speed was negotiated.
Obtained from: NetBSD
|
158651 |
16-May-2006 |
phk |
Since DELAY() was moved, most <machine/clock.h> #includes have been unnecessary.
|
158649 |
16-May-2006 |
oleg |
1) Fix mii_phy_tick(): Current code does not report link loss correctly - when link goes down, mii_phy_tick() will notice that with up to mii_anegticks delay. If link goes up during this delay then link flapping will be unnoticed by driver.
2) mii_phy_add_media(): initialize sc->mii_anegticks for 10/100 media
3) Use MII_ANEGTICKS/MII_ANEGTICKS_GIGE defines instead of hardcoded values.
Approved by: glebius (mentor) MFC after: 1 month
|
158648 |
16-May-2006 |
oleg |
Introduce MII_ANEGTICKS and MII_ANEGTICKS_GIGE defines. (How many ticks should we wait before retrying autonegotiation process).
Approved by: glebius (mentor) MFC after: 1 month
|
157691 |
12-Apr-2006 |
ps |
Fix the PHY support for the 5780. I mis-merged this from my sources.
|
157642 |
10-Apr-2006 |
ps |
Add a driver for the Broadcom NetXtreme II (BCM5706/BCM5708) PCI/PCIe Gigabit Ethernet adapeter.
Submitted by: David Christensen
|
157041 |
23-Mar-2006 |
oleg |
Add basic support for BCM5780 PHY.
Submitted by: grehan Approved by: glebius (mentor) MFC after: 1 week
|
155669 |
14-Feb-2006 |
glebius |
- Introduce ifmedia_baudrate(), which returns correct baudrate of the given media status. [1] - Utilize ifmedia_baudrate() in miibus_statchg() to update ifp->if_baudrate.
Obtained from: NetBSD [1]
|
153234 |
08-Dec-2005 |
oleg |
1) fix tiny bug in bge_start_locked() 2) rework link state detection code & use it in POLLING mode 3) fix 2 bugs in link state detection code: a) driver unable to detect link loss on bcm5721 b) on bcm570x chips (tested on bcm5700 bcm5701 bcm5702) driver fails to detect link loss with probability 1/6 (solved in brgphy.c)
Devices working in TBI mode should not be affected by this change.
Approved by: glebius (mentor) MFC after: 1 month
|
151437 |
18-Oct-2005 |
imp |
Remove dc-only pseudo phy devices after repo copy to dev/dc
|
151370 |
16-Oct-2005 |
grehan |
The BCM5401 dspcode load on media changes also applies to the 100/1000 BCM5400 phy. This fixes the problem with the GEM port not syncing up on Sawtooth G4's.
Obtained from: NetBSD Reported by: Ben Rosengart <ben + freebsd org at narcissus net>
|
150763 |
30-Sep-2005 |
imp |
Use ansi function definitions in preference to K&R to reduce diffs with NetBSD (and cause it looks cooler).
|
150762 |
30-Sep-2005 |
imp |
Not sporttings on other cards
|
150756 |
30-Sep-2005 |
imp |
Add a more generic version of the mii_phy_match routine (mii_phy_match_gen) which can be used for phy that want to piggy back other data with their table.
|
150755 |
30-Sep-2005 |
imp |
Add macros which follow the miidevs design pattern to make it easier to construct tables for mii_phy_match.
|
147287 |
11-Jun-2005 |
brooks |
Add an evil hack to work around a cast from the softc to the ifnet that I missed. Since I did no rearrange any softcs, casting the result of device_get_softc() to (struct ifnet **) and derefrencing it yeilds a pointer to the ifp. This makes at least vr(4) nics work.
|
146734 |
29-May-2005 |
nyan |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
146413 |
19-May-2005 |
ps |
Support the 5714C
Submitted by: John Cagle <john dot cagle at hp dot com>
|
141964 |
16-Feb-2005 |
imp |
On second though, print the OUI, model and revision. This is the same information that's in the id1 and id2 fields we were using, but is in a form that the drivers will be using in their matching routines.
|
141960 |
16-Feb-2005 |
imp |
Add location and PNP info to the mii bus
|
141937 |
15-Feb-2005 |
imp |
Use ANSI function definitions, in preference to the K&R definitions.
|
139749 |
06-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
138542 |
08-Dec-2004 |
sam |
Cleanup link state change notification: o add new if_link_state_change routine that deals with link state changes o change mii to use if_link_state_change
|
138124 |
26-Nov-2004 |
bz |
With mii.h rev 1.4 changes to BMSR_MEDIAMASK merged in from NetBSD got activated. NetBSD has an additional change in their mii.c rev 1.26 which got missed with that merger:
: 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.
With this GE only ones like from the SK-9844 are detected again.
PR: i386/63313, i386/71733, kern/73725 Tested by: matt baker <matt at sevenone dot com>, Jin Guojun <jin at george dot lbl dot gov> Approved by: rwatson (mentor) Obtained from: NetBSD mii.c rev 1.26 MFC after: 1 week
|
135772 |
24-Sep-2004 |
ps |
Add support for the BCM5750/5751. Unfortunately the documentation I have from Broadcom does not give much information on these devices, so the Broadcom Linux driver was used for clues to what these chips support. It turns out they are similar to the 5705 with the 5751 being the PCI-Express version and needing special work-arounds and settings.
|
135048 |
10-Sep-2004 |
wpaul |
Add device driver support for the VIA Networking Technologies VT6122 gigabit ethernet chip and integrated 10/100/1000 copper PHY. The vge driver has been added to GENERIC for i386, pc98 and amd64, but not to sparc or ia64 since I don't have the ability to test it there. The vge(4) driver supports VLANs, checksum offload and jumbo frames.
Also added the lge(4) and nge(4) drivers to GENERIC for i386 and pc98 since I was in the neighborhood. There's no reason to leave them out anymore.
|
133741 |
15-Aug-2004 |
jmg |
Add locking to the kqueue subsystem. This also makes the kqueue subsystem a more complete subsystem, and removes the knowlege of how things are implemented from the drivers. Include locking around filter ops, so a module like aio will know when not to be unloaded if there are outstanding knotes using it's filter ops.
Currently, it uses the MTX_DUPOK even though it is not always safe to aquire duplicate locks. Witness currently doesn't support the ability to discover if a dup lock is ok (in some cases).
Reviewed by: green, rwatson (both earlier versions)
|
129876 |
30-May-2004 |
phk |
Add some missing <sys/module.h> includes which are masked by the one on death-row in <sys/kernel.h>
|
129846 |
29-May-2004 |
marius |
DP83840A on hme(4) don't advertise their media capabilities themselves properly. This causes the autonegotiation to e.g. never establish a 100baseTX full-duplex link. The solution to this problem is to manually write the capabilities from the BMSR to the ANAR every time a media change occurs, even when already in autonegotiation mode. The NetBSD way of doing this is to set their MIIF_FORCEANEG flag in the NIC driver. This causes mii_phy_setmedia() to call mii_phy_auto() (which will set the ANAR according to the BMSR) even when the PHY alread is in autonegotiation mode. However, while doing the same on FreeBSD (which involves porting the MIIF_FORCEANEG flag and converting nsphy.c to use mii_phy_setmedia()) fixes autonegotiation, using mii_phy_setmedia() causes this driver to no longer work properly in the other modes. Another drawback of that approach is that this will also force writing the ANAR on other PHYs whose drivers use mii_phy_setmedia() and which are used with a NIC whose driver sets MIIF_FORCEANEG (e.g. hme(4) is known to be used together with 3 different PHYs while only the DP83840A require this workaround). So instead of moving to MIIF_FORCEANEG, just call mii_phy_auto() in nsphy_service() unconditionally when hanging off of a hme(4) and serving a media change
This is part 1/2 of fixing autonegotiation on hme(4) using DP83840A PHYs.
|
129845 |
29-May-2004 |
marius |
Spelling fix in a comment.
|
129844 |
29-May-2004 |
marius |
Remove double __FBSDID and move the remaining one into a common place after the license(s) and before the driver comment (the latter only in drivers not having __FBSDID at that location).
|
129843 |
29-May-2004 |
marius |
Move __FBSDID out from under a comment.
|
129842 |
29-May-2004 |
marius |
Spelling fix in a comment.
|
128871 |
03-May-2004 |
andre |
Link state change notification of ethernet media to the routing socket.
o Extend the if_data structure with an ifi_link_state field and provide the corresponding defines for the valid states.
o The mii_linkchg() callback updates the ifi_link_state field and calls rt_ifmsg() to notify listeners on the routing socket in addition to the kqueue KNOTE.
o If vlans are configured on a physical interface notify and update all vlan pseudo devices as well with the vlan_link_state() callback.
No objections by: sam, wpaul, ru, bms Brucification by: bde
|
128870 |
03-May-2004 |
andre |
Correct the phy_service() routine case MII_TICK to correctly track the falling edge of a media state change.
This is in preparation for media state change notification to the routing socket.
No objections by: sam, wpaul, ru, bms Brucification by: bde
|
124620 |
17-Jan-2004 |
phk |
Make sure set the media type in the phy, we cannot trust it to have chosen the type we happen to want.
Bug triggered by net-booting soekris hardware which comes up in 10/hdx mode by default.
|
121816 |
31-Oct-2003 |
brooks |
Replace the if_name and if_unit members of struct ifnet with new members if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance.
This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics.
Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
|
120537 |
28-Sep-2003 |
ps |
Typo when setting wirespeed. || != |
Found by: jake
|
120281 |
20-Sep-2003 |
wilko |
Add support for SK-9521 V2.0 and 3COM 3C940.
Tested at 100Mbit only, using Asus P4P800 onboard 3C940. The -stable version of this patch I have in use for ~2 weeks now, and works just fine for me.
Based on: Nathan L. Binkert's patch for OpenBSD Patch submitted by and thanks to: Jung-uk Kim <jkim@niksun.com> MFC after: 2 weeks
|
119983 |
11-Sep-2003 |
wpaul |
Clean up dead code.
|
119976 |
11-Sep-2003 |
wpaul |
Add a PHY driver to support the built-in gigE PHY in the 8169S/8110S ethernet chips. This driver is pretty simple, however it contains special DSP initialization code which is needed in order to get the chip to negotiate a gigE link. (This special initialization may not be needed in subsequent chip revs.) Also:
- Fix typo in if_rlreg.h (RL_GMEDIASTAT_1000MPS -> RL_GMEDIASTAT_1000MBPS)
- Deal with shared interrupts in re_intr(): if interface isn't up, return.
- Fix another bug in re_gmii_writereg() (properly apply data field mask)
- Allow PHY driver to read the RL_GMEDIASTAT register via the re_gmii_readreg() register (this is register needed to determine real time link/media status).
|
119917 |
09-Sep-2003 |
wpaul |
Add a device driver for the Broadcom BCM4401 ethernet controller, written by Stuart Walsh and Duncan Barclay (with some kibbitzing by me). I'm checking it in on Stuart's behalf.
The BCM4401 is built into several x86 laptop and desktop systems. For the moment, I have only enabled it in the x86 kernel config because although it's a PCI device, I haven't heard of any standalone NICs that use it. If somebody knows of one, we can easily add it to the other arches.
This driver uses register/structure data gleaned from the Linux driver released by Broadcom, but does not contain any of the code from the Linux driver itself. It uses busdma.
|
119868 |
08-Sep-2003 |
wpaul |
Take the support for the 8139C+/8169/8169S/8110S chips out of the rl(4) driver and put it in a new re(4) driver. The re(4) driver shares the if_rlreg.h file with rl(4) but is a separate module. (Ultimately I may change this. For now, it's convenient.)
rl(4) has been modified so that it will never attach to an 8139C+ chip, leaving it to re(4) instead. Only re(4) has the PCI IDs to match the 8169/8169S/8110S gigE chips. if_re.c contains the same basic code that was originally bolted onto if_rl.c, with the following updates:
- Added support for jumbo frames. Currently, there seems to be a limit of approximately 6200 bytes for jumbo frames on transmit. (This was determined via experimentation.) The 8169S/8110S chips apparently are limited to 7.5K frames on transmit. This may require some more work, though the framework to handle jumbo frames on RX is in place: the re_rxeof() routine will gather up frames than span multiple 2K clusters into a single mbuf list.
- Fixed bug in re_txeof(): if we reap some of the TX buffers, but there are still some pending, re-arm the timer before exiting re_txeof() so that another timeout interrupt will be generated, just in case re_start() doesn't do it for us.
- Handle the 'link state changed' interrupt
- Fix a detach bug. If re(4) is loaded as a module, and you do tcpdump -i re0, then you do 'kldunload if_re,' the system will panic after a few seconds. This happens because ether_ifdetach() ends up calling the BPF detach code, which notices the interface is in promiscuous mode and tries to switch promisc mode off while detaching the BPF listner. This ultimately results in a call to re_ioctl() (due to SIOCSIFFLAGS), which in turn calls re_init() to handle the IFF_PROMISC flag change. Unfortunately, calling re_init() here turns the chip back on and restarts the 1-second timeout loop that drives re_tick(). By the time the timeout fires, if_re.ko has been unloaded, which results in a call to invalid code and blows up the system.
To fix this, I cleared the IFF_UP flag before calling ether_ifdetach(), which stops the ioctl routine from trying to reset the chip.
- Modified comments in re_rxeof() relating to the difference in RX descriptor status bit layout between the 8139C+ and the gigE chips. The layout is different because the frame length field was expanded from 12 bits to 13, and they got rid of one of the status bits to make room.
- Add diagnostic code (re_diag()) to test for the case where a user has installed a broken 32-bit 8169 PCI NIC in a 64-bit slot. Some NICs have the REQ64# and ACK64# lines connected even though the board is 32-bit only (in this case, they should be pulled high). This fools the chip into doing 64-bit DMA transfers even though there is no 64-bit data path. To detect this, re_diag() puts the chip into digital loopback mode and sets the receiver to promiscuous mode, then initiates a single 64-byte packet transmission. The frame is echoed back to the host, and if the frame contents are intact, we know DMA is working correctly, otherwise we complain loudly on the console and abort the device attach. (At the moment, I don't know of any way to work around the problem other than physically modifying the board, so until/unless I can think of a software workaround, this will have do to.)
- Created re(4) man page
- Modified rlphy.c to allow re(4) to attach as well as rl(4).
Note that this code works for the sample 8169/Marvell 88E1000 NIC that I have, but probably won't work for the 8169S/8110S chips. RealTek has sent me some sample NICs, but they haven't arrived yet. I will probably need to add an rlgphy driver to handle the on-board PHY in the 8169S/8110S (it needs special DSP initialization).
|
119418 |
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
119285 |
22-Aug-2003 |
imp |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
119157 |
20-Aug-2003 |
ambrisko |
On Dell boxes such as the PE2650 we need to disable 3 led mode for the link LED to work.
Reviewed by: wpaul Obtained from: Linux driver
|
118814 |
12-Aug-2003 |
wpaul |
Add support for the Broadcom BCM5901 and BCM5901 rev A2 chips. These are 10/100 only NICs found on the IBM Thinkpad R40E and G40. These seem to be based on the BCM5705 MAC but with a PHY that doesn't support 1000Mbps modes.
Submitted by: Igor Sviridov <sia@nest.org>
|
117659 |
16-Jul-2003 |
wpaul |
Add support for the BCM5705 and its ilk. Changes:
- 5705 doesn't support jumbo frames - Statistics must be read from registers - RX return ring must be capped at 512 entries - Omit initialization of certain device blocks - Acknowledge link change interrupts by setting the 'link changed' bit in the status register (used to have no effect) - Remember to toggle the MI completion bit too - Set the mbuf low watermark differently (on-chip memory buffers, not BSD mbufs) - Don't enable Ethernet@WireSpeed feature for certain 5705 chip revs - Add additional PCI IDs for 5705 and 5782 parts - Add a forgotten 5704 PCI ID
Most changes ripped kicking and screaming from the Broadcom linux driver. Thanks to Paul Saab for sanity testing. (My lack of sanity has been confirmed.)
|
116488 |
17-Jun-2003 |
ps |
Fix bge at 10Mbit. The defines for 10-Half and 10-Full were swapped.
Shamed into fixing by: John Cagle <john.cagle@hp.com>
|
115520 |
31-May-2003 |
phk |
Remove unnecessary breaks. Remove unused variables. Add XXX comment where a break may be missing. [lxtphy.c]
Found by: FlexeLint
|
114628 |
04-May-2003 |
ps |
Something I missed in my tree. If the media changes, poke the DSP on the 5401/5411 Broadcom PHY's.
Obtained from: NetBSD
|
114590 |
03-May-2003 |
ps |
- Move bge_phy_hack into the phy code and implement the various DSP patch workarounds for each phy revision. Obtained from: NetBSD & Broadcom Linux driver
- Disable AUTOPOLL when accessing the PHY as it may cause PCI errors. Obtained from: NetBSD
- Check the UPDATED bit in the status block so the driver knows that the status block as indeed changed since the last access. Broadcom documentation states drivers should unset the UPDATED/CHANGED bits after reading them.
- When changing media types, first loop the phy then set the media. Broadcom documentation and Linux drivers do this and I observed much better handling of link after this change.
- Broadcom documentation states that for 1000BaseT operation, autonegotiation must be enabled. Fix hard coding of media so that the driver only advertises 1000BaseT as the supported media type and enable autonegotition.
- Only set Master/Slave on the 5701. Obtained from Broadcom Linux driver.
|
114577 |
03-May-2003 |
akiyama |
Add RealTek RTL8150 USB to fast Ethernet controller driver. This driver now supports the Melco LUA-KTX and the GREEN HOUSE GH-USB100B.
Reviewed by: imp MFC after: 2 weeks
|
114547 |
02-May-2003 |
ps |
Add untested support for the Broadcom 5704.
Obtained from: NetBSD
|
113038 |
03-Apr-2003 |
obrien |
Use __FBSDID rather than rcsid[].
|
111110 |
19-Feb-2003 |
peter |
Remove unused variable and code.
|
109514 |
19-Jan-2003 |
obrien |
Remove miidevs.h and generate it from miidevs at compile time. The devlist2h.awk tool to do this has been repocopied to sys/tools/.
|
109158 |
13-Jan-2003 |
obrien |
Regenerate
|
109147 |
12-Jan-2003 |
obrien |
Partial support for the nVidia nForce2 chipset's on-board Broadcom/Altima PHY and 3com MAC. Specifications for the Altima PHY are available at: http://www.altimacom.com/products/ac101L.html
Submitted by: Mikko S. Hyvarinen <morphy@morphy.iki.fi>
|
106107 |
29-Oct-2002 |
semenu |
Remove unnecessary <sys/malloc.h> include.
Submitted by: marius@alchemy.franken.de MFC after: 1 week
|
105135 |
14-Oct-2002 |
alfred |
Put function return types on a line by themselves. Cleanup my earlier de-__P sweep and remove whitespace between function names and paramters.
|
104094 |
28-Sep-2002 |
phk |
Be consistent about "static" functions: if the function is marked static in its prototype, mark it static at the definition too.
Inspired by: FlexeLint warning #512
|
103103 |
08-Sep-2002 |
jdp |
Add support for the BCM5703x chips. I do not have one of these cards to test; however the submitter reports that this patch works with the on-board interface on the IBM x235 server.
Submitted by: Jung-uk Kim <jkim@niksun.com> MFC after: 1 month
|
102000 |
16-Aug-2002 |
ambrisko |
Revert change to detect multiply PHYs in mii code. There might be cases when this is needed. Work around bogus second PHY in the DFE-580 card via a change in the if_ste.c driver.
Suggested by: jdp Reviewed by: jdp MFC after: 3 days
|
101492 |
07-Aug-2002 |
ambrisko |
Only attach one PHY device to a controller. NetBSD has similar code. The D-Link DFE-580 card will otherwise show 2 miibuses for each controller and therefore 2 ukphy's.
Sponsored by: Vernier Networks MFC after: 1 week
|
99441 |
05-Jul-2002 |
benno |
regenerate
|
99440 |
05-Jul-2002 |
benno |
Add a driver for the Broadcom BCM52xx "mini-theta" PHY. This includes the internal PHY on the 3COM 3C905B and 3C905C parts, however I've rigged it so that xlphy (aka exphy) takes precedence for the time being.
If people try this with their xl cards and decide that it's a better choice, we can switch this later.
This is the PHY used in various iMacs and possibly other GMAC-equipped Macintoshes with 10/100 PHYs (the ones with 10/100/1000 appear to use brgphy).
Obtained from: NetBSD
|
99439 |
05-Jul-2002 |
benno |
Use 3C905C instead of 3c905Cphy as the identifier for the Broadcom PHY used in the 3C905C. This is mainly cosmetic.
I'm doing this mainly so we share the same identifier as NetBSD.
|
96027 |
04-May-2002 |
phk |
Increase gigE negotiation timeout to 17 seconds.
10 seconds is not enough to negotiate a gigE link with a cisco switch which holds carrier off for several seconds between tries.
|
96026 |
04-May-2002 |
phk |
Clean up mii/phy drivers: Remove the MIIF_DOINGAUTO which doesn't really do anything at the end of the day except bloat the drivers which has copy&pasted it.
|
95877 |
01-May-2002 |
semenu |
MII_TICK handlers need not restart aneg on these PHYs, they behave pretty well as is, so - just fetch current status upon MII_TICK.
Also do IFM_INST verification at the top of *_service() then doing it separately for every case in switch.
acphy: do not read MII_ACPHY_DIAG twice, there is nothing latching. qsphy: always fetch actual link status from MII_QSPHY_PCTL.
MFC after: 1 week
|
95724 |
29-Apr-2002 |
phk |
Introduce NetBSD's mii_phy_match() API and use it in the nsgphy to get a description printed.
|
95723 |
29-Apr-2002 |
phk |
Convert exphy and ukphy over to the new code.
exphy is done flying blind, ukphy is tested on one card.
|
95722 |
29-Apr-2002 |
phk |
Make one generic mii_phy_detach() to replace 19 slightly different ones.
Rename mii_phy_auto_stop() mii_phy_down().
Introduce mii_down(), use it from nge. Do not indirect it to 19 identical case's in 19 switchstatements like NetBSD did.
|
95718 |
29-Apr-2002 |
phk |
Move a lot closer to NetBSDs MII support for GigE.
Move fxp and nge drivers over to use the new stuff.
|
95707 |
29-Apr-2002 |
phk |
Moving closer to being able to use NetBSD's generic mii_set_media() function.
|
95705 |
29-Apr-2002 |
phk |
Edging ever closer to NetBSD...
|
95702 |
29-Apr-2002 |
phk |
Move us yet closer to IFM_* definitions in NetBSD.
|
95673 |
28-Apr-2002 |
phk |
Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/
|
95667 |
28-Apr-2002 |
phk |
Don't pass three args when one will do just fine, and even prevent mistakes like the one brgphy.c (now corrected).
|
95665 |
28-Apr-2002 |
phk |
Improve an API by about 4 lines per driver.
|
95664 |
28-Apr-2002 |
phk |
Use generic MII #defines instead of private ones when the registers are IEEE defined.
Object file comes out the same.
|
95663 |
28-Apr-2002 |
phk |
Merge in rev 1.9 from NetBSD.
|
94994 |
18-Apr-2002 |
mckay |
Work around an Intel 21143 chip bug.
Rev 1.56 of if_dc.c removed calls to mii_pollstat() from the dc_tick() routine. dc_tick() is called regularly to detect link up and link down status, especially when autonegotiating.
The expectation was that mii_tick() (which is still called from dc_tick()) would update status information automatically in all cases where it would be sensible to do so.
Unfortunately, with authentic 21143 chips this is not the case, and the driver never successfully autonegotiates. This is because (despite what it says in the 21143 manual) the chip always claims that link is not present while the autonegotiation enable bit is set. Autonegotation takes place and succeeds, but the driver tests the link bits before it switches off the autonegotiation enable bit, and success is not recognised.
The simplest solution is to call dcphy_status() more often for MII_TICK calls by dropping out of the switch statement instead of exiting when we are autonegotiating and link appears to not be present. When autonegotiation succeeds, dcphy_status() will note the speed and fdx/hdx state and turn off the autonegotiation enable bit. The next call to dcphy_status() will notice that link is present, and the dc driver code will be notified.
Macronix chips also use this code, but implement link detection as described in the manual, and hence don't need this patch. However, tests on a Macronix 98715AEC-C show that it does not adversely affect them.
This could be done better but is the minimal effective change, and most closely mimics what was happening prior to rev 1.56 of if_dc.c. (Actually I also deleted a small amount of unnecessary code while I was in the area.)
Reviewed by: wpaul
|
94150 |
07-Apr-2002 |
wpaul |
Regenerate.
|
94149 |
07-Apr-2002 |
wpaul |
Teach the rlphy driver how to do parallel link detection. If the link partner doesn't support NWAY, the RealTek PHY (both the integrated ones on 8139 chips and the RTL8201L 10/100 PHY) will not report the link speed via the ANLPAR or BMSR registers. For the 8201L, we need to look in magic vendor-specific PHY register 0x19. For the 8139 MAC+PHY combo, we have to be able to test the RL_MEDIASTAT register.
The changes to rlphy.c are based largely on the patch from PR 30836, however I tried to eliminate some magic numbers by creating an entry for the 8201 PHY in miidevs.
Also updated if_rl.c to allow the rlphy driver to read the RL_MEDIASTAT register via the rl_miibus_readreg() routine.
|
92932 |
22-Mar-2002 |
wpaul |
regenerate
|
92931 |
22-Mar-2002 |
wpaul |
Teach the brgphy driver about the BCM5701's internal copper PHY.
|
92739 |
20-Mar-2002 |
alfred |
Remove __P.
|
91343 |
27-Feb-2002 |
danny |
Remove problematic PHY_WRITE so that autoneg to 10 Mbps actually works.
Submitted by: Dennis <TD790@aol.com> Reviewed by: Bill Paul <wpaul@freebsd.org> MFC after: 7 days
|
89234 |
10-Jan-2002 |
archie |
Fix reversed definitions for the bits that select half vs. full duplex.
Submitted by: Darren Croke <djc@packetdesign.com>
|
84823 |
11-Oct-2001 |
mjacob |
Fix declaration disagreement.
|
84333 |
01-Oct-2001 |
mjacob |
Note the 'common knowledge' assumption that each NIC's softc starts with an ifnet structure (so device_get_softc will get one).
If memory allocation fails in mii_phy_probe, don't just march ahead into a panic- return ENOMEM.
MFC after: 1 week
|
84145 |
29-Sep-2001 |
jlemon |
Cleanup pass for mii drivers. . Make internal service routines static. . Use a consistent ordering of checks in MII_TICK. Do the work in the mii_phy_tick() subroutine if appropriate. . Call mii_phy_update() to trigger the callbacks.
|
84144 |
29-Sep-2001 |
jlemon |
Change the order that we print the media options during device probe to match the other mii drivers.
|
84142 |
29-Sep-2001 |
jlemon |
Add field for last active status, as well as function prototypes.
|
84140 |
29-Sep-2001 |
jlemon |
Add new device method miibus_linkchg, along with a service routine.
|
84035 |
27-Sep-2001 |
wpaul |
Fix typo: BGGPHY -> BRGPHY in one of the #defines I added the other day.
|
83930 |
25-Sep-2001 |
wpaul |
Add some definitions for the DSP programming registers in the BCM5400 and BCM5401 PHYs.
|
83597 |
18-Sep-2001 |
wpaul |
Tweak the autoneg kickoff code to that it more closely resembles the method uses in the nsgphy driver.
|
83030 |
04-Sep-2001 |
wpaul |
Regenerate.
|
83029 |
04-Sep-2001 |
wpaul |
Add support for the BCM5401 and BCM5411 10/100/1000Mbps copper gigE PHYs. This basically updates the brgphy driver to support 10/100 modes in addition to 1000Mbps modes.
|
79885 |
19-Jul-2001 |
kris |
Quiet a variable format-string warning.
MFC after: 1 week
|
77634 |
02-Jun-2001 |
jlemon |
Only touch the PCR register in order to set bits for the fxp driver. The 3C509-TX card apparently had a slightly different version of the chip, and has problems when this register is set. The problem does not appear on the 3C509{BC} cards, but since only the fxp driver needs specific bits set, conditionalize on that.
|
77079 |
23-May-2001 |
wpaul |
Regenerate
|
77078 |
23-May-2001 |
wpaul |
Tweak the xmphy driver a little bit based on something I learned about the built-in 1000baseX interface in the Level 1 LXT1001 chip. The Level 1 PHY comes up with the isolate bit in the control register set by default, but it also has the autonegotiate bit set. When you tell the xmphy driver to select IFM_AUTO mode, it sees that the autoneg bit is already on, and thus doesn't bother updating the control register. However this means that the isolate bit is never turned off (unless you manually select 1000baseSX full or half duplex mode, which does result in the control register being modified and the ISO bit being turned off).
This subtle and unusual behavioral difference stopped me from being able to receive packets on the SMC9462TX card for several days, since isolating the PHY disconnects it from the MAC's data interface. The fix is to omit the 'is the autoneg big set?' test, since it doesn't really provide much of an optimization anyway.
This commit also updates the xmphy driver to support the Jato/Level 1 internal PHY. (I'm not sure how Jato Technologies is related to Level 1: all I know is the OUI from the PHY ID registers maps to Jato in the OUI database.) This will be used once I add the if_lge driver to support the LXT10010 chip.
|
76485 |
11-May-2001 |
jlemon |
Regenerate.
|
76483 |
11-May-2001 |
jlemon |
Correctly recognize the i82562{EM} PHYs.
Obtained from: OpenBSD
|
76482 |
11-May-2001 |
wpaul |
Regenerate
|
76479 |
11-May-2001 |
wpaul |
Add support for gigabit ethernet cards based on the NatSemi DP83820 and DP83821 gigabit ethernet MAC chips and the NatSemi DP83861 10/100/1000 copper PHY. There are a whole bunch of very low cost cards available with this chipset selling for $150USD or less. This includes the SMC9462TX, D-Link DGE-500T, Asante GigaNIX 1000TA and 1000TPC, and a couple cards from Addtron.
This chip supports TCP/IP checksum offload, VLAN tagging/insertion. 2048-bit multicast filter, jumbograms and has 8K TX and 32K RX FIFOs. I have not done serious performance testing with this driver. I know it works, and I want it under CVS control so I can keep tabs on it. Note that there's no serious mutex stuff in here yet either: I need to talk more with jhb to figure out the right way to do this. That said, I don't think there will be any problems.
This driver should also work on the alpha. It's not turned on in GENERIC.
|
75353 |
09-Apr-2001 |
mjacob |
Add Marvell PHY support for 10/100/1000 LIVENGOOD_CU Intel NIC. Parag Patel did all of the grunt work, so he gets the credit. Register definitions and actions inferred from a Linux driver, so Intel also gets some 'credit'.
|
74914 |
28-Mar-2001 |
jhb |
Catch up to header include changes: - <sys/mutex.h> now requires <sys/systm.h> - <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
|
74909 |
28-Mar-2001 |
jlemon |
Back out previous commit until I figure out a way to do it properly. We really want to be able to say "auto NWAY", "limited NWAY", and "no NWAY". Unfortunately, this does not appear to be possible with the current mediaopt structure.
|
74377 |
17-Mar-2001 |
jlemon |
Really fix NWAY negotiation for the 82553 PHY. Locking down the media interface selection should not imply disabling NWAY negotiaton as well.
Problem pointed out by: peter
|
74353 |
16-Mar-2001 |
jlemon |
Enable some undocumented bits in the DP83840 PHY, which is needed when using it with the Intel fxp driver.
Tested by: peter, Ollivier Robert <roberto@eurocontrol.fr>, Peter Schultz <pete@jocose.org>
|
74131 |
12-Mar-2001 |
jlemon |
Add drivers for Intel 82553 and 82555 PHYs.
|
74130 |
12-Mar-2001 |
jlemon |
Regenerate.
|
74129 |
12-Mar-2001 |
jlemon |
Add some definitions for Intel 82553 PHYs
|
72196 |
09-Feb-2001 |
jhb |
Add includes of sys/malloc.h so this actually compiles.
Pointy-hat to: asmodai
|
72186 |
08-Feb-2001 |
asmodai |
Fix memoryleaks with device_get_children().
Approved by: wpaul
|
72144 |
07-Feb-2001 |
semenu |
Oops... I knew i shouldn't use arrows in vi. Fix a typo causing errors in compilation.
|
72132 |
07-Feb-2001 |
semenu |
Add QS6612, AC101 and LXT970 personal drivers and register definitions.
Obtained from: NetBSD/OpenBSD
|
72012 |
04-Feb-2001 |
phk |
Another round of the <sys/queue.h> FOREACH transmogriffer.
Created with: sed(1) Reviewed by: md5(1)
|
69925 |
12-Dec-2000 |
wpaul |
Grrrrr. That last commit was supposed to be to the head, not to -stable (even though I want the fixes in -stable anyway). I'm sure I'm going to get flamed now for committing to -stable and -current too quickly. *sigh*
|
67365 |
20-Oct-2000 |
jhb |
Catch up to moving headers: - machine/ipl.h -> sys/ipl.h - machine/mutex.h -> sys/mutex.h
|
67314 |
19-Oct-2000 |
jon |
NEWCARD/Cardbus -
This commit adds support for Xircom X3201 based cardbus cards. Support for the TDK 78Q2120 MII is also added. IBM Etherjet, Intel and Xircom cards uses these chips.
Note that as a result of this commit, some Intel/DEC 21143 based cardbus cards will also attach, but not get link. That is being looked at.
|
67164 |
15-Oct-2000 |
phk |
Remove unneeded #include <machine/clock.h>
|
67091 |
13-Oct-2000 |
wpaul |
Add #include <machine/mutex.h> since these files need it and don't include anything else that includes mutex.h. Needed to resolve struct mtx from struct dc_softc.
|
66991 |
12-Oct-2000 |
imp |
sync to last commit
|
66989 |
12-Oct-2000 |
imp |
Add mii entry for tdk phy found on some cardbus cards.
|
66681 |
05-Oct-2000 |
wpaul |
Add support for parsing the media blocks from the SROM on 21143 adapters. This is necessary in order to make this driver work with the built-in ethernet on the alpha Miata machines. These systems have a 21143-PC chip on-board and optional daughtercards with either a 10/100 MII transceiver or a 10baseT/10base2 transceiver. In both cases, you need to twiddle the GPIO bits on the controller in order to turn the transceivers on, and you have to read the media info from the SROM in order to find out what bits to twiddle.
|
66129 |
20-Sep-2000 |
wpaul |
Add a homePNA PHY driver. This is really only a stub: MII-based homePNA PHYs tend to look like 10mbps PHYs with no autonegotiation. This allows us to display the proper media type and link status however.
|
66128 |
20-Sep-2000 |
wpaul |
regenerate
|
66127 |
20-Sep-2000 |
wpaul |
Add the ID for the built-in homePNA PHY in the AMD 79C798 controller.
|
61907 |
21-Jun-2000 |
semenu |
Added Altima Communications OUI and their AC101 10/100 media interface to the list of known chips.
miidevs.h regenerated also.
|
61290 |
05-Jun-2000 |
wpaul |
Don't bother checking the link state in dcphy_status() if the interface isn't up.
|
61110 |
31-May-2000 |
wpaul |
Rework the support for the internal autonegotiation on the 21143 and workalike chips (Macronix 98713A/98715 and PNIC II). Timing is somewhat critical: you need to bring the link as soon as possible after NWAY is done, and the old one second polling interval was too long. Now we poll every 10th of a second until NWAY completes (at which point we return to the 1 second interval again to keep an eye on the link state).
I tested all the other cards I had on hand to make sure I didn't bust any of them and they seem to work (including the MII-based 21143 card). This should fix some autoneg problems with DE500-BA cards and the built-in 10/100 ethernet on some alpha systems.
(Now before anyone asks why I never noticed this before, the old code worked just find with the Intel swich I used for testing back in NY. Apparently not all switches are as picky about the timing.)
|
60938 |
26-May-2000 |
jake |
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen.
Requested by: msmith and others
|
60833 |
23-May-2000 |
jake |
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk Reviewed by: phk Approved by: mdodd
|
59760 |
29-Apr-2000 |
phk |
Remove unneeded #include <sys/kernel.h>
|
59757 |
29-Apr-2000 |
peter |
Provide a tag so that miibus consumers can depend on the module, regardless of whether it is in a seperate .ko or the kernel (or in a .ko bundled with several other things in one file for packaging).
|
59477 |
22-Apr-2000 |
wpaul |
Add PHY drivers for the XMAC II's internal PHY and the Broadcom BCM5400 1000baseTX PHY. These will be used by the SysKonnect gigabit ethernet driver shortly.
|
59476 |
22-Apr-2000 |
wpaul |
Regenerate
|
59475 |
22-Apr-2000 |
wpaul |
Add entries for the XMAC II's internal PHY and the Broadcom BCM5400 1000baseTx PHY.
|
59391 |
19-Apr-2000 |
phk |
Remove ~25 unneeded #include <sys/conf.h> Remove ~60 unneeded #include <sys/malloc.h>
|
59235 |
14-Apr-2000 |
wpaul |
Change && to || in probe routine so that the mlphy driver doesn't incorrectly attach itself to ThunderLAN adapters which happen to have a PHY who's model number happens out to be 0.
Problem reported by: Peter L. Thomas <Pete@painless-computing.com>
|
59153 |
11-Apr-2000 |
semenu |
Added code to handle QS6612 PHY as standard NS PHY for support of tx driver.
|
59093 |
08-Apr-2000 |
dfr |
* Factor out the object system from new-bus so that it can be used by non-device code. * Re-implement the method dispatch to improve efficiency. The new system takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns slower than a direct function call on the same hardware.
This changes the new-bus ABI slightly so make sure you re-compile any driver modules which you use.
|
55205 |
29-Dec-1999 |
peter |
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
|
54577 |
13-Dec-1999 |
wpaul |
Fix some problems reported by Mike Pritchard:
- Add a flag DC_TX_INTR_ALWAYS which causes the transmit code to request a TX done interrupt for every packet. The PNIC seems to need this to insure that the sent TX buffers get reaped in a timely fashion.
- Try to unreset the SIA as soon as possible after resetting the whole chip.
- Change dcphy to support either 10/100 or 10Mbps only NICs. The built-in 21143 ethernet in Compaq Presario machines is 10Mbps only and it doesn't work right if we try to advertise 100Mbps modes during autoneg. When restricted to only 10mbps modes, it works fine.
Note that for now, I detect this condition by checking the PCI subsystem ID on this NIC (which has a Compaq vendor/device ID). Yes, I know that's what the SROM is supposed to be for. I'm deliberately ignoring the SROM wherever possible. Sue me.
The latter two fixes allow if_dc to work correctly with the built-in ethernet on certain Compaq Presario boxes. There are liable to be quite a few people using these as their home systems who might want to try FreeBSD; may as well be nice to them.
Now if anybody out there has an Alpha miata with 10Mbps ethernet and can show me the output from pciconf -l on their system, I'd be grateful.
|
54134 |
04-Dec-1999 |
wpaul |
Add the if_dc driver and remove all of the al, ax, dm, pn and mx drivers which it replaces. The new driver supports all of the chips supported by the ones it replaces, as well as many DEC/Intel 21143 10/100 cards.
This also completes my quest to convert things to miibus and add Alpha support.
|
54073 |
03-Dec-1999 |
mdodd |
Remove the 'ivars' arguement to device_add_child() and device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function.
This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc.
Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree.
Reviewed by: peter, dfr
|
52758 |
01-Nov-1999 |
wpaul |
Do some more work on the mxphy pseudo-driver to make it better at media detection and remove the long delays that I had used previously. Everything should be handled by timeouts now.
|
52282 |
16-Oct-1999 |
wpaul |
Convert the mx driver to miibus.
In order to make this work, I created a pseudo-PHY driver to deal with Macronix chips that use the built-in NWAY support and symbol mode port. This is actually all of them, with the exception of the original MX98713 which presents its NWAY support via the MII serial interface.
The mxphy driver actually manipulates the controller registers directly rather than using the miibus_readreg()/miibus_writereg() bus interface since there are no MII registers to read. The mx driver itself pretends that the NWAY interface is a PHY locayed at MII address 31 for the sole purpose of allowing the mxphy_probe() routine to know when it needs to attach to a host controller.
|
51428 |
19-Sep-1999 |
wpaul |
Allow the AMD PHY driver to support the DM9101 PHY. The DM9101 and the AMD AM79c873 have identical registers. I'm not sure why; one is probably a clone of the other.
|
50983 |
06-Sep-1999 |
wpaul |
Add a driver for the AMD AM79c873 10/100 PHY. By some strange coincidence, this PHY and the Davicom DM9101 have exactly the same register definitions. One of them is probably a clone of the other. I'm not sure which.
This is needed for the Davicom DM9102 10/100 PCI ethernet driver which will be committed shortly.
|
50959 |
05-Sep-1999 |
peter |
$Id$ -> $FreeBSD$
|
50758 |
01-Sep-1999 |
wpaul |
Re-arrange things in the attach routines of the 3Com and RealTek PHY drivers so that we don't clobber things or leave them uninitialized if we abort due a failure.
Submitted by: Luoqi Chen
|
50702 |
31-Aug-1999 |
wpaul |
Add a driver for the internal PHY in the RealTek 8139.
|
50578 |
29-Aug-1999 |
wpaul |
Regenerate miidevs.h.
|
50577 |
29-Aug-1999 |
wpaul |
The ASIC on the 3c905C appears to be manufactured by Broadcom (previous ones were made by Lucent). The Broadcom chip also appears to use an internal PHY made by Broadcom which uses the Broadcom OUI. This is different from previous ASICs which always returned 0 in the PHY ID registers. To account for this, I added the necessary ID values for the Broadcom PHY so that it can be detected and attached using the 3Com PHY driver instead of defaulting to the generic one.
|
50481 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$ (some mangled and/or hidden ones)
|
50480 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
50461 |
27-Aug-1999 |
wpaul |
Add miibus drivers for the ThunderLAN internal PHY and the Micro Linear ML6692 PHY. The Micro Linear driver is my own; the ThunderLAN driver is a port of the NetBSD driver with various hacks. The ML driver is necessary to support the Olicom OC-2326 ThunderLAN-based NIC.
Also regenerated miidevs.h to pick up the proper 'obtained from' revision string.
|
50391 |
26-Aug-1999 |
wpaul |
Handle buses with multiple PHYs correctly.
|
50138 |
22-Aug-1999 |
wpaul |
Crap, I knew I was going to forget something: add missing miibus method description file which slipped through the cracks.
Pointed out by: Doug <Doug@gorean.org>
|
50120 |
21-Aug-1999 |
wpaul |
This commit adds support for the NetBSD MII abstraction layer and MII-compliant PHY drivers. Many 10/100 ethernet NICs available today either use an MII transceiver or have built-in transceivers that can be programmed using an MII interface. It makes sense then to separate this support out into common code instead of duplicating it in all of the NIC drivers. The mii code also handles all of the media detection, selection and reporting via the ifmedia interface.
This is basically the same code from NetBSD's /sys/dev/mii, except it's been adapted to FreeBSD's bus architecture. The advantage to this is that it automatically allows everything to be turned into a loadable module. There are some common functions for use in drivers once an miibus has been attached (mii_mediachg(), mii_pollstat(), mii_tick()) as well as individual PHY drivers. There is also a generic driver for all PHYs that aren't handled by a specific driver. It's possible to do this because all 10/100 PHYs implement the same general register set in addition to their vendor-specific register sets, so for the most part you can use one driver for pretty much any PHY. There are a couple of oddball exceptions though, hence the need to have specific drivers.
There are two layers: the generic "miibus" layer and the PHY driver layer. The drivers are child devices of "miibus" and the "miibus" is a child of a given NIC driver. The "miibus" code and the PHY drivers can actually be compiled and kldoaded as completely separate modules or compiled together into one module. For the moment I'm using the latter approach since the code is relatively small.
Currently there are only three PHY drivers here: the generic driver, the built-in 3Com XL driver and the NS DP83840 driver. I'll be adding others later as I convert various NIC drivers to use this code.
I realize that I'm cvs adding this stuff instead of importing it onto a separate vendor branch, but in my opinion the import approach doesn't really offer any significant advantage: I'm going to be maintaining this stuff and writing my own PHY drivers one way or the other.
|