Up to [cvs.NetBSD.org] / src / sys / arch / arm / amlogic
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Sync with HEAD.
Rework the xxxVERBOSE option to share the common module-hook-based 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.
Merge changes from current as of 20200406
Don't set DVF_DETACH_SHUTDOWN. The MII layer wants to manage the lifecycle 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.
Define and implement a locking protocol for the ifmedia / mii layers: - 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.
- Simplify sc->mii_anegticks setting. Same as FreeBSD. Don't set the default value not in the attach function. Instead, set the default value (MII_ANEGTICKS) first in the beginning of the mii_phy_add_media(). The function already has the code to change the value to MII_ANEGTICKS_GIGE if it's gigabit capable. - Remove extra pmf_device_register() call. It's done in mii_phy_add_media().
Sync with HEAD
file gxlphy.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
Add support for Meson GXL internal PHY.