summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2022-09-16Cast to uint32_t to avoid undefined behavior in UGETDW(). Found by kUBSan.msaitoh
2022-09-16Use unsigned to avoid undefined behavior in ure_uno_mcast(). Found by kUBSan.msaitoh
2022-09-16Some MP improvementsskrll
- Remove use of IFF_OACTIVE - Remove use of if_timer and provide an MP safe multiqueue watchdog - Sprinkle some lock assertions. Tested by ryo@. Thanks.
2022-09-16Add ALWAYS_TXDEFER option to ixl(4), too.knakahara
2022-09-16Add ALWAYS_TXDEFER option to vmx(4), too.knakahara
2022-09-16ixg(4) add an option for Tx to use deferred softint regardless of whether ↵knakahara
can get txq lock or not. That imporve (7%) and stabilize throughput. But that can cause latency degradation, so off by default. ok'ed by msaitoh@n.o.
2022-09-14mfii: Don't panic on detach.msaitoh
Call sysmon_envsys_destroy() and clear sc->sc_sme to NULL if sysmon_envsys_register failed.
2022-09-13nvmm(4): Add suspend/resume support.riastradh
New MD nvmm_impl callbacks: - .suspend_interrupt forces all VMs on all physical CPUs to exit. - .vcpu_suspend suspends an individual vCPU on a machine. - .machine_suspend suspends an individual machine. - .suspend suspends the whole system. - .resume resumes the whole system. - .machine_resume resumes an individual machine. - .vcpu_resume resumes an indidivudal vCPU on a machine. Suspending nvmm: 1. causes new VM operations (ioctl and close) to block until resumed, 2. uses .suspend_interrupt to interrupt any concurrent and force them to return early, and then 3. uses the various suspend callbacks to suspend all vCPUs, machines, and the whole system -- all vCPUs before the machine they're on, and all machines before the system. Resuming nvmm does the reverse of (3) -- resume system, resume each machine and then the vCPUs on that machine -- and then unblocks operations. Implemented only for x86-vmx for now: - suspend_interrupt triggers a TLB IPI to cause VM exits; - vcpu_suspend issues VMCLEAR to force any in-CPU state to be written to memory; - machine_suspend does nothing; - suspend does VMXOFF on all CPUs; - resume does VMXON on all CPUs; - machine_resume does nothing; and - vcpu_resume just marks each vCPU as valid but inactive so subsequent use will clear it and load it with vmptrld. x86-svm left as an exercise for the reader.
2022-09-13kill_session now uses the session id to avoid stale session pointers.mlelstv
protect network socket with rwlock to handle recconnects. always take over socket from iscsid to prevent leaks. keep a good connection alive. don't forget child device when config_detach fails. fix locking when reassigning CCBs. pducount is protected by lock, no need for atomic. some code rework, refined debug messages.
2022-09-13Add Intel 600 series PCH-LP devices support.msaitoh
2022-09-13Regen.msaitoh
2022-09-13Add more Alder Lake devices.msaitoh
2022-09-13xhci(4): After attach, access to sc_child/2 requires sc_intr_lock.riastradh
Serializes access with xhci_intr. XXX Need to ensure the interrupt handler is quiesced at this point or else it will trip over the assertion in xhci_intr about having at least one child.
2022-09-13usbdi(9): Sprinkle usbhist into usb xfer timeout logic.riastradh
2022-09-13usbdi(9): Fix mistake in usbdi.c 1.244.riastradh
Need to clear ux_timeout_set only when we finally actually process the timeout in usbdi_xfer_timeout_task, not in the callout which schedules the task which asserts that the timeout is still set on entry. Must've exported the wrong version of my change from git.
2022-09-13xhci(4): Resume commands even if USBSTS.SRE is set.riastradh
Commands might not work after this but let's at least not deadlock -- give them an opportunity to time out or fail. XXX Maybe set sc_dying here to skip the timeout.
2022-09-13nvme(4): Don't leak memory for queues on every resume.riastradh
2022-09-13usbdi(9): Rule out possible race to read xfer->ux_status.riastradh
I think this might actually be safe, because when it's synchronous, the xfer can't be reused except by the caller after usbd_transfer returns. But let's make it definitely not wrong instead of maybe actually safe.
2022-09-13usbnet(9): Call mii_down once we've finished with mii_tick.riastradh
2022-09-12Uniform vioif's link status to if_link_state. Implemented by yamaguchi@n.o.knakahara
Let vioif(4) know LINK_STATE_UNKNOWN.
2022-09-11Packets larger than 1518 bytes (1522 bytes if VLAN tag is included) are no ↵ryo
longer received. Previously, those packets were received as truncated (incomplete) packets.
2022-09-11regenmrg
2022-09-11add several samsung nvme entriesmrg
2022-09-08Sprinkle const. Same binary before and after.skrll
2022-09-08KNF. Modify comment. No fucntional change.msaitoh
2022-09-07usbdi(9): Fix timeout after non-racy xfer resubmission.riastradh
Previously we would never clear ux_timeout_set if an xfer timedout, so resubmission of the same xfer later would fail to schedule a callout.
2022-09-07Fix the build, add new emuxki_boards.cmartin
2022-09-07emuxki(4): import a list of board definitionskhorben
This is inspired by the cxdtv(4) driver. Tested on NetBSD/amd64 with a Sound Blaster Live! Value (CT4870, PCI) and with a Sound Blaster Audigy Rx 7.1 (SB1550, PCIe). Additional sound cards sponsored by the NetBSD Foundation; thanks!
2022-09-07emuxki(4): place struct emuxki_softc into its own filekhorben
NFCI
2022-09-07emuxki(4): restrict DMA memory within the first 2GBkhorben
As implemented in the driver, the EMU10K1 chip can only address memory up to 31-bit addresses. Tested on NetBSD/amd64 with a Sound Blaster Live! Value (CT4870, PCI) and with a Sound Blaster Audigy Rx 7.1 (SB1550, PCIe). Additional sound cards sponsored by the NetBSD Foundation; thanks!
2022-09-07tpm(4): add missing newline character in device_printf()khorben
Observed with on a Sun Ultra 24, NetBSD/amd64: tpm0 at acpi0 (TPM, IFX0102-1): io 0x4e-0x4f,0x4700-0x470b mem 0xfed40000-0xfed44fff tpm0: device 0x000b15d1 rev 0x10 tpm0: read 8 bytes, expected 10tpm0: deactivating entropy source
2022-09-07emuxki(4): allow building as a modulekhorben
Tested on NetBSD/amd64 with a Sound Blaster Live! Value (CT4870) Note that this required setting outputs.master to the maximum value allowed (255) to get sound out, and then cranking the volume pretty high. Additional sound cards sponsored by the NetBSD Foundation; thanks!
2022-09-06Don't hold a spin lock entering usbd_transfer.nat
This avoids a crash found with LOCKDEBUG.
2022-09-06Do a full screen update upon vt switch.nat
2022-09-06Ensure the device is fully initialized before starting the update thread.nat
2022-09-06Don't throttle the frame rate.nat
Throttling of the frame rate is no longer necessary as most screen updates are now partial updates.
2022-09-06Finally fix the blitting function.nat
This means better performance for mostly static displays. Full screen updates are still done five times a second. Introduce a new variable sc_clear to force a full update.
2022-09-04revert 1.281mlelstv
VNDIOCLR requires write access to unconfigure a unit, even when the unit is read-only.
2022-09-04Add standard inet headers.rjs
2022-09-04bge(4): Use BUS_DMA_WAITOK in ring initilization now that it's safeskrll
2022-09-04bge(4): fix the MP improvements and improve some more.skrll
- Have two locks sc_core_lock at IPL_NONE and sc_intr_lock at IPL_NET and use appropriately. - Use stopping flags instead of bge_if_flags so that bge_if_flags only needs to be protected by the sc_core_lock - Use ifmedia_init_with_lock and provide the sc_intr_lock. mii operatiions are done from the interrupt handler. - Fixup locking in bge_detach. - Rename bge_watchdog to bge_watchdog_tick to avoid confusion with the if_watchdog method. - Sprinkle some more asserts.
2022-09-04bge(4): use a local variable to make bge_ifmedia initialization pretty.skrll
NFC
2022-09-03Garbage-collect the remaining vestiges of netisr.thorpej
2022-09-02Remove unnecessary inclusion of <net/netisr.h>.thorpej
2022-09-02Whitespace - mostly align the line continutation charactersskrll
2022-09-01xhci(4): Make sure to destroy sc_rhlock on detach.riastradh
2022-08-30nvme(4): Actually check if bp is null as commented previously.riastradh
I had tested this change, but forgot to amend the commit before exporting to CVS.
2022-08-30nvme(4): If bp is null or bp->b_ci is not assigned, use curcpu().riastradh
curcpu() might be stale by the time we're done, but it's still safe to pass it to cpu_index, and this is just used as a best-effort mechanism to keep I/O on queues handled by the same CPU. bp is not always provided, and bp->b_ci is not always assigned, e.g. when dumping. (If bp->b_ci is supposed to be always assigned, then we need to audit all the paths into it to assign it in those where it's not.) Fixes dump on nvme.
2022-08-29emuxki(4): add support for the Sound Blaster Audigy Rxkhorben
This is as per kern/56980. Confirmed working on one out of two different computers, albeit with a strong hissing noise (same card, different mainboard). The mixer settings seem to be irrelevant or not supported though. Original support inspired by the Linux driver, and confirmed with the OpenBSD driver, itself originally from NetBSD. Tested on NetBSD/amd64.
2022-08-29Make this build again. Sorry about that.skrll