A driver for the Maxim DS2413 1-Wire Dual Channel Addressable Switch,
that is, two open drain GPIO ports at the end of a 1-Wire bus.
Except for overdrive speed support, which is currently lacking in the
onewire(4) infrastructure, all aspects of the chip are supported. The
ports are presented as a gpio(4) bus and are operated on like any GPIO
bus would be with gpioctl.
There is an official family ID for the DS2413, but widely known clones
use an alternative. Both IDs are supported. It is also possible to
add another ID using a kernel config option, as there are some reports
of yet other family IDs out in the wild.
The chip works on the DS248x I2C to 1-Wire bridges and works on the
bitbanged gpioow driver. Tests were performed on a Virtualbox amd64
VM using umcpmio(4) as a USB to I2C bridge together with a DS2484 I2C
to 1-Wire bridge as well as directly on a RPI2 and RPI3 running
[7 lines not shown]
lint: fix integer constraints for division
In the expression 'a / b' with b > 0, lint wrongly assumed the result
would have the same bits cleared as a.
In the expression 'a % b', the resulting constraints were wrong for
negative b.
Introduce consumed flags by procedures in NPF.
Route procedures will almost always consume mbufs.
introcude a flag in the nbuf to let us know
that the nbuf has been consumed in case there is a
NULL check.
looked by martin
Pull up following revision(s) (requested by brad in ticket #582):
sys/dev/i2c/ds2482owreg.h: revision 1.2
sys/dev/onewire/onewire.c: revision 1.23
share/man/man4/ds2482ow.4: revision 1.2
sys/dev/i2c/ds2482owvar.h: revision 1.4
sys/dev/i2c/ds2482ow.c: revision 1.3
20 years ago when the 1-Wire infrastructure was ported over from
OpenBSD, the calls in the onewire_detach() function in the onewirebus
(sys/dev/onewire/onewire.c) code for config_detach_children() was
commented out. I don't know why this was done, exactly, as there
wasn't any particular comments present. I suspect it might have been
because owtemp, the common end device, could not detach or maybe
detaching just didn't work as expected at that time.
The string of devices are as follows:
End controller -> onewirebus -> End device
gpioow or ds2482ow -> -> such as owtemp or ds24e17iic
[28 lines not shown]
Pull up following revision(s) (requested by riastradh in ticket #580):
share/mk/bsd.own.mk: revision 1.1491
hppa: Enable fortify/ssp in userland for progs/libs that opt into it.
The `ssp' part doesn't actually do much (and really I'm not sure why
these options are mixed together) because hppa stack grows up, so
writing past the end of an array won't overwrite the return address,
so stack smashing in this way is extremely unlikely. But the
`fortify' part, which instruments functions like memcpy/read/getcwd
with bounds checks where statically known, is still useful to catch
buffer overruns.
ok `I guess' nick@
PR lib/60858: fortuitous embarrassment: fortify is all kinds of busted
Pull up following revision(s) (requested by riastradh in ticket #579):
include/ssp/ssp.h: revision 1.17
share/mk/bsd.own.mk: revision 1.1488
share/mk/bsd.own.mk: revision 1.1489
sys/arch/sparc64/conf/Makefile.sparc64: revision 1.87
lib/libc/ssp/ssp_redirect.c: revision 1.4
sys/arch/amd64/conf/Makefile.amd64: revision 1.87
sys/conf/ssp.mk: revision 1.6
sys/conf/ssp.mk: revision 1.7
sys/arch/amd64/include/Makefile.inc: revision 1.6
sys/arch/xen/conf/Makefile.xen: revision 1.51
sys/arch/i386/include/Makefile.inc: revision 1.4
sys/arch/i386/conf/Makefile.i386: revision 1.198
ssp.h: Stop creating references to useless __ssp_protected_* symbols.
The ssp wrappers are useful _only_ when they are actually used for
inline function call expansion; if the function is used for anything
[118 lines not shown]
PR lib/60677 strfmon() - remove some (harmless) lint
Avoid using a var name that overrides an external func name
from a standard header (func not used) for a short block
(harmless change).
Remove a func param that ended up no longer being used
(just got forgotten) from two (very similar) functions.
The rest of what lint complains about is idiotic. Won't fix.
PR lib/60677 strfmon() gcc lunacy fix
Deal with gcc stupidity when chars are unsigned.
If I need to check that a char pointer points to a
char that is between 0 and N (for any N <= 127)
I should be able to just write
if (*p >= 0 && *p <= N)
and on signed char hosts, that works just fine.
On unsigned char hosts, the test *p >= 0 is
always true, so gcc decides I don't know what I
am doing, and complains.
Idiotic. It is irrelevant if *p can never be < 0
on such a host, the code is still correct, does exactly
what is needed, and ...
[12 lines not shown]
Rename the pmap_completion structure to pmap_garbage, and include a copy
in each pmap. We now try to defer releasing freed resources until a
pmap_update() call (with some exceptions; RTFS), laying the groundwork
for some future ATC-related optimizations.
rdate.8: note RFC 868 is obsolescent
From OpenBSD, specifically a mailing list post, which corrects the
maximum effective date.
https://marc.info/?l=openbsd-bugs&m=177447243611195&w=2
US NIST still supports RFC 868 queries via time.nist.gov. (For
comparison, the Canadian equivalent via NRC dropped support, citing
security concerns.)
PR lib/60677 major strfmon() overhaul
This update should get strfmon() to the state currently specified in the
expected update to the POSIX specification in the first TC for Issue 8
(whenever that appears):
https://austingroupbugs.net/view.php?id=2000
More work might be needed, as there are some issues for
which there is yet to a decision on what should be produced.
The man page is updated to better explain what is required,
and what that all means. Some minor grammar fixes, etc, as well.
The tests are updated for the results as specified, with some
new tests added. More tests are needed (to appear later).
As strfmon() is such a little used function, no pullups planned.
autoconf(9): Take device references in iteration for detach.
This avoids a race with concurrent detach that can lead to tripping
KASSERT(!dv->dv_detach_done) in config_detach -> device_acquire, even
if the device_t itself remains stable while the device iteration is
ongoing (because alldev_nwrite or alldev_nread is raised).
While here, add:
- deviter_first_acquire
- deviter_next_acquire
- device_find_by_xname_acquire
- device_find_by_driver_unit_acquire
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Revoke vnodes when unconfiguring.
This way, if you unconfigure an fss instance and reconfigure it,
anything that had it open (e.g., a file system mounted from it) won't
suddenly start mixing old cached data with new data -- instead, new
I/O operations will fail.
Not perfect -- see comments.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Use LK_SHARED, not LK_EXCLUSIVE, to read out mount point.
No need to exclude other readers.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Nix needless sc == NULL conditionals.
fss_strategy and fss_ioctl can be reached only after fss_open has
returned and (now that fss_cancel exists) before fss_close has been
called (on both block _and_ all character devices that have been
opened); between (first) open and (last) close, the autoconf unit
must exist.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Tighten fss_close a bit.
Clear last FSS_CDEV_OPEN/FSS_BDEV_OPEN in fss_close so we can assert
it in fss_detach, and pass DETACH_FORCE to fss_detach so it knows
when to expect the flags to be cleared.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type