summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2022-08-03Pull up following revision(s) (requested by riastradh in ticket #1493):martin
sys/dev/usb/ucom.c: revision 1.129 ucom(4): Fix earlier mistake causing pipes not to be closed. In revision 1.123, mrg@ changed what he thought was a double-close, but was actually abort&close (as is appropriate) to just abort (which is not enough -- leaks the pipe). This restores the abort&close. The original `bug' was found by code inspection, whereas this bug was found by asserting in usb_subr.c that no pipes are open on device disconnection after detach; the asserts actually triggered with several ucom(4) devices, and no longer trigger with this change. XXX pullup-9
2022-08-03Pull up following revision(s) (requested by riastradh in ticket #1495):martin
share/man/man4/tpm.4: revision 1.7 sys/dev/ic/tpm.c: revision 1.17 sys/dev/ic/tpmvar.h: revision 1.10 sys/dev/ic/tpm.c: revision 1.18 sys/dev/ic/tpm.c: revision 1.19 sys/dev/acpi/tpm_acpi.c: revision 1.14 sys/dev/ic/tpmreg.h: revision 1.10 sys/dev/ic/tpmreg.h: revision 1.11 sys/dev/ic/tpm.c: revision 1.21 sys/dev/ic/tpm.c: revision 1.22 sys/dev/ic/tpm.c: revision 1.23 sys/dev/ic/tpm.c: revision 1.24 sys/dev/ic/tpm.c: revision 1.25 sys/dev/ic/tpmreg.h: revision 1.7 sys/dev/ic/tpmreg.h: revision 1.8 sys/dev/ic/tpmreg.h: revision 1.9 sys/dev/ic/tpmvar.h: revision 1.8 sys/dev/ic/tpmvar.h: revision 1.9 dev/ic/tpm: Tidy up headers. - Add include guards. - Add necessary includes. - Sort includes. - Use _BYTE_ORDER, not BYTE_ORDER, for public header. dev/ic/tpm: Add missing line break in attach output. dev/ic/tpm: Take advantage of entropy source if available. If the tpm is deactivated, though, detach the entropy source so we don't continue to try polling it -- it can't be activated without a reboot anyway. Add note about enabling TPM and rnd(4) source. tpm(4): Handle TPM 2.0 random source too, and loop on short reads. Tested on ThinkPad T480. tpm(4): Preserve error if any on ending commands. This way we don't spuriously suppress an error, such as TPM_DEACTIVATED, in a loop where we rely on it. tpm@acpi: Require only one locality's worth of register space. We don't actually use the registers for the other localities, and some older TPMs only have the first locality exposed via ACPI. tpm(4): Fix disabling of rnd source if tpm is deactivated. Nothing prevents a second worker from being queued when the first one is about to do rnd_detach_source. Instead, just set a flag so future requests don't bother running a new thread; if there's a concurrent one that's already been scheduled on another CPU, well, too bad, we get a couple extra log messages but that's fine. A better way to do this would probably be to detect whether the tpm is deactivated at attach time, but that requires reading more of the tpm spec than I care to do when there are alternative ways to procrastinate like scrubbing the toilet. tpm(4): Fix suspend and rework I/O transaction lock. Use sc->sc_lock over individual I/O transactions, not open/close of the whole device. This way there is a bounded time before the tpm is unbusied even if userland is getting at it, so userland can't hold up suspend indefinitely. Of course, the tpm might be suspended and resumed in the middle of the user's session this way -- tough. This limits the response buffer to 1024 bytes -- which is already a bit hefty to have on the stack (but it's probably not very deep on the stack from userland so maybe not a big deal). If it turns out we need more, we can use kmem to allocate a buffer on the heap, with the caveat that it might fail. This is necessary so that suspend doesn't block indefinitely on uiomove in tpmread. tpm(4): Nix TPM_BE16/TPM_BE32. Just use sys/endian.h.
2022-08-03Pull up following revision(s) (requested by riastradh in ticket #1492):martin
sys/dev/usb/ukbd.c: revision 1.154 ukbd(4): Wait for callouts and blinking to complete in detach. This detach routine (and whole driver) has got a lotta other problems, but let's fix 'em one at a time...
2022-08-03Pull up following revision(s) (requested by riastradh in ticket #1490):martin
sys/dev/acpi/thinkpad_acpi.c: revision 1.48 With the recent change of the EC address space handler, we no longer get an ACPI_INTEGER in host byte order but a byte sized buffer with little endian data. Extract only the low 8 bits from buffer to get the fan speed again.
2022-08-03Pull up following revision(s) (requested by riastradh in ticket #1485):martin
sys/dev/pci/if_iwi.c: revision 1.117 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.401 sys/dev/scsipi/ses.c: revision 1.52 sys/dev/isa/mcd.c: revision 1.121 sys/dev: Memset zero before copyout. Just in case of uninitialized padding which would lead to kernel stack disclosure. If the compiler can prove the memset redundant then it can optimize it away; otherwise better safe than sorry. I think the iwi(4), mcd(4), and ses(4) changes actually plug leaks; the raidframe(4) change probably doesn't (but doesn't hurt).
2022-08-01Pull up following revision(s) (requested by rin in ticket #1483):martin
sys/dev/usb/uslsa.c: revision 1.32 PR kern/56946 Baud rate must be in little endian for SLSA_R_SET_BAUDRATE request.
2022-07-27regen for ticket #1482martin
2022-07-27Pull up the following revisions, requested by msaitoh in ticket #1482:martin
sys/dev/pci/pcidevs 1.1422,1.1445-1.1460 via patch sys/arch/x86/pci/amdsmn.c 1.13 Update pcidevs: - Add Intel Alder Lake devices and Intel 600 Series PCH devices. - Add some Intel Xeon Scalable / Skylake-E devices. - Fix AMD F16_HB from 0x1568 to 0x1538. - Add some devices for AMD and improve some descriptions to clarify. - Add VMware AHCI and NVMe. - Update Intel 700 series Ethernet devices. - Add some Broadcom devices. - Add some Broadcom / LSI RAID cards. - Fix typos and whitespace.
2022-07-11Pull up the following revisions, requested by msaitoh in ticket #1477:martin
sys/dev/pci/if_wmreg.h 1.122-1.125 sys/dev/pci/if_wmvar.h 1.48 sys/dev/pci/if_wm.c 1.719-1.720, 1.722-1.725, 1.727-1.740 via patch - wm_tick: Add missing splx(s) when not WM_MPSAFE. - Print DMA range info if the system is booting in the verbose mode. - Micro optimization: - Call m_freem(m) only if m0 == NULL. - Call wm_xxeof() only when limit > 0. - Don't set the more flag when there is no packet to process. - No functional changes: - Call txeof first, then rxeof for the consistency. - Remove duplicated break. - Remove stray semicolons from struct declaration. - Fix value return from void function. - Use macros. - Modify comment. - KNF.
2022-06-03Pull up following revision(s) (requested by msaitoh in ticket #1460):snj
sys/dev/pci/ixgbe/ixgbe.c: patch Fix previous to re-enable legacy interrupt correctly. It's a part of ixgbe.c rev. 1.273.
2022-06-02Pull up the following revisions, all via patch, requested by msaitohmartin
in ticket #1459: sys/dev/pci/ixgbe/ixgbe.c 1.261,1.265-1.268,1.273,1.275-1.277, 1.312,1.316-1.319 via patch sys/dev/pci/ixgbe/ixgbe.h 1.85 via patch sys/dev/pci/ixgbe/ixgbe_type.h 1.46-1.47 sys/dev/pci/ixgbe/ixgbe_x550.c 1.26 sys/dev/pci/ixgbe/ixv.c 1.182 - Reduce code duplication between ixgbe_msix_admin() and ixgbe_legacy_irq(). - Add missing code which was not in ixgbe_msix_admin() from ixgbe_legacy_irq() and vice versa. - Reorder code. - Disable/enable the OTHER interrupts correctly. - Don't return in the middle of ixgbe_msix_admin() when an flow director reinit failed. NetBSD currently doesn't support flow director, so this is not a real bug. - Print ECC, PHY and temp error log using with ratecheck(). - Correctly re-enable queue interrupt in ixgbe_legacy_irq(). - Correctly enter the recovery mode. - No functional change: - Add some debug printf()s. - Don't use "more" flag for simplify. - Fix typos in comment. - KNF.
2022-05-31Pull up following revision(s) (requested by msaitoh in ticket #1458):martin
sys/dev/pci/ixgbe/ixv.c: revision 1.181 sys/dev/pci/ixgbe/ixgbe.c: revision 1.315 sys/dev/pci/ixgbe/ixgbe.h: revision 1.86 Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed. Fixes PR kern/56857. Remove unused adapter->msix_mem.
2022-05-30Pull up the following revisions, requested by msaitoh:martin
sys/dev/pci/ixgbe/ixgbe.c 1.270,1.280,1.307-1.311, 1.313-1.314 via patch sys/dev/pci/ixgbe/ix_txrx.c 1.96-1.97 sys/dev/pci/ixgbe/ixv.c 1.158,1.179-1.180 via patch - ixg(4): Print Printed Board Assembly (PBA) number. - ixg(4): Add IFF_RUNNING check in ixgbe_legacy_irq() again. this might fix small race but it's not so dangerous. - Add value check for {tx,rx}_process_limit sysctl to avoid setting wrong value. - Add missing num_tx_desc sysctl. - No functional change: - KNF a bit. - Simplify setting of EIAC register. - Move the definition of eicr_mask variable. - Enclose flow director stuff in ixgbe_intr_admin_common() with IXGBE_FIR which is not defined in NetBSD. - Modify comment for consistency. - Use cached rx_copy_len in ixgbe_rxeof().
2022-05-19Pull up following revision(s) (requested by buhrow in ticket #1456):martin
sys/dev/pci/if_bge.c: revision 1.353 For chips which contain an ASF/IPMI firmware, instruct the chip to shut the host ASF firmware down when attaching the device so the IPMI BMC can use the same physical port even when NetBSD doesn't have a network configuration on the device. By contrast, when the device gets a network configuration assigned to it and bge_init() is called, the host ASF firmware is brought up so both NetBSD and the IPMI BMc can use the same physical port. This now matches FreeBSD behavior, as well as behavior from NetBSD-5.2. Tested on a Sunfire X2200-M2 system with the following chip: bge1 at pci7 dev 4 function 1: Broadcom BCM5715 Gigabit Ethernet bge1: interrupting at ioapic0 pin 11 bge1: HW config 000000d4, 00000014, 00000000, 00000000 00000000 bge1: ASIC BCM5715 A3 (0x9003), Ethernet address 00:1e:68:XX:XX:XX bge1: setting short Tx thresholds brgphy1 at bge1 phy 1: BCM5714 1000BASE-T/X media interface, rev. 0 brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
2022-05-17Pull up following revision(s) via patch (requested by msaitoh in ticket #1454):bouyer
sys/dev/ic/mfi.c: revisions 1.63, 1.66-77 sys/dev/ic/mfireg.h: revisions 1.11-1.20 via patch sys/dev/pci/mfi_pci.c: revision 1.21 sys/dev/pci/mfii.c: revisions 1.6-1.7, 1.10-1.15 share/man/man4/mfi.4: revision 1.13 Improve mfi(4) and mfii(4): - Set 'ld_sync' to NULL as part of 'again', to prevent use-after-free. - Add some code for the SKINNY variant to make Dell PERC H310 work. - Print the percentage correctly when the background initialization is running. - Clear mailbox to not to pass garbage data. - Use union mbox instead of unit8_t xxx[] to avoid unaligned access. - Set stripe size for BIOCVOL to show the size correctly in bioctl. - Add support for iBBU-09 to show BBU voltage, current and temperature correctly. - Fix typos in comments. - Sprinkle static. - Improve debug printf()s. - KNF. Remove extra semicolon. Whitespace fixes.
2022-05-13Pull up following revision(s) (requested by bouyer in ticket #1445):martin
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.98 bus_dmamem_unmap() before bus_dmamem_free(), otherwise we may give back meomry which is still (and will stay) mapped. Fixes one instance of "panic: HYPERVISOR_mmu_update failed" on Xen. There may be others.
2022-03-15Pull up following revision(s) (requested by perseant in ticket #1435):martin
sys/dev/ata/ata.c: revision 1.167 Avoid an unaccounted extra channel freeze, if a reset is requested more than once before the thread services the request. Closes PR#56745.
2022-02-16Pull up following revision(s) (requested by jakllsch in ticket #1428):martin
sys/dev/usb/uhidev.c: revision 1.82 Do not explicitly set the HID Report Protocol upon attach, some devices don't like it and should be in Report Protocol after enumeration/reset anyway. May address PR kern/55019.
2022-02-08Pull up following revision(s) (requested by jdolecek in ticket #1426):martin
sys/dev/ata/ata_recovery.c: revision 1.3 sys/dev/ata/ata_subr.c: revision 1.9 stop xfer timeouts during recovery, all xfers will be requeued anyway this avoids race with the timeout routine when processing the xfers for requeueing should fix PR kern/54790 by Izumi Tsutsui
2022-02-02Pull up the following revisions (requested by msaitoh in ticket #1424):martin
sys/dev/pci/ixgbe/ix_txrx.c 1.95 sys/dev/pci/ixgbe/ixgbe.c 1.305 via patch sys/dev/pci/ixgbe/ixgbe_mbx.c 1.19 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.15-1.16 sys/dev/pci/ixgbe/ixv.c 1.178 via patch Use atomic_{load,store}_relaxed() for event counters.
2022-02-01Pull up following revision(s) (requested by reinoud in ticket #1421):martin
sys/dev/scsipi/cd.c: revision 1.351 Limit buffer size for device capabilities requests as a work-around for PR kern/56109.
2022-02-01Pull up the following revisions, requested by msaitoh in ticket #1420:martin
sys/dev/pci/ixgbe/ixgbe.c 1.264,1.269,1.272, 1.306 via patch Four INTx related fixes: - Fix a bug that the all interrupt sources are enabled when the interface is UP and the INTx line is shared with other devices. - Fix a bug that it might incorrectly enable interrupt when IFF_RUNNING is not set. - Don't process TX/RX if a queue interrupt isn't occurred. - Increment legacy interrupt counter after checking INTx sharing.
2022-01-31Pull up following revision(s) (requested by msaitoh in ticket #1416):martin
sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.19 sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.31 sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.23 sys/dev/pci/ixgbe/if_sriov.c: revision 1.17 sys/dev/pci/ixgbe/ixv.c: revision 1.172 sys/dev/pci/ixgbe/ixv.c: revision 1.173 sys/dev/pci/ixgbe/ixgbe.c: revision 1.301 sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.55 sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.29 sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.16 sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.17 sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.18 Add code to support API version 1.5. No functional change. - This change adds almost all code to support API 1.5 except real negotiation and upgrade mailbox functions. - From ix-3.3.18, ix-3.3.22 and ixv-1.5.24. Enable mailbox API 1.5 support. Tested on ESXi with ixgben 1.10.3.0. Don't clear mailbox related counters in ixgbe_upgrade_mbx_params_vf(). Don't clear mailbox related counters in ixgbe_upgrade_mbx_params_pf().
2022-01-31Pull up following revision(s) (requested by riastradh in ticket #1415):martin
sys/dev/usb/usbnet.c: revision 1.44 (via patch) usbnet: Defer hardware multicast filter updates to USB task. Breaks deadlock: - usbnet_detach holds usbnet lock, awaits kpause in ure_reset - callout holds softclock `lock' (sequential softints, blocks kpause wakeup), awaits softnet_lock in tcp_timer_keep, frag6_fasttimo, &c. - soclose holds softnet_lock, awaits usbnet lock in SIOCDELMULTI This change breaks the deadlock by not passing the SIOCADDMULTI or SIOCDELMULTI ioctl synchronously to the driver, which typically takes the usbnet lock. With this change, the ethernet layer still maintains the list of multicast addresses synchronously, but we defer the driver logic that updates the hardware multicast filter to an asynchronous USB task without softnet_lock held. This doesn't cause exactly the same ioctl to be sent to the driver -- usbnet just sends SIOCDELMULTI with an all-zero struct ifreq, and might drop some ioctls if issued in quick succession. This is OK because none of the drivers actually distinguish between SIOCADDMULTI and SIOCDELMULTI, or examine the argument; the drivers just commit whatever multicast addresses are listed in the ethercom. Other than the different ioctl submitted, there is no change to the ABI or locking scheme of usbnet, so this is safe to pull up to netbsd-9. This means we unfortunately can't guarantee that if a process issues SIOCADDMULTI and then sendto, the multicast filter update will be done by the time of the sendto -- and, more importantly, the packets received in reply to it. But failing to guarantee that is better than deadlocking! Later changes on HEAD will restore the synchronous multicast filter updates with much more extensive ABI changes and API simplifications in usbnet(9). Proposed on tech-net: https://mail-index.netbsd.org/tech-net/2021/12/30/msg008164.html XXX pullup-9
2022-01-30Pull up the following revisions, requested by msaitoh in ticket #1414:martin
sys/dev/pci/ixgbe/if_sriov.c 1.12-1.16 sys/dev/pci/ixgbe/ixgbe.c 1.295-1.297,1.300,1.304 via patch sys/dev/pci/ixgbe/ixgbe.h 1.84 sys/dev/pci/ixgbe/ixgbe_82598.c 1.17-1.18 sys/dev/pci/ixgbe/ixgbe_82598.h 1.9 sys/dev/pci/ixgbe/ixgbe_82599.c 1.24-1.28 sys/dev/pci/ixgbe/ixgbe_82599.h 1.8 sys/dev/pci/ixgbe/ixgbe_api.c 1.26-1.27 sys/dev/pci/ixgbe/ixgbe_api.h 1.16 sys/dev/pci/ixgbe/ixgbe_bypass.h 1.3 sys/dev/pci/ixgbe/ixgbe_common.c 1.34-1.42 sys/dev/pci/ixgbe/ixgbe_common.h 1.15-1.16 sys/dev/pci/ixgbe/ixgbe_dcb.c 1.12-1.13 sys/dev/pci/ixgbe/ixgbe_dcb.h 1.8-1.9 sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.10-1.12 sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.8 sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.10-1.11 sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.8 sys/dev/pci/ixgbe/ixgbe_fdir.h 1.4 sys/dev/pci/ixgbe/ixgbe_features.h 1.4 sys/dev/pci/ixgbe/ixgbe_mbx.c 1.13-1.15 sys/dev/pci/ixgbe/ixgbe_mbx.h 1.15-1.18 sys/dev/pci/ixgbe/ixgbe_netmap.c 1.5 sys/dev/pci/ixgbe/ixgbe_osdep.c 1.8 sys/dev/pci/ixgbe/ixgbe_osdep.h 1.31 sys/dev/pci/ixgbe/ixgbe_phy.c 1.25-1.29 sys/dev/pci/ixgbe/ixgbe_phy.h 1.13 sys/dev/pci/ixgbe/ixgbe_rss.h 1.6 sys/dev/pci/ixgbe/ixgbe_sriov.h 1.5 sys/dev/pci/ixgbe/ixgbe_type.h 1.51-1.54 sys/dev/pci/ixgbe/ixgbe_vf.c 1.28-1.29 sys/dev/pci/ixgbe/ixgbe_vf.h 1.15 sys/dev/pci/ixgbe/ixgbe_x540.c 1.20-1.22 sys/dev/pci/ixgbe/ixgbe_x540.h 1.10 sys/dev/pci/ixgbe/ixgbe_x550.c 1.21-1.25 sys/dev/pci/ixgbe/ixgbe_x550.h 1.7 sys/dev/pci/ixgbe/ixv.c 1.170, 1.174-1.175 via patch - Add typecast for type mismatch. - Fix retry count calculation of I2C read/write. - Wait longer for link after fiber MAC setup. - ixv(4): Use adapter->mta for the multicast array memory instead of the on-stack array. - Match X550_PHY_ID correctly on X550. - Print NVM image version on 82598. - Use 64bit for lxon + lxoff. - Don't expose garbage data of hw.ixvN.debug. - Some NetBSD unrelated changes: - Fix infinite recursion on PCIe link down if VMDQ is used. - Move PF mailbox initialization from ixgbe_attach() to ixgbe_init_iov(). - Add IPv6 mask for flow director. - Change error level in ixgbe_fc_autoneg(). - Check host interface return status when writing NVM. - Change DCB credit parameters. - Restore some mailbox related functions. Revert part of ixgbe_mbx.c rev. 1.7 and ixgbe_mbx.h rev. 1.11. No functional change. - Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}. No functional change. - Remove unused argument. Change argument. - Remove unnecessary return value check. - Remove debug error message. - Remove dead code. - Add some unused macros. - Fix typo in comment. - Rename some functions. - Sort lines, modify comment. - Whitespace fix.
2022-01-29Pull up the following revisions, requested by msaitoh in ticket #1412:martin
sys/dev/pci/pci_subr.c 1.232-1.239 via patch sys/dev/pci/pcireg.h 1.62-1.63 - Decode link control2's Compliance Preset/De-emphasis more. - Decode Physical Layer 16.0 GT/s extended capability. - Decode Lane Margining at the Receiver extended capability. - Print "reserved" instead of "unknown" when printing equalization preset. One of them is known to be the default value. - Fix typo.
2022-01-29Pull up the following revisions (all via patch), requested by msaitohmartin
in ticket #1410: sys/dev/mii/makphy.c 1.67,1.69-1.72 sys/dev/mii/makphyvar.h 1.3-1.4 - Add I347-AT4 support. - Add three workarounds for QEMU e1000: - QEMU sets BMSR_EXTSTAT but the access to register 15 fails. Set EXTSR_1000TFDX and EXTSR_1000THDX if the access failed in the attach function. It's just a cosmetic change. - Marvell 88E1[01]11 have the Fiber/Copper auto selection feature, but QEMU doesn't implement it. If the register access failed, the media is regarded as copper only. It's just a cosmetic change. - QEMU provides the PHY specific status register at 0x11 but the link indication bit (PSSR_LINK) is always 1. It causes "virsh domif-setlink xxx yyy down" doesn't work. To avoid this problem, read the BMSR and check the BMSR_LINK bit. Add MAKPHY_QUIRK_PSSR_LINK bit for this quirk. Set it if MII_EXTSR doesn't exist because it's one of the case of QEMU. - Reduce the number of access to the ESSR register. One of the reason is that the register is not implemented on QEMU. Another reason is that it's not required to access the register if the device is in the copper only mode.
2022-01-29Pull up following revision(s) (requested by msaitoh in ticket #1409):martin
sys/dev/mii/igphy.c: revision 1.37 sys/dev/mii/ihphy.c: revision 1.19 sys/dev/mii/makphy.c: revision 1.68 Fix a bug that "ifconfig xx0 media none" set LINK_STATE_UNKNOWN instead of LINK_STATE_DOWN. XXX We should check for other PHY drivers, too.
2022-01-29Pull up the following revisions (all via patch), requested by msaitohmartin
in ticket #1408: sys/dev/pci/ixgbe/ixgbe_vf.h 1.16-1.17 sys/dev/pci/ixgbe/ixv.c 1.176-1.177 Make ifconfig -z ixvN clear event counter.
2022-01-29Pullup the following revisions, requested by msaitoh:martin
sys/dev/pci/ixgbe/ixgbe.c 1.298, 1.303 via patch Add some missing error counters to ierror.
2022-01-20Pull up following revision(s) (requested by riastradh in ticket #1399):martin
sys/dev/acpi/acpi_display.c: revision 1.21 acpiout(4): Work around firmware that doesn't like some brightnesses. Instead of just asking for cur - 5 or cur + 5, repeatedly ask for that increment, check whether we actually made progress in that direction, and if not keep going with another increment, until we hit the bounds of brightness levels. I can't find anything in the ACPI spec about this, but my laptop seems to have trouble with certain levels: 15, 75, 85, 95. It goes in all other increments of 5 from 5 to 100, just not those ones -- acts as if the change just never happened, so with the old logic the brightness up/down would get stuck unable to move in either direction. This should have no impact on machines where the first increment actually takes.
2022-01-18Pull up following revision(s) (requested by martin in ticket #1405):snj
sys/dev/usb/usb_quirks.c: revision 1.102 Ignore new APC UPS devices when matching uhid devices.
2022-01-18regen for ticket 1404snj
2022-01-18Pull up following revision(s) (requested by martin in ticket #1404):snj
sys/dev/usb/usbdevs: revision 1.800 Add a new APC UPS device id.
2022-01-18Pull up following revision(s) (requested by bouyer in ticket #1403):martin
sys/dev/usb/usb_quirks.c: revision 1.103 Add UQ_HID_IGNORE for the Microchip PICkit2 and 3 programmers.
2022-01-18Regen for ticket #1402 (add Microchip PICkit3 programmer)martin
2022-01-18Pull up following revision(s) (requested by bouyer in ticket #1402):martin
sys/dev/usb/usbdevs: revision 1.801 Add the Microchip PICkit3 programmer
2021-12-30Pull up following revision(s) (requested by riastradh in ticket #1398):martin
sys/dev/cgd.c: revision 1.142 cgd(4): Fix criterion for detach when wedgies are held. The somewhat confusingly named DK_BUSY(dksc, pmask) answers the following question: Suppose I hold either the character or the block device (but not both) of all of the partitions in pmask. Is anyone else using the disk, rendering it unsafe to detach? This is useful for ioctls like CGDIOCCLR and VNDIOCCLR, which must be issued on open file descriptors for the disk, so the question cannot simply be answered by testing whether dk_openmask != 0. Instead, DK_BUSY breaks the question into the following criteria: 1. Are there any _other_ partitions than those in pmask open at all? If so, it must be someone else, since I only hold partitions in pmask -- hence the disk is busy. 2. Are any of the partitions in pmask open _both_ as a block device _and_ as a character device? If so, it must be someone else, since I only hold _either_ the character _or_ the block device open but not both -- hence the disk is busy. When config_detach_all runs at shutdown time, it tries to detach cgd(4), which has DVF_DETACH_SHUTDOWN; this is important so we submit queued writes to the underlying disk and wait for them to complete with dk_drain. If cgd(4) has any dk wedges with file systems mounted still configured on it, it isn't ready to detach yet. But asking DK_BUSY(dksc, 1 << RAW_PART) returns false, because the dk wedges only hold RAW_PART open as a block device -- so if nobody has RAW_PART open as a character device, or any other partitions open, cgd_detach blithely goes on its way to forcibly detach the wedges. Instead, ask DK_BUSY(dksc, 0), because the caller -- cgd_detach issued by config_detach_all -- does not, in fact, hold any partitions open, so it doesn't need to work around them like ioctl(CGDIOCCLR) does. Fixes hang in zfs on dk on cgd during shutdown (and probably also zfs on cgd without any intervening dk but I haven't tested). (This change might have the side effect that `drvctl -d cgdN' doesn't work, but I don't care.) XXX pullup-9 XXX pullup-8 (...-7, -6, -5...)
2021-12-30Pull up following revision(s) (requested by riastradh in ticket #1397):martin
sys/dev/pckbport/synaptics.c: revision 1.71 synaptics(4): New sysctl knob for debug output. Set hw.synaptics.debug=1 to re-enable it; the compile-time DIAGNOSTIC option was inappropriate for this.
2021-12-19Pull up following revision(s) (requested by mrg in ticket #1395):martin
sys/dev/usb/usb_quirks.c: revision 1.101 add two additional cyperpower ups ids for ignore hid.
2021-12-19regen for ticket #1395 (add two more models of cyperpower UPS)martin
2021-12-19Pull up following revision(s) (requested by mrg in ticket #1395):martin
sys/dev/usb/usbdevs: revision 1.799 add two more models of cyperpower UPS.
2021-12-19Pull up following revision(s) (requested by mrg in ticket #1394):martin
sys/dev/raidframe/rf_diskqueue.c: revision 1.63 (patch) call buf_destroy() after buf_init(). hopefully fixes the lockdebug problem shown here: http://mail-index.netbsd.org/tech-kern/2021/12/10/msg027851.html but seems unlikely to fix the original problem. tested on i386/anita. ok oster@ XXX: pullup-9 (netbsd-8 uses old APIs.)
2021-12-14Pull up following revision(s) (requested by riastradh in ticket #1393):martin
sys/dev/cgd.c: revision 1.141 cgd(4): Wait for worker threads to complete before destroying mutex. Fixes PR kern/56546 (probably!).
2021-12-08Pull up following revision(s) (requested by hauke in ticket #1392):martin
sys/dev/ipmi.c: revision 1.6 sys/dev/ipmi.c: revision 1.7 sys/dev/ipmi.c: revision 1.8 sys/dev/ipmi.c: revision 1.9 Fail open when ipmi device was found. Clear sc_envsys on failure to prevent double-free. ipmi(4): Use config_pending_incr/decr. Don't abuse autoconf's private (and incoherent) dv_flags. ipmi(4): Notify config_pending_decr when ready, not when dying. Should fix hang at boot. ipmi(4): Tidy up ipmi_thread a little. - Join on detach -- don't free anything until thread has exited; thread may still be using stuff. - Nix dead error branch -- malloc(M_WAITOK) cannot fail. - x = malloc(sizeof(x[0]) * n), not x = malloc(sizeof(type_t) * n)
2021-12-08Pull up the following revisions, requested by msaitoh in ticket #1391:martin
sys/arch/x86/include/specialreg.h 1.171, 1.173-1.178 sys/arch/x86/x86/identcpu.c 1.106, 1.117, 1.122 via patch sys/dev/nvmm/x86/nvmm_x86.c 1.18 sys/external/bsd/drm2/drm/drm_cache.c 1.14 sys/external/bsd/drm2/include/asm/cpufeature.h 1.5 usr.sbin/cpuctl/arch/i386.c 1.114-1.117 - Add LA57, PKE, PKS, CET, CET_U, CET_S, HWP, KL, AVX512_BF16, TME_EN and PCONFIG. - Rename some macros to match the x86 specification and the other OSes. - Print CPUID 0x8000008 %ebx on Intel, too. - Print CPUID leaf 7 subleaf 1. - Identify Tiger Lake, 3rd gen Xeon Scalable (Ice Lake), Elkhart Lake and Jasper Lake. - Add comment. - KNF. Whitespace fix.
2021-12-07Pull up the following revisions, requested by msaitoh in ticket #1388:martin
sys/dev/i2c/spdmem_i2c.c 1.23-1.25 via patch - Carefully access to the I2C bus in the match function. - Improve bank reset code for DDR4.
2021-12-06Pull up following revision(s) (requested by msaitoh in ticket #1387):martin
sys/dev/i2c/sdtemp.c: revision 1.41 Use aprint_debug instead of aprint_error for expected failure.
2021-12-06Pull up following revision(s) (requested by riastradh in ticket #1386):martin
sys/dev/usb/ehci.c: revision 1.287 ehci: Replace bogus polling during suspend by taking bus lock. The system is not at high IPL or limited to a single CPU at this point; it is running essentially normally, just with some devices suspended. Other threads might be trying to touch EHCI registers, which might have bad outcomes while we're suspending stuff. Enabling polling only makes sense if there is a single thread and single CPU running, such as when we enter ddb on crash.
2021-12-03Pull up the following revisions, requested by msaitoh in ticket #1384:martin
sys/dev/pci/pcireg.h 1.152-1.154, 1.156-1.161 sys/dev/pci/pci_subr.c 1.222, 1.227-1.232 via patch sys/dev/pci/nvme_pci.c 1.31 sys/dev/pci/pci.c 1.158, 1.163 sys/dev/pci/ppb.c 1.74 - When parsing Enhanced Allocation entries, use the correct calculation for finding the next entry. - Add 32.0GT/s to the list of pcie speeds (PCIe 5.x.). - Add Some PCI config information: - Lane Margining at the Receiver - NVME admin interface - UFSHCI - InfiniBand - Host fabric - HDA 1.0 with vendor ext - USB4 HCI - MIPI I3C - Cellular controller/modem (+ Ethernet) - Change PCI_VENDOR_MASK and PCI_PRODUCT_MASK to unsigned values, to prevent sign extension of product ID when shifted up into place in PCI_ID_CODE(). Fixes PR kern/56176. - Add LCAP & LCAP2 definitions. - Use PCI-SIG official acronyms for some macros. - Fix typo in some messages. - Fix typo in comments. - Whitespace fixes.