The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25.8.2 / (download) - annotate - [select for diffs], Thu Nov 16 05:13:13 2023 UTC (5 months ago) by thorpej
Branch: thorpej-ifq
Changes since 1.25.8.1: +3 -3 lines
Diff to previous 1.25.8.1 (colored) to branchpoint 1.25 (colored) to selected 1.8.4.2 (colored)

if_transmit_lock() and if_enqueue() are equivalent.  if_enqueue() is
a better name, so collapse everything down to that and garbage-collect
if_transmit_lock().

Revision 1.25.8.1 / (download) - annotate - [select for diffs], Thu Nov 16 04:30:21 2023 UTC (5 months ago) by thorpej
Branch: thorpej-ifq
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored) to selected 1.8.4.2 (colored)

IFQ_CLASSIFY() -> ifq_classify_packet().

Revision 1.25 / (download) - annotate - [select for diffs], Sat Aug 20 11:32:08 2022 UTC (19 months, 4 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, 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, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Branch point for: thorpej-ifq
Changes since 1.24: +3 -10 lines
Diff to previous 1.24 (colored) to selected 1.8.4.2 (colored)

umb(4): Use usbd_do_request as drivers are intended to do.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Apr 17 13:17:56 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.23: +5 -4 lines
Diff to previous 1.23 (colored) to selected 1.8.4.2 (colored)

umb(4): Use memcpy, not potentially unaligned/aliased casts.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Apr 17 13:17:40 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.22: +12 -2 lines
Diff to previous 1.22 (colored) to selected 1.8.4.2 (colored)

umb(4): Validate descriptor lengths.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Apr 17 13:15:27 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.21: +5 -3 lines
Diff to previous 1.21 (colored) to selected 1.8.4.2 (colored)

umb(4): Use usb_cdc_descriptor_t for bDescriptorSubtype.

Note: This needs more length validation!  TBD in a separate commit.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Sep 21 14:49:01 2021 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored) to selected 1.8.4.2 (colored)

don't opencode kauth_cred_get()

Revision 1.19.8.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:30 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.19: +3 -9 lines
Diff to previous 1.19 (colored) next main 1.20 (colored) to selected 1.8.4.2 (colored)

Sync w/ HEAD.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jun 16 00:21:19 2021 UTC (2 years, 10 months ago) by riastradh
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.19: +3 -9 lines
Diff to previous 1.19 (colored) to selected 1.8.4.2 (colored)

if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around.  And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail.  (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint.  This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken.  However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.

Revision 1.8.4.4 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:49 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.8.4.3: +9 -9 lines
Diff to previous 1.8.4.3 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.8.4.2 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.8.4.3 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:13 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.8.4.2: +36 -29 lines
Diff to previous 1.8.4.2 (colored) to branchpoint 1.8 (colored)

Merge changes from current as of 20200406

Revision 1.19 / (download) - annotate - [select for diffs], Tue Mar 24 07:12:16 2020 UTC (4 years ago) by maxv
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Branch point for: thorpej-i2c-spi-conf
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored) to selected 1.8.4.2 (colored)

Fix type confusion. Found by kASan when doing a normal attach+detach over
vHCI.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Mar 21 06:55:13 2020 UTC (4 years ago) by skrll
Branch: MAIN
Changes since 1.17: +5 -5 lines
Diff to previous 1.17 (colored) to selected 1.8.4.2 (colored)

KNF

Revision 1.17 / (download) - annotate - [select for diffs], Thu Mar 19 07:51:22 2020 UTC (4 years, 1 month ago) by khorben
Branch: MAIN
Changes since 1.16: +6 -7 lines
Diff to previous 1.16 (colored) to selected 1.8.4.2 (colored)

Only set the IPv4 address in umb(4) if both MBIM_IPCONF_HAS_ADDRINFO and
MBIM_IPCONF_HAS_GWINFO are available. Configuring umb(4) without gateway
wont work the system needs a destination address for the interface.
Problem found by jsg@.
OK jsg@ deraadt@

From OpenBSD.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Mar 19 07:50:27 2020 UTC (4 years, 1 month ago) by khorben
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored) to selected 1.8.4.2 (colored)

turn the success paths of FCC registration into debug prints. The
(unlikely) failure path remains noisy.
discussed with claudio

From OpenBSD.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Mar 19 07:49:29 2020 UTC (4 years, 1 month ago) by khorben
Branch: MAIN
Changes since 1.14: +6 -3 lines
Diff to previous 1.14 (colored) to selected 1.8.4.2 (colored)

When there is no network around the state timeout fires over and over again.
Change the printf into a log and only under IFF_DEBUG to reduce dmesg spam.
Loudly requested by beck@ OK deraadt@

From OpenBSD.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Mar 14 02:35:33 2020 UTC (4 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.13: +6 -6 lines
Diff to previous 1.13 (colored) to selected 1.8.4.2 (colored)

revert the 0x% -> %# change for fixed width formats pointed out by uwe.

Revision 1.13 / (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.12: +11 -11 lines
Diff to previous 1.12 (colored) to selected 1.8.4.2 (colored)

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

Revision 1.10.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.10: +11 -12 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.8.4.2 (colored)

Sync with head.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Feb 4 05:46: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.11: +3 -3 lines
Diff to previous 1.11 (colored) to selected 1.8.4.2 (colored)

Use ifmedia_fini().

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jan 29 06:35:28 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.10: +10 -11 lines
Diff to previous 1.10 (colored) to selected 1.8.4.2 (colored)

Adopt <net/if_stats.h>.

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Tue Dec 17 16:12:53 2019 UTC (4 years, 4 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
Changes since 1.9: +8 -2 lines
Diff to previous 1.9 (colored) next main 1.10 (colored) to selected 1.8.4.2 (colored)

Pull up following revision(s) (requested by christos in ticket #569):

	sys/dev/usb/if_umb.c: revision 1.10
	sys/net/if.c: revision 1.466
	sys/dev/ic/ath.c: revision 1.129

Protect network ioctls from non-authorized users. (Ilja Van Sprundel)

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 17 04:54:36 2019 UTC (4 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.9: +8 -2 lines
Diff to previous 1.9 (colored) to selected 1.8.4.2 (colored)

Protect network ioctls from non-authorized users. (Ilja Van Sprundel)

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jun 26 22:58:58 2019 UTC (4 years, 9 months ago) by khorben
Branch: MAIN
CVS Tags: phil-wifi-20191119, netbsd-9-base, netbsd-9-0-RC1
Branch point for: netbsd-9
Changes since 1.8: +11 -11 lines
Diff to previous 1.8 (colored) to selected 1.8.4.2 (colored)

Fix typos

Some were found by OpenBSD.

Revision 1.8.4.2 / (download) - annotate - [selected], Mon Jun 10 22:07:33 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.8.4.1: +2881 -0 lines
Diff to previous 1.8.4.1 (colored) to branchpoint 1.8 (colored)

Sync with HEAD

Revision 1.8.4.1, Sun Jan 27 02:08:42 2019 UTC (5 years, 2 months ago) by christos
Branch: phil-wifi
Changes since 1.8: +0 -2881 lines
FILE REMOVED

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

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:42 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: phil-wifi-20190609, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.8.4.2 (colored)

Merge the [pgoyette-compat] branch

Revision 1.4.4.4 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:47 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.4.4.3: +3 -3 lines
Diff to previous 1.4.4.3 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.8.4.2 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.7 / (download) - annotate - [select for diffs], Thu Nov 15 10:56:30 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored) to selected 1.8.4.2 (colored)

Remove the 'copy' argument from m_devget(), unused. While here rename
off0->off.

Revision 1.4.4.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.4.4.2: +17 -18 lines
Diff to previous 1.4.4.2 (colored) to branchpoint 1.4 (colored) to selected 1.8.4.2 (colored)

Ssync with HEAD

Revision 1.6 / (download) - annotate - [select for diffs], Thu Sep 20 09:48:54 2018 UTC (5 years, 6 months ago) by khorben
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.5: +13 -10 lines
Diff to previous 1.5 (colored) to selected 1.8.4.2 (colored)

Prevent a panic in umb(4) when roaming is disabled

From OpenBSD.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Sep 20 09:45:16 2018 UTC (5 years, 6 months ago) by khorben
Branch: MAIN
Changes since 1.4: +6 -10 lines
Diff to previous 1.4 (colored) to selected 1.8.4.2 (colored)

Use usb_rem_task_wait() now that it is available

This should avoid panics while detaching devices.

Revision 1.4.4.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.4.4.1: +2882 -0 lines
Diff to previous 1.4.4.1 (colored) to branchpoint 1.4 (colored) to selected 1.8.4.2 (colored)

Sync with HEAD

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

Revision 1.4.4.1, Wed Aug 1 18:27:58 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.4: +0 -2882 lines
FILE REMOVED

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

Revision 1.4 / (download) - annotate - [select for diffs], Wed Aug 1 18:27:58 2018 UTC (5 years, 8 months ago) by khorben
Branch: MAIN
CVS Tags: pgoyette-compat-0906, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: pgoyette-compat
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored) to selected 1.8.4.2 (colored)

Fix building umb(4) on NetBSD-current

Patch by Robert Swindells; thank you!

Revision 1.3 / (download) - annotate - [select for diffs], Wed Aug 1 12:36:56 2018 UTC (5 years, 8 months ago) by khorben
Branch: MAIN
Changes since 1.2: +5 -12 lines
Diff to previous 1.2 (colored) to selected 1.8.4.2 (colored)

Allow kmem_alloc(9) to sleep when attaching

Without this, umb(4) may needlessly fail to attach, like when under memory
pressure.

Thanks skrll@ for the heads-up!

Revision 1.2 / (download) - annotate - [select for diffs], Wed Aug 1 12:25:50 2018 UTC (5 years, 8 months ago) by khorben
Branch: MAIN
Changes since 1.1: +15 -15 lines
Diff to previous 1.1 (colored) to selected 1.8.4.2 (colored)

Avoid parentheses in return statements (KNF)

NFCI.

Thanks skrll@ for the heads-up!

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jul 31 16:44:29 2018 UTC (5 years, 8 months ago) by khorben
Branch: MAIN
Diff to selected 1.8.4.2 (colored)

Add a port of the umb(4) driver from OpenBSD

The umb(4) driver provides support for USB MBIM (Mobile Broadband
Interface Model) devices.

MBIM devices establish connections via cellular networks such as GPRS,
UMTS, and LTE. They appear as a regular point-to-point network interface, transporting raw IP frames.

Required configuration parameters like PIN and APN have to be set with
umbctl(8), a new tool specific to this driver. The IP address is configured
automatically; the default route and DNS server information have to be set
separately.

The driver is not fully functional yet, it is therefore still marked as
experimental and disabled by default. Any help welcome to complete it!

Tested on NetBSD/amd64, with a Sierra Wireless EM7345 LTE modem on a Lenovo
ThinkPad T440s. No functional change expected otherwise.

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>