Home | History | Annotate | Download | only in usb
History log of /src/sys/dev/usb/if_mos.c
RevisionDateAuthorComments
 1.24  10-Oct-2022  martin ETHERCAP_VLAN_MTU does not go into ifp->if_capabilities but ethercom
ec_capabilities instead.
 1.23  20-Aug-2022  riastradh usbnet(9): New usbnet_ispromisc(un).

Replaces ifp->if_flags & IFF_PROMISC in multicast filter updates.
 1.22  03-Mar-2022  riastradh usbnet: Omit needless detachcv name parameter to usbnet_attach.
 1.21  03-Mar-2022  riastradh usbnet: Factor usbnet_init_rx_tx out into usbnet_if_init.

Make it private; no need for drivers to call it any more.
 1.20  03-Mar-2022  riastradh usbnet drivers: Omit redundant device reset via *_uno_stop on init.

Only those drivers where *_uno_stop is just *_reset, and *_uno_init
immediately calls *_reset afterward, are affected.
 1.19  03-Mar-2022  riastradh usbnet drivers: From *_uno_init, call *_uno_stop, not usbnet_stop.

Make usbnet_stop private now that no drivers use it.

None of the driver-independent logic in usbnet_stop has any effect at
this point because we are guaranteed not to be running, so only the
driver-dependent logic in *_uno_stop (at most) is needed.

For drivers with no *_uno_stop, just omit the call to usbnet_stop
altogether.

Some of this logic is obviously redundant with the subsequent call to
*_reset -- to be addressed in a subsequent commit.
 1.18  03-Mar-2022  riastradh usbnet drivers: Omit needless isdying tests in *_uno_init.

usbnet(9) already checks this immediately before calling *_uno_init.
 1.17  03-Mar-2022  riastradh usbnet drivers: Avoid undefined behaviour if read reg fails.

Some callers don't check the error code, e.g. ~all the mii phy
drivers using PHY_READ. Just return zero if the device is gone or
the xfer fails for any other reason.
 1.16  03-Mar-2022  riastradh usbnet drivers: Omit redundant multicast filter update on init.
 1.15  03-Mar-2022  riastradh usbnet drivers: Omit needless uno_mcast locked subroutines.

uno_mcast is now called with the core lock already held so there is
no need for a separate locked subroutine.
 1.14  03-Mar-2022  riastradh usbnet: Take the core lock around uno_mcast.

Every driver does this already. This will enable us to change the
lock that serializes access to the registers so we can go back to
doing this synchronously in SIOCADDMULTI/SIOCDELMULTI.
 1.13  03-Mar-2022  riastradh usbnet drivers: Omit needless uno_init locked subroutines.

uno_init is now called with the core lock already held so there is no
need for a separate locked subroutine.
 1.12  03-Mar-2022  riastradh usbnet drivers: No need for usbnet_busy in uno_mcast.

This callback always runs with IFNET_LOCK held, and during a task
that usbnet_detach prevents scheduling anew and waits for finishing
before completing the detach, so there is no need to hang onto a
reference count here.
 1.11  03-Mar-2022  riastradh usbnet drivers: No need for usbnet_busy in uno_init.

This callback always runs with the IFNET_LOCK held, and the interface
cannot be detached until the IFNET_LOCK is released, so there is no
need to hang onto a reference count here. (None of the usbnet
drivers touch the IFNET_LOCK except to verify it is held sometimes.)
 1.10  03-Mar-2022  riastradh usbnet: Split multicast filter reprogramming into separate operation.
 1.9  03-Mar-2022  riastradh usbnet drivers: Stop timeout loops early if device is detaching.
 1.8  03-Mar-2022  riastradh usbnet: Enter uno_init with the core lock held.

This reduces code in all drivers except urndis(4) and aue(4).

However, it's still safe for urndis to drop the core lock because the
ifnet is locked, and the ifnet lock covers the DOWN->UP (uno_init)
and UP->DOWN (uno_stop) transitions.
 1.7  02-Apr-2020  nisimura branches: 1.7.4;
iron out multicast filter logic and pick better name for its work
 1.6  31-Mar-2020  nisimura iron out multicast filter logic and pick better name for its work
 1.5  15-Mar-2020  thorpej 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.
 1.4  29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.3  07-Jan-2020  maxv branches: 1.3.2;
Localify, constify.
 1.2  06-Jan-2020  msaitoh Fix a bug that IFF_ALLMULTI is almost always set.
 1.1  20-Sep-2019  mrg add mos(4) driver for Moschip MCS7730/MCS7830/MCS7832 usb ethernet.
ported from openbsd. usbnet version loses about 40% of code.
 1.3.2.1  29-Feb-2020  ad Sync with head.
 1.7.4.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.4.1  02-Apr-2020  martin file if_mos.c was added on branch phil-wifi on 2020-04-13 08:04:49 +0000

RSS XML Feed