Re: Some bwfm(4) diffs

2023-10-09 Thread Patrick Wildt
On Sun, Oct 08, 2023 at 07:42:54PM +0200, Mark Kettenis wrote: > Hector Martin has added support for the BCM4388 that is found on the > last generation of Apple Macs. Based on his commits I've managed to > get it working on my M2 Pro mini. I still have to clean up some of > that stuff, but here

xhci(4): map MSI-X

2023-04-18 Thread Patrick Wildt
Hi, I noticed that on Qemu with arm64 we're falling back to legacy interrupts with xhci(4) on PCI. Turns out that the virtual xHCI does not support MSI, but it does support MSI-X. By having xhci(4) map MSI-X as well I can use that on Qemu. My x395, which so far used MSI, is still working fine

Re: wsmouse(4): Apple-like multi-touch buttons

2023-02-07 Thread Patrick Wildt
On Tue, Feb 07, 2023 at 10:07:56PM +0100, Ulf Brosziewski wrote: > I wouldn't mind seeing such a feature in the driver, but I think there's more > to do than counting contacts. The start of a click-and-drag gesture may > involve > two contacts and a button-press event, or people who place a thumb

Re: wsmouse(4): Apple-like multi-touch buttons

2023-02-07 Thread Patrick Wildt
On Tue, Feb 07, 2023 at 02:12:57PM +0100, Tobias Heider wrote: > On Mon, Sep 19, 2022 at 11:16:51AM +0200, Ulf Brosziewski wrote: > > Is there enough interest in this feature among OpenBSD users? I haven't > > seen many requests for it, if any. Moreover, is it a good idea to configure > >

Re: gptimer(4): switch to clockintr

2023-01-24 Thread Patrick Wildt
Am Tue, Jan 24, 2023 at 10:32:49PM +0100 schrieb Mark Kettenis: > > Date: Tue, 24 Jan 2023 20:57:48 +0100 > > From: Patrick Wildt > > > > Am Mon, Jan 23, 2023 at 04:34:27PM -0600 schrieb Scott Cheloha: > > > Whoops, missed one. This is the fifth and (I think)

Re: gptimer(4): switch to clockintr

2023-01-24 Thread Patrick Wildt
Am Mon, Jan 23, 2023 at 04:34:27PM -0600 schrieb Scott Cheloha: > Whoops, missed one. This is the fifth and (I think) last armv7 clock > interrupt driver that needs to switch to clockintr. gptimer(4) is > nearly identical to dmtimer(4). > > Notable changes: > > - Switch stathz from 128 to hz.

Re: LLVM 15: mismatched bound errors

2022-12-24 Thread Patrick Wildt
On Thu, Dec 22, 2022 at 01:14:57AM +0100, Patrick Wildt wrote: > On Tue, Dec 20, 2022 at 05:48:41PM -0700, Todd C. Miller wrote: > > On Tue, 20 Dec 2022 23:44:08 +0100, Patrick Wildt wrote: > > > > > clang complains when the function is declared with a fixed array size in

Re: LLVM 15: mismatched bound errors

2022-12-21 Thread Patrick Wildt
Am Thu, Dec 22, 2022 at 01:57:37AM +0100 schrieb Jeremie Courreges-Anglas: > On Thu, Dec 22 2022, Theo Buehler wrote: > > On Thu, Dec 22, 2022 at 11:39:41AM +1100, Jonathan Gray wrote: > >> On Thu, Dec 22, 2022 at 01:20:32AM +0100, Theo Buehler wrote: > >> > > Any concerns regarding the changes

Re: LLVM 15: mismatched bound errors

2022-12-21 Thread Patrick Wildt
On Tue, Dec 20, 2022 at 05:48:41PM -0700, Todd C. Miller wrote: > On Tue, 20 Dec 2022 23:44:08 +0100, Patrick Wildt wrote: > > > clang complains when the function is declared with a fixed array size in > > a parameter while the prototype is unbounded, like this: > > > &

LLVM 15: mismatched bound errors

2022-12-20 Thread Patrick Wildt
Hi, clang complains when the function is declared with a fixed array size in a parameter while the prototype is unbounded, like this: /usr/src/sys/net/pf.c:4353:54: error: argument 'sns' of type 'struct pf_src_node *[4]' with mismatched bound [-Werror,-Warray-parameter] struct

Re: arm64 pwmbl(4): simplify ramp case

2022-11-11 Thread Patrick Wildt
On Fri, Nov 11, 2022 at 06:48:21AM +, Miod Vallat wrote: > > This actually breaks my machine. malloc() is saying allocation too > > large. OF_getproplen will return -1 on that. Is it possible that > > len is treated as uint64_t as it is an int and sizeof is effectively > > uint64_t? > >

Re: qcpmic.4, qcpmicgpio.4, etc.: Sort SEE ALSO

2022-11-10 Thread Patrick Wildt
There are other drivers with intro after others. Are we sorting those alphabetically or by relevancy? Von meinem iPhone gesendet > Am 10.11.2022 um 16:46 schrieb Josiah Frentsos : > > Index: qcpmic.4 > === > RCS file:

Re: arm64 pwmbl(4): simplify ramp case

2022-11-10 Thread Patrick Wildt
On Mon, Jul 04, 2022 at 06:47:33PM +, Miod Vallat wrote: > When the fdt does not provide a list of brightness states, pwmbl(4) > builds a 256 state ramp (i.e. state[i] = i with 0 <= i < 256). > > The following diff keeps that behaviour, but gets rid of the malloc > call for that ramp, since

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-13 Thread Patrick Wildt
Am Sun, Feb 13, 2022 at 01:39:22PM + schrieb Klemens Nanni: > On Sun, Feb 13, 2022 at 02:30:21PM +0100, Tobias Heider wrote: > > OF_getproplen() will return -1 if "reset-gpios" is not found which > > currently causes a panic: > > > > panic: malloc: allocation too large, type = 2, size =

Re: mvdog(4): add support for armada-380-wdg

2022-02-13 Thread Patrick Wildt
Am Sun, Feb 13, 2022 at 02:22:53PM +0100 schrieb Tobias Heider: > Hey, > > I'm trying to get the Turris Omnia running and one thing missing > is a driver for the armada-380-wdg. We already have a similar driver > called mvdog(4) that currently only supports the armada-3700 watchdog. > The diff

Re: Missing UBSan libs

2022-01-30 Thread Patrick Wildt
Am Sun, Jan 30, 2022 at 11:40:29AM -0800 schrieb Greg Steuck: > Greg Steuck writes: > > >> I notice people keep sending fixes to problems reported by UBSan. I > >> wanted to join the club, but the trivial thing listed at > >> https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html doesn't >

sdhc(4): make use of SDHC version 3.0 divisors to increase frequency accuracy

2022-01-18 Thread Patrick Wildt
Hi, On SDHC version 3.0 controllers the divisor doesn't have to be a power of two, but can be a multiple of two. This means we can get a lot closer to the target clock. E.g. to reach 400 kHz on a 200 MHz bus clock, the old mechanism would take 512 as divisor (== 390.612 kHz) while the new

Re: ohci(4) and ehci(4) at acpi(4)

2021-12-29 Thread Patrick Wildt
On Wed, Dec 29, 2021 at 06:43:31PM +0100, Patrick Wildt wrote: > On Wed, Dec 29, 2021 at 06:02:02PM +0100, Mark Kettenis wrote: > > > Date: Wed, 29 Dec 2021 17:16:36 +0100 > > > From: Patrick Wildt > > > > > > On Wed, Dec 29, 2021 at 05:03:50PM

Re: ohci(4) and ehci(4) at acpi(4)

2021-12-29 Thread Patrick Wildt
On Wed, Dec 29, 2021 at 06:02:02PM +0100, Mark Kettenis wrote: > > Date: Wed, 29 Dec 2021 17:16:36 +0100 > > From: Patrick Wildt > > > > On Wed, Dec 29, 2021 at 05:03:50PM +0100, Patrick Wildt wrote: > > > Hi, > > > > > > a device I have st

Re: ohci(4) and ehci(4) at acpi(4)

2021-12-29 Thread Patrick Wildt
On Wed, Dec 29, 2021 at 06:02:02PM +0100, Mark Kettenis wrote: > > We have acpi_intr_disestablish() on arm64 now... > Actually we also have it on amd64 now, so maybe we should start by removing all those ifdefs? Then there'll be less cargo-culting. ok? Patrick diff --git

Re: ohci(4) and ehci(4) at acpi(4)

2021-12-29 Thread Patrick Wildt
On Wed, Dec 29, 2021 at 05:03:50PM +0100, Patrick Wildt wrote: > Hi, > > a device I have still has oHCI and eHCI controllers, which are needed to > be able to use the second USB port. > > ehci(4) at acpi(4) is plain simple, as it attaches to PNP0D20. I have > copied the xh

ohci(4) and ehci(4) at acpi(4)

2021-12-29 Thread Patrick Wildt
Hi, a device I have still has oHCI and eHCI controllers, which are needed to be able to use the second USB port. ehci(4) at acpi(4) is plain simple, as it attaches to PNP0D20. I have copied the xhci(4) at acpi(4) file and added the functional changes that exist between xhci(4) and ehci(4) at

Re: com(4) at acpi(4) on amd64

2021-12-14 Thread Patrick Wildt
gt; > > > > > On Mon, Dec 06, 2021 at 09:23:45PM +0100, Mark Kettenis wrote: > > > > > > > > Date: Mon, 6 Dec 2021 21:08:04 +0100 > > > > > > > > From: Patrick Wildt > > > > > > > > > > > > > > > > Hi

Re: com(4) at acpi(4) on amd64

2021-12-07 Thread Patrick Wildt
+0100 > > > > From: Anton Lindqvist > > > > > > > > On Mon, Dec 06, 2021 at 09:23:45PM +0100, Mark Kettenis wrote: > > > > > > Date: Mon, 6 Dec 2021 21:08:04 +0100 > > > > > > From: Patrick Wildt > > > > > > > > >

Re: com(4) at acpi(4) on amd64

2021-12-06 Thread Patrick Wildt
Am Mon, Dec 06, 2021 at 09:23:45PM +0100 schrieb Mark Kettenis: > > Date: Mon, 6 Dec 2021 21:08:04 +0100 > > From: Patrick Wildt > > > > Hi, > > > > On one machine I had the pleasure of having to try and use the > > Serial-over-LAN feature which

com(4) at acpi(4) on amd64

2021-12-06 Thread Patrick Wildt
Hi, On one machine I had the pleasure of having to try and use the Serial-over-LAN feature which shows up as just another com(4) device. Instead of having to manually add a com(4) at isa(4) I figured it would be nicer to have them attach via ACPI. At least on that machine, the SOL definitely

Re: lib/Makefile: libfido2 requires libz

2021-11-30 Thread Patrick Wildt
On Tue, Nov 30, 2021 at 03:24:17PM -0700, Theo de Raadt wrote: > Todd C. Miller wrote: > > > On Tue, 30 Nov 2021 23:18:23 +0100, Mark Kettenis wrote: > > > > > Maybe add a comment here that libfido2 depends on libz? > > > > > > > +SUBDIR+=libfido2 > > > > Yes, please. With a comment this is

Re: lib/Makefile: libfido2 requires libz

2021-11-30 Thread Patrick Wildt
On Thu, Nov 11, 2021 at 08:27:21PM +0900, SASANO Takayoshi wrote: > Hi, > > Recently I tried to crossbuild for arm64 on amd64. > I found "TARGET=arm64 make cross-tools" stops when building libfido2. > > libfido2 requires libz but this is not built yet at that time. > lib/Makefile needs to tweak

hvkbd(4): Hyper-V Synthetic Keyboard

2021-11-14 Thread Patrick Wildt
Hi, this is a port of NetBSD's hvkbd(4). While Hyper-V Gen1 provides pckbc(4) as keyboard, Gen2's no-legcay-HW approach needs us to make use of the Synthetic Keyboard if we want to be able to type in the framebuffer console. One thing I'm not so sure about is if we really need another wskbd

Re: fix uchcom(4) handling of parity and character size config

2021-10-29 Thread Patrick Wildt
Am Wed, Oct 27, 2021 at 06:46:38AM +1000 schrieb David Gwynne: > i bought some random usb to rs485 serial adapters so i can talk > modbus to a thing, but then discovered i can't talk to the modbus > thing because uchcom doesn't support configuring parity. > > this ports the functionality to

bootloader: remove unsued variables

2021-10-25 Thread Patrick Wildt
Hi, this fixes the build of sys/arch/amd64/stand with LLVM 13. ok? Patrick diff --git a/sys/lib/libsa/netif.c b/sys/lib/libsa/netif.c index d1a5e180291..79c6496878e 100644 --- a/sys/lib/libsa/netif.c +++ b/sys/lib/libsa/netif.c @@ -85,7 +85,7 @@ netif_match(struct netif *nif, void

some warnings in prep for LLVM 13

2021-10-25 Thread Patrick Wildt
Hi, mortimer@ has this diff in his tree for LLVM 13. I actually haven't tried to see if it works fine with LLVM 11, but I feel it needs to be sent out and not just be blindly committed. If someone wants to take care of this, it would be nice, so I can take care of the remaining parts of sending

Re: riscv64: ld.lld is too picky on ABI mismatch

2021-10-25 Thread Patrick Wildt
Am Mon, Oct 25, 2021 at 11:43:55AM +0200 schrieb Mark Kettenis: > > From: Jeremie Courreges-Anglas > > Date: Sun, 24 Oct 2021 17:30:46 +0100 > > > > clang(1) defaults to FP ABI but ld(1) -melf64lriscv doesn't. This is > > a problem as soon as a port tries to use raw ld(1) -b binary to embed > >

Re: crypto: remove crypto queue

2021-10-21 Thread Patrick Wildt
On Fri, Oct 22, 2021 at 12:03:07AM +0200, Tobias Heider wrote: > Currently, all crypto users set CRYPTO_F_NOQUEUE to run crypto operations > without queue and there are no plans to switch back to using the queue. > The diff below removes the flag together with the queueing code. > > ok? Looks

agintc(4): initialize IGROUP (tests required on RK3399 like RockPro64 or Pinebook Pro)

2021-10-21 Thread Patrick Wildt
Hi, This diff is one of two steps in getting Parallels on Apple M1s to work. It initializes two registers to configure the interrupts as GNS1. It works fine on the Ampere machine that I have access to, but it would be very nice if someone can give this a try on an RK3399 machine like the

Re: Handle openbsd,dma-constraint on armv7

2021-10-04 Thread Patrick Wildt
Am Mon, Oct 04, 2021 at 01:42:48PM + schrieb Visa Hankala: > On the Zynq-7000, the lowest 512KiB of physical address space usually > contains RAM that is usable by the CPUs. However, many other bus > masters, such as the Ethernet and SDIO controllers, are not able to > access the 256KiB range

avoid sched lock recursion in sleep_signal_check()

2021-09-09 Thread Patrick Wildt
Hi, one step to (at some point) change the sched lock to a mutex is to start avoiding recursion on the sched lock. single_thread_check() always takes the sched lock. If we want to avoid recursion, we need to call the locked version and take the sched lock ourselves if we need to. Another

Re: [please test] amd64: schedule clock interrupts against system clock

2021-09-09 Thread Patrick Wildt
Am Thu, Sep 09, 2021 at 04:10:31PM +0200 schrieb Mark Kettenis: > > Date: Mon, 6 Sep 2021 21:43:29 +0200 > > From: Patrick Wildt > > > > Am Fri, Jul 30, 2021 at 07:55:29PM +0200 schrieb Alexander Bluhm: > > > On Mon, Jul 26, 2021 at 08:12:39AM -0500, Scott Chel

Re: Turn SCHED_LOCK() into a mutex

2021-09-09 Thread Patrick Wildt
Am Wed, Nov 04, 2020 at 09:13:22AM -0300 schrieb Martin Pieuchot: > Diff below removes the recursive attribute of the SCHED_LOCK() by > turning it into a IPL_NONE mutex. I'm not intending to commit it > yet as it raises multiple questions, see below. > > This work has been started by art@ more

Re: mutex(9): initialize some more mutexes before use?

2021-09-09 Thread Patrick Wildt
Am Thu, Sep 09, 2021 at 12:55:13PM +0200 schrieb Mark Kettenis: > > Date: Wed, 8 Sep 2021 10:45:53 +0200 > > From: Martin Pieuchot > > > > On 07/09/21(Tue) 14:19, Patrick Wildt wrote: > > > Hi, > > > > > > I was playing around a littl

Re: [please test] amd64: schedule clock interrupts against system clock

2021-09-07 Thread Patrick Wildt
Am Tue, Sep 07, 2021 at 09:52:42PM +0200 schrieb Martin Pieuchot: > On 07/09/21(Tue) 21:47, Patrick Wildt wrote: > > Am Tue, Sep 07, 2021 at 02:43:22PM +0200 schrieb Patrick Wildt: > > > Am Mon, Sep 06, 2021 at 09:43:29PM +0200 schrieb Patrick Wildt: > > > > Am F

Re: [please test] amd64: schedule clock interrupts against system clock

2021-09-07 Thread Patrick Wildt
Am Tue, Sep 07, 2021 at 02:43:22PM +0200 schrieb Patrick Wildt: > Am Mon, Sep 06, 2021 at 09:43:29PM +0200 schrieb Patrick Wildt: > > Am Fri, Jul 30, 2021 at 07:55:29PM +0200 schrieb Alexander Bluhm: > > > On Mon, Jul 26, 2021 at 08:12:39AM -0500, Scott Cheloha wrote: > >

Re: [please test] amd64: schedule clock interrupts against system clock

2021-09-07 Thread Patrick Wildt
Am Mon, Sep 06, 2021 at 09:43:29PM +0200 schrieb Patrick Wildt: > Am Fri, Jul 30, 2021 at 07:55:29PM +0200 schrieb Alexander Bluhm: > > On Mon, Jul 26, 2021 at 08:12:39AM -0500, Scott Cheloha wrote: > > > On Fri, Jun 25, 2021 at 06:09:27PM -0500, Scott Cheloha wrote: > > &

mutex(9): initialize some more mutexes before use?

2021-09-07 Thread Patrick Wildt
Hi, I was playing around a little with the mutex code and found that on arm64 there some uninitialized mutexes out there. I think the arm64 specific one is comparatively easy to solve. We either initialize the mtx when we initialize the rest of the pmap, or we move it into the global definition

Re: [please test] amd64: schedule clock interrupts against system clock

2021-09-06 Thread Patrick Wildt
Am Fri, Jul 30, 2021 at 07:55:29PM +0200 schrieb Alexander Bluhm: > On Mon, Jul 26, 2021 at 08:12:39AM -0500, Scott Cheloha wrote: > > On Fri, Jun 25, 2021 at 06:09:27PM -0500, Scott Cheloha wrote: > > 1 month bump. I really appreciate the tests I've gotten so far, thank > > you. > > On my Xeon

virtio(4): don't require legacy mode to have an I/O BAR

2021-08-23 Thread Patrick Wildt
Hi, so on the new Parallels version, when using the 'Other' OS setting, virtio(4) won't attach. Apparently it's not Virtio 1.0, because even Fedora 34 falls back to the 'legacy' driver. While our code expects (and requires) an I/O BAR, it seems to be that the PCI device only provides two memory

Re: vmx(4): remove useless code

2021-08-06 Thread Patrick Wildt
On Fri, Aug 06, 2021 at 11:05:53AM +0200, Patrick Wildt wrote: > Am Thu, Aug 05, 2021 at 02:33:01PM +0200 schrieb Jan Klemkow: > > Hi, > > > > The following diff removes useless code from the driver. As discussed > > here [1] and committed there [2], the hyp

Re: vmx(4): remove useless code

2021-08-06 Thread Patrick Wildt
Am Thu, Aug 05, 2021 at 02:33:01PM +0200 schrieb Jan Klemkow: > Hi, > > The following diff removes useless code from the driver. As discussed > here [1] and committed there [2], the hypervisor doesn't do anything > with the data structures. We even just set NULL to the pointer since > the

Re: iked(8): Increase the default Child SA data lifetime limit

2021-08-03 Thread Patrick Wildt
Am Tue, Aug 03, 2021 at 01:40:51PM +0200 schrieb Tobias Heider: > On Tue, Aug 03, 2021 at 12:17:38PM +0100, Stuart Henderson wrote: > > On 2021/08/03 01:12, Vitaliy Makkoveev wrote: > > > iked(8) uses 3 hours and 512 megabytes of processed data as default > > > lifetime hard limits for Child SA.

Re: [please test] amd64: schedule clock interrupts against system clock

2021-07-27 Thread Patrick Wildt
On Thu, Jun 24, 2021 at 09:50:07PM -0500, Scott Cheloha wrote: > Hi, > > I'm looking for testers for the attached patch. You need an amd64 > machine with a lapic. > > This includes: > > - All "real" amd64 machines ever made > - amd64 VMs running on hypervisors that provide a virtual lapic > >

Re: pf icmp reflect

2021-07-26 Thread Patrick Wildt
On Mon, Jul 26, 2021 at 06:41:42PM +0200, Alexander Bluhm wrote: > Hi, > > The mbuf header cleanup I added in revision 1.173 of ip_icmp.c is > too strict. ICMP error packets generated by pf are not passed > immediately, but may be blocked. Preserve PF_TAG_GENERATED flag > in icmp_reflect() and

Re: dwiic(4): wait for tx empty when hitting tx limit

2021-07-13 Thread Patrick Wildt
Am Mon, Jul 05, 2021 at 07:52:28PM +0200 schrieb Mark Kettenis: > > Date: Mon, 5 Jul 2021 19:30:28 +0200 > > From: Patrick Wildt > > > > Am Mon, Jul 05, 2021 at 07:07:24PM +0200 schrieb Mark Kettenis: > > > > Date: Mon, 5 Jul 2021 19:02:32 +0200 > > &g

Re: dwiic(4): wait for tx empty when hitting tx limit

2021-07-05 Thread Patrick Wildt
Am Mon, Jul 05, 2021 at 07:07:24PM +0200 schrieb Mark Kettenis: > > Date: Mon, 5 Jul 2021 19:02:32 +0200 > > From: Patrick Wildt > > > > Am Mon, Jul 05, 2021 at 06:34:31PM +0200 schrieb Mark Kettenis: > > > > Date: Mon, 5 Jul 2021 00:04:24 +0200 > > &g

Re: dwiic(4): wait for tx empty when hitting tx limit

2021-07-05 Thread Patrick Wildt
Am Mon, Jul 05, 2021 at 06:34:31PM +0200 schrieb Mark Kettenis: > > Date: Mon, 5 Jul 2021 00:04:24 +0200 > > From: Patrick Wildt > > > > Hi, > > > > I had trouble interfacing with a machine's IPMI through dwiic(4). What > > I saw was that when sending

dwiic(4): wait for tx empty when hitting tx limit

2021-07-04 Thread Patrick Wildt
Hi, I had trouble interfacing with a machine's IPMI through dwiic(4). What I saw was that when sending 'bigger' commands, it would never receive the STOP bit interrupt. The trouble is, as can be seen in the log, that we want to send (it says read, but it's a write OP, so it's send) 20 bytes,

Re: Patch: Send AUTHENTICATION_FAILED in case of unexpected auth method or auth data not being accessible

2021-06-29 Thread Patrick Wildt
Am Tue, Jun 29, 2021 at 10:39:06AM + schrieb Claudia Priesterjahn: > We added two AUTHENTICATION_FAILED notifications for the cases that > the peer used an unexepected authentication method and for the case > that the peer's authentication data is not accessible. Bit of a spacing issue, but

Re: 10gbase-r support for mvpp(4)

2021-06-02 Thread Patrick Wildt
Am Wed, Jun 02, 2021 at 10:37:36PM +0200 schrieb Mark Kettenis: > Linux folks changed the device tree to use 10gbase-r instead of > 10gbase-kr since "it is more correct". Then the UEFI folks synched > their device trees to Linux and the 10G ports broke. So accept both > in the code. > > ok? >

Re: sdmmc(4): check and retry bus width change

2021-06-01 Thread Patrick Wildt
Am Mon, Feb 22, 2021 at 08:10:21PM +0100 schrieb Patrick Wildt: > Hi, > > it seems like some eMMCs are not capable of doing 8-bit operation, > even if the controller supports it. I was questioning our drivers > first, but it looks like it's the same on Linux. In the case that

nvme(4): fix prpl sync length

2021-05-31 Thread Patrick Wildt
Hi, this call to sync the DMA mem wants to sync N - 1 number of prpl entries, as the first segment is configured regularly, while the addresses for the following segments (if more than 2), are in a special DMA memory. The code currently removes a single byte, instead of an entry. This just means

mcx(4): sync only received length on RX

2021-05-31 Thread Patrick Wildt
Hi, mcx(4) seems to sync the whole mapsize on processing a received packet. As far as I know, we usually only sync the actual size that we have received. Noticed this when doing bounce buffer tests, seeing that it copied a lot more data than is necessary. That's because the RX buffer size is

Re: amd64: softintr_dispatch: remove kernel lock

2021-05-22 Thread Patrick Wildt
Am Sat, May 22, 2021 at 02:33:47PM +0200 schrieb Mark Kettenis: > > Date: Sat, 22 May 2021 11:11:38 + > > From: Visa Hankala > > > > On Wed, May 19, 2021 at 05:11:09PM -0500, Scott Cheloha wrote: > > > Hi, > > > > > > visa@ says I need to unlock softintr_dispatch() before I can > > > unlock

Re: xhci early enumeration

2021-05-21 Thread Patrick Wildt
Am Fri, May 21, 2021 at 07:24:59PM +0200 schrieb Mark Kettenis: > > Date: Fri, 21 May 2021 19:01:39 +0200 > > From: Patrick Wildt > > > > Am Fri, May 21, 2021 at 06:18:40PM +0200 schrieb Martin Pieuchot: > > > On 21/05/21(Fri) 10:48, Patrick Wildt wrote: >

Re: xhci early enumeration

2021-05-21 Thread Patrick Wildt
Am Fri, May 21, 2021 at 06:18:40PM +0200 schrieb Martin Pieuchot: > On 21/05/21(Fri) 10:48, Patrick Wildt wrote: > > Am Wed, May 19, 2021 at 07:15:50AM + schrieb Christian Ludwig: > > > The usb(4) driver allows to enumerate the bus early during boot by > > > sett

Re: xhci early enumeration

2021-05-21 Thread Patrick Wildt
Am Wed, May 19, 2021 at 07:15:50AM + schrieb Christian Ludwig: > The usb(4) driver allows to enumerate the bus early during boot by > setting its driver flags to 0x1 in UKC. This mechanism can enable a USB > console keyboard early during autoconf(9), which can come in handy at > times. This

Re: move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-20 Thread Patrick Wildt
Am Thu, May 20, 2021 at 11:28:19AM +0200 schrieb Claudio Jeker: > On Thu, May 20, 2021 at 09:37:38AM +0200, Martin Pieuchot wrote: > > On 20/05/21(Thu) 03:23, Alexandr Nedvedicky wrote: > > > Hrvoje gave a try to experimental diff, which trades rw-locks in pf(4) > > > for mutexes [1]. Hrvoje soon

hvn(4): don't input mbufs if interface is not running

2021-05-12 Thread Patrick Wildt
Hi, when hvn(4) attaches it sends commands and waits for replies to come back in, hence the interrupt function is being polled. Unfortunately it seems that the 'receive pipe' has both command completion and data packets. As it turns out, while hvn(4) is just setting up the pipes, it can already

enable dt(4)

2021-04-26 Thread Patrick Wildt
Hi, as proposed by bluhm@ recently, this is the diff to enable dt(4) in GENERIC. The overhead should be small, and I have been using it on arm64 to successfully debug issues for a while now. I can't vouch that it builds for all architectures... Did anyone do that? Number 1 rule: don't break

Re: tmpfs & UVM aobj

2021-04-22 Thread Patrick Wildt
Am Thu, Apr 22, 2021 at 11:19:22AM +0200 schrieb Martin Pieuchot: > uao_shrink() and uao_grow() are only used by TMPFS, ok to place them > under an #ifdef? This save some bytes on RAMDISKs. sure, ok patrick@ > Index: uvm/uvm_aobj.c >

Re: Change umb(4) devclass from DV_DULL to DV_IFNET

2021-04-20 Thread Patrick Wildt
Am Mon, Apr 19, 2021 at 10:25:39AM +0200 schrieb Tilo Stritzky: > On 10/04/21 22:56 Tilo Stritzky wrote: > > umb interfaces advertise themselves as generic devices. > > Network makes a lot more sense, I think. > > tested on amd64. > > Having seen no response on this one, I'ld like to expand a

Re: virtio(4) at fdt: version 2 for Parallels 16 on Mac (M1)

2021-04-14 Thread Patrick Wildt
Am Thu, Apr 15, 2021 at 12:47:44AM +0200 schrieb Patrick Wildt: > On Wed, Apr 14, 2021 at 11:20:56PM +0200, Patrick Wildt wrote: > > Am Wed, Apr 14, 2021 at 10:55:14PM +0200 schrieb Mark Kettenis: > > > > Date: Wed, 14 Apr 2021 22:25:16 +0200 > > > > From: Patri

Re: virtio(4) at fdt: version 2 for Parallels 16 on Mac (M1)

2021-04-14 Thread Patrick Wildt
On Wed, Apr 14, 2021 at 11:20:56PM +0200, Patrick Wildt wrote: > Am Wed, Apr 14, 2021 at 10:55:14PM +0200 schrieb Mark Kettenis: > > > Date: Wed, 14 Apr 2021 22:25:16 +0200 > > > From: Patrick Wildt > > > > > > Am Wed, Apr 14, 2021 at 10:17:58PM

Re: virtio(4) at fdt: version 2 for Parallels 16 on Mac (M1)

2021-04-14 Thread Patrick Wildt
Am Wed, Apr 14, 2021 at 10:55:14PM +0200 schrieb Mark Kettenis: > > Date: Wed, 14 Apr 2021 22:25:16 +0200 > > From: Patrick Wildt > > > > Am Wed, Apr 14, 2021 at 10:17:58PM +0200 schrieb Patrick Wildt: > > > Hi, > > > > > > Parallels 16 for M

Re: virtio(4) at fdt: version 2 for Parallels 16 on Mac (M1)

2021-04-14 Thread Patrick Wildt
Am Wed, Apr 14, 2021 at 10:17:58PM +0200 schrieb Patrick Wildt: > Hi, > > Parallels 16 for Mac supports the Apple M1 SoC now, and since it does > provide an EFI 'BIOS', our images boot out of the box (once converted > to 'hdd' or supplied as USB stick). > > Unfortunately

virtio(4) at fdt: version 2 for Parallels 16 on Mac (M1)

2021-04-14 Thread Patrick Wildt
Hi, Parallels 16 for Mac supports the Apple M1 SoC now, and since it does provide an EFI 'BIOS', our images boot out of the box (once converted to 'hdd' or supplied as USB stick). Unfortunately virtio doesn't attach, because Parallels seems to provide a 'new' version 2. The following diff adds

Re: uvideo(4) new quirk flag UVIDEO_FLAG_NOATTACH

2021-04-05 Thread Patrick Wildt
Am Mon, Apr 05, 2021 at 11:19:02PM +0200 schrieb Mark Kettenis: > > Date: Mon, 5 Apr 2021 23:15:23 +0200 > > From: Marcus Glocker > > > > On Mon, Apr 05, 2021 at 07:30:43AM -0700, Greg Steuck wrote: > > > > > OK gnezdo with a usability question inline. > > > > Thanks. See below. > > > > >

Re: simpleaudio: set sysclk before using it

2021-04-05 Thread Patrick Wildt
Am Sun, Apr 04, 2021 at 11:17:54PM +0200 schrieb Mark Kettenis: > > Date: Sun, 4 Apr 2021 22:24:57 +0200 > > From: Klemens Nanni > > Cc: Mark Kettenis > > > > On Sun, Apr 04, 2021 at 10:01:50PM +0200, Mark Kettenis wrote: > > > > Date: Sun, 4 Apr 2021 21:08:09 +0200 > > > > From: Klemens Nanni

Re: cwfg: Use meaningful alert level, track apm's battery state better

2021-03-31 Thread Patrick Wildt
Am Mon, Mar 29, 2021 at 07:16:18AM +0200 schrieb Klemens Nanni: > The datasheet says the hardware's default State-Of-Charge threshold is > three percent, i.e. the gauge pulls down the pin to logic low at 3% > remaining battery life. > > My Pinebook Pro's fuel gauge actually shows an alert level

Re: Huawei ME906s-158 LTE, cdce(4) vs umb(4)

2021-03-28 Thread Patrick Wildt
Am Sun, Mar 28, 2021 at 10:53:53AM +0100 schrieb Stuart Henderson: > On 2021/03/25 00:14, Stuart Henderson wrote: > > On 2021/03/25 00:30, Patrick Wildt wrote: > > > Without having looked at anything, it might be worth looking at the most > > > recent mail in this threa

Re: cwfg: flag sensor as invalid on bogus reads

2021-03-26 Thread Patrick Wildt
Am Sat, Mar 27, 2021 at 12:00:32AM +0100 schrieb Klemens Nanni: > On Fri, Mar 26, 2021 at 11:22:32PM +0100, Patrick Wildt wrote: > > It's pretty normal for voltage to go up once AC is connected. In the > > end, afaik batteries are charged by applying voltage. Additionally >

Re: efiboot/arm64: fix "mach dtb" return code to avoid bogus boot

2021-03-26 Thread Patrick Wildt
Am Sat, Mar 27, 2021 at 12:09:25AM +0100 schrieb Klemens Nanni: > On Fri, Mar 26, 2021 at 11:28:37PM +0100, Patrick Wildt wrote: > > > fdt = (void *)addr; > > > - return (0); > > > + return (1); > > > > Wait, you've been saying that return code 1 ma

Re: apm/arm64: fix errno, merge ioctl cases

2021-03-26 Thread Patrick Wildt
Am Sat, Mar 20, 2021 at 08:01:51PM +0100 schrieb Klemens Nanni: > The EBADF error is always overwritten for the standby, suspend and > hibernate ioctls, only the mode ioctl has it right. > > Merge the now identical casese while here. > > Tested on a Pinebook Pro. > > OK? ok patrick@ > Index:

Re: efiboot/arm64: fix "mach dtb" return code to avoid bogus boot

2021-03-26 Thread Patrick Wildt
Am Wed, Mar 24, 2021 at 07:20:29PM +0100 schrieb Klemens Nanni: > Bootloader command functions must return zero in case of failure, > returning 1 tells the bootloader to boot the file. > > arm64's `machine dtb' command has it the wrong way so using it triggers > a boot that doesn't make any

Re: cwfg: flag sensor as invalid on bogus reads

2021-03-26 Thread Patrick Wildt
Am Fri, Mar 26, 2021 at 12:26:51AM +0100 schrieb Klemens Nanni: > Follow-up to "arm64: make cwfg(4) report battery information to apm(4)". > > This driver continues to report stale hw.sensors values when reading > them fails, which can easily be observed on a Pinebook Pro after > plugging in the

Re: fyi: get HP EliteBook 830 G7/G8 booting

2021-03-26 Thread Patrick Wildt
Am Fri, Mar 26, 2021 at 12:12:44PM +0100 schrieb Mark Kettenis: > > Date: Fri, 26 Mar 2021 19:43:23 +0900 (JST) > > From: YASUOKA Masahiko > > > > Hi, > > > > On Fri, 26 Mar 2021 09:30:43 +0100 > > Jan Klemkow wrote: > > > If you want to boot OpenBSD on an HP EliteBook 830 G7/G8, the

Re: Huawei ME906s-158 LTE, cdce(4) vs umb(4)

2021-03-24 Thread Patrick Wildt
On Wed, Mar 24, 2021 at 11:23:11PM +, Stuart Henderson wrote: > In my ongoing search to find a umb(4) that will actually work that > isn't the one in my laptop (since my EM7305 has been a failure), > I picked up a Huawei ME906s-158 off ebay. It attaches to cdce and ugen > and fails to work: >

Re: ixl(4): add ID for X710 10G SFP+

2021-03-15 Thread Patrick Wildt
Am Mon, Mar 15, 2021 at 08:59:05AM +0100 schrieb Jan Klemkow: > On Mon, Mar 15, 2021 at 01:35:28AM -0600, Theo de Raadt wrote: > > My comments are about the "text name", which goes into every kernel > > anyone compiles. > > > > It should be as short as possible. > > Sorry, I missed that point. >

acpi(4): pass DMA tag to ACPI tables

2021-03-06 Thread Patrick Wildt
Hi, to be able to have acpiiort(4) pass a DMA tag to smmu(4), acpiiort(4) needs to be passed a DMA tag. So far acpi(4) only seems to pass it on acpi_foundhid(), but the ACPI table drivers don't get it. So, let's just pass the default DMA tag. ok? Patrick diff --git a/sys/dev/acpi/acpi.c

Re: Read `ps_single' once

2021-03-04 Thread Patrick Wildt
Am Thu, Mar 04, 2021 at 10:42:24AM +0100 schrieb Mark Kettenis: > > Date: Thu, 4 Mar 2021 10:34:24 +0100 > > From: Martin Pieuchot > > > > Running t/rw/msleep(9) w/o KERNEL_LOCK() implies that a thread can > > change the value of `ps_single' while one of its siblings might be > > dereferencing

Re: fix nvme(4): NULL deref. and empty device attachments

2021-02-24 Thread Patrick Wildt
Am Wed, Feb 24, 2021 at 05:34:48PM +0100 schrieb Jan Klemkow: > Hi, > > While attaching the following disks, the nvme driver runs into a NULL > dereference in nvme_scsi_capacity16() and nvme_scsi_capacity(). > > nvme0 at pci1 dev 0 function 0 vendor "Intel", unknown product 0x0a54 rev > 0x00:

sdmmc(4): check and retry bus width change

2021-02-22 Thread Patrick Wildt
Hi, it seems like some eMMCs are not capable of doing 8-bit operation, even if the controller supports it. I was questioning our drivers first, but it looks like it's the same on Linux. In the case that 8-bit doesn't work, they seem to fall back to lower values to make that HW work. This diff

Re: add simplepmbus(4)

2021-02-17 Thread Patrick Wildt
Am Wed, Feb 17, 2021 at 11:56:16AM +1100 schrieb Jonathan Gray: > Add a driver for "simple-pm-bus" a way to enable a clock and/or > power domain for a group of devices. > > https://www.kernel.org/doc/Documentation/devicetree/bindings/bus/simple-pm-bus.txt > > This is needed to use am335x/omap4

Re: Posted vs. non-posted device access

2021-02-14 Thread Patrick Wildt
Am Mon, Feb 15, 2021 at 09:55:56AM +1000 schrieb David Gwynne: > > > > On 15 Feb 2021, at 07:54, Mark Kettenis wrote: > > > > One of the aspects of device access is whether CPU writes to a device > > are posted or non-posted. For non-posted writes, the CPU will wait > > for the device to

Re: Add missing break statement on if_rge.c

2021-02-11 Thread Patrick Wildt
Am Thu, Feb 11, 2021 at 12:24:37PM + schrieb Ricardo Mestre: > Hi, > > Add missing break statement. OK? makes sense to me, ok patrick@ > CID 1501710 > > Index: if_rge.c > === > RCS file: /cvs/src/sys/dev/pci/if_rge.c,v >

Re: isakmpd link dynamically

2021-02-11 Thread Patrick Wildt
Am Thu, Feb 11, 2021 at 11:29:58AM +0100 schrieb Alexander Bluhm: > - recommit in /usr/src/usr.sbin -> we loose history I know no one cares about git, but if the move was committed in a "single cvs commit", git would understand it's simply a move of files. So yeah, cvs wouldn't cope, but git

Re: Swapped arguments on stoeplitz_ip{4,6}port

2021-02-11 Thread Patrick Wildt
Already committed as of 7 minutes ago, heh! Am Thu, Feb 11, 2021 at 10:48:16AM + schrieb Ricardo Mestre: > Hi, > > It seems this got the args swapped as described in CID 1501717. > > stoeplitz_ip6port being a macro for stoeplitz_hash_ip6port and the arguments > placed as shown below.

Re: rasops1

2020-12-23 Thread Patrick Wildt
Am Wed, Dec 23, 2020 at 11:32:58PM +0100 schrieb Frederic Cambus: > Hi Mark, > > On Fri, Dec 18, 2020 at 10:33:52PM +0100, Mark Kettenis wrote: > > > The diff below disables the optimized functions on little-endian > > architectures such that we always use rasops1_putchar(). This makes > >

Re: tsleep(9): add global "nowake" channel

2020-12-23 Thread Patrick Wildt
Am Wed, Dec 23, 2020 at 05:04:23PM -0600 schrieb Scott Cheloha: > On Wed, Dec 23, 2020 at 02:42:18PM -0700, Theo de Raadt wrote: > > I agree. This chunk below is really gross and does not follow the > > special wakeup channel metaphor. > > > > It is *entirely clear* that a called "nowake" has

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-23 Thread Patrick Wildt
Am Wed, Dec 23, 2020 at 10:44:21AM +0100 schrieb Marcus Glocker: > On Wed, 23 Dec 2020 09:47:44 +0100 > Marcus Glocker wrote: > > > On Tue, 22 Dec 2020 20:55:41 +0100 > > Marcus Glocker wrote: > > > > > > > Did you consider incrementing xx->ntrb instead? > > > > > > >That doesn't work

Re: uplcom driver update for 23a3 (HXN) chip

2020-10-26 Thread Patrick Wildt
On Mon, Oct 26, 2020 at 09:12:17AM +0100, Stefan Huber wrote: > Hey all, > > I recently got hands on an USB-TTY converter that is not (yet) supported by > OpenBSD: > > > addr 03: 067b:23a3 Prolific Technology Inc., USB-Serial Controller > > Simply adding the device ID to usbdevs and the uplcom

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-10-11 Thread Patrick Wildt
On Sun, Oct 11, 2020 at 08:12:29AM +0200, Martin Pieuchot wrote: > On 09/10/20(Fri) 12:37, Jonathon Fletcher wrote: > > In xhci_xfer_get_trb, the count of transfer buffers in the pipe > > (xp->free_trbs) is always decremented but the count of transfer buffers > > used in the transfer (xx->ntrb)

  1   2   3   4   5   >