summaryrefslogtreecommitdiff
path: root/sys/dev/mii/smscphy.c
AgeCommit message (Collapse)Author
2021-08-25Add missing RCSID and __KERNEL_RCSID().andvar
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.
2019-11-27- Simplify sc->mii_anegticks setting. Same as FreeBSD.msaitoh
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().
2019-11-01 Port SMSC LAN87xx 10/100 Ethernet PHY driver from FreeBSD with some cleanupmsaitoh
and IFM_NONE support.