summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2019-11-06Pull break into ifdef; noticed by bluhm who also OK'ed the previousFlorian Obser
commit.
2019-11-06Make iwn(4) flush remaining frames on the Tx aggregation queue whenStefan Sperling
Tx aggregation is stopped. Fixes a bug where outstanding frames on the aggregation queue interfere with roaming to another AP. net80211 will only roam once all outstanding frames destined for the old AP have been sent, i.e. once that AP node's Tx refcount goes to 0. Any outstanding frames sitting in the Tx aggregation queue, waiting to be ACKed, will keep this refcount above zero. To make roaming work reliably in combination with Tx aggregation, the driver must ensure that ieee80211_release_node() gets called for each frame on the queue when Tx aggregation is stopped. Problem observed by tobhe@ Fix tested + ok tobhe@ jca@
2019-11-06Fix RTA_DNS checks:Florian Obser
Do not overwrite the address family, we need to know if this is IPv4 or IPv6 to parse the message. Nameservers are IP addresses, not NUL-terminated strings. Check that the length is a multiple of the length of an IP address. OK krw
2019-11-06Raise net80211's "beacon miss" threshold to avoid frequent re-connectsStefan Sperling
to APs that are relatively far away and suffer some packet loss. The former threshold was 7 beacons (about 700 ms). This raises the threshold to 30 beacons (about 3 seconds). Should still be good enough for detecting APs that have disappeared, and makes wifi networks provided by the University of Bucharest more reliable in the p2k19 hackroom. While here, make 'ifconfig iwm0/iwn0 debug' print an obvious message when we believe that the AP has disappeared. Problem reported and fix tested by landry@ / pirofti@ ok mpi@ sthen@
2019-11-06Substitute boolean_t/TRUE/FALSE by int/1/0.Martin Pieuchot
ok dlg@, jasper@
2019-11-06ANSIfy functions and get rid of boolean_t.Martin Pieuchot
ok dlg@, jasper@
2019-11-06Substitute boolean_t/TRUE/FALSE by int/1/0.Martin Pieuchot
ok dlg@, jasper@, anton@
2019-11-06replace the hooks used with if_detachhooks with a task list.David Gwynne
the main semantic change is that things registering detach hooks have to allocate and set a task structure that then gets added to the list. this means if the task is allocated up front (eg, as part of carps softc or bridges port structure), it avoids the possibility that adding a hook can fail. a lot of drivers weren't checking for failure, and unwinding state in the event of failure in other parts was error prone. while doing this i discovered that the list operations have to be in a particular order, but drivers weren't doing that consistently either. this diff wraps the list ops up so you have to seriously go out of your way to screw them up. ive also sprinkled some NET_ASSERT_LOCKED around the list operations so we can make sure there's no potential for the list to be corrupted, especially while it's being run. hrvoje popovski has tested this a bit, and some issues he discovered have been fixed. ok sashan@
2019-11-05Remove mpls_inkloop and the corresponding sysctl net.mpls.maxloop_inkernel.Claudio Jeker
The value is no longer needed since the MPLS code got refactored some time ago. Found by Thomas Habets (thomas (at) habets se)
2019-11-05Kill uvm_deallocate(9) and use uvm_unmap() directly.Martin Pieuchot
ok kettenis@, semarie@, deraadt@
2019-11-05Give some END()s to assembly symbols.Martin Pieuchot
ok kettenis@, jca@
2019-11-04remove mobileip(4)David Gwynne
noone seems to use it, and we should not encourage people to use it by having it available. it's been disabled for most of the last release and noones asked for it in 6.6, so i'm taking that as an ok for this removal.
2019-11-04Restore the old way of dispatching dead procs through idle proc.Visa Hankala
The new way needs more thought.
2019-11-04Regularly poll and report kubsan findings using the timeout(9) APIanton
instead of task(9). Undefined behavior can potentially be present in any context and calling task_add() isn't always safe. ok visa@
2019-11-04Add ogx(4), a driver for the OCTEON III network processor.Visa Hankala
This network driver covers higher-end models of the OCTEON III family. They have a modified design whose interface is not compatible with the lower-end models or earlier chip generations. The code is still a work in progress. However, it is capable enough to make the SGMII port functional on the CN7360. No objection from deraadt@
2019-11-04Switch iwm 3160, 7260, and 7265 to -17 firmware images.Stefan Sperling
7260 tested by florian 7265 tested by kettenis 3160 should work as it's a trimmed-down variant of 7260 Please report any problems as soon as possible.
2019-11-04Make iwm send the DQA command later, as Linux does. We were sending it toStefan Sperling
the init firmware which does not need it. The main runtime firmware needs it. This actually enables DQA mode, and two further problems showed up: 1) Correctly configure the AUX station queue in the DQA case. 2) Always transmit our own frames via the AP's station. The AUX station is meant to be used for firmware-generated frames only. Tested on 7260, 7265, and 8265 with standard -current firmware images. Required for newer firmware versions. ok patrick@
2019-11-04Don't send the BT coex config command to iwm 8k init firmware because newerStefan Sperling
firmware versions will crash when we do that. Debugged together with patrick. ok patrick@
2019-11-04iwm API version -31 firmware and up will crash after load unless the driverStefan Sperling
explicitly enables support for 31 queues in the GP_CTRL register. Coincidence? Accident? Bad joke? In any case this took us several days to figure out; the root cause was eventually identified by patrick@ ok patrick@
2019-11-04Fix handling of iwm_sf_config() input argument.Stefan Sperling
Same change as dragonfly commit 666737f64b4f6dd42ffd9f0ace9fc46ccc1ebaab ok patrick@
2019-11-04Ignore FW_DBG_DEST and FW_DBG_CONF iwm firmware image TLV sections, for now.Stefan Sperling
ok patrick@
2019-11-04Support iwm(4) firmware images with ucode_api flags larger than 32 bits.Stefan Sperling
ok patrick@
2019-11-04Sync iwm's SCD_QUEUE macros with iwlwifi.Stefan Sperling
Our outdated copies of these had a bug. See Linux commit cb6bb128b73ae898d6ee0281c2b2644f70633d58 ok patrick@
2019-11-04Tweak a device type check in iwm_apm_init() to ensure it will matchStefan Sperling
7k devices only when support for > 8k devices is added in the future. ok patrick@
2019-11-04Enable only iwm's "firmware-load" interrupt while loading the firmware.Stefan Sperling
Other interrupts are enabled once firmware has been loaded successfully. Corresponds more closely to what Linux does. ok patrick@
2019-11-04Add support for iwm firmware paging, required for newer 8k device firmware.Stefan Sperling
Patch by Imre Vadasz Tested for regressions by phessler and Krystian Lewandowski No very obvious mistakes found by kettenis@ ok patrick@
2019-11-04in vlan_clone_destroy take NET_LOCK when calling vlan_down and mark it dead.David Gwynne
2019-11-04make the parent promisc when a promisc vlan interface is brought up.David Gwynne
this has been reported by a bunch of people including chris@, jon williams on bugs@, and ze loff on misc@
2019-11-04Fix previous commit: missed a ds_copyin() moved in rev 1.72Philip Guenther
2019-11-03Merge sys_shmctl() and shmctl1() again, as we no longer have a need forPhilip Guenther
the copyin/copyout compat shims. ok deraadt@ millert@ anton@
2019-11-03kern_timeout.c: style(9), misc. cleanupcheloha
- Move mutex to top of file, annotate locking for module - Group module-local prototypes below globals but above function defs - __inline -> inline - No static without inline - Drop extra parentheses around return values Compiler input from visa@. ok visa@
2019-11-03rework kubsan_state into simpler boolean named kubsan_coldanton
2019-11-03add missing handler for float cast overflow; caused by code inanton
sys/dev/pci/drm/amd/display/dc/calcs/dcn_calc_auto.c
2019-11-03Don't talk about uvm_km_alloc(9), pool_get(9) is what we need.Martin Pieuchot
ok deraadt@, guenther@
2019-11-03Correctly re-initialize the nameinfo struct that is re-used forBob Beck
vn_open when vnconfig'ing from a read-only filesystem. This bug has been with us for a long time and was spotted by Kawamata Yoshihiro <kaw@on.rim.or.jp> after recent changes making vn_open more picky about the structure it is called with.
2019-11-02softclock: move softintr registration/scheduling into timeout modulecheloha
softclock() is scheduled from hardclock(9) because long ago callouts were processed from hardclock(9) directly. The introduction of timeout(9) circa 2000 moved all callout processing into a dedicated module, but the softclock scheduling stayed behind in hardclock(9). We can move all the softclock() "stuff" into the timeout module to make kern_clock.c a bit cleaner. Neither initclocks() nor hardclock(9) need to "know" about softclock(). The initial softclock() softintr registration can be done from timeout_proc_init() and softclock() can be scheduled from timeout_hardclock_update(). ok visa@
2019-11-02Revert previous, a race is present and can be triggered with golang.Martin Pieuchot
Found by jsing@
2019-11-02Add a few more PCIe capability registers and bits. As usual, the namesMark Kettenis
are taken from Intel chipset documentation. Prompted by a diff from kurt@. ok kurt@
2019-11-02Start documenting which locking primitives apply to uvm_map members.Martin Pieuchot
ok kettenis@
2019-11-02Move dead procs to the reaper queue immediately after context switch.Visa Hankala
This eliminates a forced context switch to the idle proc. In addition, sched_exit() no longer needs to sum proc runtime because mi_switch() will do it. OK mpi@ a while ago
2019-11-01Kill resched_proc() and instead call need_resched() when a thread isMartin Pieuchot
added to the runqueue of a CPU. This fix out-of-sync cases when the priority of a thread wasn't reflecting the runqueue it was sitting in leading to unnecessary context switch. ok visa@
2019-11-01Reduce BOOTRANDOM_MAX to 256. naddy pointed out there's no point havingTheo de Raadt
it larger than RC4STATE. A long discussion ensued. In conclusion all entropy inputs are either satisfactory enough, or just as shitty at 512.
2019-11-01Push the KERNEL_LOCK() down in uvm_map_inentry().Martin Pieuchot
The lookup in uvm_map_inentry_fix() is already serialized by the vm_map_lock and such lookup is already executed w/o the KERNEL_LOCK(). ok kettenis@, deraadt@
2019-11-01Keep local function definitions in C files.Martin Pieuchot
2019-11-01Document that p_{sp,pc}inentry are owned by the current thread.Martin Pieuchot
2019-11-01Fix an off-by-one in db_save_stack_trace().Martin Pieuchot
Save the PC after checking if it belongs to the kernel.
2019-11-01Flush the register windows before unwinding the stack.Martin Pieuchot
This makes db_save_stack_trace() and db_stack_dump() work. ok deraadt@, kettenis@
2019-10-31In 2013, when OpenBSD/armv7 was still rather early, improvements forPatrick Wildt
that platform have been trickling in bit by bit. One of those changes unfortunately introduced a regression in cache flushes. The check for the length in the cache-flush-loop was changed from the instruction bpl to bhi. This has the effect that it does not branch on zero anymore. Due to the length decrement at the beginning of the function, which was not removed, a length of (n * cacheline) + 1 means that the loop misses one run! This means it is possible that the last byte of a DMA transfer was incorrect, as one could see on network packets often enough. Remove that instruction, which makes it even more similar to the OpenBSD/arm64 code. ok deraadt@
2019-10-31Make background scans less frequent if we keep choosing the same AP.Stefan Sperling
This helps a bit in situations where a single AP is used and background scans are causing packet loss, as seen with Jesper Wellin's Broadcom-based AP and my Android phone in hotspot mode. This is not a proper fix but our background scan frequency against a single AP was much higher than needed anyway. Tested by jan, job, benno, Tracey Emery, Jesper Wallin
2019-10-30drm/amdgpu: Bail earlier when amdgpu.cik_/si_support is not set to 1Jonathan Gray
From Hans de Goede 4d5307c099afc9ce5fe89e8acf9b3c65104d0e08 in linux 4.19.y/4.19.81 984d7a929ad68b7be9990fc9c5cfa5d5c9fc7942 in mainline linux