Commit Graph

156584 Commits

Author SHA1 Message Date
thorpej 051986d92d Regen for:
Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
2021-10-20 03:13:14 +00:00
thorpej 982ae832c3 Overhaul of the EVFILT_VNODE kevent(2) filter:
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
2021-10-20 03:08:16 +00:00
knakahara defcf4e52b Uniform INTx/MSI handler's Tx/Rx behavior to MSI-X's one.
Because the difference has caused INTx/MSI own bugs.
2021-10-20 02:12:36 +00:00
knakahara 9affeb2e7f Fix Tx stall, reported and implemented original patch by chs@n.o, thanks.
Check if_snd queue because if.c::if_transmit() doesn't call ifp->if_start()
when IFQ_ENQUEUE failed.

Reviewed and tested by chs@n.o and msaitoh@n.o.
2021-10-20 02:05:15 +00:00
jmcneill 33f66e53aa - microtime -> microuptime
- avoid kpause with timeo=0
2021-10-20 01:09:49 +00:00
roy ca7d1a57f1 netinet: Allow binding the unspecified address when no addresses exist
You should always be able to bind to the unspecified address even if
no addresses have been configured on any interface.

For example, a DHCP client could be started before the loopback interface
has been fully configured.
2021-10-19 20:01:09 +00:00
yamaguchi 3e05162506 lagg: reject a vlan interface that is not configured
The vlan I/F has no MAC address used in LACP.
2021-10-19 08:02:42 +00:00
yamaguchi a5c0a90f03 lagg: support l2tp(4) aggregation
- Accept "ifconfig lagg* laggport l2tp*"
- Set promiscuous mode when the added interface is l2tp*
- check IFF_UP in addition to IFF_RUNNING on
  SIOCSIFFLAGS to a child interface.
2021-10-19 07:52:33 +00:00
yamaguchi 396733a098 lagg: clear I/G bitg and set G/L bit in a generated MAC address 2021-10-19 07:40:52 +00:00
rin 49b0c0364d Revert previous:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/mips/mips/vm_machdep.c#rev1.163

> cpu_uarea_alloc: For ILP32, do not try to allocate physical memory above
> pmap_limits.avail_end.
>
> Fix NULL dereference in uvm_pglistalloc_contig_aggressive().

"high" argument larger than pmap_limits.avail_end is just legal for
uvm_pglistalloc(); uvm_pglistalloc_contig_aggressive() and friends
allocate memory between uvm_physseg_get_avail_start() and
uvm_physseg_get_avail_end().

It turned out that the NULL dereference took place as PHYS_TO_VM_PAGE()
aka uvm_phys_to_vm_page() returns NULL for a valid pa. I've not figured
out why...

Thanks chs@ for correcting my misunderstanding.
2021-10-19 03:47:33 +00:00
christos ef513097b6 Fix llvm build: error: equality comparison with extraneous parentheses
[-Werror,-Wparentheses-equality]
2021-10-18 14:14:07 +00:00
simonb 9edf7099a4 Whitespace nits. 2021-10-18 11:40:56 +00:00
jmcneill 911a0d1bfd Only print an error about missing I/O BARs for chips that need it. 2021-10-18 11:36:11 +00:00
hannken 7e1e2ee903 Use a local static variable to hold "pktq_rps_hash_default"
like the other devices do.

Kernel ALL/amd64 compiles again.

OK: Kengo NAKAHARA <knakahara@netbsd.org>
2021-10-18 08:15:00 +00:00
ryo 3e14ca5b84 When booted with "boot netbsd -1" (disable multiprocessor boot),
"ddb>continue" didn't work when ddb was started by breakpoint trap.
2021-10-17 22:44:34 +00:00
jmcneill be917db8d8 plcom: speed up close with HUPCL set
Instead of incurring a 1s penalty on close of a plcom device with HUPCL set,
defer the sleep until the next open, and only sleep if necessary.
2021-10-17 22:34:17 +00:00
andvar cc8386344a regen 2021-10-17 20:40:20 +00:00
andvar 85aa460fcb s/Techonology/Technology/ 2021-10-17 20:40:03 +00:00
andvar 0a828985a3 regen 2021-10-17 20:33:27 +00:00
andvar 9a713fea03 s/Versin/Version/ 2021-10-17 20:33:05 +00:00
jmcneill 129a3690a1 Upgrade self-test passed messages from verbose to debug. 2021-10-17 14:45:45 +00:00
jmcneill c484a56f8e Upgrade cgd self-test output from verbose to debug. 2021-10-17 14:42:15 +00:00
jmcneill cc0e6e64a2 Honour the timeout= entry in boot.cfg 2021-10-17 14:12:54 +00:00
jmcneill e63dca36f8 Only define DEFAULT_TIMEOUT if it is not already defined. 2021-10-17 14:12:21 +00:00
jmcneill 4d197dd704 Fix primary CPU detection in cpu_acpi_tprof_intr_establish 2021-10-17 12:41:05 +00:00
skrll bc0216cc0d Trailing whitespace 2021-10-17 08:47:21 +00:00
skrll a345cbe1df Remove some newlines 2021-10-17 07:26:20 +00:00
jmcneill 4914102d9b Skip legacy device detection for VMware guests with ACPI enabled. 2021-10-16 13:15:01 +00:00
jmcneill 3acde5105d Enable com and lpt at ACPI attachments. 2021-10-16 13:09:40 +00:00
simonb da9de12571 Spinkle some KNF spaces after commas. 2021-10-16 07:12:01 +00:00
simonb 61de7ee680 Remove funny straggling blank line. 2021-10-16 07:05:45 +00:00
skrll 3919694e35 pm_remove_all is a shared field so move it out the #ifdefs 2021-10-16 07:04:36 +00:00
ryo 112de833eb fix non-MULTIPROCESSOR build
Build tested only.
2021-10-16 06:37:43 +00:00
ryo 33a6512b20 fix non-MULTIPROCESSOR build 2021-10-16 06:34:30 +00:00
mrg d6dbabab9d apply always-open quirk for logitech B100 mouse. 2021-10-16 05:40:46 +00:00
mrg 8ad7e6e3a9 regen. 2021-10-16 05:39:32 +00:00
mrg a546201dbe add logitech B100 mouse 2021-10-16 05:39:11 +00:00
andvar 279d5541d3 fix typos in comments. 2021-10-15 22:32:28 +00:00
jmcneill 3d62b3aa89 Swap fdc@isa for fdc@acpi as the former takes over a second to probe. 2021-10-15 19:22:12 +00:00
jmcneill 29d43a600d Convert some debug messages to aprint_debug 2021-10-15 19:21:45 +00:00
jmcneill 353f2d85b7 Add missing acpi include 2021-10-15 19:01:52 +00:00
jmcneill 3f344a9ebc Disable MSI and MSI-X support if IAPC_BOOT_ARCH reports that MSI is not
supported.
2021-10-15 18:51:38 +00:00
jmcneill d6daa00218 If ACPI indicates that there are no user visible devices on the LPC or ISA
bus, set the "no-legacy-devices" property on isa to bypass indirect
configuration of ISA devices.
2021-10-15 18:44:53 +00:00
jmcneill 83310f9ffc Fix typo in comment: "porniters" -> "pointers" 2021-10-15 18:12:48 +00:00
jmcneill 02983654f2 Revert "usb: uhub: remove unnecessary delays when powering on ports"
syzbot says that the change exposes UB in usb_free_device and I can't
see how, so revert until I have a better understanding of what's going on.

Reported-by: syzbot+c445f7149cce07d4c252@syzkaller.appspotmail.com
Reported-by: syzbot+a2ae42f37de765a54b20@syzkaller.appspotmail.com
2021-10-15 11:59:16 +00:00
brad ea034c40cb A driver for the Sensirion SGP40 MOx gas sensor. An example of this
chip from Adafruit is:

https://www.adafruit.com/product/4829

This is a moderately priced gas sensor that can detect volatile
organic compounds in the air.  The driver uses the 3-clause BSD
licensed VOC algorithm provided by Sensirion to turn the raw sensor
metric into a VOC index which can indicate the quality of the air in a
particular indoor environment.  All published functions of the chip
are supported and one unpublished feature.
2021-10-14 13:54:45 +00:00
jmcneill b3018c46b3 - use microtime instead of getmicrotime, suggested by thorpej
- use ttclos for wchan even though we are sleeping in comopen now
2021-10-14 09:56:12 +00:00
rin 298b669053 cpu_uarea_alloc: For ILP32, do not try to allocate physical memory above
pmap_limits.avail_end.

Fix NULL dereference in uvm_pglistalloc_contig_aggressive().
2021-10-14 02:22:25 +00:00
andvar 96ed59532d fix typos and wrong ISO/IEC standard number in reference description. 2021-10-13 21:49:10 +00:00
msaitoh 7a98bb4957 Add support for I219V 15-19 and I219LM 16-19. 2021-10-13 08:12:36 +00:00