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 ei

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 &channel called "nowake

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 > > ssdfb

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. Similar

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 would

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 > retrie

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 ackno

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 dt

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 i

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: ms

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 it

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 b/sys

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. >

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: 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 bootloader

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 A

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 sense:

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: a

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

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. Additionall

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: 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 of

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: 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. > > > > > Ma

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 th

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: /cvs/src/sha

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? > > Ah,

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 i

com(4) at pci

2020-03-03 Thread Patrick Wildt
c* at sdhc?# SD/MMC bus diff --git a/sys/dev/pci/com_pci.c b/sys/dev/pci/com_pci.c new file mode 100644 index 000..cfb6e238bea --- /dev/null +++ b/sys/dev/pci/com_pci.c @@ -0,0 +1,242 @@ +/* $OpenBSD$ */ +/* + * Copyright (c) 2020 Patrick Wildt + * + * Permission to use, co

Re: New bwfm device (bcm43341)

2020-03-13 Thread Patrick Wildt
On Fri, Mar 13, 2020 at 02:49:33PM +0100, Rob Schmersel wrote: > Hi, > > I got a new toy to play with recently which uses a bcm43341 wireless > chipset. This chipset is the same as the bcm43340 apart from an > additional nfc mode and can re-use the brcmfmac43340-sdio.bin firmware. > (I simply adde

Re: New bwfm device (bcm43341)

2020-03-13 Thread Patrick Wildt
On Fri, Mar 13, 2020 at 05:54:01PM +0100, Rob Schmersel wrote: > On Fri, 13 Mar 2020 16:31:18 +0100 > Patrick Wildt wrote: > > Thanks for the diff! Since Linux uses the same firmware (43340) for > > both 43340 and 43341, I commited the diff slightly differently to > > fo

Re: Fix brightness control on ASUS 1005PXD

2020-03-16 Thread Patrick Wildt
On Sat, Mar 14, 2020 at 04:28:26AM +0100, Alexandre Ratchov wrote: > On ASUS 1001PXD, _BQC returns an out of range value which makes > acpivout_get_brightness() return -1, in turn breaking the > display.brightness control (wsconsctl displays a mangled value). > > This diff ignores the out of range

usb(4): use cacheable buffers for data transfers (massive speedup)

2020-03-18 Thread Patrick Wildt
Hi, I've spent a few days investigating why USB ethernet adapters are so horribly slow on my ARMs. Using dt(4) I realized that it was spending most of its time in memcpy. But, why? As it turns out, all USB data buffers are mapped COHERENT, which on some/most ARMs means uncached. Using cached da

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-03-18 Thread Patrick Wildt
On Wed, Mar 18, 2020 at 11:22:40AM +0100, Patrick Wildt wrote: > Hi, > > I've spent a few days investigating why USB ethernet adapters are so > horribly slow on my ARMs. Using dt(4) I realized that it was spending > most of its time in memcpy. But, why? As it turns out, al

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > On Wed, Apr 01, 2020 at 12:58:23PM +1100, Jonathan Gray wrote: > > On Wed, Mar 18, 2020 at 01:41:06PM +0100, Patrick Wildt wrote: > > > On Wed, Mar 18, 2020 at 11:22:40AM +0100, Patrick Wildt wrote: > > >

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > > On Wed, Apr 01, 2020 at 12:58:23PM +1100, Jonathan Gray wrote: > > > On Wed, Mar 18, 2020 at 01:41:06PM +0100, Patrick Wildt wrote: > > > &

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 09:40:06AM +0200, Patrick Wildt wrote: > On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > > On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > > > On Wed, Apr 01, 2020 at 12:58:23PM +1100, Jonathan Gray wrote: > > > &

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 12:04:25PM +0200, Patrick Wildt wrote: > On Wed, Apr 01, 2020 at 09:40:06AM +0200, Patrick Wildt wrote: > > On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > > > On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > > > &

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-02 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 12:23:53PM +0200, Patrick Wildt wrote: > On Wed, Apr 01, 2020 at 12:04:25PM +0200, Patrick Wildt wrote: > > On Wed, Apr 01, 2020 at 09:40:06AM +0200, Patrick Wildt wrote: > > > On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > > > &

coherent em(4) descriptor rings (to be able to run on my arm64 machine)

2020-04-26 Thread Patrick Wildt
Hi, I have a HummingBoard Pulse, which is an NXP i.MX8MQ based board featuring two ethernets, with the second ethernet being an em(4) on a PCIe controller. I had trouble getting it to work, but realized that the issue is the descriptor ring coherency. I looked into the code, tried to find if the

Re: [patch] Check for -1 explicitly in getpeereid.c

2020-04-26 Thread Patrick Wildt
Hi, I don't know userland very well, so I have a question. In the middle of 2019 there have been plenty of changes in regards to changing checks of syscalls from < 0 to a more strict == -1, like this one in isakmpd: revision 1.26 date: 2019/06/28 13:32:44; author: d

sdmmc: CIS tuple can have empty body

2020-04-28 Thread Patrick Wildt
Hi, on my i.MX8MM EVK there's a ath10k-based WiFi chip which we unfortunately do not support (yet?). But the SD/MMC CIS parser complains: sdmmc0: CIS parse error at 4136, tuple code 0x14, length 0 manufacturer 0x0271, product 0x0701 at sdmmc0 function 1 not configured It's not a transmission bu

Re: sdmmc: CIS tuple can have empty body

2020-04-28 Thread Patrick Wildt
On Tue, Apr 28, 2020 at 11:16:43PM +0200, Patrick Wildt wrote: > Hi, > > on my i.MX8MM EVK there's a ath10k-based WiFi chip which we > unfortunately do not support (yet?). But the SD/MMC CIS parser > complains: > > sdmmc0: CIS parse error at 4136, tuple code 0x14, leng

libsa's in_cksum() cannot handle payload of odd-length?

2020-05-18 Thread Patrick Wildt
Hi, I was trying to tftpboot and had an issue with files of odd-length. As it turns out, I think the in_cksum() that's called for UDP payload cannot handle a payload length that's not aligned to 16 bytes. I don't know how in_cksum() is supposed to work exactly, but it looks like the first step is

Re: libsa's in_cksum() cannot handle payload of odd-length?

2020-05-18 Thread Patrick Wildt
On Mon, May 18, 2020 at 05:50:28PM +0200, Claudio Jeker wrote: > On Mon, May 18, 2020 at 03:50:05PM +0200, Patrick Wildt wrote: > > Hi, > > > > I was trying to tftpboot and had an issue with files of odd-length. > > As it turns out, I think the in_cksum() that's c

Re: libsa's in_cksum() cannot handle payload of odd-length?

2020-05-18 Thread Patrick Wildt
On Mon, May 18, 2020 at 10:16:27AM -0600, Theo de Raadt wrote: > I suspect there are other inconsistancies in all these versions. > > ./sys/arch/arm/arm/in_cksum_arm.S > ./sys/arch/i386/i386/in_cksum.s > ./sys/arch/sparc64/sparc64/in_cksum.S > ./sys/arch/sh/sh/in_cksum.S These are assembly and fo

powerpc64: Target Info in clang for __OpenBSD__

2020-05-19 Thread Patrick Wildt
Hi, drahn@ was complaining to me that his cross-compiler wasn't defining __OpenBSD__ or __ELF__, and I think the fix is pretty simple. We're just missing a case in a switch-case. The .cpp file itself still compiles, but I haven't built a full clang with it. Please give it a go and report back.

Re: sparc64 boot issue on qemu

2020-05-30 Thread Patrick Wildt
On Sat, May 30, 2020 at 07:21:15PM +, Miod Vallat wrote: > Yet another case where the emulator does not match the real hardware. > > Why bother with them? > > Get qemu to fix their shit so that the frame buffer metrics variable are > aligned on 64-bit boundaries. There might not be a written

Re: WireGuard patchset for OpenBSD, rev. 3

2020-06-21 Thread Patrick Wildt
On Sun, Jun 21, 2020 at 10:06:52AM -0400, Sonic wrote: > Along that line, does wireguard have any problems using alias > addresses? It's not a problem with IKEv1 but it is with IKEv2. > > Thanks! > > Chris I still don't see how this is a problem with IKEv2, so don't spread any rumours and instea

Re: SSE in kernel?

2020-06-23 Thread Patrick Wildt
On Tue, Jun 23, 2020 at 06:51:20AM -0400, Bryan Steele wrote: > On Mon, Jun 22, 2020 at 11:10:10PM -0700, jo...@armadilloaerospace.com wrote: > > Are SSE instructions allowed in the AMD64 kernel? Is #ifdef __SSE__ > > a sufficient guard? > > > > I have a rasops32 putchar with SSE that is 2x faste

umass(4): consistently use sc_xfer_flags for polling mode

2020-06-23 Thread Patrick Wildt
Hi, when powering down, sd(4) will trigger a powerdown on it's umass(4) USB stick. If the device fails to respond, for whatever reason, the umass(4) code will do multiple reset mechanism, and one of those uses a control transfer. Unfortunately the control transfer is not passed the sc_xfer_flags

xhci(4): acknowledge interrupts before calling usb_schedsoftintr()

2020-06-23 Thread Patrick Wildt
Hi, I had issues with a machine hanging on powerdown. The issue is caused by sd(4)'s suspend method trying to "power down" my umass(4) USB stick. The symptom was that during powerdown, when running in "polling mode", the first transaction (send command to power down to USB stick) works: We enque

Re: xhci: zero length multi-TRB inbound xfer does not work

2020-06-24 Thread Patrick Wildt
On Tue, Jun 16, 2020 at 06:55:27AM +, sc.dy...@gmail.com wrote: > hi, > > The function xhci_event_xfer_isoc() of sys/dev/usb/xhci.c at line 954 > does not work with zero length multi-TRB inbound transfer. > >949/* >950 * If we queued two TRBs for a fram

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 s

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). >

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
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 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: 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 lit

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 > ==

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 The

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

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 d

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 nee

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 > > > setting

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: 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

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 max

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

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

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: 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 th

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, but

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 se

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-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: 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 i

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: 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. Al

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 initia

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 hypervisor d

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: [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 m

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-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: > > &

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 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: 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 little with

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 t

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

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 option

ssdfb(4): SSD1309 OLED display (128x64)

2018-07-27 Thread Patrick Wildt
le dev/fdt/ssdfb.c ssdfb diff --git a/sys/dev/fdt/ssdfb.c b/sys/dev/fdt/ssdfb.c new file mode 100644 index 000..ca136e0a28f --- /dev/null +++ b/sys/dev/fdt/ssdfb.c @@ -0,0 +1,441 @@ +/* $OpenBSD$ */ +/* + * Copyright (c) 2018 Patrick Wildt + * + * Permission to use, copy, mo

ssdfb(4): mmap(2) support for X11

2018-07-31 Thread Patrick Wildt
Hi, this adds mmap(2) support for ssdfb(4), so we can map the framebuffer from userland and have X11 or another graphical program write into it. ok? Patrick diff --git a/sys/dev/fdt/ssdfb.c b/sys/dev/fdt/ssdfb.c index e91762a0ad2..8f141608c91 100644 --- a/sys/dev/fdt/ssdfb.c +++ b/sys/dev/fdt/s

Re: ssdfb(4): SSD1309 OLED display (128x64)

2018-08-01 Thread Patrick Wildt
On Tue, Jul 31, 2018 at 03:05:11PM +0200, Mark Kettenis wrote: > You might want to look at what the udl(4) driver does. The kernel > driver lives in sys/dev/usb/udl.c and implements a "damage" ioctl that > updates a region of the actual framebuffer from the virtual > framebuffer that lives in phys

Re: Using shift on external keyboards in softraid passphrases from efiboot

2018-08-24 Thread Patrick Wildt
On Fri, Aug 24, 2018 at 10:47:27AM +0200, Theo Buehler wrote: > On Fri, Aug 24, 2018 at 11:50:51AM +0900, YASUOKA Masahiko wrote: > > Hi, > > > > I think the diff should be brought to arm64 as well. ok? > > ok. But shouldn't armv7 also be kept in sync? Exactly. > > > > > On Thu, 23 Aug 2018

Re: memory leaks in bwfm

2018-09-18 Thread Patrick Wildt
The code hands off the reponsibility of ctl and ctl->buf to bs_txctl which will free both buffers if there is an error enqueueing the command. Only if bs_txctl succeeds in enqueueing and there is a response timeout we can free it. Thus, not ok. If this pattern is not understandable then we can w

Re: Add "Spleen 5x8" font to wsfont

2018-09-21 Thread Patrick Wildt
On Thu, Sep 20, 2018 at 09:44:09PM +0200, Frederic Cambus wrote: > Hi tech@, > > Here is a diff to add "Spleen 5x8" to wsfont, a font targetted at small > OLED displays to be used with devices handled by ssdfb(4). It contains > all printable ASCII characters (96 glyphes). > > The font is 2-Clause

lldb: build and install

2018-10-02 Thread Patrick Wildt
Hi, we already do have the sources for LLDB, the only thing left to do is add the build infrastructure so that we actually compile all the independent pieces and link them together. Aparently LLDB also makes use of some of the clang libraries, so those are part of LLDB linking dependencies as wel

Re: lldb: build and install

2018-10-03 Thread Patrick Wildt
On Tue, Oct 02, 2018 at 06:07:22PM +0200, Mark Kettenis wrote: > > Date: Tue, 2 Oct 2018 17:24:42 +0200 > > From: Patrick Wildt > > > > Hi, > > > > we already do have the sources for LLDB, the only thing left to do is > > add the build infrastr

ure(4): VLANs and Jumbo frames

2018-10-30 Thread Patrick Wildt
Hi, I recently wanted to use VLANs on ure(4) but failed. As it turns out, hardmtu is set to 1500 which apparently does not leave enough space for the VLAN tag. It looks like the Gigabit Version does even support Jumbo frames. Thus we can set the maximum framelen on the RX path to something bigg

  1   2   3   4   5   6   >