summaryrefslogtreecommitdiff
path: root/sys/dev/mii
AgeCommit message (Collapse)Author
2021-12-15Cosmetic change for the output of mii_get_descr().msaitoh
2021-11-05Don't power down the PHY when the interface goes down.msaitoh
- All of other PHY drivers don't power down the PHY. Do the same way. - At least, keeping the link is required for Intel AMT and WoL.
2021-08-25Add missing RCSID and __KERNEL_RCSID().andvar
2021-08-20fix various typos in comments and log messages.andvar
2021-08-07Merge thorpej-cfargs2.thorpej
2021-06-29Regen for new sys/dev/devlist2h.awkpgoyette
2021-06-29Rework the xxxVERBOSE option to share the common module-hook-basedpgoyette
verbose mechanism with MIIVERBOSE. This reduces some duplicated code and allows us to once again permit auto-unload of MIIVERBOSE. Change details: * Update dev/devlist2h.awk to accomodate miidevs, including generation of MII_STR_oui_model definitions and use of oui and model rather than vendor and product. This also changes the compressed data in the xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex digits long) * Update a couple of phy drivers to use new calls to get verbose data * Regen all of the xxxdevs{,_data}.h files (separate commit, coming very soon) * Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various DEV_VERBOSE_xxx macros * Update the pci, usb, and hdaudio code as needed, to #include the xxxdevs.h files (in order to get the proper printf format strings) * Since dev/dev_verbose.c now uses non-literal printf format strings, (to deal with the vendor/product vs oui/model issue), we need to make sure it gets compiled with -Wno-error=format-nonliteral, even in userland's libpci and librumpdev! * Bump kernel version for the change in module interfaces Welcome to 9.99.86! XXX It might be useful in the future to extend the MII_STR_oui_model XXX definitions to PCI as well (and perhaps USB and HDAUDIO). This XXX would allow for a single centralized location for the products' XXX descriptions, rather than being dispersed among individual XXX drivers' xxx_match tables.
2021-06-05Ooopppsss - typo!pgoyette
2021-06-05As with usbverbose and pciverbose, these modules are not safe to bepgoyette
auto-unloaded. Disable for now. All of these need to be updated with an appropriate refcount mechanism to ensure that the code and/or tables aren't unloaded while they are being used.
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2020-11-04 Fix a bug that "ifconfig xx0 media none" set LINK_STATE_UNKNOWN instead ofmsaitoh
LINK_STATE_DOWN. XXX We should check for other PHY drivers, too.
2020-10-20Add Intel I347-AT4.msaitoh
2020-09-16 Add a workaround for jumbo frame on PCH2 and newer. Tested by chs@.msaitoh
- Add wm_lv_jumbo_workaround_ich8lan() and use it. From FreeBSD. XXX For KUMCTRLSTA_OFFSET_HD_CTRL register modification, it's doubtful. FreeBSD and Linux do the same thing that they set the same value on both jumbo frame's enable case and the disable case. It seems the default value is 0x0b0c and it's not changed on the enable case, so it might be a bug on the enable case or the modification is not required. - Rename I219_UNKNOWN1 to I82579_UNKNOWN1.
2020-08-27Move mii_phy_statusmsg(sc) back to its original position. Fixeskardel
deafness bug on macppc reported and tested by martin@ Thanks !
2020-08-24Keep the change check invariant intact. The previous code could misskardel
status updates by picking up a new status different from the tested status. This left addresses in the DETACHED state although the link status is already UP again. addresses PR/kern 55538
2020-08-24 Remove extra PHY_RESET(sc) in the MII_TICK path because it's not requierdmsaitoh
to just restart autonego.
2020-08-24 Don't do full initialization for autonego when just restarting autonegomsaitoh
because it's not required. This change reduce extra initialization which include PHY_RESET() which caused long delay(max 500ms).
2020-08-04mii_knowndevs[] is de facto const, define it as such.uwe
This time for real. On my first try I did it in the generated miidevs_data.h file.
2020-08-03mii_knowndevs[] is de facto const, define it as such.uwe
2020-08-03Rename PSSR_* to MAKPHY_PSSR_* and IGPHY_PSSR_* to avoid conflict.msaitoh
No functional change.
2020-08-03s/MII_IGPHY_/IGPHY_/. No functional change.msaitoh
2020-07-07- Remove the waitfor argument from mii_phy_auto().msaitoh
- Whitespace fix.
2020-07-07- Call tlphy_auto correctly.msaitoh
- It's not required to do busy-wait by mii_phy_auto(sc, 1). Now there is no any PHY driver which calls mii_phy_auto(sc, 1).
2020-07-07"no media present" is intended case on tlphy(4), so don't usemsaitoh
aprint_error_dev().
2020-06-23Regen.msaitoh
2020-06-23 Add some Microsemi (Vitesse) devices.msaitoh
2020-05-25Add support for BCM54213PE RGMII clock delays, from OpenBSDjmcneill
2020-05-25Add MIIF_RXID and MIIF_TXID flags to signal that RX or TX delays are ↵jmcneill
required, from OpenBSD.
2020-04-08 Add two new RDC PHYs from Andrius V.msaitoh
2020-04-08 Regen.msaitoh
2020-04-08 Add two new RDC PHYs from Andrius V.msaitoh
2020-03-28Don't set DVF_DETACH_SHUTDOWN. The MII layer wants to manage the lifecyclethorpej
of the PHY devices, and if a NIC driver chooses not to detach its PHYs at shutdown, that's the driver's business. PR kern/55121.
2020-03-15Define and implement a locking protocol for the ifmedia / mii layers:thorpej
- MP-safe drivers provide a mutex to ifmedia that is used to serialize access to media-related structures / hardware regsiters. Converted drivers use the new ifmedia_init_with_lock() function for this. The new name is provided to ease the transition. - Un-converted drivers continue to call ifmedia_init(), which will supply a compatibility lock to be used instead. Several media-related entry points must be aware of this compatibility lock, and are able to acquire it recursively a limited number of times, if needed. This is a SPIN mutex with priority IPL_NET. - This same lock is used to serialize access to PHY registers and other MII-related data structures. The PHY drivers are modified to acquire and release the lock, as needed, and assert the lock is held as a diagnostic aid. The "usbnet" framework has had an overhaul of its internal locking protocols to fit in with the media / mii changes, and the drivers adapted. USB wifi drivers have been changed to provide their own adaptive mutex to the ifmedia later via a new ieee80211_media_init_with_lock() function. This is required because the USB drivers need an adaptive mutex. Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv. mcx also now calls ifmedia_init_with_lock() because it needs to also use an adaptive mutex. The mcx driver still needs to be fully converted to NET_MPSAFE.
2020-03-13Fix a bug that atphy(4) doesn't work with Attansic L2 rev. 1.msaitoh
Reported by Rocky Hotas. - On ASUS M2N-MX SE Plus (NVIDIA MCP61 with Attansic L2 rev. 1), changing debug port 0x29's value makes the next PHY read fail with error. Read any register to ignore this problem if the PHY is Attansic L2 revision 1. I don't know if this problem is from L2 rev. 1 itself or from the combination because I have only one machine which has L2 rev. "1". At least, ASUS eee pc 900 (Attansic L2 rev. "2") has no this problem. - Add comment. AR8021 document has no description about the power saving control register(debug port 0x29). - Add comment. AR8031 document says the lower 14 bits are reserved and the default value is 0x36d0. Shouldn't we clear those bits? - I have no document neither L1(F1) nor L2(F2), so I don't know whether the debug port access is correct or not. Tested with the following machines: - ASUS P5B SE, L1 rev. 5, age(4) - ASUS K50IJ, L1 rev. 9, ale(4) - ASUS eee pc 900, L2 rev. 2, lii(4) - ASUS M2N-MX SE Plus, L2 rev. 1, nfe(4) - Intel DP55WB, 82578(AR8021 rev. 2), wm(4) - Dell inspiron 14z, AR0835 rev. 9, alc(4)
2020-03-13Regen.msaitoh
2020-03-130x001374 is non-bitreversed value of Attansic OUI(0x00c82e).msaitoh
Attansic/Atheros correctly uses ID1 and ID2 register, so delete all 0x001374 related entries.
2020-03-13- Add Quake Technologies and Aeluros' OUImsaitoh
- Add Teranetics TN1010 10GBase-T PHY
2020-02-28 Move PHY_RESET() in the media change path from if_et.c to etphy.c.msaitoh
I don't know if the reset is required or not. I tested some media transitions without the reset and it worked. It might be OK to remove but Linux does it only in et1011c_config_aneg(). So move the reset to etphy_service(,,MII_MEDIACHG)'s autonego case. This change is also required for future locking changes.
2020-02-27 Regen.msaitoh
2020-02-27 Use xxVIA instead of VIA.msaitoh
0x004063 is VIA's official OUI but VT6103 use 0x0002c6. 0x0002c6 is non-bitreversed value of 0x004063. Reported by Andrius V.
2020-02-22Match BCM54213PEjmcneill
2020-02-22regenjmcneill
2020-02-22Add BCM54213PEjmcneill
2020-02-14unbreak the previous commit errornisimura
2020-02-14determine FDX flow control abilitiesnisimura
2020-02-14add missing two aprint_normal* linesnisimura
2020-02-05RDC -> xxRDC. No functional change.msaitoh
2020-02-05 Regen.msaitoh
2020-02-05 Change the OUI macro name of RDC to xxRDC. 0x00d02d is non-bitreverse valuemsaitoh
of official 0x000bb4. From Andrius V.
2020-01-28 Fix comment.msaitoh