The NetBSD Project

CVS log for src/sys/dev/usb/if_mue.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / usb

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.83 / (download) - annotate - [select for diffs], Mon Oct 31 21:22:06 2022 UTC (17 months, 2 weeks ago) by andvar
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored) to selected 1.73 (colored)

fix various typos in comments and one output message.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Aug 20 14:08:59 2022 UTC (19 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.81: +4 -4 lines
Diff to previous 1.81 (colored) to selected 1.73 (colored)

usbnet(9): New usbnet_ispromisc(un).

Replaces ifp->if_flags & IFF_PROMISC in multicast filter updates.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Mar 3 05:56:28 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored) to selected 1.73 (colored)

usbnet: Omit needless detachcv name parameter to usbnet_attach.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Mar 3 05:56:09 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) to selected 1.73 (colored)

usbnet: Factor usbnet_init_rx_tx out into usbnet_if_init.

Make it private; no need for drivers to call it any more.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Mar 3 05:55:19 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.78: +2 -6 lines
Diff to previous 1.78 (colored) to selected 1.73 (colored)

usbnet drivers: Prune dead IFF_RUNNING branches in *_uno_init.

usbnet(9) guarantees !IFF_RUNNING now before calling it.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Mar 3 05:55:01 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.77: +2 -7 lines
Diff to previous 1.77 (colored) to selected 1.73 (colored)

usbnet drivers: Omit needless isdying tests in *_uno_init.

usbnet(9) already checks this immediately before calling *_uno_init.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Mar 3 05:54:37 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.76: +2 -6 lines
Diff to previous 1.76 (colored) to selected 1.73 (colored)

usbnet drivers: Omit needless usbnet core lock and assertions.

During attach, the caller has exclusive access to the usbnet until
usbnet_attach_ifp.  At other times, register access is serialized
either by the usbnet multicast lock or by IFNET_LOCK.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Mar 3 05:54:21 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.75: +7 -3 lines
Diff to previous 1.75 (colored) to selected 1.73 (colored)

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.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Mar 3 05:54:03 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.74: +6 -2 lines
Diff to previous 1.74 (colored) to selected 1.73 (colored)

usbnet drivers: Assert IFNET_LOCKED in if ioctl routines.

These only happen either during the transition up or down (init or
stop), or while that transition is excluded (ioctl).

This may be called from ioctl or from init, which both hold the ifnet
lock.

XXX smsc_setoe_locked should maybe trigger reinit because the rx loop
behaves differently depending on whether checksumming is enabled.

XXX mue_sethwcsum_locked needs to exclude mcast updates.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Mar 3 05:53:33 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.73: +2 -5 lines
Diff to previous 1.73 (colored)

usbnet drivers: Omit redundant multicast filter update on init.

Revision 1.73 / (download) - annotate - [selected], Thu Mar 3 05:53:14 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.72: +6 -7 lines
Diff to previous 1.72 (colored)

usbnet drivers: Stop abusing ifp->if_flags & IFF_ALLMULTI.

This legacy flag is a figment of userland's imagination.  The actual
kernel state is ec->ec_flags & ETHER_F_ALLMULTI, protected by the
ETHER_LOCK, so that multicast filter updates -- which run without
IFNET_LOCK -- need not attempt to write racily to ifp->if_flags.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Mar 3 05:53:04 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.71: +6 -15 lines
Diff to previous 1.71 (colored) to selected 1.73 (colored)

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.

Revision 1.71 / (download) - annotate - [select for diffs], Thu Mar 3 05:52:46 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.70: +2 -6 lines
Diff to previous 1.70 (colored) to selected 1.73 (colored)

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.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Mar 3 05:52:35 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.69: +3 -13 lines
Diff to previous 1.69 (colored) to selected 1.73 (colored)

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.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Mar 3 05:51:35 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.68: +2 -4 lines
Diff to previous 1.68 (colored) to selected 1.73 (colored)

usbnet drivers: No need for usbnet_busy in uno_ioctl.

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 subnet
drivers touch the IFNET_LOCK except to verify it is held sometimes.)

Revision 1.68 / (download) - annotate - [select for diffs], Thu Mar 3 05:51:27 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.67: +2 -4 lines
Diff to previous 1.67 (colored) to selected 1.73 (colored)

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.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Mar 3 05:51:17 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.66: +2 -5 lines
Diff to previous 1.66 (colored) to selected 1.73 (colored)

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.)

Revision 1.66 / (download) - annotate - [select for diffs], Thu Mar 3 05:51:06 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.65: +18 -6 lines
Diff to previous 1.65 (colored) to selected 1.73 (colored)

usbnet: Split multicast filter reprogramming into separate operation.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Mar 3 05:50:57 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.64: +4 -2 lines
Diff to previous 1.64 (colored) to selected 1.73 (colored)

usbnet drivers: Stop timeout loops early if device is detaching.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Mar 3 05:50:22 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.63: +2 -4 lines
Diff to previous 1.63 (colored) to selected 1.73 (colored)

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.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Mar 3 05:48:06 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.62: +2 -4 lines
Diff to previous 1.62 (colored) to selected 1.73 (colored)

axen(4), mue(4), smsc(4): Omit irrelevant cases in ioctl.

SIOCSIFFLAGS and SIOCSETHERCAP always end up in ether_ioctl_reinit,
which triggers the same logic to reprogram the multicast filters
anyway.

Revision 1.60.6.1 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:31 2021 UTC (2 years, 8 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored) next main 1.61 (colored) to selected 1.73 (colored)

Sync with HEAD.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Jul 15 15:23:46 2021 UTC (2 years, 9 months ago) by nisimura
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.61: +77 -101 lines
Diff to previous 1.61 (colored) to selected 1.73 (colored)


back out the previous accidental commit

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jul 15 03:25:50 2021 UTC (2 years, 9 months ago) by nisimura
Branch: MAIN
Changes since 1.60: +103 -79 lines
Diff to previous 1.60 (colored) to selected 1.73 (colored)

explanation typo

Revision 1.60 / (download) - annotate - [select for diffs], Sat Jun 27 13:33:26 2020 UTC (3 years, 9 months ago) by jmcneill
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored) to selected 1.73 (colored)

prop_data_data_nocopy -> prop_data_value

Revision 1.50.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:49 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.50.2.2: +425 -1077 lines
Diff to previous 1.50.2.2 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored) to selected 1.73 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.59 / (download) - annotate - [select for diffs], Sun Mar 15 23:04:50 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.58: +50 -48 lines
Diff to previous 1.58 (colored) to selected 1.73 (colored)

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.

Revision 1.58 / (download) - annotate - [select for diffs], Fri Mar 13 18:17:40 2020 UTC (4 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.57: +7 -7 lines
Diff to previous 1.57 (colored) to selected 1.73 (colored)

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:16 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.56: +5 -5 lines
Diff to previous 1.56 (colored) next main 1.57 (colored) to selected 1.73 (colored)

Sync with head.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Jan 29 06:26:32 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.56: +5 -5 lines
Diff to previous 1.56 (colored) to selected 1.73 (colored)

Adopt <net/if_stats.h>.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 7 06:42:26 2020 UTC (4 years, 3 months ago) by maxv
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.55: +4 -4 lines
Diff to previous 1.55 (colored) to selected 1.73 (colored)

Localify, constify.

Revision 1.50.4.1 / (download) - annotate - [select for diffs], Sun Sep 1 13:00:37 2019 UTC (4 years, 7 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.50: +417 -1071 lines
Diff to previous 1.50 (colored) next main 1.51 (colored) to selected 1.73 (colored)

Pull up following revision(s) (requested by mrg in ticket #135):

	distrib/sets/lists/comp/mi			1.2279
	distrib/sets/lists/modules/mi			1.123
	share/man/man9/Makefile				1.438
	share/man/man9/usbnet.9				1.1-1.9
	sys/dev/ic/rndisreg.h				1.3
	sys/dev/usb/TODO				1.47-1.52
	sys/dev/usb/TODO.usbmp				1.15,1.16
	sys/dev/usb/files.usb				1.157-1.167
	sys/dev/usb/if_aue.c				1.155-1.161
	sys/dev/usb/if_auereg.h				1.30-1.32
	sys/dev/usb/if_axe.c				1.103-1.119
	sys/dev/usb/if_axen.c				1.51-1.53,1.55-1.67
	sys/dev/usb/if_axenreg.h			1.15
	sys/dev/usb/if_cdce.c				1.54-1.67
	sys/dev/usb/if_cue.c				1.85,1.86
	sys/dev/usb/if_cuereg.h				1.23
	sys/dev/usb/if_kue.c				1.97-1.100
	sys/dev/usb/if_kuereg.h				1.23,1.24
	sys/dev/usb/if_mue.c				1.51-1.55
	sys/dev/usb/if_muereg.h				1.6
	sys/dev/usb/if_muevar.h				1.9
	sys/dev/usb/if_smsc.c				1.46-1.61
	sys/dev/usb/if_smscreg.h			1.6
	sys/dev/usb/if_smscvar.h			delete
	sys/dev/usb/if_udav.c				1.60-1.71
	sys/dev/usb/if_udavreg.h			1.14,1.15
	sys/dev/usb/if_upl.c				1.65,1.66
	sys/dev/usb/if_ure.c				1.15-1.31
	sys/dev/usb/if_urevar.h				1.4,1.5
	sys/dev/usb/if_url.c				1.67-1.70
	sys/dev/usb/if_urlreg.h				1.14
	sys/dev/usb/if_urndis.c				1.22-1.33
	sys/dev/usb/if_urtwn.c				1.72
	sys/dev/usb/ohci.c				1.290
	sys/dev/usb/uhub.c				1.143
	sys/dev/usb/usb.c				1.180
	sys/dev/usb/usb.h				1.118
	sys/dev/usb/usb_mem.c				1.71
	sys/dev/usb/usb_subr.c				1.238,1.239
	sys/dev/usb/usbdevs				1.772
	sys/dev/usb/usbdi.c				1.183,1.186
	sys/dev/usb/usbdi.h				1.97
	sys/dev/usb/usbdi_util.c			1.75
	sys/dev/usb/usbhist.h				1.5,1.6
	sys/dev/usb/usbnet.c				1.1-1.24
	sys/dev/usb/usbnet.h				1.1-1.14
	sys/dev/usb/usbroothub.c			1.9
	sys/dev/usb/xhci.c				1.109,1.110
	sys/modules/Makefile				1.223
	sys/modules/usbnet/Makefile			1.1

usbnet(9): Add common framework for USB network devices.
This bring various safety fixes to all updated drivers,
and includes locking clean up, detach safety when being
used or not, separate rx/tx locks to improve performance,
porting to NET_MPSAFE, many edge/error case bugs in
drivers fixed, as well as resovling PRs 54303 and 54308.
These drivers are converted: axe(4), axen(4), aue(4),
cdce(4), cue(4), kue(4), mue(4), smsc(4), udav(4),
upl(4), ure(4), url(4), and urndis(4).

Revision 1.55 / (download) - annotate - [select for diffs], Fri Aug 23 04:32:57 2019 UTC (4 years, 7 months ago) by mrg
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored) to selected 1.73 (colored)

s/UBSNET_MII_DECL_DEFAULT/USBNET_MII_DECL_DEFAULT/.  from sc.dying.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Aug 20 06:37:06 2019 UTC (4 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.53: +17 -16 lines
Diff to previous 1.53 (colored) to selected 1.73 (colored)

couple more changes to usbnet(9):

- MII read/write reg return int instead of usbd_status (requested by skrll)
- usbnet_attach_ifp(9) changes arg, two mii-specific flags are placed by a
  pointer to new struct usbnet_mii.  if not NULL, then attach an MII to this
  interface like previous have_mii parameter.  use this to allow ure(4) to
  properly pass PHY location to mii_attach().

welcome netbsd 9.99.10.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Aug 19 07:33:37 2019 UTC (4 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.52: +8 -2 lines
Diff to previous 1.52 (colored) to selected 1.73 (colored)

move the check against un_phyno from usbnet back into the drivers
that do this (axe, axen, mue, smsc, ure.)  it made mii scanning
only work for phy 0, and aue needs it for at least one device.

fix smsc to return usbd_status not -1 on failure.  XXX smsc was
writing to '*val' even in error cases, it does not now.

remove a double call to IFQ_SET_READY() (noticed by chuq).

avoid unlock+instant relock by using usbnet_lock_mii_un_locked().

Revision 1.52 / (download) - annotate - [select for diffs], Thu Aug 15 08:02:32 2019 UTC (4 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.51: +414 -1060 lines
Diff to previous 1.51 (colored) to selected 1.73 (colored)

port cue(4), mue(4) and url(4) to usbnet(9).  diffstat says:

8 files changed, 911 insertions(+), 3087 deletions(-)

Revision 1.51 / (download) - annotate - [select for diffs], Thu Aug 1 00:10:22 2019 UTC (4 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.50: +5 -20 lines
Diff to previous 1.50 (colored) to selected 1.73 (colored)

remove unused code and use common ethernet media code where equivalent.

Revision 1.50.2.2 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:33 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.50.2.1: +1974 -0 lines
Diff to previous 1.50.2.1 (colored) to branchpoint 1.50 (colored) to selected 1.73 (colored)

Sync with HEAD

Revision 1.50.2.1, Wed May 29 09:04:01 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.50: +0 -1974 lines
FILE REMOVED

file if_mue.c was added on branch phil-wifi on 2019-06-10 22:07:33 +0000

Revision 1.50 / (download) - annotate - [select for diffs], Wed May 29 09:04:01 2019 UTC (4 years, 10 months ago) by mlelstv
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base
Branch point for: phil-wifi, netbsd-9
Changes since 1.49: +5 -4 lines
Diff to previous 1.49 (colored) to selected 1.73 (colored)

don't use a spin lock, the USB host driver may need to take other locks.
stop watchdog timer early to prevent calling txeof twice.
allow more output after USB error by clearing OACTIVE in error path.

Revision 1.49 / (download) - annotate - [select for diffs], Wed May 29 08:23:54 2019 UTC (4 years, 10 months ago) by mlelstv
Branch: MAIN
Changes since 1.48: +5 -5 lines
Diff to previous 1.48 (colored) to selected 1.73 (colored)

mutexes are destroyed unconditionally in detach, so also init them
unconditionally.

Revision 1.48 / (download) - annotate - [select for diffs], Tue May 28 07:41:50 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.47: +7 -3 lines
Diff to previous 1.47 (colored) to selected 1.73 (colored)

 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.

Revision 1.47 / (download) - annotate - [select for diffs], Sun May 26 17:48:47 2019 UTC (4 years, 10 months ago) by mlelstv
Branch: MAIN
Changes since 1.46: +3 -2 lines
Diff to previous 1.46 (colored) to selected 1.73 (colored)

Also destroy the mutex. Thanks chs@ for noticing.

Revision 1.46 / (download) - annotate - [select for diffs], Sun May 26 04:52:07 2019 UTC (4 years, 10 months ago) by mlelstv
Branch: MAIN
Changes since 1.45: +8 -4 lines
Diff to previous 1.45 (colored) to selected 1.73 (colored)

usbd_transfer may sleep, add a mutex to prevent a race in mue_start.

Revision 1.45 / (download) - annotate - [select for diffs], Thu May 23 13:10:52 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.44: +7 -6 lines
Diff to previous 1.44 (colored) to selected 1.73 (colored)

 Whitespace fix (mainly tabify).

Revision 1.44 / (download) - annotate - [select for diffs], Thu May 23 10:57:29 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.43: +10 -10 lines
Diff to previous 1.43 (colored) to selected 1.73 (colored)

-No functional change:
  - KNF
  - u_int*_t -> uint*_t.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Mar 5 08:25:03 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.42: +2 -4 lines
Diff to previous 1.42 (colored) to selected 1.73 (colored)

 Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes
if_upgt.c's ETHER_ALIGN from 0 to 2.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Mar 5 08:17:44 2019 UTC (5 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored) to selected 1.73 (colored)

Avoid unitialized use warning.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Feb 6 22:54:41 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.40: +8 -9 lines
Diff to previous 1.40 (colored) to selected 1.73 (colored)

Fix sign compare differently; instead of casting from int to unsigned,
casting from sizeof (and friends) to int.

Suggested by joerg@.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Feb 6 22:42:11 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.39: +6 -6 lines
Diff to previous 1.39 (colored) to selected 1.73 (colored)

We cannot use DPRINTF(sc, ...) when sc is not initialized.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Feb 6 09:15:01 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.38: +5 -5 lines
Diff to previous 1.38 (colored) to selected 1.73 (colored)

Fix sign compare.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Feb 6 08:38:41 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.37: +4 -3 lines
Diff to previous 1.37 (colored) to selected 1.73 (colored)

Add ratecheck for TX errors for axen(4) and mue(4).

Revision 1.37 / (download) - annotate - [select for diffs], Wed Feb 6 08:31:38 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.36: +38 -18 lines
Diff to previous 1.36 (colored) to selected 1.73 (colored)

Fix TSO support:
- Rename mue_tx_offload() to mue_tso_prepare().
- Take care of short mbuf's (paranoia).

Revision 1.36 / (download) - annotate - [select for diffs], Wed Feb 6 08:28:11 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.35: +2 -7 lines
Diff to previous 1.35 (colored) to selected 1.73 (colored)

Remove unused.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Feb 6 08:26:30 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.34: +2 -7 lines
Diff to previous 1.34 (colored) to selected 1.73 (colored)

SIOC[GS]IFMEDIA are processed in ether_ioctl().

Revision 1.34 / (download) - annotate - [select for diffs], Wed Feb 6 08:23:08 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.33: +24 -8 lines
Diff to previous 1.33 (colored) to selected 1.73 (colored)

Fix NULL checks after dereference.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Feb 6 08:20:23 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.32: +15 -12 lines
Diff to previous 1.32 (colored) to selected 1.73 (colored)

Cosmetic changes; no functional changes.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Feb 6 08:16:49 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.31: +8 -4 lines
Diff to previous 1.31 (colored) to selected 1.73 (colored)

Fix panic when detach or "ifconfig down" for axen(4) and mue(4).
- Mitigate race conditions, that become critical when multiple outstanding
  transfers are enabled.
- Drop link flags earlier in foo_stop() to make sure (paranoia).

Revision 1.31 / (download) - annotate - [select for diffs], Sun Feb 3 13:11:07 2019 UTC (5 years, 2 months ago) by mlelstv
Branch: MAIN
Changes since 1.30: +24 -21 lines
Diff to previous 1.30 (colored) to selected 1.73 (colored)

Make size of transmit/receive queues variable. Restrict queue size again
to 1 for LAN7500 as some chips fail.

Read Chip revision register and report value. Maybe we can identify
chisp better now.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jan 31 05:25:48 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored) to selected 1.73 (colored)

Add missing callout_destroy() in mue_detach().

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jan 30 11:11:45 2019 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.28: +18 -12 lines
Diff to previous 1.28 (colored) to selected 1.73 (colored)

Fix mue_sethwcsum():
- Check appropriate flags to enable RX checksum offloading.
- We don't support ICMP/IGMP checksum offloading.

Tested both on LAN7800 and 7500.

Revision 1.6.2.6 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:24 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.6.2.5: +29 -21 lines
Diff to previous 1.6.2.5 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored) to selected 1.73 (colored)

Sync with HEAD

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 22 03:42:28 2019 UTC (5 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-20190127
Changes since 1.27: +29 -21 lines
Diff to previous 1.27 (colored) to selected 1.73 (colored)

 Change MII PHY read/write API from:

	int (*mii_readreg_t)(device_t, int, int);
	void (*mii_writereg_t)(device_t, int, int, int);
to:

	int (*mii_readreg_t)(device_t, int, int, uint16_t *);
	int (*mii_writereg_t)(device_t, int, int, uint16_t);

Now we can test if a read/write operation failed or not by the return value.

 In 802.3 spec says that the PHY shall not respond to read/write transaction
to the unimplemented register(22.2.4.3). Detecting timeout can be used to
check whether a register is implemented or not (if the register conforms to
the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.

 Note that I noticed that the following code do infinite loop in the
read/wirte function. If it accesses unimplemented PHY register, it will hang.
It should be fixed:

	arm/at91/at91emac.c
	arm/ep93xx/epe.c
	arm/omap/omapl1x_emac.c
	mips/ralink/ralink_eth.c
	arch/powerpc/booke/dev/pq3etsec.c(read)
	dev/cadence/if_cemac.c <- hkenken
	dev/ic/lan9118.c


Tested with the following device:

	axe+ukphy
	axe+rgephy
	axen+rgephy	(tested by Andrius V)
	wm+atphy
	wm+ukphy
	wm+igphy
	wm+ihphy
	wm+makphy
	sk+makphy
	sk+brgphy
	sk+gentbi
	msk+makphy
	sip+icsphy
	sip+ukphy
	re+rgephy
	bge+brgphy
	bnx+brgphy
	gsip+gphyter
	rtk+rlphy
	fxp+inphy	(tested by Andrius V)
	tlp+acphy
	ex+exphy
	epic+qsphy
	vge+ciphy	(tested by Andrius V)
	vr+ukphy	(tested by Andrius V)
	vte+ukphy	(tested by Andrius V)

Not tested (MAC):
	arm:at91emac
	arm:cemac
	arm:epe
	arm:geminigmac
	arm:enet
	arm:cpsw
	arm:emac(omac)
	arm:emac(sunxi)
	arm:npe
	evbppc:temac
	macppc:bm
	macppc:gm
	mips:aumac
	mips:ae
	mips:cnmac
	mips:reth
	mips:sbmac
	playstation2:smap
	powerpc:tsec
	powerpc:emac(ibm4xx)
	sgimips:mec
	sparc:be
	sf
	ne(ax88190, dl10019)
	awge
	ep
	gem
	hme
	smsh
	mtd
	sm
	age
	alc
	ale
	bce
	cas
	et
	jme
	lii
	nfe
	pcn
	ste
	stge
	tl
	xi
	aue
	mue
	smsc
	udav
	url

Not tested (PHY):
	amhphy
	bmtphy
	dmphy
	etphy
	glxtphy
	ikphy
	iophy
	lxtphy
	nsphyter
	pnaphy
	rdcphy
	sqphy
	tlphy
	tqphy
	urlphy

Revision 1.6.2.5 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:43 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.4: +41 -35 lines
Diff to previous 1.6.2.4 (colored) to branchpoint 1.6 (colored) to selected 1.73 (colored)

Synch with HEAD

Revision 1.27 / (download) - annotate - [select for diffs], Sat Jan 5 07:56:07 2019 UTC (5 years, 3 months ago) by mlelstv
Branch: MAIN
CVS Tags: pgoyette-compat-20190118
Changes since 1.26: +30 -16 lines
Diff to previous 1.26 (colored) to selected 1.73 (colored)

Enable multiple outstanding transfers.

iperf3 now shows 250MBit/s for sending and 225MBit/s for receiving.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Dec 28 22:55:20 2018 UTC (5 years, 3 months ago) by rin
Branch: MAIN
Changes since 1.25: +13 -21 lines
Diff to previous 1.25 (colored) to selected 1.73 (colored)

Define DPRINTF() as __nothing when !USB_DEBUG. Drop excess braces.

No functional changes intended.

Revision 1.6.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:01 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.3: +109 -34 lines
Diff to previous 1.6.2.3 (colored) to branchpoint 1.6 (colored) to selected 1.73 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.25 / (download) - annotate - [select for diffs], Sat Dec 22 16:58:51 2018 UTC (5 years, 3 months ago) by rin
Branch: MAIN
CVS Tags: pgoyette-compat-1226
Changes since 1.24: +7 -6 lines
Diff to previous 1.24 (colored) to selected 1.73 (colored)

Fix previous; We also need to turn off IFF_ALLMULTI bit when
it is disabled.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Dec 20 02:52:59 2018 UTC (5 years, 3 months ago) by rin
Branch: MAIN
Changes since 1.23: +4 -3 lines
Diff to previous 1.23 (colored) to selected 1.73 (colored)

Set IFF_ALLMULTI bit appropriately when we fall back to "allmulti".

Revision 1.23 / (download) - annotate - [select for diffs], Tue Dec 11 16:45:49 2018 UTC (5 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (colored) to selected 1.73 (colored)

Avoid signed/unsigned comparision (if_mtu is uint64_t)

Revision 1.22 / (download) - annotate - [select for diffs], Tue Dec 11 13:35:02 2018 UTC (5 years, 4 months ago) by rin
Branch: MAIN
Changes since 1.21: +40 -17 lines
Diff to previous 1.21 (colored) to selected 1.73 (colored)

Determine the frame size as a function of MTU.

XXX Jumbo frame is not yet supported.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Dec 11 09:05:50 2018 UTC (5 years, 4 months ago) by rin
Branch: MAIN
Changes since 1.20: +7 -8 lines
Diff to previous 1.20 (colored) to selected 1.73 (colored)

Stop assigning random MAC address when it cannot be obtained from H/W.
It was intended only for debugging.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Dec 11 08:16:57 2018 UTC (5 years, 4 months ago) by rin
Branch: MAIN
Changes since 1.19: +61 -11 lines
Diff to previous 1.19 (colored) to selected 1.73 (colored)

Support checksum offloading for mue(4) by Robert Swindells
and adjusted by myself.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Dec 4 01:35:15 2018 UTC (5 years, 4 months ago) by rin
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored) to selected 1.73 (colored)

Remove duplicate ;'s. No binary changes intended.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:51 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.2: +66 -72 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored) to selected 1.73 (colored)

Ssync with HEAD

Revision 1.18 / (download) - annotate - [select for diffs], Sun Sep 16 02:00:36 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.17: +10 -10 lines
Diff to previous 1.17 (colored) to selected 1.73 (colored)

Style. No functional changes.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Sep 16 01:56:29 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.16: +4 -3 lines
Diff to previous 1.16 (colored) to selected 1.73 (colored)

Check range of EEPROM address rather truncate implicitly.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Sep 16 01:44:11 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored) to selected 1.73 (colored)

Correct nonsense message in KASSERTMSG.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Sep 16 01:41:28 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.14: +13 -14 lines
Diff to previous 1.14 (colored) to selected 1.73 (colored)

- Style (total_len ---> totlen).
- Fix printf format (totlen is unsigned).

Revision 1.14 / (download) - annotate - [select for diffs], Sun Sep 16 01:29:28 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.13: +3 -4 lines
Diff to previous 1.13 (colored) to selected 1.73 (colored)

Do not turn on IFF_OACTIVE if transfer fails.
Remove redundant error message.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Sep 16 01:27:21 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.12: +3 -16 lines
Diff to previous 1.12 (colored) to selected 1.73 (colored)

Drop wrong KASSERT; we don't need TCP headers here.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Sep 16 01:23:09 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.11: +28 -21 lines
Diff to previous 1.11 (colored) to selected 1.73 (colored)

Rewrite mue_encap(); drop too long packets rather than panic.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Sep 16 01:18:30 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) to selected 1.73 (colored)

Allow ethernet frame with VLAN tag.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Sep 16 01:13:26 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) to selected 1.73 (colored)

Correct lower bound of RX packet length; don't forget FCS.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Sep 16 01:07:38 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.8: +12 -11 lines
Diff to previous 1.8 (colored) to selected 1.73 (colored)

- Improve error messages.
- Switch from debug printf to normal printf for real errors.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Sep 16 00:58:47 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.7: +6 -5 lines
Diff to previous 1.7 (colored) to selected 1.73 (colored)

Use proper integer types.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Sep 16 00:55:16 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.6: +3 -4 lines
Diff to previous 1.6 (colored) to selected 1.73 (colored)

Style. No binary changes.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:04 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.1: +1839 -0 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) to selected 1.73 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.6.2.1, Sat Sep 1 09:57:12 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6: +0 -1839 lines
FILE REMOVED

file if_mue.c was added on branch pgoyette-compat on 2018-09-06 06:56:04 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Sat Sep 1 09:57:12 2018 UTC (5 years, 7 months ago) by mlelstv
Branch: MAIN
CVS Tags: pgoyette-compat-0906
Branch point for: pgoyette-compat
Changes since 1.5: +5 -5 lines
Diff to previous 1.5 (colored) to selected 1.73 (colored)

fix diagnostic build.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Aug 31 11:21:00 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
CVS Tags: jdolecek-ncqfixes-base, jdolecek-ncqfixes
Changes since 1.4: +6 -7 lines
Diff to previous 1.4 (colored) to selected 1.73 (colored)

Convert debug printf to KASSERTMSG for check of RX buffer length.
Also turn KASSERT into KASSERTMSG for that of TX buffer.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Aug 30 09:59:12 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored) to selected 1.73 (colored)

Check buffer length before copy.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Aug 30 09:00:08 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.2: +83 -16 lines
Diff to previous 1.2 (colored) to selected 1.73 (colored)

Support added for TCP segmentation offload (TSO).
Improve TX performance around 10% if enabled.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Aug 27 14:59:04 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored) to selected 1.73 (colored)

Check ifp->if_capenable, not ifp->if_capabilities, when enable some features.
Not a real problem since ifp->if_capabilities = 0 at the moment.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Aug 25 20:12:22 2018 UTC (5 years, 7 months ago) by rin
Branch: MAIN
Diff to selected 1.73 (colored)

Add mue(4), driver for Microchip LAN75xx/LAN78xx known as internal NIC of
Raspberry Pi 3 B+, from OpenBSD.

Tested on Raspberry Pi 3 B+ (LAN7800) and Z-TEK ZE582 (LAN7500).

* BUGS/TODO

- If the media type is set to something other than 1000baseT-FDX, data
  transmission becomes quite unstable. Also, ukphy(4) recognize 1000baseT as
  a supported media type, but it is not in fact.

- Catch up with changes made to usmsc(4) in nick-nhusb branch, i.e.,
  make the driver MP-safe.

- Support RX/VLAN/TX chekcsum offloading.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>