CVS commit: src/common/lib/libc/arch/arm/quad
Module Name:src Committed By: skrll Date: Thu May 9 07:13:00 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/quad: __aeabi_ldivmod.S Log Message: Don't use old syntax - it breaks the build. hi matt. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S diff -u src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.5 src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.6 --- src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.5 Wed May 8 05:13:56 2013 +++ src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S Thu May 9 07:12:59 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: __aeabi_ldivmod.S,v 1.5 2013/05/08 05:13:56 matt Exp $) +RCSID($NetBSD: __aeabi_ldivmod.S,v 1.6 2013/05/09 07:12:59 skrll Exp $) ENTRY(__aeabi_ldivmod) orrs ip, r2, r3 @@ -132,7 +132,7 @@ ENTRY(__aeabi_ldivmod) .Ldivbyzero: push {r0-r1, ip, lr} - cmps AHI, #0 + cmp AHI, #0 mvnge ALO, #0 movge AHI, ALO, lsr #1 movlt ALO, #0
CVS commit: src/bin/sh
Module Name:src Committed By: simonb Date: Thu May 9 11:43:27 UTC 2013 Modified Files: src/bin/sh: sh.1 Log Message: Document that a here-document can finish at an EOF as well as at the delimiter. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.109 src/bin/sh/sh.1:1.110 --- src/bin/sh/sh.1:1.109 Wed Oct 3 19:37:36 2012 +++ src/bin/sh/sh.1 Thu May 9 11:43:27 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: sh.1,v 1.109 2012/10/03 19:37:36 wiz Exp $ +.\ $NetBSD: sh.1,v 1.110 2013/05/09 11:43:27 simonb Exp $ .\ Copyright (c) 1991, 1993 .\ The Regents of the University of California. All rights reserved. .\ @@ -31,7 +31,7 @@ .\ .\ @(#)sh.1 8.6 (Berkeley) 5/4/95 .\ -.Dd August 26, 2012 +.Dd May 9, 2013 .Dt SH 1 .Os .Sh NAME @@ -480,9 +480,9 @@ The following redirection is often calle .Li delimiter .El .Pp -All the text on successive lines up to the delimiter is saved away and -made available to the command on standard input, or file descriptor n if -it is specified. +All the text on successive lines up to the delimiter, or to an EOF, is +saved away and made available to the command on standard input, or file +descriptor n if it is specified. If the delimiter as specified on the initial line is quoted, then the here-doc-text is treated literally; otherwise, the text is subjected to parameter expansion, command substitution, and arithmetic
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: skrll Date: Thu May 9 11:44:37 UTC 2013 Modified Files: src/libexec/ld.elf_so: Makefile Log Message: Fix debug symlink To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/libexec/ld.elf_so/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/Makefile diff -u src/libexec/ld.elf_so/Makefile:1.119 src/libexec/ld.elf_so/Makefile:1.120 --- src/libexec/ld.elf_so/Makefile:1.119 Wed May 8 15:33:45 2013 +++ src/libexec/ld.elf_so/Makefile Thu May 9 11:44:36 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.119 2013/05/08 15:33:45 christos Exp $ +# $NetBSD: Makefile,v 1.120 2013/05/09 11:44:36 skrll Exp $ # # NOTE: when changing ld.so, ensure that ldd still compiles. # @@ -151,8 +151,8 @@ _PROGDEBUG.${PROG} := ${PROG}.debug .if ${SHLINKINSTALLDIR} != /usr/libexec SYMLINKS+= ${SHLINKINSTALLDIR}/${PROG} /usr/libexec/${PROG} .if ${MKDEBUG} != no -SYMLINKS+= ${DESTDIR}${DEBUGDIR}${BINDIR}/${PROG}.debug \ - ${DESTDIR}${DEBUGDIR}/usr${BINDIR}/${PROG}.debug +SYMLINKS+= ${DEBUGDIR}${BINDIR}/${PROG}.debug \ + ${DEBUGDIR}/usr${BINDIR}/${PROG}.debug .endif .endif
CVS commit: src/sys/dev/pci
Module Name:src Committed By: minoura Date: Thu May 9 12:23:18 UTC 2013 Modified Files: src/sys/dev/pci: if_vioif.c Log Message: Fix a typo, and remove an unused member. This should fix the problem that recent Qemu dies during configuring a vioif. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/if_vioif.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/if_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.3 src/sys/dev/pci/if_vioif.c:1.4 --- src/sys/dev/pci/if_vioif.c:1.3 Sat Mar 30 03:21:08 2013 +++ src/sys/dev/pci/if_vioif.c Thu May 9 12:23:17 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.3 2013/03/30 03:21:08 christos Exp $ */ +/* $NetBSD: if_vioif.c,v 1.4 2013/05/09 12:23:17 minoura Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_vioif.c,v 1.3 2013/03/30 03:21:08 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if_vioif.c,v 1.4 2013/05/09 12:23:17 minoura Exp $); #include sys/param.h #include sys/systm.h @@ -151,7 +151,6 @@ struct vioif_softc { uint8_t sc_mac[ETHER_ADDR_LEN]; struct ethercom sc_ethercom; - uint32_t sc_features; short sc_ifflags; /* bus_dmamem */ @@ -654,7 +653,7 @@ vioif_stop(struct ifnet *ifp, int disabl vioif_rx_drain(sc); virtio_reinit_start(vsc); - virtio_negotiate_features(vsc, sc-sc_features); + virtio_negotiate_features(vsc, vsc-sc_features); virtio_start_vq_intr(vsc, sc-sc_vq[0]); virtio_stop_vq_intr(vsc, sc-sc_vq[1]); if (vsc-sc_nvqs = 3)
CVS commit: src/sys/dev/usb
Module Name:src Committed By: aymeric Date: Thu May 9 12:40:18 UTC 2013 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add a Foxconn AR3012 bluetooth controller ids To generate a diff of this commit: cvs rdiff -u -r1.647 -r1.648 src/sys/dev/usb/usbdevs 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/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.647 src/sys/dev/usb/usbdevs:1.648 --- src/sys/dev/usb/usbdevs:1.647 Thu May 2 23:13:12 2013 +++ src/sys/dev/usb/usbdevs Thu May 9 12:40:17 2013 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.647 2013/05/02 23:13:12 rkujawa Exp $ +$NetBSD: usbdevs,v 1.648 2013/05/09 12:40:17 aymeric Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -109,6 +109,7 @@ vendor LUCENT 0x047e Lucent vendor PLANTRONICS 0x047f Plantronics vendor KYOCERA 0x0482 Kyocera vendor STMICRO 0x0483 STMicroelectronics +vendor FOXCONN 0x0489 Foxconn / Hon Hai vendor MEIZU 0x0492 Meizu Electronics vendor YAMAHA 0x0499 YAMAHA vendor COMPAQ 0x049f Compaq @@ -1478,6 +1479,9 @@ product FEIXUN RTL8192CU 0x0091 RTL8192C /* Fiberline */ product FIBERLINE WL430U 0x6003 WL-430U +/* Foxconn / Hon Hai products */ +product FOXCONN AR3012 0xe04e Bluetooth AR3012 + /* Freecom products */ product FREECOM DVD 0xfc01 Connector for DVD drive
CVS commit: src/sys/dev/usb
Module Name:src Committed By: aymeric Date: Thu May 9 12:41:13 UTC 2013 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.639 -r1.640 src/sys/dev/usb/usbdevs.h cvs rdiff -u -r1.640 -r1.641 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.639 src/sys/dev/usb/usbdevs.h:1.640 --- src/sys/dev/usb/usbdevs.h:1.639 Fri May 3 15:38:04 2013 +++ src/sys/dev/usb/usbdevs.h Thu May 9 12:41:13 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdevs.h,v 1.639 2013/05/03 15:38:04 jakllsch Exp $ */ +/* $NetBSD: usbdevs.h,v 1.640 2013/05/09 12:41:13 aymeric Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. @@ -116,6 +116,7 @@ #define USB_VENDOR_PLANTRONICS 0x047f /* Plantronics */ #define USB_VENDOR_KYOCERA 0x0482 /* Kyocera */ #define USB_VENDOR_STMICRO 0x0483 /* STMicroelectronics */ +#define USB_VENDOR_FOXCONN 0x0489 /* Foxconn / Hon Hai */ #define USB_VENDOR_MEIZU 0x0492 /* Meizu Electronics */ #define USB_VENDOR_YAMAHA 0x0499 /* YAMAHA */ #define USB_VENDOR_COMPAQ 0x049f /* Compaq */ @@ -1485,6 +1486,9 @@ /* Fiberline */ #define USB_PRODUCT_FIBERLINE_WL430U 0x6003 /* WL-430U */ +/* Foxconn / Hon Hai products */ +#define USB_PRODUCT_FOXCONN_AR3012 0xe04e /* Bluetooth AR3012 */ + /* Freecom products */ #define USB_PRODUCT_FREECOM_DVD 0xfc01 /* Connector for DVD drive */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.640 src/sys/dev/usb/usbdevs_data.h:1.641 --- src/sys/dev/usb/usbdevs_data.h:1.640 Fri May 3 15:38:04 2013 +++ src/sys/dev/usb/usbdevs_data.h Thu May 9 12:41:13 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdevs_data.h,v 1.640 2013/05/03 15:38:04 jakllsch Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.641 2013/05/09 12:41:13 aymeric Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. @@ -243,6 +243,10 @@ const struct usb_vendor usb_vendors[] = STMicroelectronics, }, { + USB_VENDOR_FOXCONN, + Foxconn / Hon Hai, + }, + { USB_VENDOR_MEIZU, Meizu Electronics, }, @@ -2127,7 +2131,7 @@ const struct usb_vendor usb_vendors[] = GNU Radio USRP, }, }; -const int usb_nvendors = 522; +const int usb_nvendors = 523; const struct usb_product usb_products[] = { { @@ -4715,6 +4719,10 @@ const struct usb_product usb_products[] WL-430U, }, { + USB_VENDOR_FOXCONN, USB_PRODUCT_FOXCONN_AR3012, + Bluetooth AR3012, + }, + { USB_VENDOR_FREECOM, USB_PRODUCT_FREECOM_DVD, Connector for DVD drive, }, @@ -9987,4 +9995,4 @@ const struct usb_product usb_products[] Prestige, }, }; -const int usb_nproducts = 1964; +const int usb_nproducts = 1965;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: aymeric Date: Thu May 9 12:44:31 UTC 2013 Modified Files: src/sys/dev/usb: aubtfwl.c Added Files: src/sys/dev/usb: aubtfwlreg.h Log Message: . add support for loading code + config of AR3012 based chips . make it easy to add vendor and product ids for similar hardware To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/aubtfwl.c cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/aubtfwlreg.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/usb/aubtfwl.c diff -u src/sys/dev/usb/aubtfwl.c:1.4 src/sys/dev/usb/aubtfwl.c:1.5 --- src/sys/dev/usb/aubtfwl.c:1.4 Thu Dec 27 16:42:32 2012 +++ src/sys/dev/usb/aubtfwl.c Thu May 9 12:44:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: aubtfwl.c,v 1.4 2012/12/27 16:42:32 skrll Exp $ */ +/* $NetBSD: aubtfwl.c,v 1.5 2013/05/09 12:44:31 aymeric Exp $ */ /* * Copyright (c) 2011 Jonathan A. Kollasch @@ -27,16 +27,18 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: aubtfwl.c,v 1.4 2012/12/27 16:42:32 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: aubtfwl.c,v 1.5 2013/05/09 12:44:31 aymeric Exp $); #include sys/param.h #include dev/usb/usb.h #include dev/usb/usbdevs.h #include dev/usb/usbdi.h +#include dev/usb/usbdivar.h #include dev/usb/usbdi_util.h #include dev/firmload.h -#define AR3K_FIRMWARE_HEADER_SIZE 20 +#include dev/usb/aubtfwlreg.h + #define AR3K_FIRMWARE_CHUNK_SIZE 4096 static int aubtfwl_match(device_t, cfdata_t, void *); @@ -46,19 +48,33 @@ static void aubtfwl_attach_hook(device_t struct aubtfwl_softc { usbd_device_handle sc_udev; + int sc_flags; +#define AUBT_IS_AR3012 1 }; CFATTACH_DECL_NEW(aubtfwl, sizeof(struct aubtfwl_softc), aubtfwl_match, aubtfwl_attach, aubtfwl_detach, NULL); +static const struct usb_devno ar3k_devs[] = { + { USB_VENDOR_ATHEROS2, USB_PRODUCT_ATHEROS2_AR3011 }, +}; + +static const struct usb_devno ar3k12_devs[] = { + { USB_VENDOR_FOXCONN, USB_PRODUCT_FOXCONN_AR3012 }, +}; + static int aubtfwl_match(device_t parent, cfdata_t match, void *aux) { const struct usb_attach_arg * const uaa = aux; - if (uaa-vendor == USB_VENDOR_ATHEROS2 - uaa-product == USB_PRODUCT_ATHEROS2_AR3011) + if (usb_lookup(ar3k_devs, uaa-vendor, uaa-product)) return UMATCH_VENDOR_PRODUCT; + if (usb_lookup(ar3k12_devs, uaa-vendor, uaa-product)) { + return (UGETW(uaa-device-ddesc.bcdDevice) 1)? + UMATCH_NONE : UMATCH_VENDOR_PRODUCT; + } + return UMATCH_NONE; } @@ -70,6 +86,10 @@ aubtfwl_attach(device_t parent, device_t aprint_naive(\n); aprint_normal(\n); sc-sc_udev = uaa-device; + sc-sc_flags = 0; + + if (usb_lookup(ar3k12_devs, uaa-vendor, uaa-product)) + sc-sc_flags |= AUBT_IS_AR3012; config_mountroot(self, aubtfwl_attach_hook); } @@ -84,27 +104,27 @@ aubtfwl_detach(device_t self, int flags) return 0; } -static void -aubtfwl_attach_hook(device_t self) -{ +/* Returns 0 if firmware was correctly loaded */ +static int +aubtfwl_firmware_load(device_t self, const char *name) { struct aubtfwl_softc * const sc = device_private(self); usbd_interface_handle iface; usbd_pipe_handle pipe; usbd_xfer_handle xfer; void *buf; usb_device_request_t req; - int error; + int error = 0; firmware_handle_t fwh; size_t fws; size_t fwo = 0; uint32_t n; - - memset(req, 0, sizeof(req)); - error = firmware_open(ubt, ath3k-1.fw, fwh); /* XXX revisit name */ + memset(req, 0, sizeof req); + + error = firmware_open(ubt, name, fwh); if (error != 0) { - aprint_error_dev(self, ath3k-1.fw open fail %d\n, error); - return; + aprint_error_dev(self, '%s' open fail %d\n, name, error); + return error; } fws = firmware_get_size(fwh); @@ -132,12 +152,14 @@ aubtfwl_attach_hook(device_t self) xfer = usbd_alloc_xfer(sc-sc_udev); if (xfer == NULL) { aprint_error_dev(self, failed to alloc xfer\n); + error = 1; goto out_pipe; } - buf = usbd_alloc_buffer(xfer, 4096); + buf = usbd_alloc_buffer(xfer, AR3K_FIRMWARE_CHUNK_SIZE); if (buf == NULL) { aprint_error_dev(self, failed to alloc buffer\n); + error = 1; goto out_xfer; } @@ -147,7 +169,7 @@ aubtfwl_attach_hook(device_t self) goto out_xfer; } - req.bRequest = 1; + req.bRequest = AR3K_SEND_FIRMWARE; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; USETW(req.wValue, 0); USETW(req.wIndex, 0); @@ -158,7 +180,7 @@ aubtfwl_attach_hook(device_t self) error = usbd_do_request(sc-sc_udev, req, buf); if (error != 0) { aprint_error_dev(self, %s\n, usbd_errstr(error)); - return; + return error; } fwo = AR3K_FIRMWARE_HEADER_SIZE; @@ -166,7 +188,7 @@ aubtfwl_attach_hook(device_t self) n = min(AR3K_FIRMWARE_CHUNK_SIZE, fws - fwo); error = firmware_read(fwh, fwo, buf, n); if (error != 0) { - break;; + break; } error = usbd_bulk_transfer(xfer, pipe, USBD_NO_COPY, USBD_DEFAULT_TIMEOUT, @@ -174,11 +196,13 @@ aubtfwl_attach_hook(device_t
CVS commit: src/share/man/man4
Module Name:src Committed By: aymeric Date: Thu May 9 12:46:22 UTC 2013 Modified Files: src/share/man/man4: aubtfwl.4 Log Message: mention support for AR3012 based chips and point to the corresponding firmware files To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/aubtfwl.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/aubtfwl.4 diff -u src/share/man/man4/aubtfwl.4:1.2 src/share/man/man4/aubtfwl.4:1.3 --- src/share/man/man4/aubtfwl.4:1.2 Tue Mar 13 19:25:39 2012 +++ src/share/man/man4/aubtfwl.4 Thu May 9 12:46:21 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: aubtfwl.4,v 1.2 2012/03/13 19:25:39 njoly Exp $ +.\ $NetBSD: aubtfwl.4,v 1.3 2013/05/09 12:46:21 aymeric Exp $ .\ .\ Copyright (c) 2012 The NetBSD Foundation .\ All rights reserved. @@ -23,38 +23,49 @@ .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ -.Dd February 14, 2012 +.Dd May 9, 2013 .Dt AUBTFWL 4 .Os .Sh NAME .Nm aubtfwl -.Nd Atheros AR3011 Firmware Loader +.Nd Atheros AR3011/AR3012 Firmware Loader .Sh SYNOPSIS .Cd aubtfwl* at uhub? .Sh DESCRIPTION The .Nm driver manages automatic loading of firmware on the Atheros AR3011 -Bluetooth chipset. -The firmware file -.Pa ath3k-1.fw -should be obtained and placed in a +and AR3012 Bluetooth chipsets. +The firmware files should be obtained and placed in a .Pa ubt/ directory in the search path of the .Xr firmload 9 kernel subsystem. Upon attachment, the .Nm -driver will load this firmware file and the device will detach +driver will load the necessary firmware files and the device will detach and reattach as a generic Bluetooth device using the .Xr ubt 4 driver. .Pp -The firmware file can be obtained from the Linux firmware +For AR3011 chipsets, you will need the +.Pa ath3k-1.fw +firmware file in +.Pa ubt/ +, and for AR3012 chipsets, the files +.Pa ar3k/AthrBT_*.dfu +and +.Pa ar3k/ramps_*.dfu +in +.Pa ubt/ar3k/ +.Pp +The firmware files can be obtained from the Linux firmware git repository at .Lk http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git . .Sh FILES .Pa ath3k-1.fw +.Pa ar3k/AthrBT_*.dfu +.Pa ar3k/ramps_*.dfu .Sh SEE ALSO .Xr bluetooth 4 , .Xr ubt 4 ,
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu May 9 13:54:12 UTC 2013 Modified Files: src/share/man/man4: aubtfwl.4 Log Message: Punctuation fixes, put FILES in a list. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/aubtfwl.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/aubtfwl.4 diff -u src/share/man/man4/aubtfwl.4:1.3 src/share/man/man4/aubtfwl.4:1.4 --- src/share/man/man4/aubtfwl.4:1.3 Thu May 9 12:46:21 2013 +++ src/share/man/man4/aubtfwl.4 Thu May 9 13:54:11 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: aubtfwl.4,v 1.3 2013/05/09 12:46:21 aymeric Exp $ +.\ $NetBSD: aubtfwl.4,v 1.4 2013/05/09 13:54:11 wiz Exp $ .\ .\ Copyright (c) 2012 The NetBSD Foundation .\ All rights reserved. @@ -51,21 +51,26 @@ driver. For AR3011 chipsets, you will need the .Pa ath3k-1.fw firmware file in -.Pa ubt/ -, and for AR3012 chipsets, the files +.Pa ubt/ , +and for AR3012 chipsets, the files .Pa ar3k/AthrBT_*.dfu and .Pa ar3k/ramps_*.dfu in -.Pa ubt/ar3k/ +.Pa ubt/ar3k/ . .Pp The firmware files can be obtained from the Linux firmware git repository at .Lk http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git . .Sh FILES +.Bl -bullet +.It .Pa ath3k-1.fw +.It .Pa ar3k/AthrBT_*.dfu +.It .Pa ar3k/ramps_*.dfu +.El .Sh SEE ALSO .Xr bluetooth 4 , .Xr ubt 4 ,
CVS commit: src/common/lib/libc/arch/arm/quad
Module Name:src Committed By: matt Date: Thu May 9 15:03:41 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/quad: __aeabi_ldivmod.S __aeabi_uldivmod.S Log Message: Don't worry about divide by 0 for kernel or standalone To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S diff -u src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.6 src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.7 --- src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S:1.6 Thu May 9 07:12:59 2013 +++ src/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S Thu May 9 15:03:40 2013 @@ -29,11 +29,13 @@ #include machine/asm.h -RCSID($NetBSD: __aeabi_ldivmod.S,v 1.6 2013/05/09 07:12:59 skrll Exp $) +RCSID($NetBSD: __aeabi_ldivmod.S,v 1.7 2013/05/09 15:03:40 matt Exp $) ENTRY(__aeabi_ldivmod) +#if !defined(_KERNEL) !defined(_STANDALONE) orrs ip, r2, r3 beq .Ldivbyzero +#endif push {r4-r5, sl, lr} #define NEG r5 @@ -130,6 +132,7 @@ ENTRY(__aeabi_ldivmod) pop {r4-r5, sl, lr} RET +#if !defined(_KERNEL) !defined(_STANDALONE) .Ldivbyzero: push {r0-r1, ip, lr} cmp AHI, #0 @@ -140,4 +143,5 @@ ENTRY(__aeabi_ldivmod) bl PLT_SYM(__aeabi_ldiv0) pop {r2-r3, ip, lr} RET +#endif END(__aeabi_ldivmod) Index: src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S diff -u src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.5 src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.6 --- src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S:1.5 Wed May 8 05:13:56 2013 +++ src/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S Thu May 9 15:03:40 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: __aeabi_uldivmod.S,v 1.5 2013/05/08 05:13:56 matt Exp $) +RCSID($NetBSD: __aeabi_uldivmod.S,v 1.6 2013/05/09 15:03:40 matt Exp $) /* * typedef struct { unsigned long long quo, rem } ulldiv_t; @@ -38,8 +38,10 @@ RCSID($NetBSD: __aeabi_uldivmod.S,v 1.5 */ ENTRY(__aeabi_uldivmod) +#if !defined(_KERNEL) !defined(_STANDALONE) orrs ip, r2, r3 beq .Ldivbyzero +#endif push {r4,lr} sub sp, sp, #16 @@ -54,6 +56,7 @@ ENTRY(__aeabi_uldivmod) pop {r2-r4,lr} RET +#if !defined(_KERNEL) !defined(_STANDALONE) .Ldivbyzero: push {r0-r1,ip,lr} mvn r0, #0 @@ -61,4 +64,5 @@ ENTRY(__aeabi_uldivmod) bl PLT_SYM(__aeabi_ldiv0) pop {r2-r3,ip,lr} RET +#endif END(__aeabi_uldivmod)
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Thu May 9 15:25:44 UTC 2013 Modified Files: src/external/gpl2/xcvs/dist/src: acl.c Log Message: When checking for membership in the system group file don't forget to check the primary group of the user. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/src/acl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/acl.c diff -u src/external/gpl2/xcvs/dist/src/acl.c:1.4 src/external/gpl2/xcvs/dist/src/acl.c:1.5 --- src/external/gpl2/xcvs/dist/src/acl.c:1.4 Wed Oct 3 18:28:20 2012 +++ src/external/gpl2/xcvs/dist/src/acl.c Thu May 9 11:25:44 2013 @@ -30,6 +30,7 @@ */ #include cvs.h #include getline.h +#include pwd.h #include grp.h static int acl_fileproc (void *callerdat, struct file_info *finfo); @@ -556,18 +557,24 @@ check_default: if (debug) fprintf (stderr, usesystemgroups=%d\n, use_system_groups); if (use_system_groups) { struct group *griter; + struct passwd *pwd; + gid_t gid = (pwd = getpwnam(username)) != NULL ? pwd-pw_gid : -1; setgrent (); while (griter = getgrent ()) { - char **users=griter-gr_mem; - int index = 0; - char *userchk = users [index++]; - while(userchk != NULL) { - if(strcmp (userchk, username) == 0) - break; - userchk = users[index++]; + char *userchk; + if (gid == griter-gr_gid) { + userchk = username; + } else { + char **users = griter-gr_mem; + int index = 0; + userchk = users [index++]; + while(userchk != NULL) { + if(strcmp (userchk, username) == 0) + break; + userchk = users[index++]; + } } - if (debug) fprintf (stderr, usercheck=%s\n, userchk); if (userchk != NULL) { char *grp; if ((grp = findusername (part_perms, griter-gr_name)))
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: christos Date: Thu May 9 15:37:58 UTC 2013 Modified Files: src/libexec/ld.elf_so: load.c Log Message: Fix refcount of the object we found in our list by name. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/libexec/ld.elf_so/load.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/load.c diff -u src/libexec/ld.elf_so/load.c:1.44 src/libexec/ld.elf_so/load.c:1.45 --- src/libexec/ld.elf_so/load.c:1.44 Mon May 6 15:59:30 2013 +++ src/libexec/ld.elf_so/load.c Thu May 9 11:37:58 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: load.c,v 1.44 2013/05/06 19:59:30 christos Exp $ */ +/* $NetBSD: load.c,v 1.45 2013/05/09 15:37:58 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: load.c,v 1.44 2013/05/06 19:59:30 christos Exp $); +__RCSID($NetBSD: load.c,v 1.45 2013/05/09 15:37:58 christos Exp $); #endif /* not lint */ #include err.h @@ -212,6 +212,7 @@ _rtld_load_by_name(const char *name, Obj dbg((load by name %s %p, name, x)); for (o = _rtld_objlist-next; o != NULL; o = o-next) if (_rtld_object_match_name(o, name)) { + ++o-refcount; (*needed)-obj = o; return true; }
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: christos Date: Thu May 9 15:38:14 UTC 2013 Modified Files: src/libexec/ld.elf_so: map_object.c rtld.c rtld.h symver.c Log Message: convert to SIMPLEQ like the rest of the queues. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/libexec/ld.elf_so/map_object.c cvs rdiff -u -r1.166 -r1.167 src/libexec/ld.elf_so/rtld.c cvs rdiff -u -r1.115 -r1.116 src/libexec/ld.elf_so/rtld.h cvs rdiff -u -r1.3 -r1.4 src/libexec/ld.elf_so/symver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/map_object.c diff -u src/libexec/ld.elf_so/map_object.c:1.50 src/libexec/ld.elf_so/map_object.c:1.51 --- src/libexec/ld.elf_so/map_object.c:1.50 Wed May 8 11:25:01 2013 +++ src/libexec/ld.elf_so/map_object.c Thu May 9 11:38:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: map_object.c,v 1.50 2013/05/08 15:25:01 christos Exp $ */ +/* $NetBSD: map_object.c,v 1.51 2013/05/09 15:38:14 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -34,7 +34,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: map_object.c,v 1.50 2013/05/08 15:25:01 christos Exp $); +__RCSID($NetBSD: map_object.c,v 1.51 2013/05/09 15:38:14 christos Exp $); #endif /* not lint */ #include errno.h @@ -421,6 +421,7 @@ void _rtld_obj_free(Obj_Entry *obj) { Objlist_Entry *elm; + Name_Entry *entry; #if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II) if (obj-tls_done) @@ -432,9 +433,8 @@ _rtld_obj_free(Obj_Entry *obj) obj-needed = needed-next; xfree(needed); } - while (!STAILQ_EMPTY(obj-names)) { - Name_Entry *entry = STAILQ_FIRST(obj-names); - STAILQ_REMOVE_HEAD(obj-names, link); + while ((entry = SIMPLEQ_FIRST(obj-names)) != NULL) { + SIMPLEQ_REMOVE_HEAD(obj-names, link); xfree(entry); } while ((elm = SIMPLEQ_FIRST(obj-dldags)) != NULL) { @@ -459,7 +459,7 @@ _rtld_obj_new(void) Obj_Entry *obj; obj = CNEW(Obj_Entry); - STAILQ_INIT(obj-names); + SIMPLEQ_INIT(obj-names); SIMPLEQ_INIT(obj-dldags); SIMPLEQ_INIT(obj-dagmembers); return obj; Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.166 src/libexec/ld.elf_so/rtld.c:1.167 --- src/libexec/ld.elf_so/rtld.c:1.166 Mon May 6 15:59:30 2013 +++ src/libexec/ld.elf_so/rtld.c Thu May 9 11:38:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.166 2013/05/06 19:59:30 christos Exp $ */ +/* $NetBSD: rtld.c,v 1.167 2013/05/09 15:38:14 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rtld.c,v 1.166 2013/05/06 19:59:30 christos Exp $); +__RCSID($NetBSD: rtld.c,v 1.167 2013/05/09 15:38:14 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -884,6 +884,7 @@ _rtld_unload_object(sigset_t *mask, Obj_ _rtld_linkmap_delete(obj); *linkp = obj-next; _rtld_objcount--; +xprintf(%s, %d: %s\n, __FILE__, __LINE__, obj-path); _rtld_obj_free(obj); } else linkp = obj-next; @@ -1373,8 +1374,8 @@ dl_iterate_phdr(int (*callback)(struct d for (obj = _rtld_objlist; obj != NULL; obj = obj-next) { phdr_info.dlpi_addr = (Elf_Addr)obj-relocbase; /* XXX: wrong but not fixing it yet */ - phdr_info.dlpi_name = STAILQ_FIRST(obj-names) ? - STAILQ_FIRST(obj-names)-name : obj-path; + phdr_info.dlpi_name = SIMPLEQ_FIRST(obj-names) ? + SIMPLEQ_FIRST(obj-names)-name : obj-path; phdr_info.dlpi_phdr = obj-phdr; phdr_info.dlpi_phnum = obj-phsize / sizeof(obj-phdr[0]); #if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II) Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.115 src/libexec/ld.elf_so/rtld.h:1.116 --- src/libexec/ld.elf_so/rtld.h:1.115 Mon May 6 15:59:30 2013 +++ src/libexec/ld.elf_so/rtld.h Thu May 9 11:38:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.115 2013/05/06 19:59:30 christos Exp $ */ +/* $NetBSD: rtld.h,v 1.116 2013/05/09 15:38:14 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -92,7 +92,7 @@ typedef struct Struct_Objlist_Entry { typedef SIMPLEQ_HEAD(Struct_Objlist, Struct_Objlist_Entry) Objlist; typedef struct Struct_Name_Entry { - STAILQ_ENTRY(Struct_Name_Entry) link; + SIMPLEQ_ENTRY(Struct_Name_Entry) link; char name[1]; } Name_Entry; @@ -255,8 +255,8 @@ typedef struct Struct_Obj_Entry { uint8_t nbuckets_s1; uint8_t nbuckets_s2; size_t pathlen; /* Pathname length */ - STAILQ_HEAD(, Struct_Name_Entry) names; /* List of names for this object we - know about. */ + SIMPLEQ_HEAD(, Struct_Name_Entry) names; /* List of names for this + * object we know about. */ #ifdef __powerpc__ Elf_Addr *gotptr; /* GOT table (secure-plt only) */ Index: src/libexec/ld.elf_so/symver.c diff -u src/libexec/ld.elf_so/symver.c:1.3 src/libexec/ld.elf_so/symver.c:1.4 --- src/libexec/ld.elf_so/symver.c:1.3 Tue May 7 09:01:07 2013
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: christos Date: Thu May 9 15:39:10 UTC 2013 Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: remove stray debugging To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/libexec/ld.elf_so/rtld.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.167 src/libexec/ld.elf_so/rtld.c:1.168 --- src/libexec/ld.elf_so/rtld.c:1.167 Thu May 9 11:38:14 2013 +++ src/libexec/ld.elf_so/rtld.c Thu May 9 11:39:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.167 2013/05/09 15:38:14 christos Exp $ */ +/* $NetBSD: rtld.c,v 1.168 2013/05/09 15:39:10 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rtld.c,v 1.167 2013/05/09 15:38:14 christos Exp $); +__RCSID($NetBSD: rtld.c,v 1.168 2013/05/09 15:39:10 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -884,7 +884,6 @@ _rtld_unload_object(sigset_t *mask, Obj_ _rtld_linkmap_delete(obj); *linkp = obj-next; _rtld_objcount--; -xprintf(%s, %d: %s\n, __FILE__, __LINE__, obj-path); _rtld_obj_free(obj); } else linkp = obj-next;
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: skrll Date: Thu May 9 15:47:35 UTC 2013 Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: Remove redundant assignment. Hasn't been needed since 1999. To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/libexec/ld.elf_so/rtld.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.168 src/libexec/ld.elf_so/rtld.c:1.169 --- src/libexec/ld.elf_so/rtld.c:1.168 Thu May 9 15:39:10 2013 +++ src/libexec/ld.elf_so/rtld.c Thu May 9 15:47:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.168 2013/05/09 15:39:10 christos Exp $ */ +/* $NetBSD: rtld.c,v 1.169 2013/05/09 15:47:34 skrll Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rtld.c,v 1.168 2013/05/09 15:39:10 christos Exp $); +__RCSID($NetBSD: rtld.c,v 1.169 2013/05/09 15:47:34 skrll Exp $); #endif /* not lint */ #include sys/param.h @@ -352,12 +352,7 @@ _rtld_init(caddr_t mapbase, caddr_t relo RTLD_DEFAULT_LIBRARY_PATH / RTLD_ARCH_SUBDIR); #endif - /* - * Set up the _rtld_objlist pointer, so that rtld symbols can be found. - */ - _rtld_objlist = _rtld_objself; - - /* Make the object list empty again. */ + /* Make the object list empty. */ _rtld_objlist = NULL; _rtld_objtail = _rtld_objlist; _rtld_objcount = 0;
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: christos Date: Thu May 9 19:12:04 UTC 2013 Modified Files: src/usr.sbin/npf/npfctl: npf_parse.y Log Message: always allow hex where decimal is allowed. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/npf/npfctl/npf_parse.y 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/npf/npfctl/npf_parse.y diff -u src/usr.sbin/npf/npfctl/npf_parse.y:1.22 src/usr.sbin/npf/npfctl/npf_parse.y:1.23 --- src/usr.sbin/npf/npfctl/npf_parse.y:1.22 Tue Mar 19 20:29:47 2013 +++ src/usr.sbin/npf/npfctl/npf_parse.y Thu May 9 15:12:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_parse.y,v 1.22 2013/03/20 00:29:47 christos Exp $ */ +/* $NetBSD: npf_parse.y,v 1.23 2013/05/09 19:12:03 christos Exp $ */ /*- * Copyright (c) 2011-2012 The NetBSD Foundation, Inc. @@ -156,7 +156,7 @@ yyerror(const char *fmt, ...) %type str addr, some_name, list_elem, table_store, string %type str proc_param_val, opt_apply -%type num ifindex, port, opt_final, on_ifindex +%type num ifindex, port, opt_final, on_ifindex, number %type num afamily, opt_family %type num block_or_pass, rule_dir, block_opts %type num opt_stateful, icmp_type, table_type, map_sd, map_type @@ -240,12 +240,12 @@ list_elem npfvar_add_element(vp, NPFVAR_STRING, $1, strlen($1) + 1); npfvar_add_elements(cvar, vp); } - | NUM MINUS NUM + | number MINUS number { npfvar_t *vp = npfctl_parse_port_range($1, $3); npfvar_add_elements(cvar, vp); } - | NUM + | number { npfvar_t *vp = npfvar_create(.num); npfvar_add_element(vp, NPFVAR_NUM, $1, sizeof($1)); @@ -377,7 +377,7 @@ proc_param proc_param_val : some_name { $$ = $1; } - | NUM { (void)asprintf($$, %ld, $1); } + | number { (void)asprintf($$, %ld, $1); } | FPNUM { (void)asprintf($$, %lf, $1); } | { $$ = NULL; } ; @@ -540,7 +540,7 @@ opt_proto $$.op_proto = npfctl_protono($2); $$.op_opts = NULL; } - | PROTO NUM + | PROTO number { $$.op_proto = $2; $$.op_opts = NULL; @@ -611,11 +611,7 @@ filt_addr ; addr_and_mask - : addr SLASH NUM - { - $$ = npfctl_parse_fam_addr_mask($1, NULL, $3); - } - | addr SLASH HEX + : addr SLASH number { $$ = npfctl_parse_fam_addr_mask($1, NULL, $3); } @@ -697,7 +693,7 @@ port_range ; port - : NUM { $$ = $1; } + : number { $$ = $1; } | IDENTIFIER { $$ = npfctl_portno($1); } | STRING { $$ = npfctl_portno($1); } ; @@ -707,7 +703,7 @@ icmp_type_and_code { $$ = npfctl_parse_icmp($num0, $2, -1); } - | ICMPTYPE icmp_type CODE NUM + | ICMPTYPE icmp_type CODE number { $$ = npfctl_parse_icmp($num0, $2, $4); } @@ -748,7 +744,7 @@ tcp_flags ; icmp_type - : NUM { $$ = $1; } + : number { $$ = $1; } | IDENTIFIER { $$ = npfctl_icmptype($num-1, $1); } | VAR_ID { @@ -830,6 +826,11 @@ ifindex } ; +number + : HEX { $$ = $1; } + | NUM { $$ = $1; } + ; + some_name : IDENTIFIER { $$ = $1; } | STRING { $$ = $1; }
CVS commit: src/sys/netipsec
Module Name:src Committed By: gdt Date: Thu May 9 19:21:50 UTC 2013 Modified Files: src/sys/netipsec: ipsec_osdep.h Log Message: Fix FAST_IPSEC locking violation. Without this change, using ESP tunnels with FAST_IPSEC on a 2-cpu i386 machine results in an mbuf leak. This change was tested in netbsd-6. When FAST_IPSEC is enabled and a tunnel is set up, after the outer packet is stripped off, FAST_IPSEC queues the inner packet on the appropriate queue (ipinstrq or ip6instrq). These queues require the KERNEL_LOCK to be held before using the queue, and the FAST_IPSEC code did not take the KERNEL_LOCK as required. KERNEL_LOCK and KERNEL_UNLOCK_ONE calls have been added. If a struct ifnet instance is passed to the if_handoff function which does this queuing, the interface's if_start function may be called. Some hardware devices require KERNEL_LOCK to be held; others do not. Looking at the body of NetBSD code, other places where an if_start function is called, KERNEL_LOCK is held. Thus, the lock is not released in if_handoff until after the if_start function is called. In practice, having the kernel lock when if_start is called makes no difference - there is not a single instance in all of the NetBSD code where if_handoff is passed an instance of struct ifnet. This commit is the work of Bev Schwartz of BBN. Approved for Public Release, Distribution Unlimited This material is based upon work supported by the Defense Advanced Research Projects Agency and Space and Naval Warfare Systems Center, Pacific, under Contract No. N66001-09-C-2073. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/netipsec/ipsec_osdep.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/netipsec/ipsec_osdep.h diff -u src/sys/netipsec/ipsec_osdep.h:1.23 src/sys/netipsec/ipsec_osdep.h:1.24 --- src/sys/netipsec/ipsec_osdep.h:1.23 Tue Nov 29 13:15:27 2011 +++ src/sys/netipsec/ipsec_osdep.h Thu May 9 19:21:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_osdep.h,v 1.23 2011/11/29 13:15:27 drochner Exp $ */ +/* $NetBSD: ipsec_osdep.h,v 1.24 2013/05/09 19:21:50 gdt Exp $ */ /* $FreeBSD: /repoman/r/ncvs/src/sys/netipsec/ipsec_osdep.h,v 1.1 2003/09/29 22:47:45 sam Exp $ */ /* @@ -144,8 +144,10 @@ if_handoff(struct ifqueue *ifq, struct m int need_if_start = 0; int s = splnet(); + KERNEL_LOCK(1, NULL); if (IF_QFULL(ifq)) { IF_DROP(ifq); + KERNEL_UNLOCK_ONE(NULL); splx(s); m_freem(m); return (0); @@ -159,6 +161,7 @@ if_handoff(struct ifqueue *ifq, struct m IF_ENQUEUE(ifq, m); if (need_if_start) (*ifp-if_start)(ifp); + KERNEL_UNLOCK_ONE(NULL); splx(s); return (1); }
CVS commit: [khorben-n900] src/sys/dev/wscons
Module Name:src Committed By: khorben Date: Fri May 10 00:38:20 UTC 2013 Modified Files: src/sys/dev/wscons [khorben-n900]: wsconsio.h Log Message: Allocated a wskbd entry for the Nokia N900 To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.108.2.1 src/sys/dev/wscons/wsconsio.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/wscons/wsconsio.h diff -u src/sys/dev/wscons/wsconsio.h:1.108 src/sys/dev/wscons/wsconsio.h:1.108.2.1 --- src/sys/dev/wscons/wsconsio.h:1.108 Mon Apr 29 13:39:47 2013 +++ src/sys/dev/wscons/wsconsio.h Fri May 10 00:38:20 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: wsconsio.h,v 1.108 2013/04/29 13:39:47 kiyohara Exp $ */ +/* $NetBSD: wsconsio.h,v 1.108.2.1 2013/05/10 00:38:20 khorben Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -108,6 +108,7 @@ struct wscons_event { #define WSKBD_TYPE_LUNA 23 /* OMRON SX-9100 LUNA */ #define WSKBD_TYPE_RFB 24 /* Usermode vnc remote keyboard */ #define WSKBD_TYPE_EPOC 25 /* Psion EPOC machine keyboard */ +#define WSKBD_TYPE_N900 26 /* Nokia N900 keyboard */ /* Manipulate the keyboard bell. */ struct wskbd_bell_data { @@ -331,7 +332,7 @@ struct wsmouse_repeat { #define WSDISPLAY_TYPE_VALKYRIE 54 /* Apple onboard video 'valkyrie' */ #define WSDISPLAY_TYPE_IMXIPU 55 /* i.MX ipu */ #define WSDISPLAY_TYPE_VC4 56 /* Broadcom VideoCore 4 */ -#define WSDISPLAY_TYPE_OMAP3 57 /* OMAP 3530 */ +#define WSDISPLAY_TYPE_OMAP3 57 /* OMAP 3430/3530 */ #define WSDISPLAY_TYPE_WINDERMERE 58 /* SoC for EPOC32 Series 5mx */ #define WSDISPLAY_TYPE_CLPS711X 59 /* CL PS-711x */
CVS commit: [khorben-n900] src/sys/arch/arm/omap
Module Name:src Committed By: khorben Date: Fri May 10 00:50:35 UTC 2013 Modified Files: src/sys/arch/arm/omap [khorben-n900]: omap2430_intr.h Log Message: Pre-allocated more potential interrupt sources for the N900. It features the regular 6 * 32 GPIO pins on the main core, plus 18 pins on the TPS65950 companion chip, for a total of at least 210 such interrupt sources. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.8.1 src/sys/arch/arm/omap/omap2430_intr.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/arm/omap/omap2430_intr.h diff -u src/sys/arch/arm/omap/omap2430_intr.h:1.4 src/sys/arch/arm/omap/omap2430_intr.h:1.4.8.1 --- src/sys/arch/arm/omap/omap2430_intr.h:1.4 Sat Jul 14 07:42:57 2012 +++ src/sys/arch/arm/omap/omap2430_intr.h Fri May 10 00:50:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: omap2430_intr.h,v 1.4 2012/07/14 07:42:57 matt Exp $ */ +/* $NetBSD: omap2430_intr.h,v 1.4.8.1 2013/05/10 00:50:34 khorben Exp $ */ /* * Define the SDP2430 specific information and then include the generic OMAP @@ -162,7 +162,7 @@ uint32_t omap_microtimer_interval(uint32 #define IRQ_GPT12_3530 95 /* (3530) GPT12 */ #define PIC_MAXSOURCES 96 -#define PIC_MAXMAXSOURCES (PIC_MAXSOURCES+192) +#define PIC_MAXMAXSOURCES (PIC_MAXSOURCES+256) void omap_irq_handler(void *);
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: htodd Date: Fri May 10 00:50:50 UTC 2013 Modified Files: src/distrib/sets/lists/debug: md.amd64 Log Message: Add ./usr/libdata/debug/usr/libexec/ld.elf_so-i386.debug entry. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/lists/debug/md.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/md.amd64 diff -u src/distrib/sets/lists/debug/md.amd64:1.22 src/distrib/sets/lists/debug/md.amd64:1.23 --- src/distrib/sets/lists/debug/md.amd64:1.22 Sun Apr 28 04:05:40 2013 +++ src/distrib/sets/lists/debug/md.amd64 Fri May 10 00:50:50 2013 @@ -1,8 +1,9 @@ -# $NetBSD: md.amd64,v 1.22 2013/04/28 04:05:40 joerg Exp $ +# $NetBSD: md.amd64,v 1.23 2013/05/10 00:50:50 htodd Exp $ ./usr/libdata/debug/lib/i386/npf/ext_log.so.0.0.debug comp-npf-debug debug,compat ./usr/libdata/debug/lib/i386/npf/ext_normalize.so.0.0.debug comp-npf-debug debug,compat ./usr/libdata/debug/lib/i386/npf/ext_rndblock.so.0.0.debug comp-npf-debug debug,compat ./usr/libdata/debug/libexec/ld.elf_so-i386.debug comp-sys-debug debug +./usr/libdata/debug/usr/libexec/ld.elf_so-i386.debug comp-sys-debug debug ./usr/libdata/debug/usr/libexec/ld.elf_so-i386 comp-obsolete obsolete ./usr/libdata/debug/usr/bin/fdformat.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/iasl.debug comp-util-debug debug
CVS commit: [khorben-n900] src/sys/arch/arm/pic
Module Name:src Committed By: khorben Date: Fri May 10 00:57:56 UTC 2013 Modified Files: src/sys/arch/arm/pic [khorben-n900]: pic.c picvar.h Log Message: Allow interrupt handlers to be temporarily disabled or enabled again, including from within interrupt context: returning non-zero keeps the handler enabled (as previously), while returning zero disables the interrupt until a call to intr_enable(). This is necessary with the TPS65950 companion chip because: - it interrupts on the main code (via IRQ_SYS_nIRQ0) - interrupt handling requires I2C traffic (to access registers) - interrupt-based interaction is necessary with this chip (keypad, GPIO...) XXX Affects other ARM devices using the ARM PIC code, additional code review is required to address them. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.6.1 src/sys/arch/arm/pic/pic.c cvs rdiff -u -r1.7 -r1.7.8.1 src/sys/arch/arm/pic/picvar.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/arm/pic/pic.c diff -u src/sys/arch/arm/pic/pic.c:1.15 src/sys/arch/arm/pic/pic.c:1.15.6.1 --- src/sys/arch/arm/pic/pic.c:1.15 Tue Oct 30 07:42:35 2012 +++ src/sys/arch/arm/pic/pic.c Fri May 10 00:57:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pic.c,v 1.15 2012/10/30 07:42:35 msaitoh Exp $ */ +/* $NetBSD: pic.c,v 1.15.6.1 2013/05/10 00:57:56 khorben Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pic.c,v 1.15 2012/10/30 07:42:35 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: pic.c,v 1.15.6.1 2013/05/10 00:57:56 khorben Exp $); #define _INTR_PRIVATE #include sys/param.h @@ -201,7 +201,7 @@ pic_mark_pending_sources(struct pic_soft return ipl_mask; KASSERT((irq_base 31) == 0); - + (*pic-pic_ops-pic_block_irqs)(pic, irq_base, pending); atomic_or_32(ipending, pending); @@ -252,7 +252,7 @@ pic_find_pending_irqs_by_ipl(struct pic_ } } -void +int pic_dispatch(struct intrsource *is, void *frame) { int rv; @@ -265,13 +265,15 @@ pic_dispatch(struct intrsource *is, void rv = (*is-is_func)(is-is_arg); } else { pic_deferral_ev.ev_count++; - return; + return 1; } struct pic_percpu * const pcpu = percpu_getref(is-is_pic-pic_percpu); KASSERT(pcpu-pcpu_magic == PICPERCPU_MAGIC); pcpu-pcpu_evs[is-is_irq].ev_count++; percpu_putref(is-is_pic-pic_percpu); + + return rv; } void @@ -290,6 +292,7 @@ pic_deliver_irqs(struct pic_softc *pic, uint32_t blocked_irqs; int irq; bool progress = false; + int rv; KASSERT(pic-pic_pending_ipls ipl_mask); @@ -336,7 +339,7 @@ pic_deliver_irqs(struct pic_softc *pic, is = pic-pic_sources[irq_base + irq]; if (is != NULL) { cpsie(I32_bit); -pic_dispatch(is, frame); +rv = pic_dispatch(is, frame); cpsid(I32_bit); #if PIC_MAXSOURCES 32 /* @@ -345,7 +348,8 @@ pic_deliver_irqs(struct pic_softc *pic, */ poi = 1; #endif -blocked_irqs |= __BIT(irq); +if (rv) + blocked_irqs |= __BIT(irq); } else { KASSERT(0); } @@ -725,3 +729,23 @@ intr_disestablish(void *ih) pic_disestablish_source(is); } + +void +intr_enable(void *ih) +{ + const struct intrsource const *is = ih; + struct pic_softc * const pic = is-is_pic; + const int irq = is-is_irq; + + (*pic-pic_ops-pic_unblock_irqs)(pic, irq ~0x1f, __BIT(irq 0x1f)); +} + +void +intr_disable(void *ih) +{ + const struct intrsource * const is = ih; + struct pic_softc * const pic = is-is_pic; + const int irq = is-is_irq; + + (*pic-pic_ops-pic_block_irqs)(pic, irq ~0x1f, __BIT(irq 0x1f)); +} Index: src/sys/arch/arm/pic/picvar.h diff -u src/sys/arch/arm/pic/picvar.h:1.7 src/sys/arch/arm/pic/picvar.h:1.7.8.1 --- src/sys/arch/arm/pic/picvar.h:1.7 Sat Sep 1 00:00:42 2012 +++ src/sys/arch/arm/pic/picvar.h Fri May 10 00:57:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: picvar.h,v 1.7 2012/09/01 00:00:42 matt Exp $ */ +/* $NetBSD: picvar.h,v 1.7.8.1 2013/05/10 00:57:56 khorben Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -64,11 +64,13 @@ void *pic_establish_intr(struct pic_soft int pic_alloc_irq(struct pic_softc *pic); void pic_disestablish_source(struct intrsource *is); void pic_do_pending_ints(register_t psw, int newipl, void *frame); -void pic_dispatch(struct intrsource *is, void *frame); +int pic_dispatch(struct intrsource *is, void *frame); void *intr_establish(int irq, int ipl, int type, int (*func)(void *), void *arg); void intr_disestablish(void *); +void intr_enable(void *); +void intr_disable(void *); #ifdef MULTIPROCESSOR void intr_cpu_init(struct cpu_info *); void intr_ipi_send(const kcpuset_t *, u_long ipi);
CVS commit: [khorben-n900] src/sys/dev/i2c
Module Name:src Committed By: khorben Date: Fri May 10 01:10:03 UTC 2013 Modified Files: src/sys/dev/i2c [khorben-n900]: files.i2c i2c.c i2cvar.h Log Message: Added two locators for I2C devices: intr and intrbase. They are required to allow the TPS65950 companion chip to both handle its interrupts on the system, and allow its extra GPIO pins to be used as interrupts as well. XXX This change is not adequate because intr_establish() is a MD interface, so it will have to be re-designed before merging to the main tree. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.49.2.1 src/sys/dev/i2c/files.i2c cvs rdiff -u -r1.39 -r1.39.6.1 src/sys/dev/i2c/i2c.c cvs rdiff -u -r1.8 -r1.8.28.1 src/sys/dev/i2c/i2cvar.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/i2c/files.i2c diff -u src/sys/dev/i2c/files.i2c:1.49 src/sys/dev/i2c/files.i2c:1.49.2.1 --- src/sys/dev/i2c/files.i2c:1.49 Mon May 6 22:04:12 2013 +++ src/sys/dev/i2c/files.i2c Fri May 10 01:10:02 2013 @@ -1,10 +1,10 @@ -# $NetBSD: files.i2c,v 1.49 2013/05/06 22:04:12 rkujawa Exp $ +# $NetBSD: files.i2c,v 1.49.2.1 2013/05/10 01:10:02 khorben Exp $ obsolete defflag opt_i2cbus.h I2C_SCAN define i2cbus { } define i2cexec -device iic { [addr = -1], [size = -1] } +device iic { [addr = -1], [size = -1], [intr = -1], [intrbase = -1] } attach iic at i2cbus file dev/i2c/i2c.ciic file dev/i2c/i2c_exec.c iic | i2cbus | i2cexec Index: src/sys/dev/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.39 src/sys/dev/i2c/i2c.c:1.39.6.1 --- src/sys/dev/i2c/i2c.c:1.39 Sun Feb 3 16:28:51 2013 +++ src/sys/dev/i2c/i2c.c Fri May 10 01:10:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.39 2013/02/03 16:28:51 jdc Exp $ */ +/* $NetBSD: i2c.c,v 1.39.6.1 2013/05/10 01:10:03 khorben Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: i2c.c,v 1.39 2013/02/03 16:28:51 jdc Exp $); +__KERNEL_RCSID(0, $NetBSD: i2c.c,v 1.39.6.1 2013/05/10 01:10:03 khorben Exp $); #include sys/param.h #include sys/systm.h @@ -112,6 +112,8 @@ iic_search(device_t parent, cfdata_t cf, ia.ia_tag = sc-sc_tag; ia.ia_addr = cf-cf_loc[IICCF_ADDR]; ia.ia_size = cf-cf_loc[IICCF_SIZE]; + ia.ia_intr = cf-cf_loc[IICCF_INTR]; + ia.ia_intrbase = cf-cf_loc[IICCF_INTRBASE]; ia.ia_type = sc-sc_type; ia.ia_name = NULL; @@ -192,6 +194,7 @@ iic_attach(device_t parent, device_t sel prop_dictionary_t dev; prop_data_t cdata; uint32_t addr, size; + int intr, intrbase; uint64_t cookie; const char *name; struct i2c_attach_args ia; @@ -214,6 +217,11 @@ iic_attach(device_t parent, device_t sel loc[1] = size; else loc[1] = -1; + if (!prop_dictionary_get_uint32(dev, intr, intr)) +intr = -1; + if (!prop_dictionary_get_uint32(dev, intrbase, + intrbase)) +intrbase = -1; memset(ia, 0, sizeof ia); ia.ia_addr = addr; @@ -222,6 +230,8 @@ iic_attach(device_t parent, device_t sel ia.ia_name = name; ia.ia_cookie = cookie; ia.ia_size = size; + ia.ia_intr = intr; + ia.ia_intrbase = intrbase; buf = NULL; cdata = prop_dictionary_get(dev, compatible); Index: src/sys/dev/i2c/i2cvar.h diff -u src/sys/dev/i2c/i2cvar.h:1.8 src/sys/dev/i2c/i2cvar.h:1.8.28.1 --- src/sys/dev/i2c/i2cvar.h:1.8 Sun Feb 28 15:33:21 2010 +++ src/sys/dev/i2c/i2cvar.h Fri May 10 01:10:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: i2cvar.h,v 1.8 2010/02/28 15:33:21 snj Exp $ */ +/* $NetBSD: i2cvar.h,v 1.8.28.1 2013/05/10 01:10:03 khorben Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -117,6 +117,8 @@ struct i2c_attach_args { i2c_tag_t ia_tag; /* our controller */ i2c_addr_t ia_addr; /* address of device */ int ia_size; /* size (for EEPROMs) */ + int ia_intr; /* interrupt */ + int ia_intrbase; /* interrupt base */ int ia_type; /* bus type */ /* only set if using direct config */ const char * ia_name; /* name of the device */
CVS commit: [khorben-n900] src/sys/arch/arm/omap
Module Name:src Committed By: khorben Date: Fri May 10 01:16:21 UTC 2013 Modified Files: src/sys/arch/arm/omap [khorben-n900]: omap2_reg.h Log Message: Added the base registers for SPI support. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/arch/arm/omap/omap2_reg.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/arm/omap/omap2_reg.h diff -u src/sys/arch/arm/omap/omap2_reg.h:1.18 src/sys/arch/arm/omap/omap2_reg.h:1.18.2.1 --- src/sys/arch/arm/omap/omap2_reg.h:1.18 Tue Apr 30 05:37:51 2013 +++ src/sys/arch/arm/omap/omap2_reg.h Fri May 10 01:16:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: omap2_reg.h,v 1.18 2013/04/30 05:37:51 matt Exp $ */ +/* $NetBSD: omap2_reg.h,v 1.18.2.1 2013/05/10 01:16:21 khorben Exp $ */ /* * Copyright (c) 2007 Microsoft @@ -714,6 +714,14 @@ #define I2C3_BASE_3530 0x4806 /* + * SPI + */ +#define SPI1_BASE_3530 0x48098000 +#define SPI2_BASE_3530 0x4809a000 +#define SPI3_BASE_3530 0x480b8000 +#define SPI4_BASE_3530 0x480ba000 + +/* * USB Host */ #define OHCI1_BASE_2430 0x4805e000
CVS commit: [khorben-n900] src/sys/dev/gpio
Module Name:src Committed By: khorben Date: Fri May 10 01:20:05 UTC 2013 Modified Files: src/sys/dev/gpio [khorben-n900]: files.gpio gpio.c gpiovar.h Log Message: Added a locator for interrupts on the GPIO bus. This allows ARM devices (like the Nokia N900) to register interrupt handlers as specified within their respective kernel configuration file. XXX This change is not adequate because intr_establish() is a MD interface, so it will have to be re-designed before merging to the main tree. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.18.1 src/sys/dev/gpio/files.gpio cvs rdiff -u -r1.51 -r1.51.6.1 src/sys/dev/gpio/gpio.c cvs rdiff -u -r1.15 -r1.15.18.1 src/sys/dev/gpio/gpiovar.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/gpio/files.gpio diff -u src/sys/dev/gpio/files.gpio:1.10 src/sys/dev/gpio/files.gpio:1.10.18.1 --- src/sys/dev/gpio/files.gpio:1.10 Sun Nov 13 12:33:00 2011 +++ src/sys/dev/gpio/files.gpio Fri May 10 01:20:05 2013 @@ -1,6 +1,6 @@ -# $NetBSD: files.gpio,v 1.10 2011/11/13 12:33:00 mbalmer Exp $ +# $NetBSD: files.gpio,v 1.10.18.1 2013/05/10 01:20:05 khorben Exp $ -define gpio {[offset = -1], [mask = 0], [flag = 0]} +define gpio {[offset = -1], [mask = 0], [flag = 0], [intr = -1]} device gpio: gpio attach gpio at gpiobus Index: src/sys/dev/gpio/gpio.c diff -u src/sys/dev/gpio/gpio.c:1.51 src/sys/dev/gpio/gpio.c:1.51.6.1 --- src/sys/dev/gpio/gpio.c:1.51 Wed Oct 17 21:35:39 2012 +++ src/sys/dev/gpio/gpio.c Fri May 10 01:20:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.51 2012/10/17 21:35:39 dyoung Exp $ */ +/* $NetBSD: gpio.c,v 1.51.6.1 2013/05/10 01:20:04 khorben Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -19,7 +19,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gpio.c,v 1.51 2012/10/17 21:35:39 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: gpio.c,v 1.51.6.1 2013/05/10 01:20:04 khorben Exp $); /* * General Purpose Input/Output framework. @@ -249,6 +249,7 @@ gpio_search(device_t parent, cfdata_t cf ga.ga_offset = cf-cf_loc[GPIOCF_OFFSET]; ga.ga_mask = cf-cf_loc[GPIOCF_MASK]; ga.ga_flags = cf-cf_loc[GPIOCF_FLAG]; + ga.ga_intr = cf-cf_loc[GPIOCF_INTR]; namlen = strlen(cf-cf_name) + 1; ga.ga_dvname = kmem_alloc(namlen, KM_NOSLEEP); if (ga.ga_dvname == NULL) Index: src/sys/dev/gpio/gpiovar.h diff -u src/sys/dev/gpio/gpiovar.h:1.15 src/sys/dev/gpio/gpiovar.h:1.15.18.1 --- src/sys/dev/gpio/gpiovar.h:1.15 Sun Nov 13 13:20:02 2011 +++ src/sys/dev/gpio/gpiovar.h Fri May 10 01:20:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: gpiovar.h,v 1.15 2011/11/13 13:20:02 mbalmer Exp $ */ +/* $NetBSD: gpiovar.h,v 1.15.18.1 2013/05/10 01:20:05 khorben Exp $ */ /* $OpenBSD: gpiovar.h,v 1.3 2006/01/14 12:33:49 grange Exp $ */ /* @@ -71,6 +71,7 @@ struct gpio_attach_args { uint32_t ga_mask; char *ga_dvname; uint32_t ga_flags; + int ga_intr; }; /* GPIO pin map */
CVS commit: [khorben-n900] src/sys/dev/spi
Module Name:src Committed By: khorben Date: Fri May 10 01:25:07 UTC 2013 Modified Files: src/sys/dev/spi [khorben-n900]: files.spi spi.c spivar.h Log Message: Just like for the I2C and GPIO buses, added an interrupt locator to the SPI bus, so that ARM device drivers on either of these buses (like on the Nokia N900) can register and react on system interrupts. These interrupts are typically triggered via GPIO pins. XXX This change is not adequate because intr_establish() is a MD interface, so it will have to be re-designed before merging to the main tree. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.114.1 src/sys/dev/spi/files.spi cvs rdiff -u -r1.8 -r1.8.6.1 src/sys/dev/spi/spi.c cvs rdiff -u -r1.4 -r1.4.20.1 src/sys/dev/spi/spivar.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/spi/files.spi diff -u src/sys/dev/spi/files.spi:1.2 src/sys/dev/spi/files.spi:1.2.114.1 --- src/sys/dev/spi/files.spi:1.2 Sat Oct 7 07:21:13 2006 +++ src/sys/dev/spi/files.spi Fri May 10 01:25:07 2013 @@ -1,8 +1,8 @@ -# $NetBSD: files.spi,v 1.2 2006/10/07 07:21:13 gdamore Exp $ +# $NetBSD: files.spi,v 1.2.114.1 2013/05/10 01:25:07 khorben Exp $ define spibus { } -device spi { slave } +device spi { slave, [intr = -1] } attach spi at spibus file dev/spi/spi.c spi | spibus Index: src/sys/dev/spi/spi.c diff -u src/sys/dev/spi/spi.c:1.8 src/sys/dev/spi/spi.c:1.8.6.1 --- src/sys/dev/spi/spi.c:1.8 Fri Feb 15 17:44:40 2013 +++ src/sys/dev/spi/spi.c Fri May 10 01:25:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: spi.c,v 1.8 2013/02/15 17:44:40 rkujawa Exp $ */ +/* $NetBSD: spi.c,v 1.8.6.1 2013/05/10 01:25:07 khorben Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: spi.c,v 1.8 2013/02/15 17:44:40 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: spi.c,v 1.8.6.1 2013/05/10 01:25:07 khorben Exp $); #include locators.h @@ -119,6 +119,7 @@ spi_search(device_t parent, cfdata_t cf, } sa.sa_handle = sc-sc_slaves[addr]; + sa.sa_intr = cf-cf_loc[SPICF_INTR]; if (config_match(parent, cf, sa) 0) config_attach(parent, cf, sa, spi_print); Index: src/sys/dev/spi/spivar.h diff -u src/sys/dev/spi/spivar.h:1.4 src/sys/dev/spi/spivar.h:1.4.20.1 --- src/sys/dev/spi/spivar.h:1.4 Wed Jun 8 23:05:48 2011 +++ src/sys/dev/spi/spivar.h Fri May 10 01:25:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: spivar.h,v 1.4 2011/06/08 23:05:48 rmind Exp $ */ +/* $NetBSD: spivar.h,v 1.4.20.1 2013/05/10 01:25:07 khorben Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -82,6 +82,7 @@ struct spibus_attach_args { struct spi_attach_args { struct spi_handle *sa_handle; + int sa_intr; }; /*