CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: palle Date: Fri Jun 17 21:59:06 UTC 2016 Added Files: src/sys/arch/sparc64/dev: vbus.c vbusvar.h vrtc.c Log Message: sun4v: vbus and vrtc drivers - from OpenBSD To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/sparc64/dev/vbus.c \ src/sys/arch/sparc64/dev/vbusvar.h src/sys/arch/sparc64/dev/vrtc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: palle Date: Fri Jun 17 21:59:06 UTC 2016 Added Files: src/sys/arch/sparc64/dev: vbus.c vbusvar.h vrtc.c Log Message: sun4v: vbus and vrtc drivers - from OpenBSD To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/sparc64/dev/vbus.c \ src/sys/arch/sparc64/dev/vbusvar.h src/sys/arch/sparc64/dev/vrtc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/sparc64/dev/vbus.c diff -u /dev/null src/sys/arch/sparc64/dev/vbus.c:1.1 --- /dev/null Fri Jun 17 21:59:06 2016 +++ src/sys/arch/sparc64/dev/vbus.c Fri Jun 17 21:59:06 2016 @@ -0,0 +1,273 @@ +/* $NetBSD: vbus.c,v 1.1 2016/06/17 21:59:06 palle Exp $ */ +/* $OpenBSD: vbus.c,v 1.8 2015/09/27 11:29:20 kettenis Exp $ */ +/* + * Copyright (c) 2008 Mark Kettenis + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include +extern todr_chip_handle_t todr_handle; + +#ifdef DEBUG +#define VBUS_INTR 0x01 +int vbus_debug = 0x00|VBUS_INTR; +#define DPRINTF(l, s) do { if (vbus_debug & l) printf s; } while (0) +#else +#define DPRINTF(l, s) +#endif + +struct vbus_softc { + device_t sc_dv; + bus_space_tag_t sc_bustag; + bus_dma_tag_t sc_dmatag; +}; +int vbus_cmp_cells(int *, int *, int *, int); +int vbus_match(device_t, cfdata_t, void *); +void vbus_attach(device_t, device_t, void *); +int vbus_print(void *, const char *); + +CFATTACH_DECL_NEW(vbus, sizeof(struct vbus_softc), +vbus_match, vbus_attach, NULL, NULL); + +void *vbus_intr_establish(bus_space_tag_t, int, int, +int (*)(void *), void *, void (*)(void)); +void vbus_intr_ack(struct intrhand *); +bus_space_tag_t vbus_alloc_bus_tag(struct vbus_softc *, bus_space_tag_t); + +int +vbus_match(device_t parent, cfdata_t match, void *aux) +{ + struct mainbus_attach_args *ma = aux; + + if (strcmp(ma->ma_name, "virtual-devices") == 0) + return (1); + + return (0); +} + +void +vbus_attach(device_t parent, device_t self, void *aux) +{ + struct vbus_softc *sc = (struct vbus_softc *)self; + struct mainbus_attach_args *ma = aux; + int node; + + sc->sc_bustag = vbus_alloc_bus_tag(sc, ma->ma_bustag); + sc->sc_dmatag = ma->ma_dmatag; + printf("\n"); + + for (node = OF_child(ma->ma_node); node; node = OF_peer(node)) { + struct vbus_attach_args va; + char buf[32]; + + bzero(, sizeof(va)); + va.va_node = node; + if (OF_getprop(node, "name", buf, sizeof(buf)) <= 0) + continue; + va.va_name = buf; + va.va_bustag = sc->sc_bustag; + va.va_dmatag = sc->sc_dmatag; + prom_getprop(node, "reg", sizeof(*va.va_reg), + _nreg, (void **)_reg); + prom_getprop(node, "interrupts", sizeof(*va.va_intr), + _nintr, (void **)_intr); + config_found(self, , vbus_print); + } + + struct vbus_attach_args va; + bzero(, sizeof(va)); + va.va_name = "rtc"; + config_found(self, , vbus_print); + +} + +int +vbus_print(void *aux, const char *name) +{ + struct vbus_attach_args *va = aux; + + if (name) + printf("\"%s\" at %s", va->va_name, name); + return (UNCONF); +} + +/* + * Compare a sequence of cells with a mask, return 1 if they match and + * 0 if they don't. + */ +int +vbus_cmp_cells(int *cell1, int *cell2, int *mask, int ncells) +{ + int i; + + for (i = 0; i < ncells; i++) { + if (((cell1[i] ^ cell2[i]) & mask[i]) != 0) + return (0); + } + return (1); +} + +int +vbus_intr_map(int node, int ino, uint64_t *sysino) +{ + int *imap = NULL, nimap; + int *reg = NULL, nreg; + int *imap_mask; + int parent; + int address_cells, interrupt_cells; + uint64_t devhandle; + uint64_t devino; + int len; + int err; + + DPRINTF(VBUS_INTR, ("vbus_intr_map(): ino 0x%x\n", ino)); + + parent = OF_parent(node); + + address_cells = prom_getpropint(parent, "#address-cells", 2); + interrupt_cells = prom_getpropint(parent, "#interrupt-cells", 1); + KASSERT(interrupt_cells == 1); + + len = OF_getproplen(parent, "interrupt-map-mask"); + if (len < (address_cells + interrupt_cells) * sizeof(int)) + return (-1); + imap_mask = malloc(len, M_DEVBUF, M_NOWAIT); + if (imap_mask == NULL) + return (-1); + if (OF_getprop(parent, "interrupt-map-mask", imap_mask, len) != len) + return (-1);
CVS commit: src/sys/arch/sparc64/doc
Module Name:src Committed By: palle Date: Fri Jun 17 21:52:27 UTC 2016 Modified Files: src/sys/arch/sparc64/doc: TODO Log Message: Update sparc64 TODO: sun4u specfic code in TRAP_SETUP() + make a note about importing the man pages for the sun4v specific drivers To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc64/doc/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/doc/TODO diff -u src/sys/arch/sparc64/doc/TODO:1.18 src/sys/arch/sparc64/doc/TODO:1.19 --- src/sys/arch/sparc64/doc/TODO:1.18 Sat Jun 4 21:26:26 2016 +++ src/sys/arch/sparc64/doc/TODO Fri Jun 17 21:52:27 2016 @@ -1,4 +1,4 @@ - /* $NetBSD: TODO,v 1.18 2016/06/04 21:26:26 palle Exp $ */ + /* $NetBSD: TODO,v 1.19 2016/06/17 21:52:27 palle Exp $ */ Things to be done: @@ -27,4 +27,6 @@ sun4v: - vpci.c/vpcivar.h: cleanup FIXMEs - interrups not handled properly (com at ebus only...) - mpt(4) complains: mpt0: Phy 0: Link Status Unknown -- locore.s: TRAP_SETUP() - sun4u specific ASI_DMMU \ No newline at end of file +- locore.s: TRAP_SETUP() - sun4u specific ASI_DMMU +- man pages for drivers imported from OpenBSD lke vpci, vbus etc. +
CVS commit: src/sys/arch/sparc64/doc
Module Name:src Committed By: palle Date: Fri Jun 17 21:52:27 UTC 2016 Modified Files: src/sys/arch/sparc64/doc: TODO Log Message: Update sparc64 TODO: sun4u specfic code in TRAP_SETUP() + make a note about importing the man pages for the sun4v specific drivers To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc64/doc/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc64/conf
Module Name:src Committed By: palle Date: Fri Jun 17 21:38:09 UTC 2016 Modified Files: src/sys/arch/sparc64/conf: GENERIC files.sparc64 Log Message: sun4v: vbus and vrtc drivers - from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.190 src/sys/arch/sparc64/conf/GENERIC cvs rdiff -u -r1.149 -r1.150 src/sys/arch/sparc64/conf/files.sparc64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc64/conf
Module Name:src Committed By: palle Date: Fri Jun 17 21:38:09 UTC 2016 Modified Files: src/sys/arch/sparc64/conf: GENERIC files.sparc64 Log Message: sun4v: vbus and vrtc drivers - from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.190 src/sys/arch/sparc64/conf/GENERIC cvs rdiff -u -r1.149 -r1.150 src/sys/arch/sparc64/conf/files.sparc64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/conf/GENERIC diff -u src/sys/arch/sparc64/conf/GENERIC:1.189 src/sys/arch/sparc64/conf/GENERIC:1.190 --- src/sys/arch/sparc64/conf/GENERIC:1.189 Thu May 26 10:38:07 2016 +++ src/sys/arch/sparc64/conf/GENERIC Fri Jun 17 21:38:09 2016 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.189 2016/05/26 10:38:07 nakayama Exp $ +# $NetBSD: GENERIC,v 1.190 2016/06/17 21:38:09 palle Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/sparc64/conf/std.sparc64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.189 $" +#ident "GENERIC-$Revision: 1.190 $" maxusers 64 @@ -247,6 +247,7 @@ ebus* at mainbus0# ebus devices ebus* at pci? # ebus devices # XXX 'puc's aren't really bridges, but there's no better place for them here puc* at pci? dev ? function ? # PCI "universal" comm. cards +vbus0 at mainbus0 Standard system devices -- all required for a given architecture @@ -273,6 +274,9 @@ rtc* at ebus? ## Timer chip found on 4/300, sun4c, sun4m and (some) sun4u systems. timer* at mainbus0# sun4c +# Virtual devices for sun4v systems. +vrtc0 at vbus? + Serial port configuration ## Zilog 8530 serial chips. Each has two-channels. Index: src/sys/arch/sparc64/conf/files.sparc64 diff -u src/sys/arch/sparc64/conf/files.sparc64:1.149 src/sys/arch/sparc64/conf/files.sparc64:1.150 --- src/sys/arch/sparc64/conf/files.sparc64:1.149 Tue Oct 6 16:40:36 2015 +++ src/sys/arch/sparc64/conf/files.sparc64 Fri Jun 17 21:38:09 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.sparc64,v 1.149 2015/10/06 16:40:36 martin Exp $ +# $NetBSD: files.sparc64,v 1.150 2016/06/17 21:38:09 palle Exp $ # @(#)files.sparc64 8.1 (Berkeley) 7/19/93 # sparc64-specific configuration info @@ -69,6 +69,10 @@ file arch/sparc64/dev/ebus.c ebus attach ebus at mainbus with ebus_mainbus file arch/sparc64/dev/ebus_mainbus.c ebus_mainbus +device vbus {} +attach vbus at mainbus +file arch/sparc64/dev/vbus.c vbus + device clock: mk48txx attach clock at sbus with mkclock_sbus attach clock at ebus with mkclock_ebus @@ -312,3 +316,8 @@ include "arch/sparc64/conf/majors.sparc6 # OpenFirmware convenience stuff file dev/ofw/ofw_subr.c + +# Virtual rtc +device vrtc +attach vrtc at vbus +file arch/sparc64/dev/vrtc.c vrtc
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Jun 17 19:45:24 UTC 2016 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-6.11.1 To generate a diff of this commit: cvs rdiff -u -r1.1338 -r1.1339 src/doc/3RDPARTY cvs rdiff -u -r1.2171 -r1.2172 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Jun 17 19:45:24 UTC 2016 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-6.11.1 To generate a diff of this commit: cvs rdiff -u -r1.1338 -r1.1339 src/doc/3RDPARTY cvs rdiff -u -r1.2171 -r1.2172 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1338 src/doc/3RDPARTY:1.1339 --- src/doc/3RDPARTY:1.1338 Mon Jun 6 10:52:09 2016 +++ src/doc/3RDPARTY Fri Jun 17 19:45:24 2016 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1338 2016/06/06 10:52:09 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.1339 2016/06/17 19:45:24 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -306,8 +306,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 6.11.0 -Current Vers: 6.11.0 +Version: 6.11.1 +Current Vers: 6.11.1 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2171 src/doc/CHANGES:1.2172 --- src/doc/CHANGES:1.2171 Sun Jun 12 06:21:56 2016 +++ src/doc/CHANGES Fri Jun 17 19:45:24 2016 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2171 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2172 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -319,3 +319,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0: sys_info: Import a script to return version information for system libraries and utilities [agc 20160604] nvmectl(8): Added NVM Express control utility. [nonaka 20160604] + dhcpcd(8): Import dhcpcd-6.11.1. [roy 20160617]
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Jun 17 19:42:32 UTC 2016 Modified Files: src/external/bsd/dhcpcd/dist: arp.c arp.h bpf-filter.h defs.h dhcp-common.c dhcp.c dhcp.h dhcp6.c dhcp6.h dhcpcd.c dhcpcd.conf.5.in dhcpcd.h if-bsd.c if-options.c if.c if.h ipv4.c ipv4.h ipv4ll.c ipv4ll.h ipv6.c ipv6.h ipv6nd.c script.c src/external/bsd/dhcpcd/dist/dhcpcd-hooks: 20-resolv.conf 30-hostname Log Message: Sync To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/bsd/dhcpcd/dist/arp.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/arp.h \ src/external/bsd/dhcpcd/dist/dhcp6.h cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/bpf-filter.h cvs rdiff -u -r1.27 -r1.28 src/external/bsd/dhcpcd/dist/defs.h \ src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/dhcp-common.c \ src/external/bsd/dhcpcd/dist/dhcpcd.h src/external/bsd/dhcpcd/dist/ipv4.h cvs rdiff -u -r1.42 -r1.43 src/external/bsd/dhcpcd/dist/dhcp.c cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/dhcp.h \ src/external/bsd/dhcpcd/dist/if.h src/external/bsd/dhcpcd/dist/ipv4ll.c cvs rdiff -u -r1.21 -r1.22 src/external/bsd/dhcpcd/dist/dhcp6.c \ src/external/bsd/dhcpcd/dist/if.c cvs rdiff -u -r1.34 -r1.35 src/external/bsd/dhcpcd/dist/dhcpcd.c cvs rdiff -u -r1.30 -r1.31 src/external/bsd/dhcpcd/dist/if-bsd.c cvs rdiff -u -r1.33 -r1.34 src/external/bsd/dhcpcd/dist/if-options.c cvs rdiff -u -r1.22 -r1.23 src/external/bsd/dhcpcd/dist/ipv4.c cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/ipv4ll.h cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/ipv6.c \ src/external/bsd/dhcpcd/dist/ipv6.h cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/ipv6nd.c cvs rdiff -u -r1.26 -r1.27 src/external/bsd/dhcpcd/dist/script.c cvs rdiff -u -r1.8 -r1.9 \ src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf cvs rdiff -u -r1.7 -r1.8 \ src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Jun 17 19:42:32 UTC 2016 Modified Files: src/external/bsd/dhcpcd/dist: arp.c arp.h bpf-filter.h defs.h dhcp-common.c dhcp.c dhcp.h dhcp6.c dhcp6.h dhcpcd.c dhcpcd.conf.5.in dhcpcd.h if-bsd.c if-options.c if.c if.h ipv4.c ipv4.h ipv4ll.c ipv4ll.h ipv6.c ipv6.h ipv6nd.c script.c src/external/bsd/dhcpcd/dist/dhcpcd-hooks: 20-resolv.conf 30-hostname Log Message: Sync To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/bsd/dhcpcd/dist/arp.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/arp.h \ src/external/bsd/dhcpcd/dist/dhcp6.h cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/bpf-filter.h cvs rdiff -u -r1.27 -r1.28 src/external/bsd/dhcpcd/dist/defs.h \ src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/dhcp-common.c \ src/external/bsd/dhcpcd/dist/dhcpcd.h src/external/bsd/dhcpcd/dist/ipv4.h cvs rdiff -u -r1.42 -r1.43 src/external/bsd/dhcpcd/dist/dhcp.c cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/dhcp.h \ src/external/bsd/dhcpcd/dist/if.h src/external/bsd/dhcpcd/dist/ipv4ll.c cvs rdiff -u -r1.21 -r1.22 src/external/bsd/dhcpcd/dist/dhcp6.c \ src/external/bsd/dhcpcd/dist/if.c cvs rdiff -u -r1.34 -r1.35 src/external/bsd/dhcpcd/dist/dhcpcd.c cvs rdiff -u -r1.30 -r1.31 src/external/bsd/dhcpcd/dist/if-bsd.c cvs rdiff -u -r1.33 -r1.34 src/external/bsd/dhcpcd/dist/if-options.c cvs rdiff -u -r1.22 -r1.23 src/external/bsd/dhcpcd/dist/ipv4.c cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/ipv4ll.h cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/ipv6.c \ src/external/bsd/dhcpcd/dist/ipv6.h cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/ipv6nd.c cvs rdiff -u -r1.26 -r1.27 src/external/bsd/dhcpcd/dist/script.c cvs rdiff -u -r1.8 -r1.9 \ src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf cvs rdiff -u -r1.7 -r1.8 \ src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/arp.c diff -u src/external/bsd/dhcpcd/dist/arp.c:1.19 src/external/bsd/dhcpcd/dist/arp.c:1.20 --- src/external/bsd/dhcpcd/dist/arp.c:1.19 Mon May 9 10:15:59 2016 +++ src/external/bsd/dhcpcd/dist/arp.c Fri Jun 17 19:42:31 2016 @@ -1,5 +1,5 @@ #include - __RCSID("$NetBSD: arp.c,v 1.19 2016/05/09 10:15:59 roy Exp $"); + __RCSID("$NetBSD: arp.c,v 1.20 2016/06/17 19:42:31 roy Exp $"); /* * dhcpcd - DHCP client daemon @@ -65,6 +65,7 @@ arp_request(const struct interface *ifp, struct arphdr ar; size_t len; uint8_t *p; + const struct iarp_state *state; ar.ar_hrd = htons(ifp->family); ar.ar_pro = htons(ETHERTYPE_IP); @@ -91,7 +92,9 @@ arp_request(const struct interface *ifp, APPEND(, sizeof(sip)); ZERO(ifp->hwlen); APPEND(, sizeof(tip)); - return if_sendrawpacket(ifp, ETHERTYPE_ARP, arp_buffer, len); + + state = ARP_CSTATE(ifp); + return if_sendraw(ifp, state->fd, ETHERTYPE_ARP, arp_buffer, len); eexit: errno = ENOBUFS; @@ -123,7 +126,7 @@ arp_packet(void *arg) { struct interface *ifp = arg; const struct interface *ifn; - uint8_t arp_buffer[ARP_LEN]; + uint8_t buf[ARP_LEN]; struct arphdr ar; struct arp_msg arm; ssize_t bytes; @@ -134,65 +137,62 @@ arp_packet(void *arg) state = ARP_STATE(ifp); flags = 0; - while (!(flags & RAW_EOF)) { - bytes = if_readrawpacket(ifp, ETHERTYPE_ARP, - arp_buffer, sizeof(arp_buffer), ); - if (bytes == -1) { - logger(ifp->ctx, LOG_ERR, - "%s: arp if_readrawpacket: %m", ifp->name); - arp_close(ifp); - return; - } - /* We must have a full ARP header */ - if ((size_t)bytes < sizeof(ar)) - continue; - memcpy(, arp_buffer, sizeof(ar)); - /* Families must match */ - if (ar.ar_hrd != htons(ifp->family)) - continue; + bytes = if_readraw(ifp, state->fd, buf, sizeof(buf), ); + if (bytes == -1) { + logger(ifp->ctx, LOG_ERR, + "%s: arp if_readrawpacket: %m", ifp->name); + arp_close(ifp); + return; + } + /* We must have a full ARP header */ + if ((size_t)bytes < sizeof(ar)) + return; + memcpy(, buf, sizeof(ar)); + /* Families must match */ + if (ar.ar_hrd != htons(ifp->family)) + return; #if 0 - /* These checks are enforced in the BPF filter. */ - /* Protocol must be IP. */ - if (ar.ar_pro != htons(ETHERTYPE_IP)) - continue; - /* Only these types are recognised */ - if (ar.ar_op != htons(ARPOP_REPLY) && - ar.ar_op != htons(ARPOP_REQUEST)) - continue; + /* These checks are enforced in the BPF filter. */ + /* Protocol must be IP. */ + if (ar.ar_pro != htons(ETHERTYPE_IP)) + continue; + /* Only these types are recognised */ + if (ar.ar_op != htons(ARPOP_REPLY) && + ar.ar_op != htons(ARPOP_REQUEST)) + continue; #endif - if (ar.ar_pln != sizeof(arm.sip.s_addr)) - continue; + if (ar.ar_pln !=
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Jun 17 19:37:44 UTC 2016 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv9889 Log Message: Import dhcpcd-6.11.1 with the following changes: * Fix truncated packet handling where the DHCP message is less than the BOOTP size * Rework the raw socket handling around an fd for initial Solaris support * Only pull one message from the raw socket - eloop will handle the looping * Netmask fixes for STATIC and INFORM * Rework if_address to use struct ipv4_addr, like the ipv6 counter parts * Split BSD handlink into many smaller functions to improve readability * empty DNS entries are no longer created * Test for hostname_fqdn being set to server or blank * Allow an SLA 0 and prefix length of 0 to delegate the whole prefix ia_pd 1 wm1/0 * Fix prefix delegation address timings on renew Status: Vendor Tag: roy Release Tags: dhcpcd-6-11-1 U src/external/bsd/dhcpcd/dist/common.c U src/external/bsd/dhcpcd/dist/control.c C src/external/bsd/dhcpcd/dist/dhcpcd.c U src/external/bsd/dhcpcd/dist/duid.c U src/external/bsd/dhcpcd/dist/eloop.c C src/external/bsd/dhcpcd/dist/if.c C src/external/bsd/dhcpcd/dist/if-options.c C src/external/bsd/dhcpcd/dist/script.c C src/external/bsd/dhcpcd/dist/dhcp-common.c C src/external/bsd/dhcpcd/dist/if-bsd.c C src/external/bsd/dhcpcd/dist/arp.c C src/external/bsd/dhcpcd/dist/dhcp.c C src/external/bsd/dhcpcd/dist/ipv4.c C src/external/bsd/dhcpcd/dist/ipv4ll.c C src/external/bsd/dhcpcd/dist/ipv6.c C src/external/bsd/dhcpcd/dist/ipv6nd.c C src/external/bsd/dhcpcd/dist/dhcp6.c U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/auth.c U src/external/bsd/dhcpcd/dist/dhcpcd.conf U src/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in U src/external/bsd/dhcpcd/dist/dhcpcd.8.in C src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in C src/external/bsd/dhcpcd/dist/arp.h U src/external/bsd/dhcpcd/dist/auth.h C src/external/bsd/dhcpcd/dist/bpf-filter.h U src/external/bsd/dhcpcd/dist/common.h U src/external/bsd/dhcpcd/dist/config.h U src/external/bsd/dhcpcd/dist/control.h C src/external/bsd/dhcpcd/dist/defs.h U src/external/bsd/dhcpcd/dist/dev.h U src/external/bsd/dhcpcd/dist/dhcp-common.h C src/external/bsd/dhcpcd/dist/dhcp.h C src/external/bsd/dhcpcd/dist/dhcp6.h U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h C src/external/bsd/dhcpcd/dist/dhcpcd.h U src/external/bsd/dhcpcd/dist/duid.h U src/external/bsd/dhcpcd/dist/eloop.h U src/external/bsd/dhcpcd/dist/if-options.h C src/external/bsd/dhcpcd/dist/if.h C src/external/bsd/dhcpcd/dist/ipv4.h C src/external/bsd/dhcpcd/dist/ipv4ll.h C src/external/bsd/dhcpcd/dist/ipv6.h U src/external/bsd/dhcpcd/dist/ipv6nd.h U src/external/bsd/dhcpcd/dist/script.h U src/external/bsd/dhcpcd/dist/crypt/hmac_md5.c U src/external/bsd/dhcpcd/dist/crypt/crypt.h U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump C src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf C src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/15-timezone U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind 26 conflicts created by this import. Use the following command to help the merge: cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Jun 17 19:37:44 UTC 2016 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv9889 Log Message: Import dhcpcd-6.11.1 with the following changes: * Fix truncated packet handling where the DHCP message is less than the BOOTP size * Rework the raw socket handling around an fd for initial Solaris support * Only pull one message from the raw socket - eloop will handle the looping * Netmask fixes for STATIC and INFORM * Rework if_address to use struct ipv4_addr, like the ipv6 counter parts * Split BSD handlink into many smaller functions to improve readability * empty DNS entries are no longer created * Test for hostname_fqdn being set to server or blank * Allow an SLA 0 and prefix length of 0 to delegate the whole prefix ia_pd 1 wm1/0 * Fix prefix delegation address timings on renew Status: Vendor Tag: roy Release Tags: dhcpcd-6-11-1 U src/external/bsd/dhcpcd/dist/common.c U src/external/bsd/dhcpcd/dist/control.c C src/external/bsd/dhcpcd/dist/dhcpcd.c U src/external/bsd/dhcpcd/dist/duid.c U src/external/bsd/dhcpcd/dist/eloop.c C src/external/bsd/dhcpcd/dist/if.c C src/external/bsd/dhcpcd/dist/if-options.c C src/external/bsd/dhcpcd/dist/script.c C src/external/bsd/dhcpcd/dist/dhcp-common.c C src/external/bsd/dhcpcd/dist/if-bsd.c C src/external/bsd/dhcpcd/dist/arp.c C src/external/bsd/dhcpcd/dist/dhcp.c C src/external/bsd/dhcpcd/dist/ipv4.c C src/external/bsd/dhcpcd/dist/ipv4ll.c C src/external/bsd/dhcpcd/dist/ipv6.c C src/external/bsd/dhcpcd/dist/ipv6nd.c C src/external/bsd/dhcpcd/dist/dhcp6.c U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/auth.c U src/external/bsd/dhcpcd/dist/dhcpcd.conf U src/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in U src/external/bsd/dhcpcd/dist/dhcpcd.8.in C src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in C src/external/bsd/dhcpcd/dist/arp.h U src/external/bsd/dhcpcd/dist/auth.h C src/external/bsd/dhcpcd/dist/bpf-filter.h U src/external/bsd/dhcpcd/dist/common.h U src/external/bsd/dhcpcd/dist/config.h U src/external/bsd/dhcpcd/dist/control.h C src/external/bsd/dhcpcd/dist/defs.h U src/external/bsd/dhcpcd/dist/dev.h U src/external/bsd/dhcpcd/dist/dhcp-common.h C src/external/bsd/dhcpcd/dist/dhcp.h C src/external/bsd/dhcpcd/dist/dhcp6.h U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h C src/external/bsd/dhcpcd/dist/dhcpcd.h U src/external/bsd/dhcpcd/dist/duid.h U src/external/bsd/dhcpcd/dist/eloop.h U src/external/bsd/dhcpcd/dist/if-options.h C src/external/bsd/dhcpcd/dist/if.h C src/external/bsd/dhcpcd/dist/ipv4.h C src/external/bsd/dhcpcd/dist/ipv4ll.h C src/external/bsd/dhcpcd/dist/ipv6.h U src/external/bsd/dhcpcd/dist/ipv6nd.h U src/external/bsd/dhcpcd/dist/script.h U src/external/bsd/dhcpcd/dist/crypt/hmac_md5.c U src/external/bsd/dhcpcd/dist/crypt/crypt.h U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump C src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf C src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/15-timezone U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind 26 conflicts created by this import. Use the following command to help the merge: cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: abhinav Date: Fri Jun 17 18:48:07 UTC 2016 Modified Files: src/usr.sbin/makemandb: apropos.1 Log Message: Fix grammar/spelling at few places. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/makemandb/apropos.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: abhinav Date: Fri Jun 17 18:48:07 UTC 2016 Modified Files: src/usr.sbin/makemandb: apropos.1 Log Message: Fix grammar/spelling at few places. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/makemandb/apropos.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/apropos.1 diff -u src/usr.sbin/makemandb/apropos.1:1.17 src/usr.sbin/makemandb/apropos.1:1.18 --- src/usr.sbin/makemandb/apropos.1:1.17 Thu Jun 16 14:07:16 2016 +++ src/usr.sbin/makemandb/apropos.1 Fri Jun 17 18:48:07 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: apropos.1,v 1.17 2016/06/16 14:07:16 abhinav Exp $ +.\" $NetBSD: apropos.1,v 1.18 2016/06/17 18:48:07 abhinav Exp $ .\" .\" Copyright (c) 2011 Abhinav Upadhyay.\" All rights reserved. @@ -64,7 +64,7 @@ Quotes are optional for specifying multi It supports the following options: .Bl -tag -width indent .It Fl [1-9] -Search only within the specified section manual pages. +Search only within the specified section of manual pages. .It Fl C Ar path Use different .Xr man 1 @@ -96,7 +96,7 @@ Limit the search to the pages for the sp By default pages for all architectures are shown in the search results. .It Fl s Ar section Restrict the search to the specified section of the manual. -By default, pages from all section are shown. +By default, pages from all sections are shown. This option is for backwards compatibility with the classic version of apropos, using it is equivalent to using the .Op 123456789 @@ -112,7 +112,7 @@ tag. .Sh ENVIRONMENT VARIABLES The .Ev APROPOS -environment variables is white-space tokenized as an argument vector +environment variable is white-space tokenized as an argument vector and the options in it are parsed and set. Command line options override the environment options. .Sh SEE ALSO
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Fri Jun 17 17:35:21 UTC 2016 Modified Files: src/sys/dev/pci: ciss_pci.c Log Message: catch up with new names. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/ciss_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Fri Jun 17 17:35:21 UTC 2016 Modified Files: src/sys/dev/pci: ciss_pci.c Log Message: catch up with new names. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/ciss_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ciss_pci.c diff -u src/sys/dev/pci/ciss_pci.c:1.11 src/sys/dev/pci/ciss_pci.c:1.12 --- src/sys/dev/pci/ciss_pci.c:1.11 Sat Mar 29 15:28:24 2014 +++ src/sys/dev/pci/ciss_pci.c Fri Jun 17 13:35:21 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss_pci.c,v 1.11 2014/03/29 19:28:24 christos Exp $ */ +/* $NetBSD: ciss_pci.c,v 1.12 2016/06/17 17:35:21 christos Exp $ */ /* $OpenBSD: ciss_pci.c,v 1.9 2005/12/13 15:56:01 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.11 2014/03/29 19:28:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.12 2016/06/17 17:35:21 christos Exp $"); #include #include @@ -283,13 +283,13 @@ ciss_pci_attach(device_t parent, device_ } sc->sc_dmat = pa->pa_dmat; - sc->iem = CISS_READYENA; + sc->iem = CISS_INTR_OPQ_SA5; reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); if (PCI_VENDOR(reg) == PCI_VENDOR_COMPAQ && (PCI_PRODUCT(reg) == PCI_PRODUCT_COMPAQ_CSA5i || PCI_PRODUCT(reg) == PCI_PRODUCT_COMPAQ_CSA532 || PCI_PRODUCT(reg) == PCI_PRODUCT_COMPAQ_CSA5312)) - sc->iem = CISS_READYENAB; + sc->iem = CISS_INTR_OPQ_SA5B; cfg_bar = bus_space_read_2(sc->sc_iot, sc->sc_ioh, CISS_CFG_BAR); sc->cfgoff = bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_CFG_OFF);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Fri Jun 17 17:05:04 UTC 2016 Modified Files: src/sys/dev/ic: cissreg.h Log Message: rename intr bits To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/cissreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/cissreg.h diff -u src/sys/dev/ic/cissreg.h:1.4 src/sys/dev/ic/cissreg.h:1.5 --- src/sys/dev/ic/cissreg.h:1.4 Sat Oct 12 12:52:21 2013 +++ src/sys/dev/ic/cissreg.h Fri Jun 17 13:05:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cissreg.h,v 1.4 2013/10/12 16:52:21 christos Exp $ */ +/* $NetBSD: cissreg.h,v 1.5 2016/06/17 17:05:04 christos Exp $ */ /* $OpenBSD: cissreg.h,v 1.11 2010/06/03 01:02:13 dlg Exp $ */ /* @@ -24,8 +24,10 @@ #define CISS_IDB_CFG 0x01 #define CISS_ISR 0x30 #define CISS_IMR 0x34 -#define CISS_READYENAB 4 -#define CISS_READYENA 8 +#define CISS_INTR_OPQ_SA5 (1<<3) +#define CISS_INTR_OPQ_SA5B (1<<2) +#define CISS_INTR_OPQ (CISS_INTR_OPQ_SA5|CISS_INTR_OPQ_SA5B) +#define CISS_INTR_MSI (1<<0) #define CISS_INQ 0x40 #define CISS_OUTQ 0x44 #define CISS_CFG_BAR 0xb4
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Fri Jun 17 17:05:04 UTC 2016 Modified Files: src/sys/dev/ic: cissreg.h Log Message: rename intr bits To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/cissreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Fri Jun 17 17:03:20 UTC 2016 Modified Files: src/sys/dev/ic: rt2860.c Log Message: ifdef out unused code. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/rt2860.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/rt2860.c diff -u src/sys/dev/ic/rt2860.c:1.15 src/sys/dev/ic/rt2860.c:1.16 --- src/sys/dev/ic/rt2860.c:1.15 Fri Jun 17 11:38:54 2016 +++ src/sys/dev/ic/rt2860.c Fri Jun 17 13:03:20 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rt2860.c,v 1.15 2016/06/17 15:38:54 christos Exp $ */ +/* $NetBSD: rt2860.c,v 1.16 2016/06/17 17:03:20 christos Exp $ */ /* $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */ /*- @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.15 2016/06/17 15:38:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.16 2016/06/17 17:03:20 christos Exp $"); #include #include @@ -2741,6 +2741,7 @@ rt2860_updateedca(struct ieee80211com *i return 0; } +#ifdef HW_CRYPTO static int rt2860_set_key(struct ieee80211com *ic, const struct ieee80211_key *ck, const uint8_t *mac) @@ -2864,6 +2865,7 @@ rt2860_delete_key(struct ieee80211com *i } return 1; } +#endif static int8_t rt2860_rssi2dbm(struct rt2860_softc *sc, uint8_t rssi, uint8_t rxchain)
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Fri Jun 17 17:03:20 UTC 2016 Modified Files: src/sys/dev/ic: rt2860.c Log Message: ifdef out unused code. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/rt2860.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: skrll Date: Fri Jun 17 16:07:40 UTC 2016 Modified Files: src/sys/dev/ic: sl811hs.c Log Message: More(/less) debug To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/ic/sl811hs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: skrll Date: Fri Jun 17 16:07:40 UTC 2016 Modified Files: src/sys/dev/ic: sl811hs.c Log Message: More(/less) debug To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/ic/sl811hs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/sl811hs.c diff -u src/sys/dev/ic/sl811hs.c:1.77 src/sys/dev/ic/sl811hs.c:1.78 --- src/sys/dev/ic/sl811hs.c:1.77 Fri Jun 17 15:57:08 2016 +++ src/sys/dev/ic/sl811hs.c Fri Jun 17 16:07:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sl811hs.c,v 1.77 2016/06/17 15:57:08 skrll Exp $ */ +/* $NetBSD: sl811hs.c,v 1.78 2016/06/17 16:07:40 skrll Exp $ */ /* * Not (c) 2007 Matthew Orgass @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.77 2016/06/17 15:57:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.78 2016/06/17 16:07:40 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_slhci.h" @@ -1735,11 +1735,10 @@ slhci_dointr(struct slhci_softc *sc) KASSERT(mutex_owned(>sc_intr_lock)); - DLOG(D_INTR, "Flags %#x sc_ier %#x ISR=%#x", t->flags, sc->sc_ier, - slhci_read(sc, SL11_ISR), 0); - - if (sc->sc_ier == 0) + if (sc->sc_ier == 0) { + DLOG(D_INTR, "sc_ier is zero", 0, 0, 0, 0); return 0; + } r = slhci_read(sc, SL11_ISR); @@ -1776,8 +1775,10 @@ slhci_dointr(struct slhci_softc *sc) r &= sc->sc_ier; - if (r == 0) + if (r == 0) { + DLOG(D_INTR, "r is zero", 0, 0, 0, 0); return 0; + } sc->sc_ier_check = 0; @@ -1787,6 +1788,7 @@ slhci_dointr(struct slhci_softc *sc) /* If we have an insertion event we do not care about anything else. */ if (__predict_false(r & SL11_ISR_INSERT)) { slhci_insert(sc); + DLOG(D_INTR, "... done", 0, 0, 0, 0); return 1; } @@ -1896,6 +1898,8 @@ slhci_dointr(struct slhci_softc *sc) slhci_dotransfer(sc); + DLOG(D_INTR, "... done", 0, 0, 0, 0); + return 1; }
CVS commit: src/sys/dev/ic
Module Name:src Committed By: skrll Date: Fri Jun 17 15:57:08 UTC 2016 Modified Files: src/sys/dev/ic: sl811hs.c Log Message: _KERNEL_OPT protection To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/ic/sl811hs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/sl811hs.c diff -u src/sys/dev/ic/sl811hs.c:1.76 src/sys/dev/ic/sl811hs.c:1.77 --- src/sys/dev/ic/sl811hs.c:1.76 Tue May 17 03:20:58 2016 +++ src/sys/dev/ic/sl811hs.c Fri Jun 17 15:57:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sl811hs.c,v 1.76 2016/05/17 03:20:58 martin Exp $ */ +/* $NetBSD: sl811hs.c,v 1.77 2016/06/17 15:57:08 skrll Exp $ */ /* * Not (c) 2007 Matthew Orgass @@ -68,11 +68,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.76 2016/05/17 03:20:58 martin Exp $"); - -#include "opt_slhci.h" +__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.77 2016/06/17 15:57:08 skrll Exp $"); #ifdef _KERNEL_OPT +#include "opt_slhci.h" #include "opt_usb.h" #endif
CVS commit: src/sys/dev/ic
Module Name:src Committed By: skrll Date: Fri Jun 17 15:57:08 UTC 2016 Modified Files: src/sys/dev/ic: sl811hs.c Log Message: _KERNEL_OPT protection To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/ic/sl811hs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Fri Jun 17 15:38:54 UTC 2016 Modified Files: src/sys/dev/ic: rt2860.c Log Message: disable hardware crypto for now. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/rt2860.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/rt2860.c diff -u src/sys/dev/ic/rt2860.c:1.14 src/sys/dev/ic/rt2860.c:1.15 --- src/sys/dev/ic/rt2860.c:1.14 Thu Jun 16 11:51:13 2016 +++ src/sys/dev/ic/rt2860.c Fri Jun 17 11:38:54 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rt2860.c,v 1.14 2016/06/16 15:51:13 riastradh Exp $ */ +/* $NetBSD: rt2860.c,v 1.15 2016/06/17 15:38:54 christos Exp $ */ /* $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */ /*- @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.14 2016/06/16 15:51:13 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.15 2016/06/17 15:38:54 christos Exp $"); #include #include @@ -137,10 +137,12 @@ static void rt2860_set_macaddr(struct rt static void rt2860_updateslot(struct ifnet *); static void rt2860_updateprot(struct ieee80211com *); static int rt2860_updateedca(struct ieee80211com *); +#ifdef HW_CRYPTO static int rt2860_set_key(struct ieee80211com *, const struct ieee80211_key *, const uint8_t *); static int rt2860_delete_key(struct ieee80211com *, const struct ieee80211_key *); +#endif static int8_t rt2860_rssi2dbm(struct rt2860_softc *, uint8_t, uint8_t); static const char * rt2860_get_rf(uint8_t); static int rt2860_read_eeprom(struct rt2860_softc *); @@ -378,8 +380,10 @@ rt2860_attachhook(device_t self) #endif ic->ic_updateslot = rt2860_updateslot; ic->ic_wme.wme_update = rt2860_updateedca; +#ifdef HW_CRYPTO ic->ic_crypto.cs_key_set = rt2860_set_key; ic->ic_crypto.cs_key_delete = rt2860_delete_key; +#endif /* override state transition machine */ sc->sc_newstate = ic->ic_newstate; ic->ic_newstate = rt2860_newstate; @@ -1289,6 +1293,15 @@ rt2860_rx_intr(struct rt2860_softc *sc) goto skip; } +#ifdef HW_CRYPTO + if (__predict_false(rxd->flags & htole32(RT2860_RX_MICERR))) { + /* report MIC failures to net80211 for TKIP */ + ieee80211_notify_michael_failure(ic, wh, 0/* XXX */); + ifp->if_ierrors++; + goto skip; + } +#endif + MGETHDR(m1, M_DONTWAIT, MT_DATA); if (__predict_false(m1 == NULL)) { ifp->if_ierrors++; @@ -1341,10 +1354,12 @@ rt2860_rx_intr(struct rt2860_softc *sc) m->m_pkthdr.len = m->m_len = le16toh(rxwi->len) & 0xfff; wh = mtod(m, struct ieee80211_frame *); +#ifdef HW_CRYPTO if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { /* frame is decrypted by hardware */ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; } +#endif /* HW may insert 2 padding bytes after 802.11 header */ if (rxd->flags & htole32(RT2860_RX_L2PAD)) { @@ -1354,13 +1369,6 @@ rt2860_rx_intr(struct rt2860_softc *sc) wh = mtod(m, struct ieee80211_frame *); } - if (__predict_false(rxd->flags & htole32(RT2860_RX_MICERR))) { - /* report MIC failures to net80211 for TKIP */ - ieee80211_notify_michael_failure(ic, wh, 0/* XXX */); - ifp->if_ierrors++; - goto skip; - } - ant = rt2860_maxrssi_chain(sc, rxwi); rssi = rxwi->rssi[ant]; @@ -1402,6 +1410,7 @@ rt2860_rx_intr(struct rt2860_softc *sc) } bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m); skipbpf: + wh = mtod(m, struct ieee80211_frame *); /* grab a reference to the source node */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Fri Jun 17 15:38:54 UTC 2016 Modified Files: src/sys/dev/ic: rt2860.c Log Message: disable hardware crypto for now. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/rt2860.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/nfs
Module Name:src Committed By: christos Date: Fri Jun 17 14:28:29 UTC 2016 Modified Files: src/sys/nfs: nfs_clntsocket.c nfs_socket.c Log Message: Serialize all access to the NFS request queue via splsoftnet(). Fixes random crashes. XXX: Pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/nfs/nfs_clntsocket.c cvs rdiff -u -r1.197 -r1.198 src/sys/nfs/nfs_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/nfs/nfs_clntsocket.c diff -u src/sys/nfs/nfs_clntsocket.c:1.4 src/sys/nfs/nfs_clntsocket.c:1.5 --- src/sys/nfs/nfs_clntsocket.c:1.4 Mon Jun 13 10:23:26 2016 +++ src/sys/nfs/nfs_clntsocket.c Fri Jun 17 10:28:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_clntsocket.c,v 1.4 2016/06/13 14:23:26 christos Exp $ */ +/* $NetBSD: nfs_clntsocket.c,v 1.5 2016/06/17 14:28:29 christos Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_clntsocket.c,v 1.4 2016/06/13 14:23:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_clntsocket.c,v 1.5 2016/06/17 14:28:29 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -324,7 +324,7 @@ nfs_reply(struct nfsreq *myrep, struct l struct mbuf *mrep, *nam, *md; u_int32_t rxid, *tl; char *dpos, *cp2; - int error; + int error, s; /* * Loop around until we get our own reply @@ -402,6 +402,7 @@ nfsmout: * Loop through the request list to match up the reply * Iff no match, just drop the datagram */ + s = splsoftnet(); TAILQ_FOREACH(rep, _reqq, r_chain) { if (rep->r_mrep != NULL || rxid != rep->r_xid) continue; @@ -467,6 +468,7 @@ nfsmout: nmp->nm_timeouts = 0; break; } + splx(s); nfs_rcvunlock(nmp); /* * If not matched to a request, drop it. Index: src/sys/nfs/nfs_socket.c diff -u src/sys/nfs/nfs_socket.c:1.197 src/sys/nfs/nfs_socket.c:1.198 --- src/sys/nfs/nfs_socket.c:1.197 Tue Jul 14 23:28:55 2015 +++ src/sys/nfs/nfs_socket.c Fri Jun 17 10:28:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_socket.c,v 1.197 2015/07/15 03:28:55 manu Exp $ */ +/* $NetBSD: nfs_socket.c,v 1.198 2016/06/17 14:28:29 christos Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.197 2015/07/15 03:28:55 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.198 2016/06/17 14:28:29 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -349,7 +349,7 @@ nfs_reconnect(struct nfsreq *rep) { struct nfsreq *rp; struct nfsmount *nmp = rep->r_nmp; - int error; + int error, s; time_t before_ts; nfs_disconnect(nmp); @@ -384,6 +384,7 @@ nfs_reconnect(struct nfsreq *rep) * Loop through outstanding request list and fix up all requests * on old socket. */ + s = splsoftnet(); TAILQ_FOREACH(rp, _reqq, r_chain) { if (rp->r_nmp == nmp) { if ((rp->r_flags & R_MUSTRESEND) == 0) @@ -391,6 +392,7 @@ nfs_reconnect(struct nfsreq *rep) rp->r_rexmit = 0; } } + splx(s); return (0); }
CVS commit: src/sys/nfs
Module Name:src Committed By: christos Date: Fri Jun 17 14:28:29 UTC 2016 Modified Files: src/sys/nfs: nfs_clntsocket.c nfs_socket.c Log Message: Serialize all access to the NFS request queue via splsoftnet(). Fixes random crashes. XXX: Pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/nfs/nfs_clntsocket.c cvs rdiff -u -r1.197 -r1.198 src/sys/nfs/nfs_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Fri Jun 17 07:41:56 UTC 2016 Modified Files: src/sys/arch/amiga/dev: grf_cv3d.c grf_cv3dreg.h Log Message: Remove the "totally untested" comments for the ZorroII frame buffer select macro. The card is confirmed to work in an A2000. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amiga/dev/grf_cv3d.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amiga/dev/grf_cv3dreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Fri Jun 17 07:41:56 UTC 2016 Modified Files: src/sys/arch/amiga/dev: grf_cv3d.c grf_cv3dreg.h Log Message: Remove the "totally untested" comments for the ZorroII frame buffer select macro. The card is confirmed to work in an A2000. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amiga/dev/grf_cv3d.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amiga/dev/grf_cv3dreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/dev/grf_cv3d.c diff -u src/sys/arch/amiga/dev/grf_cv3d.c:1.33 src/sys/arch/amiga/dev/grf_cv3d.c:1.34 --- src/sys/arch/amiga/dev/grf_cv3d.c:1.33 Mon Nov 16 21:24:06 2015 +++ src/sys/arch/amiga/dev/grf_cv3d.c Fri Jun 17 07:41:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv3d.c,v 1.33 2015/11/16 21:24:06 phx Exp $ */ +/* $NetBSD: grf_cv3d.c,v 1.34 2016/06/17 07:41:56 phx Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -33,7 +33,7 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.33 2015/11/16 21:24:06 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.34 2016/06/17 07:41:56 phx Exp $"); #include "grfcv3d.h" #include "ite.h" @@ -1490,7 +1490,6 @@ cv3d_load_mon(struct grf_softc *gp, stru gp->g_fbkva = (volatile char *)cv3d_boardaddr + 0x0400 + (0x0040 * fb_flag); } else { - /* XXX This is totaly untested */ Select_Zorro2_FrameBuffer(fb_flag); } Index: src/sys/arch/amiga/dev/grf_cv3dreg.h diff -u src/sys/arch/amiga/dev/grf_cv3dreg.h:1.12 src/sys/arch/amiga/dev/grf_cv3dreg.h:1.13 --- src/sys/arch/amiga/dev/grf_cv3dreg.h:1.12 Wed Jan 22 00:25:16 2014 +++ src/sys/arch/amiga/dev/grf_cv3dreg.h Fri Jun 17 07:41:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv3dreg.h,v 1.12 2014/01/22 00:25:16 christos Exp $ */ +/* $NetBSD: grf_cv3dreg.h,v 1.13 2016/06/17 07:41:56 phx Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -101,7 +101,6 @@ struct grfcv3dtext_mode { #define vgaw16(ba, reg, val) \ *((volatile unsigned short *) (((volatile char *)ba)+reg)) = val -/* XXX This is totaly untested */ #define Select_Zorro2_FrameBuffer(flag) \ do { \ *(((volatile char *)cv3d_vcode_switch_base) + \