rework em(4) tx ring handling

2016-01-07 Thread David Gwynne
i found em_txeof hard to read, so i did this. i was originally going to follow myx/re and use a separate prod/cons for a ring of packet info which would point into the descriptor ring, but came to the conclusion that the "end of packet" pointer thats already there was more elegant. it also avoids

Re: onerng(4): new TRNG device

2016-01-07 Thread Devin Reade
Third submission, based on feedback from mpi@ and deraadt@. * rename device to "uonerng" * don't discard initial bytes from the device * decrease buffer size to 128 and poll interval to 100ms * feed the first buffer of data to the RNG as soon as the device is attached, before putting the task in

Re: Sensible default interrupt polarity on amd64 and i386

2016-01-07 Thread Mike Larkin
On Thu, Jan 07, 2016 at 10:19:55PM +0100, Mark Kettenis wrote: > The sensible default polarity is active-low for level-triggered > interrupts whereas it is active-high for edge-triggered ones. We do > this correctly when the BIOS explicitly tells us that it wants > defaults. But we also should do

Sensible default interrupt polarity on amd64 and i386

2016-01-07 Thread Mark Kettenis
The sensible default polarity is active-low for level-triggered interrupts whereas it is active-high for edge-triggered ones. We do this correctly when the BIOS explicitly tells us that it wants defaults. But we also should do it when the BIOS gives us no information. Fortunately this is easy.

Re: Get PCI resources from ACPI

2016-01-07 Thread Lampshade
Firstly diff, secondly all dmesg from unmodified and modified with yours patch kernel. OpenBSD-current amd64 with source code updated using cvs -d$CVSROOT up -D "2016-01-07 05:00" -Pd diff -u /katalogDmesg/nieZmodyfikowaneAcpiMark/dmesg.log /katalogDmesg/zmodyfikowaneAcpiMark/dmesg.log --- /

ffs: cluster_write() is a joke

2016-01-07 Thread Martin Pieuchot
I spent some time trying to implement clustering writes for MSDOSFS before I could figure out that our cluster_write() functions is not doing anything but delaying the calls do bawrite(). Awesome! So I think it's time for this code to die. The buttons can also die as we always enable read cluste

Re: new expr(1)

2016-01-07 Thread Nathan Holstein
On Tue, Jan 5, 2016 at 3:10 PM, Ted Unangst wrote: > it would be simpler to fix the bug than to rewrite the whole program, no? > > Index: expr.c > === > RCS file: /cvs/src/bin/expr/expr.c,v > retrieving revision 1.23 > diff -u -p -r1.

Re: Clustering read for MSDOSFS

2016-01-07 Thread Martin Pieuchot
On 03/01/16(Sun) 23:10, Martin Pieuchot wrote: > Reading files on msdos-formated USB sticks under OpenBSD is really slow. > *One* of the reasons is that only one block is currently read-ahead if > possible. > > Diff below converts msdosfs_read() to use bread_cluster() which at least > double the t

ext2fs: Kill unused cluster_write()

2016-01-07 Thread Martin Pieuchot
Since the introduction of the Dynamic Buffer Cache, cluster_write() is a noop. Since here it has never been enable, let's kill this code. ok? Index: ufs/ext2fs/ext2fs_readwrite.c === RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_readwrit

Re: Get PCI resources from ACPI

2016-01-07 Thread Mike Belopuhov
On Thu, Jan 07, 2016 at 06:28 +0100, Pablo Méndez Hernández wrote: > Hi team, > > On Thu, Dec 31, 2015 at 10:05 PM, Philip Guenther wrote: > > On Wed, 30 Dec 2015, Mark Kettenis wrote: > > ... > >> Updated diff. Once again the ACPI standard is ambiguous and/or violated > >> by the hardware vendo

Re: Xen virtual network (Netfront) driver

2016-01-07 Thread Mark Kettenis
> From: Mike Belopuhov > Date: Thu, 7 Jan 2016 12:02:23 +0100 > > On 6 January 2016 at 17:58, Stefan Fritsch wrote: > > On Wed, 6 Jan 2016, Mike Belopuhov wrote: > > > >> There's still stuff to do, but it receives and transmits reliably > >> (at least on modern Xen) so I'd like to get it in. Ma

sis(4) induced uvm faults on net4801

2016-01-07 Thread Nathanael Rensen
tl;dr: Zero-length packets from sis(4) on net4801 result in negative length mbufs causing uvm faults. I have observed uvm faults shortly after bringing up a sis(4) interface on a Soekris net4801: uvm_fault(0xd3adbbf0, 0xd3ee5000, 0, 1) -> e kernel: page fault trap, code=0 Stopped at memcpy+0

Re: dev/rnd.c uiovmove() conversion

2016-01-07 Thread Mark Kettenis
> Date: Thu, 7 Jan 2016 09:41:46 +0100 > From: Stefan Kempf > > Martin Natano wrote: > > Below, a diff to convert dev/rnd.c to use uiomove(). > > We also did this something similar for sosend(), although uiomovei() > would also have worked since n was guaranteed to be bounded. > > OK to commit?

Re: i386/nvram.c uiomove() conversion

2016-01-07 Thread Mark Kettenis
> Date: Thu, 7 Jan 2016 09:36:02 +0100 > From: Stefan Kempf > > Martin Natano wrote: > > Below a diff to convert i386/nvram.c to use uiomove(). A similar diff > > for amd64 has already been committed. (See > > https://marc.info/?l=openbsd-tech&m=142860367111291) Also, pos is > > converted to off_