[diff] lpbl(4): driver for TI LP8550 backlight controller (found in e.g. MacBook Air 6,2)

2016-01-09 Thread Sviatoslav Chagaev
Hi, I'm running -current on Apple MacBook Air 6,2. I installed using Jasper's instructions [1], OpenBSD is the only OS and boots via EFI. I'm experiencing a problem with LCD backlight: on wakeup from suspend, the backlight brightness is not restored and becomes unadjustable. If adjusted down, it

Re: [patch] kern/exec_script: return error when the shell name is not specified

2016-01-09 Thread Michael McConville
Maxim Pugachev wrote: > In a case when the shell name is not specified (i.e. just "#!" without > a path), don't run the heavy logic that checks shell, simply return > ENOENT. I'm not sure whether this is a reasonable thing to do. Someone with more kernel API experience will have to comment. > Als

fix iwn firmware error during init

2016-01-09 Thread Stefan Sperling
I've run into an issue where iwn(4) fails to init the hardware. Running 'ifconfig iwn0 scan' resulted in: setting configuration iwn0: fatal firmware error firmware error log: error type = "SYSASSERT" (0x0005) program counter = 0x00022088 source line = 0x00A4 error data

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2016-01-09 Thread Jiri B
On Sun, Dec 06, 2015 at 05:23:22PM +, Stuart Henderson wrote: > The bigger problem is "dual use" devices; e.g. some want UPS to attach > to upd(4), others want ugen(4) for use with NUT/apcupsd. Your code is > partially useful for these, but because it just changes things at attach, > won't surv

0 is UIO_USERSPACE

2016-01-09 Thread Martin Natano
0 is the same as UIO_USERSPACE, but more readable. No binary change. Index: ./arch/octeon/dev/amdcf.c === RCS file: /cvs/src/sys/arch/octeon/dev/amdcf.c,v retrieving revision 1.1 diff -u -p -u -r1.1 amdcf.c --- ./arch/octeon/dev/amdcf

klog uiomove() conversion

2016-01-09 Thread Martin Natano
Below the uiomove() conversion for kern/subr_log.c. msg_buf[rsx] are all of type long, but are always positive. This diff prevents truncation of uio_resid (and l) due to min() usage. Index: kern/subr_log.c === RCS file: /cvs/src/sys/k

sys_pipe.c uiomove() conversion

2016-01-09 Thread Martin Natano
Below the uiomove() conversion for kern/sys_pipe.c. This diff eliminates a potential overflow of the nread variable. I think it would benefit readability to sprinkle some ulmin()/MIN() into that code and wrap lines to <80 chars, but that's probably a matter for another diff. Including those change

Re: ipmi(4) - Stop watchdog internal timer properly

2016-01-09 Thread Masao Uebayashi
On Thu, Jan 07, 2016 at 01:48:53PM +0900, Masao Uebayashi wrote: > Reflected kettenis@'s comments: > - Initialize sc_wdog_period before use. > - Define less stupid register names. > > * > > When stopping wdog, not only disabling reboot, but also stop timer. Forgot to mention the reason: Without

Re: drm_drv.c uiomove() conversion

2016-01-09 Thread Mark Kettenis
> Date: Sat, 9 Jan 2016 11:03:13 +0100 > From: Martin Natano > > Below the uiomove() conversion for drm_drv.c. ev->event->length is a > u_int32_t, thus the implicit conversion to size_t should be > non-problematic. Thanks. That fact is enshrined in the Linux userland API, so it should never cha

Re: uvm_io.c uiomove() conversion

2016-01-09 Thread Mark Kettenis
> Date: Sat, 9 Jan 2016 11:00:32 +0100 > From: Martin Natano > > Below the conversion for uvm_io.c. The sz variable is already a size_t. Thanks. Committed. > Index: uvm/uvm_io.c > === > RCS file: /cvs/src/sys/uvm/uvm_io.c,v > retr

bpf uiomove() conversion

2016-01-09 Thread Martin Natano
Below the uiomove() conversion for bpf. bd_hlen is a signed integer, but can't be negative, because it contains the size of a buffer. Thus, the conversion to size_t is ok. Index: net/bpf.c === RCS file: /cvs/src/sys/net/bpf.c,v retrie

uvm_io.c uiomove() conversion

2016-01-09 Thread Martin Natano
Below the conversion for uvm_io.c. The sz variable is already a size_t. Index: uvm/uvm_io.c === RCS file: /cvs/src/sys/uvm/uvm_io.c,v retrieving revision 1.25 diff -u -p -u -r1.25 uvm_io.c --- uvm/uvm_io.c14 Mar 2015 03:38:53

drm_drv.c uiomove() conversion

2016-01-09 Thread Martin Natano
Below the uiomove() conversion for drm_drv.c. ev->event->length is a u_int32_t, thus the implicit conversion to size_t should be non-problematic. Index: ./dev/pci/drm/drm_drv.c === RCS file: /cvs/src/sys/dev/pci/drm/drm_drv.c,v retrie

wsevent.c uiomove() conversion

2016-01-09 Thread Martin Natano
Below the uiomove() conversion for dev/wscons/wsevent.c. 'cnt' could as well be a size_t, but using u_int makes clear, that it will never exceed UINT_MAX, and that 'ev->get = cnt;' won't overflow. Index: dev/wscons/wsevent.c === RCS f

pledge position in vi

2016-01-09 Thread Martijn van Duren
Hello tech@, I'm playing around with vi some more and found that pledge was placed before a declaration, which triggered (by stricter compiler flags) a: warning: ISO C90 forbids mixed declarations and code I agree that it's cleaner to set the declaration of optstr before pledge. Sincerely, M

ksyms uiomove() conversion

2016-01-09 Thread Martin Natano
Below the uiomove() conversion for dev/ksyms.c. 'len' is a size_t. Index: dev/ksyms.c === RCS file: /cvs/src/sys/dev/ksyms.c,v retrieving revision 1.30 diff -u -p -u -r1.30 ksyms.c --- dev/ksyms.c 29 Aug 2015 01:58:39 - 1.30