CVS commit: [isaki-audio2] src/sys/dev/pci
Module Name:src Committed By: isaki Date: Sun May 5 05:59:40 UTC 2019 Modified Files: src/sys/dev/pci [isaki-audio2]: cs4280.c cs4280reg.h cs428x.h Log Message: Remove encoding conversions on recording. These are handled in the upper layer now. To generate a diff of this commit: cvs rdiff -u -r1.71.2.2 -r1.71.2.3 src/sys/dev/pci/cs4280.c cvs rdiff -u -r1.7 -r1.7.156.1 src/sys/dev/pci/cs4280reg.h cvs rdiff -u -r1.16.42.1 -r1.16.42.2 src/sys/dev/pci/cs428x.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/pci/cs4280.c diff -u src/sys/dev/pci/cs4280.c:1.71.2.2 src/sys/dev/pci/cs4280.c:1.71.2.3 --- src/sys/dev/pci/cs4280.c:1.71.2.2 Sat May 4 07:20:10 2019 +++ src/sys/dev/pci/cs4280.c Sun May 5 05:59:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cs4280.c,v 1.71.2.2 2019/05/04 07:20:10 isaki Exp $ */ +/* $NetBSD: cs4280.c,v 1.71.2.3 2019/05/05 05:59:40 isaki Exp $ */ /* * Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.71.2.2 2019/05/04 07:20:10 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.71.2.3 2019/05/05 05:59:40 isaki Exp $"); #include "midi.h" @@ -450,9 +450,6 @@ cs4280_intr(void *p) } /* Capture Interrupt */ if (intr & HISR_CINT) { - int i; - int16_t rdata; - handled = 1; mem = BA1READ4(sc, CS4280_CIE); BA1WRITE4(sc, CS4280_CIE, (mem & ~CIE_CI_MASK) | CIE_CI_DISABLE); @@ -463,53 +460,9 @@ cs4280_intr(void *p) if ((sc->sc_ri&1) == 0) empty_dma += sc->hw_blocksize; - /* - * XXX - * I think this audio data conversion should be - * happend in upper layer, but I put this here - * since there is no conversion function available. - */ - switch(sc->sc_rparam) { - case CF_16BIT_STEREO: -/* just copy it */ -memcpy(sc->sc_rn, empty_dma, sc->hw_blocksize); -sc->sc_rn += sc->hw_blocksize; -break; - case CF_16BIT_MONO: -for (i = 0; i < 512; i++) { - rdata = *((int16_t *)empty_dma)>>1; - empty_dma += 2; - rdata += *((int16_t *)empty_dma)>>1; - empty_dma += 2; - *((int16_t *)sc->sc_rn) = rdata; - sc->sc_rn += 2; -} -break; - case CF_8BIT_STEREO: -for (i = 0; i < 512; i++) { - rdata = *((int16_t*)empty_dma); - empty_dma += 2; - *sc->sc_rn++ = rdata >> 8; - rdata = *((int16_t*)empty_dma); - empty_dma += 2; - *sc->sc_rn++ = rdata >> 8; -} -break; - case CF_8BIT_MONO: -for (i = 0; i < 512; i++) { - rdata = *((int16_t*)empty_dma) >>1; - empty_dma += 2; - rdata += *((int16_t*)empty_dma) >>1; - empty_dma += 2; - *sc->sc_rn++ = rdata >>8; -} -break; - default: -/* Should not reach here */ -aprint_error_dev(sc->sc_dev, -"unknown sc->sc_rparam: %d\n", -sc->sc_rparam); - } + /* just copy it */ + memcpy(sc->sc_rn, empty_dma, sc->hw_blocksize); + sc->sc_rn += sc->hw_blocksize; if (sc->sc_rn >= sc->sc_re) sc->sc_rn = sc->sc_rs; } @@ -752,17 +705,6 @@ cs4280_trigger_input(void *addr, void *s /* initiate capture DMA */ BA1WRITE4(sc, CS4280_CBA, DMAADDR(p)); - /* setup format information for internal converter */ - sc->sc_rparam = 0; - if (param->precision == 8) { - sc->sc_rparam += CF_8BIT; - sc->sc_rcount <<= 1; - } - if (param->channels == 1) { - sc->sc_rparam += CF_MONO; - sc->sc_rcount <<= 1; - } - /* set CIE */ cie = BA1READ4(sc, CS4280_CIE) & ~CIE_CI_MASK; BA1WRITE4(sc, CS4280_CIE, cie | CIE_CI_ENABLE); Index: src/sys/dev/pci/cs4280reg.h diff -u src/sys/dev/pci/cs4280reg.h:1.7 src/sys/dev/pci/cs4280reg.h:1.7.156.1 --- src/sys/dev/pci/cs4280reg.h:1.7 Sat Apr 15 21:20:47 2006 +++ src/sys/dev/pci/cs4280reg.h Sun May 5 05:59:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cs4280reg.h,v 1.7 2006/04/15 21:20:47 jmcneill Exp $ */ +/* $NetBSD: cs4280reg.h,v 1.7.156.1 2019/05/05 05:59:40 isaki Exp $ */ /* * Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved. @@ -217,14 +217,6 @@ #define FRMT_FTV 0x0adf -#define CF_MONO 0x01 -#define CF_8BIT 0x02 - -#define CF_16BIT_STEREO 0x00 -#define CF_16BIT_MONO 0x01 -#define CF_8BIT_STEREO 0x02 -#define CF_8BIT_MONO 0x03 - #define MIDI_BUSY_WAIT 100 #define MIDI_BUSY_DELAY 100 /* Delay when UART is busy */ Index: src/sys/dev/pci/cs428x.h diff -u src/sys/dev/pci/cs428x.h:1.16.42.1 src/sys/dev/pci/cs428x.h:1.16.42.2 --- src/sys/dev/pci/cs428x.h:1.16.42.1 Sun Apr 21 07:49:16 2019 +++ src/sys/dev/pci/cs428x.h Sun May 5 05:59:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cs428x.h,v 1.16.42.1 2019/04/21 07:49:16 isaki Exp $ */ +/* $NetBSD: cs428x.h,v 1.16.42.2 2019/05/05 05:59:40 isaki Exp $ */ /* * Copyright (c) 2000 Tatoku Ogaito. All rights reserved. @@ -118,7 +118,6 @@ struct cs428x_softc { int sc_ri; struct cs428x_dma *sc_rdma; char *sc_rbuf; - int sc_rparam; /* record format */ int
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Sun May 5 03:17:54 UTC 2019 Modified Files: src/sys/dev/usb: if_atu.c if_aue.c if_cdce.c if_cue.c if_kue.c if_rum.c if_udav.c if_upl.c if_ural.c if_url.c if_zyd.c stuirda.c uark.c uaudio.c uberry.c ubsa.c ubt.c uchcom.c ucom.c ucycom.c udsbr.c uep.c uftdi.c ugen.c ugensa.c uhid.c uhidev.c uhso.c uhub.c uipad.c uipaq.c uirda.c ukbd.c ukyopon.c ulpt.c umass.c umct.c umidi.c umodem.c ums.c uplcom.c urio.c usb.c uscanner.c usscanner.c ustir.c uthum.c utoppy.c uts.c uvideo.c uvisor.c uvscom.c uyap.c uyurex.c Log Message: remove explicit 'extern struct cfdriver _cd;' and use ioconf.h To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/if_atu.c src/sys/dev/usb/if_rum.c cvs rdiff -u -r1.150 -r1.151 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/usb/if_cdce.c src/sys/dev/usb/ucycom.c \ src/sys/dev/usb/uvideo.c cvs rdiff -u -r1.80 -r1.81 src/sys/dev/usb/if_cue.c cvs rdiff -u -r1.92 -r1.93 src/sys/dev/usb/if_kue.c src/sys/dev/usb/ums.c cvs rdiff -u -r1.56 -r1.57 src/sys/dev/usb/if_udav.c cvs rdiff -u -r1.62 -r1.63 src/sys/dev/usb/if_upl.c src/sys/dev/usb/if_url.c cvs rdiff -u -r1.58 -r1.59 src/sys/dev/usb/if_ural.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/usb/if_zyd.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/usb/stuirda.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/uark.c src/sys/dev/usb/uberry.c cvs rdiff -u -r1.158 -r1.159 src/sys/dev/usb/uaudio.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/usb/ubsa.c cvs rdiff -u -r1.61 -r1.62 src/sys/dev/usb/ubt.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/uchcom.c cvs rdiff -u -r1.123 -r1.124 src/sys/dev/usb/ucom.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/udsbr.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/uep.c cvs rdiff -u -r1.68 -r1.69 src/sys/dev/usb/uftdi.c cvs rdiff -u -r1.145 -r1.146 src/sys/dev/usb/ugen.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/usb/ugensa.c src/sys/dev/usb/umct.c cvs rdiff -u -r1.107 -r1.108 src/sys/dev/usb/uhid.c cvs rdiff -u -r1.74 -r1.75 src/sys/dev/usb/uhidev.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/uhso.c cvs rdiff -u -r1.141 -r1.142 src/sys/dev/usb/uhub.c src/sys/dev/usb/ukbd.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/uipad.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/usb/uipaq.c cvs rdiff -u -r1.43 -r1.44 src/sys/dev/usb/uirda.c \ src/sys/dev/usb/usscanner.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/ukyopon.c src/sys/dev/usb/uyap.c cvs rdiff -u -r1.102 -r1.103 src/sys/dev/usb/ulpt.c cvs rdiff -u -r1.174 -r1.175 src/sys/dev/usb/umass.c cvs rdiff -u -r1.76 -r1.77 src/sys/dev/usb/umidi.c cvs rdiff -u -r1.70 -r1.71 src/sys/dev/usb/umodem.c cvs rdiff -u -r1.81 -r1.82 src/sys/dev/usb/uplcom.c cvs rdiff -u -r1.47 -r1.48 src/sys/dev/usb/urio.c cvs rdiff -u -r1.178 -r1.179 src/sys/dev/usb/usb.c cvs rdiff -u -r1.83 -r1.84 src/sys/dev/usb/uscanner.c cvs rdiff -u -r1.39 -r1.40 src/sys/dev/usb/ustir.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/uthum.c src/sys/dev/usb/uyurex.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/utoppy.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/uts.c cvs rdiff -u -r1.49 -r1.50 src/sys/dev/usb/uvisor.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/usb/uvscom.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/usb/if_atu.c diff -u src/sys/dev/usb/if_atu.c:1.64 src/sys/dev/usb/if_atu.c:1.65 --- src/sys/dev/usb/if_atu.c:1.64 Fri Apr 26 06:33:34 2019 +++ src/sys/dev/usb/if_atu.c Sun May 5 03:17:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_atu.c,v 1.64 2019/04/26 06:33:34 msaitoh Exp $ */ +/* $NetBSD: if_atu.c,v 1.65 2019/05/05 03:17:54 mrg Exp $ */ /* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */ /* * Copyright (c) 2003, 2004 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.64 2019/04/26 06:33:34 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.65 2019/05/05 03:17:54 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -282,7 +282,7 @@ int atu_match(device_t, cfdata_t, void * void atu_attach(device_t, device_t, void *); int atu_detach(device_t, int); int atu_activate(device_t, enum devact); -extern struct cfdriver atu_cd; + CFATTACH_DECL_NEW(atu, sizeof(struct atu_softc), atu_match, atu_attach, atu_detach, atu_activate); Index: src/sys/dev/usb/if_rum.c diff -u src/sys/dev/usb/if_rum.c:1.64 src/sys/dev/usb/if_rum.c:1.65 --- src/sys/dev/usb/if_rum.c:1.64 Wed Sep 12 21:57:18 2018 +++ src/sys/dev/usb/if_rum.c Sun May 5 03:17:54 2019 @@ -1,5 +1,5 @@ /* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */ -/* $NetBSD: if_rum.c,v 1.64 2018/09/12 21:57:18 christos Exp $ */ +/* $NetBSD: if_rum.c,v 1.65 2019/05/05 03:17:54 mrg Exp $ */ /*- * Copyright (c) 2005-2007 Damien Bergamini @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.64 2018/09/12 21:57:18 christos Exp
CVS commit: [isaki-audio2] src/sys/dev/pci
Module Name:src Committed By: isaki Date: Sun May 5 03:11:28 UTC 2019 Modified Files: src/sys/dev/pci [isaki-audio2]: auixpvar.h Log Message: Remove sc_encodings. (I forgot it) To generate a diff of this commit: cvs rdiff -u -r1.8.42.2 -r1.8.42.3 src/sys/dev/pci/auixpvar.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/pci/auixpvar.h diff -u src/sys/dev/pci/auixpvar.h:1.8.42.2 src/sys/dev/pci/auixpvar.h:1.8.42.3 --- src/sys/dev/pci/auixpvar.h:1.8.42.2 Sat Apr 27 13:10:03 2019 +++ src/sys/dev/pci/auixpvar.h Sun May 5 03:11:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: auixpvar.h,v 1.8.42.2 2019/04/27 13:10:03 isaki Exp $*/ +/* $NetBSD: auixpvar.h,v 1.8.42.3 2019/05/05 03:11:28 isaki Exp $*/ /* * Copyright (c) 2004, 2005 Reinoud Zandijk @@ -119,7 +119,6 @@ struct auixp_softc { /* audio formats supported */ struct audio_format sc_formats[AUIXP_NFORMATS]; - struct audio_encoding_set *sc_encodings; /* codecs */ int sc_num_codecs;
CVS commit: [isaki-audio2] src/sys
Module Name:src Committed By: isaki Date: Sun May 5 02:31:42 UTC 2019 Modified Files: src/sys/arch/amiga/conf [isaki-audio2]: files.amiga src/sys/arch/amigappc/conf [isaki-audio2]: files.amigappc src/sys/arch/arm/broadcom [isaki-audio2]: files.bcm2835 src/sys/arch/arm/iomd [isaki-audio2]: files.iomd src/sys/arch/arm/sunxi [isaki-audio2]: files.sunxi src/sys/arch/arm/xscale [isaki-audio2]: files.pxa2x0 src/sys/arch/dreamcast/conf [isaki-audio2]: files.dreamcast src/sys/arch/evbarm/conf [isaki-audio2]: files.mini2440 src/sys/arch/hppa/conf [isaki-audio2]: files.hppa src/sys/arch/ibmnws/conf [isaki-audio2]: files.ibmnws src/sys/arch/macppc/conf [isaki-audio2]: files.macppc src/sys/arch/mips/conf [isaki-audio2]: files.alchemy src/sys/arch/prep/conf [isaki-audio2]: files.prep src/sys/arch/sgimips/hpc [isaki-audio2]: files.hpc src/sys/arch/sgimips/mace [isaki-audio2]: files.mace src/sys/arch/usermode/conf [isaki-audio2]: files.usermode src/sys/arch/x68k/conf [isaki-audio2]: files.x68k src/sys/arch/zaurus/conf [isaki-audio2]: files.zaurus src/sys/dev [isaki-audio2]: DEVNAMES src/sys/dev/bluetooth [isaki-audio2]: files.bluetooth src/sys/dev/hdaudio [isaki-audio2]: files.hdaudio src/sys/dev/isa [isaki-audio2]: files.isa src/sys/dev/pad [isaki-audio2]: files.pad src/sys/dev/pci [isaki-audio2]: files.pci src/sys/dev/pci/igma [isaki-audio2]: files.igma src/sys/dev/pci/voyager [isaki-audio2]: files.voyager src/sys/dev/sbus [isaki-audio2]: files.sbus src/sys/dev/tc [isaki-audio2]: files.tc src/sys/dev/usb [isaki-audio2]: files.usb Log Message: Remove obsoleted au{,rate,vol}conv and mulaw attributes. audio provides the equivalent of them inseparably. To generate a diff of this commit: cvs rdiff -u -r1.181 -r1.181.2.1 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r1.30 -r1.30.2.1 src/sys/arch/amigappc/conf/files.amigappc cvs rdiff -u -r1.32 -r1.32.2.1 src/sys/arch/arm/broadcom/files.bcm2835 cvs rdiff -u -r1.19 -r1.19.94.1 src/sys/arch/arm/iomd/files.iomd cvs rdiff -u -r1.61 -r1.61.2.1 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r1.20 -r1.20.4.1 src/sys/arch/arm/xscale/files.pxa2x0 cvs rdiff -u -r1.31 -r1.31.18.1 src/sys/arch/dreamcast/conf/files.dreamcast cvs rdiff -u -r1.1 -r1.1.54.1 src/sys/arch/evbarm/conf/files.mini2440 cvs rdiff -u -r1.20 -r1.20.2.1 src/sys/arch/hppa/conf/files.hppa cvs rdiff -u -r1.13 -r1.13.56.1 src/sys/arch/ibmnws/conf/files.ibmnws cvs rdiff -u -r1.110 -r1.110.4.1 src/sys/arch/macppc/conf/files.macppc cvs rdiff -u -r1.13 -r1.13.146.1 src/sys/arch/mips/conf/files.alchemy cvs rdiff -u -r1.62 -r1.62.40.1 src/sys/arch/prep/conf/files.prep cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/arch/sgimips/hpc/files.hpc cvs rdiff -u -r1.10 -r1.10.110.1 src/sys/arch/sgimips/mace/files.mace cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/arch/usermode/conf/files.usermode cvs rdiff -u -r1.82 -r1.82.2.1 src/sys/arch/x68k/conf/files.x68k cvs rdiff -u -r1.15 -r1.15.4.1 src/sys/arch/zaurus/conf/files.zaurus cvs rdiff -u -r1.320 -r1.320.2.1 src/sys/dev/DEVNAMES cvs rdiff -u -r1.15 -r1.15.8.1 src/sys/dev/bluetooth/files.bluetooth cvs rdiff -u -r1.3 -r1.3.24.1 src/sys/dev/hdaudio/files.hdaudio cvs rdiff -u -r1.172 -r1.172.2.1 src/sys/dev/isa/files.isa cvs rdiff -u -r1.5 -r1.5.24.1 src/sys/dev/pad/files.pad cvs rdiff -u -r1.412 -r1.412.2.1 src/sys/dev/pci/files.pci cvs rdiff -u -r1.1 -r1.1.40.1 src/sys/dev/pci/igma/files.igma cvs rdiff -u -r1.6 -r1.6.42.1 src/sys/dev/pci/voyager/files.voyager cvs rdiff -u -r1.43.2.1 -r1.43.2.2 src/sys/dev/sbus/files.sbus cvs rdiff -u -r1.34 -r1.34.20.1 src/sys/dev/tc/files.tc cvs rdiff -u -r1.154 -r1.154.2.1 src/sys/dev/usb/files.usb 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/conf/files.amiga diff -u src/sys/arch/amiga/conf/files.amiga:1.181 src/sys/arch/amiga/conf/files.amiga:1.181.2.1 --- src/sys/arch/amiga/conf/files.amiga:1.181 Wed Dec 19 13:57:45 2018 +++ src/sys/arch/amiga/conf/files.amiga Sun May 5 02:31:39 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.amiga,v 1.181 2018/12/19 13:57:45 maxv Exp $ +# $NetBSD: files.amiga,v 1.181.2.1 2019/05/05 02:31:39 isaki Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -118,11 +118,11 @@ device melody: audiobus, tms320av110 attach melody at zbus file arch/amiga/dev/melody.c melody -device repulse: audiobus, ac97, mulaw +device repulse: audiobus, ac97 attach repulse at zbus file arch/amiga/dev/repulse.c repulse -device toccata: audiobus, ad1848, auconv +device toccata: audiobus, ad1848 attach toccata at zbus file arch/amiga/dev/toccata.c toccata Index: src/sys/arch/amigappc/conf/files.amigappc diff -u
CVS commit: [isaki-audio2] src/sys/dev/audio
Module Name:src Committed By: isaki Date: Sun May 5 02:20:36 UTC 2019 Modified Files: src/sys/dev/audio [isaki-audio2]: audio.c audiovar.h Log Message: Revive multiuser control. To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/dev/audio/audio.c cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/dev/audio/audiovar.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/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.1.2.8 src/sys/dev/audio/audio.c:1.1.2.9 --- src/sys/dev/audio/audio.c:1.1.2.8 Sat May 4 07:41:50 2019 +++ src/sys/dev/audio/audio.c Sun May 5 02:20:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.1.2.8 2019/05/04 07:41:50 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.1.2.9 2019/05/05 02:20:36 isaki Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -149,7 +149,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.1.2.8 2019/05/04 07:41:50 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.1.2.9 2019/05/05 02:20:36 isaki Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -577,6 +577,7 @@ static int audio_mixers_set_format(struc static void audio_mixers_get_format(struct audio_softc *, struct audio_info *); static int audio_sysctl_volume(SYSCTLFN_PROTO); static int audio_sysctl_blk_ms(SYSCTLFN_PROTO); +static int audio_sysctl_multiuser(SYSCTLFN_PROTO); #if defined(AUDIO_DEBUG) static int audio_sysctl_debug(SYSCTLFN_PROTO); #endif @@ -993,6 +994,13 @@ audioattach(device_t parent, device_t se audio_sysctl_blk_ms, 0, (void *)sc, 0, CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL); + sysctl_createv(>sc_log, 0, NULL, NULL, + CTLFLAG_READWRITE, + CTLTYPE_BOOL, "multiuser", + SYSCTL_DESCR("allow multiple user access"), + audio_sysctl_multiuser, 0, (void *)sc, 0, + CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL); + #if defined(AUDIO_DEBUG) sysctl_createv(>sc_log, 0, NULL, NULL, CTLFLAG_READWRITE, @@ -2070,9 +2078,9 @@ audio_open(dev_t dev, struct audio_softc goto bad3; } } - } else /* if (sc->sc_multiuser == false) XXX not yet */ { + } else if (sc->sc_multiuser == false) { uid_t euid = kauth_cred_geteuid(kauth_cred_get()); - if (euid != 0 && kauth_cred_geteuid(sc->sc_cred) != euid) { + if (euid != 0 && euid != kauth_cred_geteuid(sc->sc_cred)) { error = EPERM; goto bad2; } @@ -7480,6 +7488,34 @@ abort: return error; } +/* + * Get or set multiuser mode. + */ +static int +audio_sysctl_multiuser(SYSCTLFN_ARGS) +{ + struct sysctlnode node; + struct audio_softc *sc; + int t, error; + + node = *rnode; + sc = node.sysctl_data; + + mutex_enter(sc->sc_lock); + + t = sc->sc_multiuser; + node.sysctl_data = + error = sysctl_lookup(SYSCTLFN_CALL()); + if (error || newp == NULL) + goto abort; + + sc->sc_multiuser = t; + error = 0; +abort: + mutex_exit(sc->sc_lock); + return error; +} + #if defined(AUDIO_DEBUG) /* * Get or set debug verbose level. (0..4) Index: src/sys/dev/audio/audiovar.h diff -u src/sys/dev/audio/audiovar.h:1.1.2.2 src/sys/dev/audio/audiovar.h:1.1.2.3 --- src/sys/dev/audio/audiovar.h:1.1.2.2 Sat May 4 07:20:09 2019 +++ src/sys/dev/audio/audiovar.h Sun May 5 02:20:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audiovar.h,v 1.1.2.2 2019/05/04 07:20:09 isaki Exp $ */ +/* $NetBSD: audiovar.h,v 1.1.2.3 2019/05/05 02:20:36 isaki Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -221,6 +221,12 @@ struct audio_softc { */ bool sc_dying; + /* + * If multiuser is false, other users who have different euid + * than the first user cannot open this device. + * Must be protected by sc_lock. + */ + bool sc_multiuser; kauth_cred_t sc_cred; struct sysctllog *sc_log;
CVS commit: [isaki-audio2] src/sys/dev/pad
Module Name:src Committed By: isaki Date: Sun May 5 02:01:34 UTC 2019 Modified Files: src/sys/dev/pad [isaki-audio2]: pad.c Log Message: Remove unnecessary __diagused (which was imported in this branch). To generate a diff of this commit: cvs rdiff -u -r1.58.2.2 -r1.58.2.3 src/sys/dev/pad/pad.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/pad/pad.c diff -u src/sys/dev/pad/pad.c:1.58.2.2 src/sys/dev/pad/pad.c:1.58.2.3 --- src/sys/dev/pad/pad.c:1.58.2.2 Sat May 4 07:20:10 2019 +++ src/sys/dev/pad/pad.c Sun May 5 02:01:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pad.c,v 1.58.2.2 2019/05/04 07:20:10 isaki Exp $ */ +/* $NetBSD: pad.c,v 1.58.2.3 2019/05/05 02:01:34 isaki Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.58.2.2 2019/05/04 07:20:10 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.58.2.3 2019/05/05 02:01:34 isaki Exp $"); #include #include @@ -401,7 +401,7 @@ pad_set_format(void *opaque, int setmode const audio_params_t *play, const audio_params_t *rec, audio_filter_reg_t *pfil, audio_filter_reg_t *rfil) { - pad_softc_t *sc __diagused; + pad_softc_t *sc; sc = (pad_softc_t *)opaque;
CVS commit: [isaki-audio2] src/sys/dev/isa
Module Name:src Committed By: isaki Date: Sun May 5 01:57:06 UTC 2019 Modified Files: src/sys/dev/isa [isaki-audio2]: sbdsp.c Log Message: Fix typos (made in this branch). To generate a diff of this commit: cvs rdiff -u -r1.139.2.3 -r1.139.2.4 src/sys/dev/isa/sbdsp.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/isa/sbdsp.c diff -u src/sys/dev/isa/sbdsp.c:1.139.2.3 src/sys/dev/isa/sbdsp.c:1.139.2.4 --- src/sys/dev/isa/sbdsp.c:1.139.2.3 Sat May 4 07:20:10 2019 +++ src/sys/dev/isa/sbdsp.c Sun May 5 01:57:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sbdsp.c,v 1.139.2.3 2019/05/04 07:20:10 isaki Exp $ */ +/* $NetBSD: sbdsp.c,v 1.139.2.4 2019/05/05 01:57:06 isaki Exp $ */ /*- * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sbdsp.c,v 1.139.2.3 2019/05/04 07:20:10 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbdsp.c,v 1.139.2.4 2019/05/05 01:57:06 isaki Exp $"); #include "midi.h" #include "mpu.h" @@ -462,7 +462,7 @@ sbdsp_attach(struct sbdsp_softc *sc) } } - /* Construct sc_format from model */ + /* Construct sc_formats from model */ sbdsp_init_format(sc); if (sc->sc_nformats == 0) { aprint_error_dev(sc->sc_dev, @@ -597,7 +597,7 @@ sbdsp_init_format(struct sbdsp_softc *sc idx = (m->precision / 16) * 2 + (m->channels - 1); d = [idx]; if (d->mode == 0) { -/* The first elements of this room */ +/* The first element of this room */ *d = tmp; continue; }
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: christos Date: Sun May 5 01:48:53 UTC 2019 Modified Files: src/sys/ufs/ufs: dir.h ufs_lookup.c Log Message: Zero out all the dirent padding not just one byte, to avoid kernel memory disclosure (from https://svnweb.freebsd.org/base?view=revision=347066) To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/ufs/ufs/dir.h cvs rdiff -u -r1.148 -r1.149 src/sys/ufs/ufs/ufs_lookup.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/ufs/ufs/dir.h diff -u src/sys/ufs/ufs/dir.h:1.25 src/sys/ufs/ufs/dir.h:1.26 --- src/sys/ufs/ufs/dir.h:1.25 Tue Sep 1 02:16:03 2015 +++ src/sys/ufs/ufs/dir.h Sat May 4 21:48:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.h,v 1.25 2015/09/01 06:16:03 dholland Exp $ */ +/* $NetBSD: dir.h,v 1.26 2019/05/05 01:48:53 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -111,8 +111,11 @@ struct direct { * without the d_name field, plus enough space for the name with a terminating * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. */ +#define DIR_ROUNDUP 4 +#define UFS_NAMEROUNDUP(namlen) (((namlen) + DIR_ROUNDUP) & ~(DIR_ROUNDUP - 1)) +#define UFS_NAMEPAD(namlen) (DIR_ROUNDUP - ((namlen) & (DIR_ROUNDUP - 1))) #define UFS_DIRECTSIZ(namlen) \ - ((sizeof(struct direct) - (FFS_MAXNAMLEN+1)) + (((namlen)+1 + 3) &~ 3)) + ((sizeof(struct direct) - (FFS_MAXNAMLEN+1)) + UFS_NAMEROUNDUP(namlen)) #if (BYTE_ORDER == LITTLE_ENDIAN) #define UFS_DIRSIZ(oldfmt, dp, needswap) \ Index: src/sys/ufs/ufs/ufs_lookup.c diff -u src/sys/ufs/ufs/ufs_lookup.c:1.148 src/sys/ufs/ufs/ufs_lookup.c:1.149 --- src/sys/ufs/ufs/ufs_lookup.c:1.148 Fri Oct 27 08:25:15 2017 +++ src/sys/ufs/ufs/ufs_lookup.c Sat May 4 21:48:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_lookup.c,v 1.148 2017/10/27 12:25:15 joerg Exp $ */ +/* $NetBSD: ufs_lookup.c,v 1.149 2019/05/05 01:48:53 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.148 2017/10/27 12:25:15 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.149 2019/05/05 01:48:53 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_ffs.h" @@ -793,10 +793,15 @@ void ufs_makedirentry(struct inode *ip, struct componentname *cnp, struct direct *newdirp) { + size_t namelen = cnp->cn_namelen; + newdirp->d_ino = ip->i_number; - newdirp->d_namlen = cnp->cn_namelen; - memcpy(newdirp->d_name, cnp->cn_nameptr, (size_t)cnp->cn_namelen); - newdirp->d_name[cnp->cn_namelen] = '\0'; + newdirp->d_namlen = namelen; + memcpy(newdirp->d_name, cnp->cn_nameptr, namelen); + + /* Zero out padding */ + memset(>d_name[namelen], 0, UFS_NAMEPAD(namelen)); + if (FSFMT(ITOV(ip))) newdirp->d_type = 0; else
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Sun May 5 00:12:34 UTC 2019 Modified Files: src/share/man/man4: ucom.4 Log Message: Add a couple of xrefs, since they exist and the Synopsis mentions them. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/share/man/man4/ucom.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/ucom.4 diff -u src/share/man/man4/ucom.4:1.26 src/share/man/man4/ucom.4:1.27 --- src/share/man/man4/ucom.4:1.26 Thu Sep 29 11:38:43 2016 +++ src/share/man/man4/ucom.4 Sun May 5 00:12:34 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: ucom.4,v 1.26 2016/09/29 11:38:43 wiz Exp $ +.\" $NetBSD: ucom.4,v 1.27 2019/05/05 00:12:34 pgoyette Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 29, 2016 +.Dd May 5, 2019 .Dt UCOM 4 .Os .Sh NAME @@ -88,6 +88,7 @@ are used for dial-out. .Sh SEE ALSO .Xr tty 4 , .Xr u3g 4 , +.Xr uark 4 , .Xr ubsa 4 , .Xr uchcom 4 , .Xr uftdi 4 , @@ -95,6 +96,7 @@ are used for dial-out. .Xr uhmodem 4 , .Xr uipaq 4 , .Xr ukyopon 4 , +.Xr umcs 4 , .Xr umct 4 , .Xr umodem 4 , .Xr uplcom 4 ,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Sat May 4 23:52:18 UTC 2019 Modified Files: src/sys/dev/usb: ukyopon.c Log Message: don't pass two different softcs that just happen to overlap, but shim the umodem functions directly and call them with the sub-softc. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/ukyopon.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/usb/ukyopon.c diff -u src/sys/dev/usb/ukyopon.c:1.21 src/sys/dev/usb/ukyopon.c:1.22 --- src/sys/dev/usb/ukyopon.c:1.21 Sat May 4 08:04:13 2019 +++ src/sys/dev/usb/ukyopon.c Sat May 4 23:52:18 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ukyopon.c,v 1.21 2019/05/04 08:04:13 mrg Exp $ */ +/* $NetBSD: ukyopon.c,v 1.22 2019/05/04 23:52:18 mrg Exp $ */ /* * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.21 2019/05/04 08:04:13 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.22 2019/05/04 23:52:18 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -86,27 +86,31 @@ struct ukyopon_softc { #define UKYOPON_MODEM_IFACE_INDEX 0 #define UKYOPON_DATA_IFACE_INDEX 3 -Static void ukyopon_get_status(void *, int, u_char *, u_char *); -Static int ukyopon_ioctl(void *, int, u_long, void *, int, proc_t *); +static void ukyopon_get_status(void *, int, u_char *, u_char *); +static int ukyopon_ioctl(void *, int, u_long, void *, int, proc_t *); +static void ukyopon_set(void *, int, int, int); +static int ukyopon_param(void *, int, struct termios *); +static int ukyopon_open(void *, int); +static void ukyopon_close(void *, int); -Static struct ucom_methods ukyopon_methods = { +static struct ucom_methods ukyopon_methods = { .ucom_get_status = ukyopon_get_status, - .ucom_set = umodem_set, - .ucom_param = umodem_param, + .ucom_set = ukyopon_set, + .ucom_param = ukyopon_param, .ucom_ioctl = ukyopon_ioctl, - .ucom_open = umodem_open, - .ucom_close = umodem_close, + .ucom_open = ukyopon_open, + .ucom_close = ukyopon_close, }; -int ukyopon_match(device_t, cfdata_t, void *); -void ukyopon_attach(device_t, device_t, void *); -int ukyopon_detach(device_t, int); -int ukyopon_activate(device_t, enum devact); +static int ukyopon_match(device_t, cfdata_t, void *); +static void ukyopon_attach(device_t, device_t, void *); +static int ukyopon_detach(device_t, int); +static int ukyopon_activate(device_t, enum devact); extern struct cfdriver ukyopon_cd; CFATTACH_DECL_NEW(ukyopon, sizeof(struct ukyopon_softc), ukyopon_match, ukyopon_attach, ukyopon_detach, ukyopon_activate); -int +static int ukyopon_match(device_t parent, cfdata_t match, void *aux) { struct usbif_attach_arg *uiaa = aux; @@ -120,7 +124,7 @@ ukyopon_match(device_t parent, cfdata_t return UMATCH_NONE; } -void +static void ukyopon_attach(device_t parent, device_t self, void *aux) { struct ukyopon_softc *sc = device_private(self); @@ -138,7 +142,7 @@ ukyopon_attach(device_t parent, device_t return; } -Static void +static void ukyopon_get_status(void *addr, int portno, u_char *lsr, u_char *msr) { struct ukyopon_softc *sc = addr; @@ -153,7 +157,40 @@ ukyopon_get_status(void *addr, int portn umodem_get_status(addr, portno, lsr, msr); } -Static int +static void +ukyopon_set(void *addr, int portno, int reg, int onoff) +{ + struct ukyopon_softc *sc = addr; + + umodem_set(>sc_umodem, portno, reg, onoff); +} + +static int +ukyopon_param(void *addr, int portno, struct termios *t) +{ + struct ukyopon_softc *sc = addr; + + return umodem_param(>sc_umodem, portno, t); +} + +static int +ukyopon_open(void *addr, int portno) +{ + struct ukyopon_softc *sc = addr; + + return umodem_open(>sc_umodem, portno); +} + +static void +ukyopon_close(void *addr, int portno) +{ + struct ukyopon_softc *sc = addr; + + umodem_close(>sc_umodem, portno); +} + + +static int ukyopon_ioctl(void *addr, int portno, u_long cmd, void *data, int flag, proc_t *p) {
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Sat May 4 23:36:14 UTC 2019 Modified Files: src/sys/dev/usb: uhmodem.c Log Message: finish previous and convert two >sc_ubsa refs to sc. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/uhmodem.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/usb/uhmodem.c diff -u src/sys/dev/usb/uhmodem.c:1.17 src/sys/dev/usb/uhmodem.c:1.18 --- src/sys/dev/usb/uhmodem.c:1.17 Sat May 4 23:07:07 2019 +++ src/sys/dev/usb/uhmodem.c Sat May 4 23:36:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uhmodem.c,v 1.17 2019/05/04 23:07:07 mrg Exp $ */ +/* $NetBSD: uhmodem.c,v 1.18 2019/05/04 23:36:14 mrg Exp $ */ /* * Copyright (c) 2008 Yojiro UO . @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v 1.17 2019/05/04 23:07:07 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v 1.18 2019/05/04 23:36:14 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -354,7 +354,7 @@ uhmodem_attach(device_t parent, device_t ucaa.ucaa_device = dev; ucaa.ucaa_iface = sc->sc_iface[i]; ucaa.ucaa_methods = _methods; - ucaa.ucaa_arg = >sc_ubsa; + ucaa.ucaa_arg = sc; ucaa.ucaa_info = comname; DPRINTF(("uhmodem: int#=%d, in = 0x%x, out = 0x%x, intr = 0x%x\n", i, ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, @@ -363,7 +363,7 @@ uhmodem_attach(device_t parent, device_t , ucomprint, ucomsubmatch); /* issue endpoint halt to each interface */ - err = uhmodem_endpointhalt(>sc_ubsa, i); + err = uhmodem_endpointhalt(sc, i); if (err) aprint_error("%s: endpointhalt fail\n", __func__); else
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Sat May 4 23:07:07 UTC 2019 Modified Files: src/sys/dev/usb: uhmodem.c Log Message: uhmodem(4) uses ubsa(4)'s softc in its own softc as the only member, and the code relies upon it being the first member (some functions called with the callback arg are in uhmodem and some in ubsa.) make it less implicit that this is really supposed to be identical to ubsa usage, and operate on ubsa_softc directly. clean up some Static. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/uhmodem.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/usb/uhmodem.c diff -u src/sys/dev/usb/uhmodem.c:1.16 src/sys/dev/usb/uhmodem.c:1.17 --- src/sys/dev/usb/uhmodem.c:1.16 Sat May 4 08:04:13 2019 +++ src/sys/dev/usb/uhmodem.c Sat May 4 23:07:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uhmodem.c,v 1.16 2019/05/04 08:04:13 mrg Exp $ */ +/* $NetBSD: uhmodem.c,v 1.17 2019/05/04 23:07:07 mrg Exp $ */ /* * Copyright (c) 2008 Yojiro UO . @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v 1.16 2019/05/04 08:04:13 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v 1.17 2019/05/04 23:07:07 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -113,7 +113,7 @@ __KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v #define UHMODEMOBUFSIZE 4096 #ifdef UHMODEM_DEBUG -Static int uhmodemdebug = 0; +static int uhmodemdebug = 0; #define DPRINTFN(n, x) do { \ if (uhmodemdebug > (n)) \ printf x; \ @@ -123,21 +123,18 @@ Static int uhmodemdebug = 0; #endif #define DPRINTF(x) DPRINTFN(0, x) -Static int uhmodem_open(void *, int); -Static usbd_status e220_modechange_request(struct usbd_device *); -Static usbd_status uhmodem_endpointhalt(struct ubsa_softc *, int); -Static usbd_status uhmodem_regwrite(struct usbd_device *, uint8_t *, size_t); -Static usbd_status uhmodem_regread(struct usbd_device *, uint8_t *, size_t); -Static usbd_status a2502_init(struct usbd_device *); +static int uhmodem_open(void *, int); +static usbd_status e220_modechange_request(struct usbd_device *); +static usbd_status uhmodem_endpointhalt(struct ubsa_softc *, int); +static usbd_status uhmodem_regwrite(struct usbd_device *, uint8_t *, size_t); +static usbd_status uhmodem_regread(struct usbd_device *, uint8_t *, size_t); +static usbd_status a2502_init(struct usbd_device *); #if 0 -Static usbd_status uhmodem_regsetup(struct usbd_device *, uint16_t); -Static usbd_status e220_init(struct usbd_device *); +static usbd_status uhmodem_regsetup(struct usbd_device *, uint16_t); +static usbd_status e220_init(struct usbd_device *); #endif -struct uhmodem_softc { - struct ubsa_softc sc_ubsa; -}; - +/* this driver uses the ubsa_softc and methods directly as-is. */ struct ucom_methods uhmodem_methods = { .ucom_get_status = ubsa_get_status, .ucom_set = ubsa_set, @@ -156,7 +153,7 @@ struct uhmodem_type { /* Whether or not it is a device different from E220 is not clear. */ }; -Static const struct uhmodem_type uhmodem_devs[] = { +static const struct uhmodem_type uhmodem_devs[] = { /* HUAWEI E220 / Emobile D0[12]HW */ {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 }, 2, E220}, /* ANYDATA / NTT DoCoMo A2502 */ @@ -166,16 +163,16 @@ Static const struct uhmodem_type uhmodem }; #define uhmodem_lookup(v, p) ((const struct uhmodem_type *)usb_lookup(uhmodem_devs, v, p)) -int uhmodem_match(device_t, cfdata_t, void *); -void uhmodem_attach(device_t, device_t, void *); -void uhmodem_childdet(device_t, device_t); -int uhmodem_detach(device_t, int); -int uhmodem_activate(device_t, enum devact); -extern struct cfdriver uhmodem_cd; -CFATTACH_DECL2_NEW(uhmodem, sizeof(struct uhmodem_softc), uhmodem_match, +static int uhmodem_match(device_t, cfdata_t, void *); +static void uhmodem_attach(device_t, device_t, void *); +static void uhmodem_childdet(device_t, device_t); +static int uhmodem_detach(device_t, int); +static int uhmodem_activate(device_t, enum devact); + +CFATTACH_DECL2_NEW(uhmodem, sizeof(struct ubsa_softc), uhmodem_match, uhmodem_attach, uhmodem_detach, uhmodem_activate, NULL, uhmodem_childdet); -int +static int uhmodem_match(device_t parent, cfdata_t match, void *aux) { struct usbif_attach_arg *uiaa = aux; @@ -188,10 +185,10 @@ uhmodem_match(device_t parent, cfdata_t return UMATCH_NONE; } -void +static void uhmodem_attach(device_t parent, device_t self, void *aux) { - struct uhmodem_softc *sc = device_private(self); + struct ubsa_softc *sc = device_private(self); struct usbif_attach_arg *uiaa = aux; struct usbd_device *dev = uiaa->uiaa_device; usb_config_descriptor_t *cdesc; @@ -211,10 +208,10 @@ uhmodem_attach(device_t parent, device_t aprint_normal_dev(self, "%s\n", devinfop); usbd_devinfo_free(devinfop); - sc->sc_ubsa.sc_dev = self; - sc->sc_ubsa.sc_udev = dev; - sc->sc_ubsa.sc_config_index =
CVS commit: src/lib/csu/arch/ia64
Module Name:src Committed By: scole Date: Sat May 4 22:55:32 UTC 2019 Modified Files: src/lib/csu/arch/ia64: crt0.S Log Message: add stop (;;) to elimate WAW dependency compiler warning To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/csu/arch/ia64/crt0.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/csu/arch/ia64/crt0.S diff -u src/lib/csu/arch/ia64/crt0.S:1.2 src/lib/csu/arch/ia64/crt0.S:1.3 --- src/lib/csu/arch/ia64/crt0.S:1.2 Mon Nov 26 17:37:45 2018 +++ src/lib/csu/arch/ia64/crt0.S Sat May 4 22:55:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: crt0.S,v 1.2 2018/11/26 17:37:45 joerg Exp $ */ +/* $NetBSD: crt0.S,v 1.3 2019/05/04 22:55:32 scole Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -RCSID("$NetBSD: crt0.S,v 1.2 2018/11/26 17:37:45 joerg Exp $") +RCSID("$NetBSD: crt0.S,v 1.3 2019/05/04 22:55:32 scole Exp $") STRONG_ALIAS(_start,__start) @@ -53,5 +53,6 @@ __start: mov sp = in3 /* Setup Memory Stack Pointer. */ mov in1 = in2 /* obj is no longer used. */ alloc r31 = ar.pfs, 3, 0, 0, 0 /* Adjust backingstore for ___start() */ + ;; br.call.sptk.many rp = ___start
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Sat May 4 17:19:10 UTC 2019 Modified Files: src/sys/kern: subr_asan.c Log Message: Rewrite kasan_mark() to fix a still existing race in pool_cache_get_paddr() that could cause false positives. Now a buffer initially valid remains valid, with no invalid->valid dance. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/kern/subr_asan.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/kern/subr_asan.c diff -u src/sys/kern/subr_asan.c:1.8 src/sys/kern/subr_asan.c:1.9 --- src/sys/kern/subr_asan.c:1.8 Sat May 4 10:07:10 2019 +++ src/sys/kern/subr_asan.c Sat May 4 17:19:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_asan.c,v 1.8 2019/05/04 10:07:10 maxv Exp $ */ +/* $NetBSD: subr_asan.c,v 1.9 2019/05/04 17:19:10 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.8 2019/05/04 10:07:10 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.9 2019/05/04 17:19:10 maxv Exp $"); #include #include @@ -237,17 +237,6 @@ kasan_add_redzone(size_t *size) *size += KASAN_SHADOW_SCALE_SIZE; } -static void -kasan_markmem(const void *addr, size_t size, bool valid, uint8_t code) -{ - KASSERT((vaddr_t)addr % KASAN_SHADOW_SCALE_SIZE == 0); - if (valid) { - kasan_shadow_Nbyte_markvalid(addr, size); - } else { - kasan_shadow_Nbyte_fill(addr, size, code); - } -} - void kasan_softint(struct lwp *l) { @@ -268,8 +257,30 @@ kasan_softint(struct lwp *l) void kasan_mark(const void *addr, size_t size, size_t sz_with_redz, uint8_t code) { - kasan_markmem(addr, sz_with_redz, false, code); - kasan_markmem(addr, size, true, code); + size_t i, n, redz; + int8_t *shad; + + KASSERT((vaddr_t)addr % KASAN_SHADOW_SCALE_SIZE == 0); + redz = sz_with_redz - roundup(size, KASAN_SHADOW_SCALE_SIZE); + KASSERT(redz % KASAN_SHADOW_SCALE_SIZE == 0); + shad = kasan_md_addr_to_shad(addr); + + /* Chunks of 8 bytes, valid. */ + n = size / KASAN_SHADOW_SCALE_SIZE; + for (i = 0; i < n; i++) { + *shad++ = 0; + } + + /* Possibly one chunk, mid. */ + if ((size & KASAN_SHADOW_MASK) != 0) { + *shad++ = (size & KASAN_SHADOW_MASK); + } + + /* Chunks of 8 bytes, invalid. */ + n = redz / KASAN_SHADOW_SCALE_SIZE; + for (i = 0; i < n; i++) { + *shad++ = code; + } } /* -- */
CVS commit: src/distrib/sets/lists/misc
Module Name:src Committed By: sevan Date: Sat May 4 17:03:39 UTC 2019 Modified Files: src/distrib/sets/lists/misc: mi Log Message: Mark the set obsolete as well. Heads up To generate a diff of this commit: cvs rdiff -u -r1.211 -r1.212 src/distrib/sets/lists/misc/mi 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/misc/mi diff -u src/distrib/sets/lists/misc/mi:1.211 src/distrib/sets/lists/misc/mi:1.212 --- src/distrib/sets/lists/misc/mi:1.211 Fri May 3 11:29:06 2019 +++ src/distrib/sets/lists/misc/mi Sat May 4 17:03:39 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.211 2019/05/03 11:29:06 sevan Exp $ +# $NetBSD: mi,v 1.212 2019/05/04 17:03:39 sevan Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1610,7 +1610,7 @@ ./usr/share/examples/supfiles/sup.au.netbsd.org misc-obsolete obsolete ./usr/share/examples/supfiles/sup.de.netbsd.org misc-obsolete obsolete ./usr/share/examples/supfiles/sup.jp.netbsd.org misc-sup-examples share -./usr/share/examples/supfiles/sup.netbsd.org misc-sup-examples obsolete +./usr/share/examples/supfiles/sup.netbsd.org misc-obsolete obsolete ./usr/share/examples/supfiles/sup.no.netbsd.org misc-obsolete obsolete ./usr/share/examples/supfiles/sup.uk.netbsd.org misc-obsolete obsolete ./usr/share/examples/supfiles/sup2.fr.netbsd.org misc-sup-examples share
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sat May 4 15:46:58 UTC 2019 Modified Files: src/sys/kern: sys_select.c Log Message: PR/54158: Anthony Mallet: poll(2) does not allow polling all possible fds (hardcoded limit to 1000 + #). Changed to limit by the max of the resource limit of open descriptors and the above. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/kern/sys_select.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/kern/sys_select.c diff -u src/sys/kern/sys_select.c:1.41 src/sys/kern/sys_select.c:1.42 --- src/sys/kern/sys_select.c:1.41 Tue Jan 30 02:52:23 2018 +++ src/sys/kern/sys_select.c Sat May 4 11:46:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_select.c,v 1.41 2018/01/30 07:52:23 ozaki-r Exp $ */ +/* $NetBSD: sys_select.c,v 1.42 2019/05/04 15:46:58 christos Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.41 2018/01/30 07:52:23 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.42 2019/05/04 15:46:58 christos Exp $"); #include #include @@ -488,7 +488,8 @@ pollcommon(register_t *retval, struct po int error; size_t ni; - if (nfds > 1000 + curlwp->l_fd->fd_dt->dt_nfiles) { + if (nfds > MAX(1000 + curlwp->l_fd->fd_dt->dt_nfiles, + curlwp->l_proc->p_rlimit[RLIMIT_NOFILE].rlim_cur)) { /* * Either the user passed in a very sparse 'fds' or junk! * The kmem_alloc() call below would be bad news.
CVS commit: src/sys/arch/atari/conf
Module Name:src Committed By: tsutsui Date: Sat May 4 13:14:18 UTC 2019 Modified Files: src/sys/arch/atari/conf: MILAN-ISAIDE MILAN-PCIIDE Log Message: Regen from MILAN.in rev 1.29. > Add pms(4), wsmouse(4), and wsmux(4) for Milan. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/arch/atari/conf/MILAN-ISAIDE cvs rdiff -u -r1.96 -r1.97 src/sys/arch/atari/conf/MILAN-PCIIDE 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/atari/conf/MILAN-ISAIDE diff -u src/sys/arch/atari/conf/MILAN-ISAIDE:1.92 src/sys/arch/atari/conf/MILAN-ISAIDE:1.93 --- src/sys/arch/atari/conf/MILAN-ISAIDE:1.92 Sat Apr 13 08:26:14 2019 +++ src/sys/arch/atari/conf/MILAN-ISAIDE Sat May 4 13:14:18 2019 @@ -1,11 +1,11 @@ # -# $NetBSD: MILAN-ISAIDE,v 1.92 2019/04/13 08:26:14 isaki Exp $ +# $NetBSD: MILAN-ISAIDE,v 1.93 2019/05/04 13:14:18 tsutsui Exp $ # # This file was automatically created. Changes will be # lost when running makeconf in this directory. # # Created from: -# NetBSD: MILAN.in,v 1.28 2018/01/20 19:24:27 tsutsui Exp $ +# NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $ # NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $ include "arch/atari/conf/std.milan" options INCLUDE_CONFIG_FILE # embed config file in kernel binary @@ -98,7 +98,10 @@ vga0 at pci? dev ? function ? # a PCI VG wsdisplay* at vga? console ? # as a wscons console pckbc0 at isa? # PC keyboard controller pckbd* at pckbc? # PC keyboard +pms* at pckbc? # PS/2 mouse wskbd* at pckbd? console ? # wscons keyboard +wsmouse* at pms? # wscons mouse +pseudo-device wsmux # mouse & keyboard multiplexor wd* at atabus? drive ? atapibus* at atabus? # ATAPI bus support cd* at atapibus? drive ? # ATAPI CD-ROM drives Index: src/sys/arch/atari/conf/MILAN-PCIIDE diff -u src/sys/arch/atari/conf/MILAN-PCIIDE:1.96 src/sys/arch/atari/conf/MILAN-PCIIDE:1.97 --- src/sys/arch/atari/conf/MILAN-PCIIDE:1.96 Sat Apr 13 08:26:14 2019 +++ src/sys/arch/atari/conf/MILAN-PCIIDE Sat May 4 13:14:18 2019 @@ -1,11 +1,11 @@ # -# $NetBSD: MILAN-PCIIDE,v 1.96 2019/04/13 08:26:14 isaki Exp $ +# $NetBSD: MILAN-PCIIDE,v 1.97 2019/05/04 13:14:18 tsutsui Exp $ # # This file was automatically created. Changes will be # lost when running makeconf in this directory. # # Created from: -# NetBSD: MILAN.in,v 1.28 2018/01/20 19:24:27 tsutsui Exp $ +# NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $ # NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $ include "arch/atari/conf/std.milan" options INCLUDE_CONFIG_FILE # embed config file in kernel binary @@ -98,7 +98,10 @@ vga0 at pci? dev ? function ? # a PCI VG wsdisplay* at vga? console ? # as a wscons console pckbc0 at isa? # PC keyboard controller pckbd* at pckbc? # PC keyboard +pms* at pckbc? # PS/2 mouse wskbd* at pckbd? console ? # wscons keyboard +wsmouse* at pms? # wscons mouse +pseudo-device wsmux # mouse & keyboard multiplexor wd* at atabus? drive ? atapibus* at atabus? # ATAPI bus support cd* at atapibus? drive ? # ATAPI CD-ROM drives
CVS commit: src/sys/arch/atari/conf
Module Name:src Committed By: tsutsui Date: Sat May 4 13:12:03 UTC 2019 Modified Files: src/sys/arch/atari/conf: MILAN.in Log Message: Add pms(4), wsmouse(4), and wsmux(4) for Milan. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/atari/conf/MILAN.in 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/atari/conf/MILAN.in diff -u src/sys/arch/atari/conf/MILAN.in:1.28 src/sys/arch/atari/conf/MILAN.in:1.29 --- src/sys/arch/atari/conf/MILAN.in:1.28 Sat Jan 20 19:24:27 2018 +++ src/sys/arch/atari/conf/MILAN.in Sat May 4 13:12:03 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: MILAN.in,v 1.28 2018/01/20 19:24:27 tsutsui Exp $ +# $NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $ # # Milan # @@ -102,7 +102,10 @@ vga0 at pci? dev ? function ? # a PCI wsdisplay* at vga? console ? # as a wscons console pckbc0 at isa? # PC keyboard controller pckbd* at pckbc? # PC keyboard +pms* at pckbc? # PS/2 mouse wskbd* at pckbd? console ? # wscons keyboard +wsmouse* at pms?# wscons mouse +pseudo-device wsmux# mouse & keyboard multiplexor # ATA devices wd* at atabus? drive ?
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Sat May 4 13:04:36 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: intr.c Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/hppa/intr.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/arch/hppa/hppa/intr.c diff -u src/sys/arch/hppa/hppa/intr.c:1.2 src/sys/arch/hppa/hppa/intr.c:1.3 --- src/sys/arch/hppa/hppa/intr.c:1.2 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/intr.c Sat May 4 13:04:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.2 2019/04/15 20:45:08 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.3 2019/05/04 13:04:36 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.2 2019/04/15 20:45:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.3 2019/05/04 13:04:36 skrll Exp $"); #define __MUTEX_PRIVATE @@ -502,7 +502,6 @@ hppa_intr_ipending(struct hppa_interrupt } } - return pending; }
CVS commit: [isaki-audio2] src/sys/arch/sgimips/mace
Module Name:src Committed By: isaki Date: Sat May 4 12:03:04 UTC 2019 Modified Files: src/sys/arch/sgimips/mace [isaki-audio2]: mavb.c Log Message: Correct precision. Tested by naru@. Thanks. To generate a diff of this commit: cvs rdiff -u -r1.12.2.3 -r1.12.2.4 src/sys/arch/sgimips/mace/mavb.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/arch/sgimips/mace/mavb.c diff -u src/sys/arch/sgimips/mace/mavb.c:1.12.2.3 src/sys/arch/sgimips/mace/mavb.c:1.12.2.4 --- src/sys/arch/sgimips/mace/mavb.c:1.12.2.3 Sat May 4 07:20:08 2019 +++ src/sys/arch/sgimips/mace/mavb.c Sat May 4 12:03:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mavb.c,v 1.12.2.3 2019/05/04 07:20:08 isaki Exp $ */ +/* $NetBSD: mavb.c,v 1.12.2.4 2019/05/04 12:03:03 isaki Exp $ */ /* $OpenBSD: mavb.c,v 1.6 2005/04/15 13:05:14 mickey Exp $ */ /* @@ -111,8 +111,8 @@ static const struct audio_format mavb_fo { .mode = AUMODE_PLAY, .encoding = AUDIO_ENCODING_SLINEAR_BE, - .validbits = 16, - .precision = 16, + .validbits = 24, + .precision = 32, .channels = 2, .channel_mask = AUFMT_STEREO, .frequency_type = 0,
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: kre Date: Sat May 4 11:15:49 UTC 2019 Modified Files: src/sys/arch/xen/x86: xenfunc.c Log Message: More of maxv's "switch to proper types" - hopefully unbreak i386 build. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/xen/x86/xenfunc.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/arch/xen/x86/xenfunc.c diff -u src/sys/arch/xen/x86/xenfunc.c:1.25 src/sys/arch/xen/x86/xenfunc.c:1.26 --- src/sys/arch/xen/x86/xenfunc.c:1.25 Sat May 4 07:20:22 2019 +++ src/sys/arch/xen/x86/xenfunc.c Sat May 4 11:15:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xenfunc.c,v 1.25 2019/05/04 07:20:22 maxv Exp $ */ +/* $NetBSD: xenfunc.c,v 1.26 2019/05/04 11:15:49 kre Exp $ */ /* * Copyright (c) 2004 Christian Limpach. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xenfunc.c,v 1.25 2019/05/04 07:20:22 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xenfunc.c,v 1.26 2019/05/04 11:15:49 kre Exp $"); #include @@ -138,7 +138,7 @@ rcr0(void) #ifndef __x86_64__ void -lcr3(vaddr_t val) +lcr3(register_t val) { int s = splvm(); /* XXXSMP */ xpq_queue_pt_switch(xpmap_ptom_masked(val));
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Sat May 4 10:07:11 UTC 2019 Modified Files: src/sys/kern: subr_asan.c src/sys/sys: systm.h Log Message: Add KASAN instrumentation for kcopy and copystr. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/kern/subr_asan.c cvs rdiff -u -r1.283 -r1.284 src/sys/sys/systm.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/kern/subr_asan.c diff -u src/sys/kern/subr_asan.c:1.7 src/sys/kern/subr_asan.c:1.8 --- src/sys/kern/subr_asan.c:1.7 Thu Apr 11 17:43:45 2019 +++ src/sys/kern/subr_asan.c Sat May 4 10:07:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_asan.c,v 1.7 2019/04/11 17:43:45 maxv Exp $ */ +/* $NetBSD: subr_asan.c,v 1.8 2019/05/04 10:07:10 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.7 2019/04/11 17:43:45 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.8 2019/05/04 10:07:10 maxv Exp $"); #include #include @@ -479,18 +479,39 @@ kasan_strlen(const char *str) return (s - str); } +#undef kcopy +#undef copystr #undef copyinstr #undef copyoutstr #undef copyin +int kasan_kcopy(const void *, void *, size_t); +int kasan_copystr(const void *, void *, size_t, size_t *); int kasan_copyinstr(const void *, void *, size_t, size_t *); int kasan_copyoutstr(const void *, void *, size_t, size_t *); int kasan_copyin(const void *, void *, size_t); +int kcopy(const void *, void *, size_t); +int copystr(const void *, void *, size_t, size_t *); int copyinstr(const void *, void *, size_t, size_t *); int copyoutstr(const void *, void *, size_t, size_t *); int copyin(const void *, void *, size_t); int +kasan_kcopy(const void *src, void *dst, size_t len) +{ + kasan_shadow_check((unsigned long)src, len, false, __RET_ADDR); + kasan_shadow_check((unsigned long)dst, len, true, __RET_ADDR); + return kcopy(src, dst, len); +} + +int +kasan_copystr(const void *kfaddr, void *kdaddr, size_t len, size_t *done) +{ + kasan_shadow_check((unsigned long)kdaddr, len, true, __RET_ADDR); + return copystr(kfaddr, kdaddr, len, done); +} + +int kasan_copyin(const void *uaddr, void *kaddr, size_t len) { kasan_shadow_check((unsigned long)kaddr, len, true, __RET_ADDR); Index: src/sys/sys/systm.h diff -u src/sys/sys/systm.h:1.283 src/sys/sys/systm.h:1.284 --- src/sys/sys/systm.h:1.283 Thu Apr 11 17:43:45 2019 +++ src/sys/sys/systm.h Sat May 4 10:07:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.283 2019/04/11 17:43:45 maxv Exp $ */ +/* $NetBSD: systm.h,v 1.284 2019/05/04 10:07:11 maxv Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -260,7 +260,12 @@ int format_bytes(char *, size_t, uint64_ void tablefull(const char *, const char *); +#if defined(_KERNEL) && defined(KASAN) +int kasan_kcopy(const void *, void *, size_t); +#define kcopy kasan_kcopy +#else int kcopy(const void *, void *, size_t); +#endif #ifdef _KERNEL #define bcopy(src, dst, len) memcpy((dst), (src), (len)) @@ -268,15 +273,17 @@ int kcopy(const void *, void *, size_t); #define bcmp(a, b, len) memcmp((a), (b), (len)) #endif /* KERNEL */ -int copystr(const void *, void *, size_t, size_t *); #if defined(_KERNEL) && defined(KASAN) +int kasan_copystr(const void *, void *, size_t, size_t *); int kasan_copyinstr(const void *, void *, size_t, size_t *); int kasan_copyoutstr(const void *, void *, size_t, size_t *); int kasan_copyin(const void *, void *, size_t); +#define copystr kasan_copystr #define copyinstr kasan_copyinstr #define copyoutstr kasan_copyoutstr #define copyin kasan_copyin #else +int copystr(const void *, void *, size_t, size_t *); int copyinstr(const void *, void *, size_t, size_t *); int copyoutstr(const void *, void *, size_t, size_t *); int copyin(const void *, void *, size_t);
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Sat May 4 09:40:28 UTC 2019 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv22341 Log Message: Import dhcpcd-7.2.2 with the following changes: * DHCP: Ensure dhcp is running on the interface received from * BSD: Link handling has been simplified, however it is expected that if an interface supports SIOCGIFMEDIA then it reports the correct link status via route(4) for reliable operations * BPF: ARP filter is more robust * BSD: Validate RTM message lengths This security issue has been addressed: * DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE Many thanks to Maxime Villard for discovering this issue. Status: Vendor Tag: roy Release Tags: dhcpcd-7-2-2 U src/external/bsd/dhcpcd/dist/.gitignore U src/external/bsd/dhcpcd/dist/BUILDING.md U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/Makefile U src/external/bsd/dhcpcd/dist/Makefile.inc U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/config-null.mk U src/external/bsd/dhcpcd/dist/configure U src/external/bsd/dhcpcd/dist/iconfig.mk U src/external/bsd/dhcpcd/dist/compat/_strtoi.h U src/external/bsd/dhcpcd/dist/compat/arc4random.c U src/external/bsd/dhcpcd/dist/compat/arc4random.h U src/external/bsd/dhcpcd/dist/compat/bitops.h U src/external/bsd/dhcpcd/dist/compat/queue.h U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h U src/external/bsd/dhcpcd/dist/compat/strtoi.h U src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h U src/external/bsd/dhcpcd/dist/compat/dprintf.c U src/external/bsd/dhcpcd/dist/compat/dprintf.h U src/external/bsd/dhcpcd/dist/compat/endian.h U src/external/bsd/dhcpcd/dist/compat/pidfile.c U src/external/bsd/dhcpcd/dist/compat/pidfile.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.c U src/external/bsd/dhcpcd/dist/compat/reallocarray.h U src/external/bsd/dhcpcd/dist/compat/strlcpy.c U src/external/bsd/dhcpcd/dist/compat/strlcpy.h U src/external/bsd/dhcpcd/dist/compat/strtoi.c U src/external/bsd/dhcpcd/dist/compat/strtou.c U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/GNUmakefile U src/external/bsd/dhcpcd/dist/src/Makefile U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/auth.h C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/dev.c U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/dhcp.h C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/src/genembedc U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c U src/external/bsd/dhcpcd/dist/src/genembedh C src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/if-linux.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/if-sun.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/route.c U
CVS commit: src/doc
Module Name:src Committed By: roy Date: Sat May 4 09:43:16 UTC 2019 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-7.2.2 To generate a diff of this commit: cvs rdiff -u -r1.1617 -r1.1618 src/doc/3RDPARTY cvs rdiff -u -r1.2533 -r1.2534 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.1617 src/doc/3RDPARTY:1.1618 --- src/doc/3RDPARTY:1.1617 Sat May 4 07:28:18 2019 +++ src/doc/3RDPARTY Sat May 4 09:43:16 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1617 2019/05/04 07:28:18 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.1618 2019/05/04 09:43:16 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -341,8 +341,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 7.2.1 -Current Vers: 7.2.1 +Version: 7.2.2 +Current Vers: 7.2.2 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.2533 src/doc/CHANGES:1.2534 --- src/doc/CHANGES:1.2533 Tue Apr 30 16:23:44 2019 +++ src/doc/CHANGES Sat May 4 09:43:16 2019 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2533 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2534 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -373,3 +373,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: [sevan 20190426] bind: Import version 9.14.1. [christos 20190427] acpi(4): Updated ACPICA to 20190405. [christos 20190428] + dhcpcd(8): Import dhcpcd-7.2.2 [roy 20190504]
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Sat May 4 09:42:16 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c Log Message: Sync To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/src/dhcp.c \ src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/src/dhcp6.c \ src/external/bsd/dhcpcd/dist/src/if-bsd.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/src/if-options.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/bsd/dhcpcd/dist/src/bpf.c diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.8 src/external/bsd/dhcpcd/dist/src/bpf.c:1.9 --- src/external/bsd/dhcpcd/dist/src/bpf.c:1.8 Tue Jan 22 15:20:21 2019 +++ src/external/bsd/dhcpcd/dist/src/bpf.c Sat May 4 09:42:15 2019 @@ -301,6 +301,7 @@ bpf_close(struct interface *ifp, int fd) /* Normally this is needed by bootp. * Once that uses this again, the ARP guard here can be removed. */ #ifdef ARP +#define BPF_CMP_HWADDR_LEN HWADDR_LEN / 4) + 2) * 2) + 1) static unsigned int bpf_cmp_hwaddr(struct bpf_insn *bpf, size_t bpf_len, size_t off, bool equal, uint8_t *hwaddr, size_t hwaddr_len) @@ -414,7 +415,7 @@ static const struct bpf_insn bpf_arp_eth sizeof(((struct ether_arp *)0)->arp_sha), 1, 0), BPF_STMT(BPF_RET + BPF_K, 0), }; -#define bpf_arp_ether_len __arraycount(bpf_arp_ether) +#define BPF_ARP_ETHER_LEN __arraycount(bpf_arp_ether) static const struct bpf_insn bpf_arp_filter [] = { /* Make sure this is for IP. */ @@ -425,21 +426,25 @@ static const struct bpf_insn bpf_arp_fil BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct arphdr, ar_op)), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REQUEST, 2, 0), /* or ARP REPLY. */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 1, 1), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 1, 0), BPF_STMT(BPF_RET + BPF_K, 0), /* Make sure the protocol length matches. */ BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct arphdr, ar_pln)), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, sizeof(in_addr_t), 1, 0), BPF_STMT(BPF_RET + BPF_K, 0), }; -#define bpf_arp_filter_len __arraycount(bpf_arp_filter) -#define bpf_arp_extra ARP_ADDRS_MAX + 1) * 2) * 2) + 2) -#define bpf_arp_hw HWADDR_LEN / 4) + 2) * 2) + 1) +#define BPF_ARP_FILTER_LEN __arraycount(bpf_arp_filter) + +#define BPF_ARP_ADDRS_LEN 1 + (ARP_ADDRS_MAX * 2) + 3 + \ +(ARP_ADDRS_MAX * 2) + 1 + +#define BPF_ARP_LEN BPF_ARP_ETHER_LEN + BPF_ARP_FILTER_LEN + \ +BPF_CMP_HWADDR_LEN + BPF_ARP_ADDRS_LEN int bpf_arp(struct interface *ifp, int fd) { - struct bpf_insn bpf[3+ bpf_arp_filter_len + bpf_arp_hw + bpf_arp_extra]; + struct bpf_insn bpf[BPF_ARP_LEN]; struct bpf_insn *bp; struct iarp_state *state; uint16_t arp_len; @@ -452,7 +457,7 @@ bpf_arp(struct interface *ifp, int fd) switch(ifp->family) { case ARPHRD_ETHER: memcpy(bp, bpf_arp_ether, sizeof(bpf_arp_ether)); - bp += bpf_arp_ether_len; + bp += BPF_ARP_ETHER_LEN; arp_len = sizeof(struct ether_header)+sizeof(struct ether_arp); break; default: @@ -462,10 +467,10 @@ bpf_arp(struct interface *ifp, int fd) /* Copy in the main filter. */ memcpy(bp, bpf_arp_filter, sizeof(bpf_arp_filter)); - bp += bpf_arp_filter_len; + bp += BPF_ARP_FILTER_LEN; /* Ensure it's not from us. */ - bp += bpf_cmp_hwaddr(bp, bpf_arp_hw, sizeof(struct arphdr), + bp += bpf_cmp_hwaddr(bp, BPF_CMP_HWADDR_LEN, sizeof(struct arphdr), false, ifp->hwaddr, ifp->hwlen); state = ARP_STATE(ifp); Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.18 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.19 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.18 Fri Apr 26 14:34:10 2019 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Sat May 4 09:42:15 2019 @@ -3499,9 +3499,14 @@ dhcp_readudp(struct dhcpcd_ctx *ctx, str logerr(__func__); return; } + if (D_CSTATE(ifp) == NULL) { + logdebugx("%s: received BOOTP for inactive interface", + ifp->name); + return; + } } - dhcp_handlebootp(ifp, (struct bootp *)buf, (size_t)bytes, + dhcp_handlebootp(ifp, (struct bootp *)(void *)buf, (size_t)bytes, _addr); #endif } Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.18 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.19 --- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.18 Wed Apr 17 23:35:34 2019 +++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c Sat May 4 09:42:15 2019 @@ -84,6 +84,9 @@ const int dhcpcd_signals[] = { const size_t dhcpcd_signals_len = __arraycount(dhcpcd_signals); #endif +#define IF_UPANDRUNNING(a) \ + (((a)->flags & (IFF_UP | IFF_RUNNING)) == (IFF_UP | IFF_RUNNING)) + static void
CVS commit: src/sys/arch/atari/pci
Module Name:src Committed By: tsutsui Date: Sat May 4 09:03:08 UTC 2019 Modified Files: src/sys/arch/atari/pci: pci_hades.c pci_tseng.c pci_vga.c Log Message: Use const for register values. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/atari/pci/pci_hades.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/atari/pci/pci_tseng.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/atari/pci/pci_vga.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/arch/atari/pci/pci_hades.c diff -u src/sys/arch/atari/pci/pci_hades.c:1.15 src/sys/arch/atari/pci/pci_hades.c:1.16 --- src/sys/arch/atari/pci/pci_hades.c:1.15 Sat May 4 08:20:05 2019 +++ src/sys/arch/atari/pci/pci_hades.c Sat May 4 09:03:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_hades.c,v 1.15 2019/05/04 08:20:05 tsutsui Exp $ */ +/* $NetBSD: pci_hades.c,v 1.16 2019/05/04 09:03:08 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_hades.c,v 1.15 2019/05/04 08:20:05 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_hades.c,v 1.16 2019/05/04 09:03:08 tsutsui Exp $"); #include #include @@ -206,21 +206,21 @@ pci_intr_disestablish(pci_chipset_tag_t */ #define PCI_LINMEMBASE 0x0e00 -static uint8_t crt_tab[] = { +static const uint8_t crt_tab[] = { 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3, 0xff }; -static uint8_t seq_tab[] = { +static const uint8_t seq_tab[] = { 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00 }; -static uint8_t attr_tab[] = { +static const uint8_t attr_tab[] = { 0x0c, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00 }; -static uint8_t gdc_tab[] = { +static const uint8_t gdc_tab[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff }; Index: src/sys/arch/atari/pci/pci_tseng.c diff -u src/sys/arch/atari/pci/pci_tseng.c:1.12 src/sys/arch/atari/pci/pci_tseng.c:1.13 --- src/sys/arch/atari/pci/pci_tseng.c:1.12 Sat May 4 08:20:05 2019 +++ src/sys/arch/atari/pci/pci_tseng.c Sat May 4 09:03:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_tseng.c,v 1.12 2019/05/04 08:20:05 tsutsui Exp $ */ +/* $NetBSD: pci_tseng.c,v 1.13 2019/05/04 09:03:08 tsutsui Exp $ */ /* * Copyright (c) 1999 Leo Weppelman. All rights reserved. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_tseng.c,v 1.12 2019/05/04 08:20:05 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_tseng.c,v 1.13 2019/05/04 09:03:08 tsutsui Exp $"); #include #include @@ -44,19 +44,19 @@ static void et6000_init(volatile uint8_t /* * Use tables for the card init... */ -static uint8_t seq_tab[] = { +static const uint8_t seq_tab[] = { 0x03, 0x01, 0x03, 0x00, 0x02, 0x00, 0x00, 0xb4 }; -static uint8_t gfx_tab[] = { +static const uint8_t gfx_tab[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff }; -static uint8_t attr_tab[] = { +static const uint8_t attr_tab[] = { 0x0a, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static uint8_t crt_tab[] = { +static const uint8_t crt_tab[] = { 0x60, 0x53, 0x4f, 0x94, 0x56, 0x05, 0xc1, 0x1f, 0x00, 0x4f, 0x00, 0x0f, 0x00, 0x00, 0x07, 0x80, 0x98, 0x3d, 0x8f, 0x28, 0x0f, 0x8f, 0xc2, 0xa3, @@ -71,7 +71,7 @@ static uint8_t crt_tab[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static uint8_t ras_cas_tab[] = { +static const uint8_t ras_cas_tab[] = { 0x11, 0x14, 0x15 }; Index: src/sys/arch/atari/pci/pci_vga.c diff -u src/sys/arch/atari/pci/pci_vga.c:1.16 src/sys/arch/atari/pci/pci_vga.c:1.17 --- src/sys/arch/atari/pci/pci_vga.c:1.16 Sat May 4 08:30:06 2019 +++ src/sys/arch/atari/pci/pci_vga.c Sat May 4 09:03:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_vga.c,v 1.16 2019/05/04 08:30:06 tsutsui Exp $ */ +/* $NetBSD: pci_vga.c,v 1.17 2019/05/04 09:03:08 tsutsui Exp $ */ /* * Copyright (c) 1999 Leo Weppelman. All rights reserved. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.16 2019/05/04 08:30:06 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.17 2019/05/04 09:03:08 tsutsui Exp $"); #include #include @@ -55,8 +55,11 @@ extern font_info font_info_8x8; extern font_info font_info_8x16; /* Console colors */ -static uint8_t conscolors[3][3] = { /* background, foreground, hilite */ - {0x0, 0x0, 0x0}, {0x30, 0x30, 0x30}, { 0x3f, 0x3f, 0x3f} +static const uint8_t conscolors[3][3] = { + /* background, foreground, hilite */ + { 0x00, 0x00, 0x00 }, + { 0x30, 0x30, 0x30 }, + { 0x3f, 0x3f, 0x3f } }; static bus_space_tag_t vga_iot, vga_memt;
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Sat May 4 08:50:39 UTC 2019 Modified Files: src/sys/arch/amd64/amd64: copy.S src/sys/arch/i386/i386: copy.S Log Message: Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas overlap, but doesn't clear it if the copy faults. If this happens, we return to the caller with DF=1, and each future memory copy will be backwards. I wonder if there really are places where kcopy() is called with overlapping areas. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amd64/amd64/copy.S cvs rdiff -u -r1.30 -r1.31 src/sys/arch/i386/i386/copy.S 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/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.32 src/sys/arch/amd64/amd64/copy.S:1.33 --- src/sys/arch/amd64/amd64/copy.S:1.32 Sat Apr 6 20:25:26 2019 +++ src/sys/arch/amd64/amd64/copy.S Sat May 4 08:50:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.32 2019/04/06 20:25:26 thorpej Exp $ */ +/* $NetBSD: copy.S,v 1.33 2019/05/04 08:50:39 maxv Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -242,6 +242,7 @@ ENTRY(copy_efault) END(copy_efault) ENTRY(kcopy_fault) + cld ret END(kcopy_fault) Index: src/sys/arch/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.30 src/sys/arch/i386/i386/copy.S:1.31 --- src/sys/arch/i386/i386/copy.S:1.30 Sat Apr 6 20:25:27 2019 +++ src/sys/arch/i386/i386/copy.S Sat May 4 08:50:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.30 2019/04/06 20:25:27 thorpej Exp $ */ +/* $NetBSD: copy.S,v 1.31 2019/05/04 08:50:39 maxv Exp $ */ /* * Copyright (c) 1998, 2000, 2004, 2008 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.30 2019/04/06 20:25:27 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.31 2019/05/04 08:50:39 maxv Exp $"); #include "assym.h" @@ -309,6 +309,7 @@ END(copy_efault) */ ENTRY(kcopy_fault) + cld popl %edi popl %esi ret
CVS commit: src/sys/arch/atari/pci
Module Name:src Committed By: tsutsui Date: Sat May 4 08:30:06 UTC 2019 Modified Files: src/sys/arch/atari/pci: pci_machdep.c pci_vga.c Log Message: Use proper integer types for PCI configuration registers. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/atari/pci/pci_machdep.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/atari/pci/pci_vga.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/arch/atari/pci/pci_machdep.c diff -u src/sys/arch/atari/pci/pci_machdep.c:1.57 src/sys/arch/atari/pci/pci_machdep.c:1.58 --- src/sys/arch/atari/pci/pci_machdep.c:1.57 Sat May 4 08:20:05 2019 +++ src/sys/arch/atari/pci/pci_machdep.c Sat May 4 08:30:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.57 2019/05/04 08:20:05 tsutsui Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.58 2019/05/04 08:30:06 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.57 2019/05/04 08:20:05 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.58 2019/05/04 08:30:06 tsutsui Exp $"); #include "opt_mbtype.h" @@ -228,7 +228,7 @@ init_pci_bus(void) pcitag_t tag; pcireg_t csr; int device, maxndevs; - int id; + uint32_t id; tag = 0; id= 0; @@ -328,7 +328,7 @@ enable_pci_devices(void) PCI_MEMREG iolist; struct pci_memreg *p, *q; int dev, reg; - int id, class; + uint32_t id, class; pcitag_t tag; pcireg_t csr, address, mask; pci_chipset_tag_t pc; Index: src/sys/arch/atari/pci/pci_vga.c diff -u src/sys/arch/atari/pci/pci_vga.c:1.15 src/sys/arch/atari/pci/pci_vga.c:1.16 --- src/sys/arch/atari/pci/pci_vga.c:1.15 Sat May 4 08:20:05 2019 +++ src/sys/arch/atari/pci/pci_vga.c Sat May 4 08:30:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_vga.c,v 1.15 2019/05/04 08:20:05 tsutsui Exp $ */ +/* $NetBSD: pci_vga.c,v 1.16 2019/05/04 08:30:06 tsutsui Exp $ */ /* * Copyright (c) 1999 Leo Weppelman. All rights reserved. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.15 2019/05/04 08:20:05 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.16 2019/05/04 08:30:06 tsutsui Exp $"); #include #include @@ -76,9 +76,9 @@ check_for_vga(bus_space_tag_t iot, bus_s pci_chipset_tag_t pc = NULL; /* XXX */ bus_space_handle_t ioh_regs, memh_fb; pcitag_t tag; - int device, found, id, maxndevs, i, j; + int device, found, maxndevs, i, j; int got_ioh, got_memh, rv; - int class; + uint32_t id, class; volatile uint8_t *regs; uint8_t *fb; const char *nbd = "NetBSD/Atari";
CVS commit: src/etc/mtree
Module Name:src Committed By: mrg Date: Sat May 4 08:26:51 UTC 2019 Modified Files: src/etc/mtree: special Log Message: capture /etc/route.conf in /var/backups. To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/etc/mtree/special Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/special diff -u src/etc/mtree/special:1.165 src/etc/mtree/special:1.166 --- src/etc/mtree/special:1.165 Fri Mar 29 21:44:22 2019 +++ src/etc/mtree/special Sat May 4 08:26:51 2019 @@ -1,4 +1,4 @@ -# $NetBSD: special,v 1.165 2019/03/29 21:44:22 christos Exp $ +# $NetBSD: special,v 1.166 2019/05/04 08:26:51 mrg Exp $ # @(#)special 8.2 (Berkeley) 1/23/94 # # This file may be overwritten on upgrades. @@ -314,6 +314,7 @@ ./etc/rc.subr type=file mode=0644 ./etc/remote type=file mode=0644 ./etc/resolv.conf type=file mode=0644 optional +./etc/route.conf type=file mode=0644 optional ./etc/rpc type=file mode=0644 ./etc/rtadvd.conf type=file mode=0644 optional ./etc/saslc.d type=dir mode=0755
CVS commit: src/usr.bin/audio/play
Module Name:src Committed By: isaki Date: Sat May 4 08:27:30 UTC 2019 Modified Files: src/usr.bin/audio/play: play.c Log Message: Use err(3)/errx(3) properly to avoid "write failed: Undefined error: 0". To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/usr.bin/audio/play/play.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/play/play.c diff -u src/usr.bin/audio/play/play.c:1.56 src/usr.bin/audio/play/play.c:1.57 --- src/usr.bin/audio/play/play.c:1.56 Fri Nov 16 13:55:17 2018 +++ src/usr.bin/audio/play/play.c Sat May 4 08:27:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: play.c,v 1.56 2018/11/16 13:55:17 mlelstv Exp $ */ +/* $NetBSD: play.c,v 1.57 2019/05/04 08:27:30 isaki Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002, 2010 Matthew R. Green @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: play.c,v 1.56 2018/11/16 13:55:17 mlelstv Exp $"); +__RCSID("$NetBSD: play.c,v 1.57 2019/05/04 08:27:30 isaki Exp $"); #endif @@ -224,6 +224,7 @@ play(char *file) off_t datasize = 0; ssize_t hdrlen; int fd; + int nw; if (file[0] == '-' && file[1] == 0) { play_fd("standard input", STDIN_FILENO); @@ -283,13 +284,19 @@ play(char *file) } while ((uint64_t)datasize > bufsize) { - if ((size_t)write(audiofd, addr, bufsize) != bufsize) + nw = write(audiofd, addr, bufsize); + if (nw == -1) err(1, "write failed"); + if ((size_t)nw != bufsize) + errx(1, "write failed"); addr = (char *)addr + bufsize; datasize -= bufsize; } - if ((off_t)write(audiofd, addr, datasize) != datasize) + nw = write(audiofd, addr, datasize); + if (nw == -1) err(1, "final write failed"); + if ((off_t)nw != datasize) + errx(1, "final write failed"); if (ioctl(audiofd, AUDIO_DRAIN) < 0 && !qflag) warn("audio drain ioctl failed"); @@ -341,8 +348,10 @@ play_fd(const char *file, int fd) if (datasize != 0 && dataout + nr > datasize) nr = datasize - dataout; nw = write(audiofd, buffer, nr); + if (nw == -1) + err(1, "audio device write failed"); if (nw != nr) - goto write_error; + errx(1, "audio device write failed"); dataout += nw; nr = read(fd, buffer, bufsize); if (nr == -1) @@ -356,8 +365,6 @@ play_fd(const char *file, int fd) return; read_error: err(1, "read of standard input failed"); -write_error: - err(1, "audio device write failed"); } /*
CVS commit: src/sys/arch/atari/pci
Module Name:src Committed By: tsutsui Date: Sat May 4 08:20:06 UTC 2019 Modified Files: src/sys/arch/atari/pci: pci_hades.c pci_machdep.c pci_milan.c pci_tseng.c pci_vga.c pci_vga.h pciide_machdep.c Log Message: Misc KNF. No binary changes on HADES and MILAN-PCIIDE kernels. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/atari/pci/pci_hades.c \ src/sys/arch/atari/pci/pci_vga.c cvs rdiff -u -r1.56 -r1.57 src/sys/arch/atari/pci/pci_machdep.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/atari/pci/pci_milan.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/atari/pci/pci_tseng.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/atari/pci/pci_vga.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/pci/pciide_machdep.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/arch/atari/pci/pci_hades.c diff -u src/sys/arch/atari/pci/pci_hades.c:1.14 src/sys/arch/atari/pci/pci_hades.c:1.15 --- src/sys/arch/atari/pci/pci_hades.c:1.14 Fri Oct 2 05:22:50 2015 +++ src/sys/arch/atari/pci/pci_hades.c Sat May 4 08:20:05 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_hades.c,v 1.14 2015/10/02 05:22:50 msaitoh Exp $ */ +/* $NetBSD: pci_hades.c,v 1.15 2019/05/04 08:20:05 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_hades.c,v 1.14 2015/10/02 05:22:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_hades.c,v 1.15 2019/05/04 08:20:05 tsutsui Exp $"); #include #include @@ -58,7 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: pci_hades.c, int pci_bus_maxdevs(pci_chipset_tag_t pc, int busno) { - return (4); + + return 4; } static int pci_config_offset(pcitag_t); @@ -66,35 +67,37 @@ static int pci_config_offset(pcitag_t); /* * Atari_init.c maps the config areas PAGE_SIZE bytes apart */ -static int pci_config_offset(pcitag_t tag) +static int +pci_config_offset(pcitag_t tag) { - int device; + int device; device = (tag >> 11) & 0x1f; - return(device * PAGE_SIZE); + + return device * PAGE_SIZE; } pcireg_t pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg) { - u_long data; + uint32_t data; - if ((unsigned int)reg >= PCI_CONF_SIZE) - return ((pcireg_t) -1); + if ((uint32_t)reg >= PCI_CONF_SIZE) + return 0x; - data = *(u_long *)(pci_conf_addr + pci_config_offset(tag) + reg); - return (bswap32(data)); + data = *(uint32_t *)(pci_conf_addr + pci_config_offset(tag) + reg); + return bswap32(data); } void pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data) { - if ((unsigned int)reg >= PCI_CONF_SIZE) + if ((uint32_t)reg >= PCI_CONF_SIZE) return; - *((u_long *)(pci_conf_addr + pci_config_offset(tag) + reg)) - = bswap32(data); + *((uint32_t *)(pci_conf_addr + pci_config_offset(tag) + reg)) + = bswap32(data); } /* @@ -105,13 +108,13 @@ pci_conf_write(pci_chipset_tag_t pc, pci */ static pci_intr_info_t iinfo[4] = { { -1 }, { -1 }, { -1 }, { -1 } }; -static int iifun(int, int); +static int iifun(int, int); static int iifun(int slot, int sr) { pci_intr_info_t *iinfo_p; - int s; + int s; iinfo_p = [slot]; @@ -125,10 +128,9 @@ iifun(int slot, int sr) * We're running at a too high priority now. */ add_sicallback((si_farg)iifun, (void*)slot, 0); - } - else { + } else { s = splx(iinfo_p->ipl); - (void) (iinfo_p->ifunc)(iinfo_p->iarg); + (void)(iinfo_p->ifunc)(iinfo_p->iarg); splx(s); /* @@ -141,7 +143,7 @@ iifun(int slot, int sr) int pci_intr_setattr(pci_chipset_tag_t pc, pci_intr_handle_t *ih, - int attr, uint64_t data) +int attr, uint64_t data) { switch (attr) { @@ -153,20 +155,21 @@ pci_intr_setattr(pci_chipset_tag_t pc, p } void * -pci_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t ih, int level, int (*ih_fun)(void *), void *ih_arg) +pci_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t ih, int level, +int (*ih_fun)(void *), void *ih_arg) { pci_intr_info_t *iinfo_p; struct intrhand *ihand; - int slot; + int slot; slot= ih; iinfo_p = [slot]; if (iinfo_p->ipl > 0) - panic("pci_intr_establish: interrupt was already established"); + panic("pci_intr_establish: interrupt was already established"); ihand = intr_establish((slot == 3) ? 23 : 16 + slot, USER_VEC, 0, -(hw_ifun_t)iifun, (void *)slot); + (hw_ifun_t)iifun, (void *)slot); if (ihand != NULL) { iinfo_p->ipl = level; iinfo_p->imask = (slot == 3) ? 0x80 : (0x01 << slot); @@ -179,7 +182,7 @@ pci_intr_establish(pci_chipset_tag_t pc, */ MFP2->mf_imrb |= iinfo_p->imask; MFP2->mf_ierb |= iinfo_p->imask; - return(iinfo_p); + return iinfo_p; } return NULL; } @@ -190,11 +193,11 @@ pci_intr_disestablish(pci_chipset_tag_t pci_intr_info_t *iinfo_p = (pci_intr_info_t *)cookie; if (iinfo->ipl < 0) - panic("pci_intr_disestablish: interrupt was not
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Sat May 4 08:04:13 UTC 2019 Modified Files: src/sys/dev/usb: moscom.c u3g.c uark.c ubsa.c ubsa_common.c uchcom.c ucomvar.h uftdi.c ugensa.c uhmodem.c uipaq.c ukyopon.c umct.c umodem.c umodem_common.c uplcom.c uslsa.c uvisor.c uvscom.c Log Message: clean up ucom / ucom-parent interface slightly: - document what the ucom_methods{} callbacks argument are and that they are all optional. - remove almost all methods being assigned to NULL, as they are all C99 initialisers and thus don't need NULL assignments. - ucom_get_status() callback always has lsr/msr pointers as valid. remove all tests for not NULL in these functions. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/moscom.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/usb/u3g.c src/sys/dev/usb/ubsa.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/uark.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/usb/ubsa_common.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/uchcom.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/ucomvar.h cvs rdiff -u -r1.67 -r1.68 src/sys/dev/usb/uftdi.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/usb/ugensa.c src/sys/dev/usb/umct.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/uhmodem.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/uipaq.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/usb/ukyopon.c cvs rdiff -u -r1.69 -r1.70 src/sys/dev/usb/umodem.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/umodem_common.c cvs rdiff -u -r1.80 -r1.81 src/sys/dev/usb/uplcom.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/uslsa.c cvs rdiff -u -r1.48 -r1.49 src/sys/dev/usb/uvisor.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/usb/uvscom.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/usb/moscom.c diff -u src/sys/dev/usb/moscom.c:1.11 src/sys/dev/usb/moscom.c:1.12 --- src/sys/dev/usb/moscom.c:1.11 Mon Jun 26 20:36:01 2017 +++ src/sys/dev/usb/moscom.c Sat May 4 08:04:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: moscom.c,v 1.11 2017/06/26 20:36:01 is Exp $ */ +/* $NetBSD: moscom.c,v 1.12 2019/05/04 08:04:13 mrg Exp $ */ /* $OpenBSD: moscom.c,v 1.11 2007/10/11 18:33:14 deraadt Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.11 2017/06/26 20:36:01 is Exp $"); +__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.12 2019/05/04 08:04:13 mrg Exp $"); #include #include @@ -156,14 +156,10 @@ int moscom_open(void *, int); int moscom_cmd(struct moscom_softc *, int, int); struct ucom_methods moscom_methods = { - .ucom_get_status = NULL, .ucom_set = moscom_set, .ucom_param = moscom_param, - .ucom_ioctl = NULL, .ucom_open = moscom_open, .ucom_close = NULL, - .ucom_read = NULL, - .ucom_write = NULL, }; static const struct usb_devno moscom_devs[] = { Index: src/sys/dev/usb/u3g.c diff -u src/sys/dev/usb/u3g.c:1.35 src/sys/dev/usb/u3g.c:1.36 --- src/sys/dev/usb/u3g.c:1.35 Tue Jul 24 08:15:57 2018 +++ src/sys/dev/usb/u3g.c Sat May 4 08:04:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: u3g.c,v 1.35 2018/07/24 08:15:57 msaitoh Exp $ */ +/* $NetBSD: u3g.c,v 1.36 2019/05/04 08:04:13 mrg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.35 2018/07/24 08:15:57 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.36 2019/05/04 08:04:13 mrg Exp $"); #include #include @@ -166,8 +166,6 @@ static void u3g_write(void *, int, u_cha struct ucom_methods u3g_methods = { .ucom_get_status = u3g_get_status, .ucom_set = u3g_set, - .ucom_param = NULL, - .ucom_ioctl = NULL, .ucom_open = u3g_open, .ucom_close = u3g_close, .ucom_read = u3g_read, @@ -542,10 +540,8 @@ u3g_get_status(void *arg, int portno, u_ { struct u3g_softc *sc = arg; - if (lsr != NULL) - *lsr = 0; /* LSR isn't supported */ - if (msr != NULL) - *msr = sc->sc_com[portno].c_msr; + *lsr = 0; /* LSR isn't supported */ + *msr = sc->sc_com[portno].c_msr; } /*ARGSUSED*/ Index: src/sys/dev/usb/ubsa.c diff -u src/sys/dev/usb/ubsa.c:1.35 src/sys/dev/usb/ubsa.c:1.36 --- src/sys/dev/usb/ubsa.c:1.35 Tue Jan 22 06:47:20 2019 +++ src/sys/dev/usb/ubsa.c Sat May 4 08:04:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ubsa.c,v 1.35 2019/01/22 06:47:20 skrll Exp $ */ +/* $NetBSD: ubsa.c,v 1.36 2019/05/04 08:04:13 mrg Exp $ */ /*- * Copyright (c) 2002, Alexander Kabaev . * All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.35 2019/01/22 06:47:20 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.36 2019/05/04 08:04:13 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -102,11 +102,8 @@ struct ucom_methods ubsa_methods = { .ucom_get_status = ubsa_get_status, .ucom_set = ubsa_set, .ucom_param = ubsa_param, - .ucom_ioctl = NULL, .ucom_open = ubsa_open, .ucom_close = ubsa_close, - .ucom_read = NULL, - .ucom_write = NULL }; Static const struct
CVS commit: [isaki-audio2] src/sys/dev/audio
Module Name:src Committed By: isaki Date: Sat May 4 07:41:50 UTC 2019 Modified Files: src/sys/dev/audio [isaki-audio2]: audio.c Log Message: Improve comments. To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/dev/audio/audio.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/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.1.2.7 src/sys/dev/audio/audio.c:1.1.2.8 --- src/sys/dev/audio/audio.c:1.1.2.7 Sat May 4 07:20:09 2019 +++ src/sys/dev/audio/audio.c Sat May 4 07:41:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.1.2.7 2019/05/04 07:20:09 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.1.2.8 2019/05/04 07:41:50 isaki Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -128,7 +128,7 @@ * get_locks - - Called at attach time * * *1 Note: Before 8.0, since these have been called only at attach time, - * neither lock were necessary. In AUDIO2, on the other hand, since + * neither lock were necessary. Currently, on the other hand, since * these may be also called after attach, the thread lock is required. * * In addition, there are two additional locks. @@ -149,7 +149,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.1.2.7 2019/05/04 07:20:09 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.1.2.8 2019/05/04 07:41:50 isaki Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -6512,10 +6512,9 @@ audio_mixers_get_format(struct audio_sof * * ai.mode(R/W) * It specifies the playback or recording mode, AUMODE_*. - * In AUDIO2, A mode change operation by ai.mode after opening is - * prohibited. - * In AUDIO2, AUMODE_PLAY_ALL no longer makes sense. However, it's - * possible to get or to set for backward compatibility. + * Currently, a mode change operation by ai.mode after opening is + * prohibited. In addition, AUMODE_PLAY_ALL no longer makes sense. + * However, it's possible to get or to set for backward compatibility. * * ai.{hiwat,lowat} (R/W) * These specify the high water mark and low water mark for playback @@ -6573,8 +6572,7 @@ audio_mixers_get_format(struct audio_sof * * ai.blocksize(R/-) * It indicates the block size in bytes. - * XXX In AUDIO2, the blocksize of playback and recording may be - * different. + * XXX The blocksize of playback and recording may be different. */ /*
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Sat May 4 07:28:18 UTC 2019 Modified Files: src/doc: 3RDPARTY Log Message: gcc-9.1 is out. To generate a diff of this commit: cvs rdiff -u -r1.1616 -r1.1617 src/doc/3RDPARTY 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.1616 src/doc/3RDPARTY:1.1617 --- src/doc/3RDPARTY:1.1616 Mon Apr 29 01:18:58 2019 +++ src/doc/3RDPARTY Sat May 4 07:28:18 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1616 2019/04/29 01:18:58 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1617 2019/05/04 07:28:18 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -439,7 +439,7 @@ There is a flex2netbsd script to help ne Package: gcc Version: 6.5 -Current Vers: 6.5/7.4/8.2 +Current Vers: 6.5/7.4/8.2/9.1 Maintainer: FSF Archive Site: ftp://ftp.gnu.org/gnu/gcc/ Home Page: http://www.gnu.org/software/gcc/
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Sat May 4 07:20:22 UTC 2019 Modified Files: src/sys/arch/amd64/amd64: cpufunc.S src/sys/arch/i386/i386: cpufunc.S i386func.S src/sys/arch/x86/include: cpufunc.h src/sys/arch/xen/x86: xenfunc.c Log Message: More inlined ASM. While here switch to proper types. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/amd64/amd64/cpufunc.S cvs rdiff -u -r1.30 -r1.31 src/sys/arch/i386/i386/cpufunc.S cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/i386/i386func.S cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x86/include/cpufunc.h cvs rdiff -u -r1.24 -r1.25 src/sys/arch/xen/x86/xenfunc.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/arch/amd64/amd64/cpufunc.S diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.38 src/sys/arch/amd64/amd64/cpufunc.S:1.39 --- src/sys/arch/amd64/amd64/cpufunc.S:1.38 Wed May 1 15:17:49 2019 +++ src/sys/arch/amd64/amd64/cpufunc.S Sat May 4 07:20:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.S,v 1.38 2019/05/01 15:17:49 maxv Exp $ */ +/* $NetBSD: cpufunc.S,v 1.39 2019/05/04 07:20:22 maxv Exp $ */ /* * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -88,58 +88,8 @@ ENTRY(ltr) ltr %di ret END(ltr) - -ENTRY(lcr0) - movq %rdi, %cr0 - ret -END(lcr0) - -ENTRY(rcr0) - movq %cr0, %rax - ret -END(rcr0) - -ENTRY(lcr2) - movq %rdi, %cr2 - ret -END(lcr2) - -ENTRY(rcr2) - movq %cr2, %rax - ret -END(rcr2) - -ENTRY(lcr3) - movq %rdi, %cr3 - ret -END(lcr3) - -ENTRY(rcr3) - movq %cr3, %rax - ret -END(rcr3) #endif -ENTRY(lcr4) - movq %rdi, %cr4 - ret -END(lcr4) - -ENTRY(rcr4) - movq %cr4, %rax - ret -END(rcr4) - -ENTRY(lcr8) - movq %rdi, %cr8 - ret -END(lcr8) - -ENTRY(rcr8) - movq %cr8, %rax - ret -END(rcr8) - /* * Big hammer: flush all TLB entries, including ones from PTE's * with the G bit set. This should only be necessary if TLB @@ -177,76 +127,6 @@ ENTRY(tlbflush) ret END(tlbflush) -ENTRY(ldr0) - movq %rdi, %dr0 - ret -END(ldr0) - -ENTRY(rdr0) - movq %dr0, %rax - ret -END(rdr0) - -ENTRY(ldr1) - movq %rdi, %dr1 - ret -END(ldr1) - -ENTRY(rdr1) - movq %dr1, %rax - ret -END(rdr1) - -ENTRY(ldr2) - movq %rdi, %dr2 - ret -END(ldr2) - -ENTRY(rdr2) - movq %dr2, %rax - ret -END(rdr2) - -ENTRY(ldr3) - movq %rdi, %dr3 - ret -END(ldr3) - -ENTRY(rdr3) - movq %dr3, %rax - ret -END(rdr3) - -ENTRY(ldr6) - movq %rdi, %dr6 - ret -END(ldr6) - -ENTRY(rdr6) - movq %dr6, %rax - ret -END(rdr6) - -ENTRY(ldr7) - movq %rdi, %dr7 - ret -END(ldr7) - -ENTRY(rdr7) - movq %dr7, %rax - ret -END(rdr7) - -ENTRY(x86_disable_intr) - cli - ret -END(x86_disable_intr) - -ENTRY(x86_enable_intr) - sti - ret -END(x86_enable_intr) - ENTRY(x86_read_flags) pushfq popq %rax @@ -469,21 +349,6 @@ ENTRY(x86_cpuid2) ret END(x86_cpuid2) -ENTRY(x86_getss) - movl %ss, %eax - ret -END(x86_getss) - -ENTRY(fnclex) - fnclex - ret -END(fnclex) - -ENTRY(fninit) - fninit - ret -END(fninit) - ENTRY(fnsave) fnsave (%rdi) ret @@ -664,21 +529,6 @@ ENTRY(outsl) ret END(outsl) -ENTRY(setds) - movw %di, %ds - ret -END(setds) - -ENTRY(setes) - movw %di, %es - ret -END(setes) - -ENTRY(setfs) - movw %di, %fs - ret -END(setfs) - #ifndef XENPV ENTRY(setusergs) CLI(ax) Index: src/sys/arch/i386/i386/cpufunc.S diff -u src/sys/arch/i386/i386/cpufunc.S:1.30 src/sys/arch/i386/i386/cpufunc.S:1.31 --- src/sys/arch/i386/i386/cpufunc.S:1.30 Wed May 1 15:17:49 2019 +++ src/sys/arch/i386/i386/cpufunc.S Sat May 4 07:20:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.S,v 1.30 2019/05/01 15:17:49 maxv Exp $ */ +/* $NetBSD: cpufunc.S,v 1.31 2019/05/04 07:20:22 maxv Exp $ */ /*- * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.S,v 1.30 2019/05/01 15:17:49 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.S,v 1.31 2019/05/04 07:20:22 maxv Exp $"); #include "opt_xen.h" @@ -73,22 +73,6 @@ ENTRY(lidt) END(lidt) #endif /* XENPV */ -ENTRY(rcr3) - movl %cr3, %eax - ret -END(rcr3) - -ENTRY(lcr4) - movl 4(%esp), %eax - movl %eax, %cr4 - ret -END(lcr4) - -ENTRY(rcr4) - movl %cr4, %eax - ret -END(rcr4) - ENTRY(x86_read_flags) pushfl popl %eax @@ -276,21 +260,6 @@ ENTRY(x86_cpuid2) ret END(x86_cpuid2) -ENTRY(x86_getss) - movl %ss, %eax - ret -END(x86_getss) - -ENTRY(fnclex) - fnclex - ret -END(fnclex) - -ENTRY(fninit) - fninit - ret -END(fninit) - ENTRY(fnsave) movl 4(%esp), %eax fnsave (%eax) Index: src/sys/arch/i386/i386/i386func.S diff -u src/sys/arch/i386/i386/i386func.S:1.20 src/sys/arch/i386/i386/i386func.S:1.21 --- src/sys/arch/i386/i386/i386func.S:1.20 Sun Jan 6 14:35:31 2019 +++ src/sys/arch/i386/i386/i386func.S Sat May 4 07:20:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i386func.S,v 1.20 2019/01/06 14:35:31 cherry Exp $ */ +/* $NetBSD: i386func.S,v 1.21 2019/05/04 07:20:22 maxv Exp $ */ /*- * Copyright (c) 1998, 2007,
CVS commit: [isaki-audio2] src/sys
Module Name:src Committed By: isaki Date: Sat May 4 07:20:11 UTC 2019 Modified Files: src/sys/arch/amiga/dev [isaki-audio2]: aucc.c repulse.c toccata.c src/sys/arch/arm/broadcom [isaki-audio2]: bcm2835_vcaudio.c src/sys/arch/arm/imx [isaki-audio2]: imx23_digfilt.c src/sys/arch/arm/iomd [isaki-audio2]: vidcaudio.c src/sys/arch/arm/sunxi [isaki-audio2]: sun4i_a10_codec.c sun6i_a31_codec.c sun8i_h3_codec.c sunxi_codec.c sunxi_codec.h sunxi_i2s.c src/sys/arch/arm/xscale [isaki-audio2]: pxa2x0_ac97.c src/sys/arch/dreamcast/dev/g2 [isaki-audio2]: aica.c src/sys/arch/evbarm/mini2440 [isaki-audio2]: audio_mini2440.c src/sys/arch/hp300/dev [isaki-audio2]: arcofi_dio.c src/sys/arch/hpcmips/vr [isaki-audio2]: vraiu.c src/sys/arch/hppa/gsc [isaki-audio2]: harmony.c src/sys/arch/i386/pnpbios [isaki-audio2]: ess_pnpbios.c sb_pnpbios.c wss_pnpbios.c ym_pnpbios.c src/sys/arch/macppc/dev [isaki-audio2]: awacs.c snapper.c src/sys/arch/prep/isa [isaki-audio2]: paud_isa.c src/sys/arch/sgimips/hpc [isaki-audio2]: haltwo.c src/sys/arch/sgimips/mace [isaki-audio2]: mavb.c src/sys/arch/sparc/dev [isaki-audio2]: audioamd.c src/sys/arch/usermode/dev [isaki-audio2]: vaudio.c src/sys/arch/vax/vsa [isaki-audio2]: vsaudio.c src/sys/arch/x68k/dev [isaki-audio2]: vs.c src/sys/arch/zaurus/dev [isaki-audio2]: wm8731_zaudio.c wm8750_zaudio.c zaudio.c src/sys/dev [isaki-audio2]: midi.c midisyn.c spkr_audio.c src/sys/dev/acpi [isaki-audio2]: wss_acpi.c ym_acpi.c src/sys/dev/audio [isaki-audio2]: audio.c audio_dai.h audiobell.c audiovar.h linear.h mulaw.h src/sys/dev/bluetooth [isaki-audio2]: btsco.c src/sys/dev/ebus [isaki-audio2]: cs4231_ebus.c src/sys/dev/fdt [isaki-audio2]: ausoc.c src/sys/dev/hdaudio [isaki-audio2]: hdafg.c hdaudiovar.h src/sys/dev/ic [isaki-audio2]: ac97.c ad1848.c am7930.c arcofi.c cs4231.c interwave.c msm6258.c opl.c pl041.c tms320av110.c uda1341.c src/sys/dev/isa [isaki-audio2]: ad1848_isa.c aria.c cms.c ess.c gus.c ics2101.c joy_ess.c midi_pcppi.c mpu_sb.c mpu_ym.c opl_ess.c opl_isa.c opl_sb.c opl_wss.c opl_ym.c pas.c sb.c sb_isa.c sbdsp.c wss.c wss_isa.c ym.c src/sys/dev/isapnp [isaki-audio2]: ess_isapnp.c gus_isapnp.c mpu_isapnp.c sb_isapnp.c wss_isapnp.c ym_isapnp.c src/sys/dev/ofisa [isaki-audio2]: ess_ofisa.c sb_ofisa.c src/sys/dev/pad [isaki-audio2]: pad.c src/sys/dev/pci [isaki-audio2]: auacer.c auich.c auixp.c autri.c auvia.c azalia.c cmpci.c cs4280.c cs4281.c cs428x.c eap.c emuxki.c esa.c esm.c eso.c fms.c gcscaudio.c joy_eap.c joy_eso.c mpu_cmpci.c mpu_eso.c mpu_fms.c mpu_yds.c neo.c opl_cmpci.c opl_eso.c opl_fms.c opl_sv.c opl_yds.c sv.c yds.c src/sys/dev/sbus [isaki-audio2]: cs4231_sbus.c dbri.c src/sys/dev/tc [isaki-audio2]: bba.c src/sys/dev/usb [isaki-audio2]: uaudio.c src/sys/rump/dev/lib/libaudio [isaki-audio2]: audio_component.c Added Files: src/sys/dev/audio [isaki-audio2]: audio_if.h Removed Files: src/sys/dev [isaki-audio2]: audio_if.h Log Message: Move dev/audio_if.h -> dev/audio/audio_if.h To generate a diff of this commit: cvs rdiff -u -r1.44.2.2 -r1.44.2.3 src/sys/arch/amiga/dev/aucc.c cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/arch/amiga/dev/repulse.c cvs rdiff -u -r1.18.2.2 -r1.18.2.3 src/sys/arch/amiga/dev/toccata.c cvs rdiff -u -r1.13.2.1 -r1.13.2.2 \ src/sys/arch/arm/broadcom/bcm2835_vcaudio.c cvs rdiff -u -r1.1.24.2 -r1.1.24.3 src/sys/arch/arm/imx/imx23_digfilt.c cvs rdiff -u -r1.57.2.2 -r1.57.2.3 src/sys/arch/arm/iomd/vidcaudio.c cvs rdiff -u -r1.2 -r1.2.8.1 src/sys/arch/arm/sunxi/sun4i_a10_codec.c cvs rdiff -u -r1.1 -r1.1.8.1 src/sys/arch/arm/sunxi/sun6i_a31_codec.c cvs rdiff -u -r1.3 -r1.3.6.1 src/sys/arch/arm/sunxi/sun8i_h3_codec.c cvs rdiff -u -r1.5.4.1 -r1.5.4.2 src/sys/arch/arm/sunxi/sunxi_codec.c cvs rdiff -u -r1.4.8.2 -r1.4.8.3 src/sys/arch/arm/sunxi/sunxi_codec.h cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/sys/arch/arm/sunxi/sunxi_i2s.c cvs rdiff -u -r1.15.2.3 -r1.15.2.4 src/sys/arch/arm/xscale/pxa2x0_ac97.c cvs rdiff -u -r1.25.2.2 -r1.25.2.3 src/sys/arch/dreamcast/dev/g2/aica.c cvs rdiff -u -r1.2.2.3 -r1.2.2.4 \ src/sys/arch/evbarm/mini2440/audio_mini2440.c cvs rdiff -u -r1.1.26.1 -r1.1.26.2 src/sys/arch/hp300/dev/arcofi_dio.c cvs rdiff -u -r1.16.2.2 -r1.16.2.3 src/sys/arch/hpcmips/vr/vraiu.c cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/hppa/gsc/harmony.c cvs rdiff -u -r1.22.56.1 -r1.22.56.2 src/sys/arch/i386/pnpbios/ess_pnpbios.c cvs rdiff -u -r1.17.20.1 -r1.17.20.2 src/sys/arch/i386/pnpbios/sb_pnpbios.c cvs rdiff -u -r1.21 -r1.21.20.1
CVS commit: [isaki-audio2] src/sys
Module Name:src Committed By: isaki Date: Sat May 4 06:35:16 UTC 2019 Modified Files: src/sys/arch/arm/sunxi [isaki-audio2]: sun50i_a64_acodec.c sun8i_codec.c src/sys/dev/fdt [isaki-audio2]: ausoc.c fdtvar.h Added Files: src/sys/dev/audio [isaki-audio2]: audio_dai.h Removed Files: src/sys/dev [isaki-audio2]: audio_dai.h Log Message: Move dev/audio_dai.h -> dev/audio/audio_dai.h To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.6.1 src/sys/arch/arm/sunxi/sun50i_a64_acodec.c cvs rdiff -u -r1.5.6.1 -r1.5.6.2 src/sys/arch/arm/sunxi/sun8i_codec.c cvs rdiff -u -r1.4.2.2 -r0 src/sys/dev/audio_dai.h cvs rdiff -u -r0 -r1.1.2.1 src/sys/dev/audio/audio_dai.h cvs rdiff -u -r1.3.8.2 -r1.3.8.3 src/sys/dev/fdt/ausoc.c cvs rdiff -u -r1.50 -r1.50.2.1 src/sys/dev/fdt/fdtvar.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/sunxi/sun50i_a64_acodec.c diff -u src/sys/arch/arm/sunxi/sun50i_a64_acodec.c:1.8 src/sys/arch/arm/sunxi/sun50i_a64_acodec.c:1.8.6.1 --- src/sys/arch/arm/sunxi/sun50i_a64_acodec.c:1.8 Wed May 16 10:23:43 2018 +++ src/sys/arch/arm/sunxi/sun50i_a64_acodec.c Sat May 4 06:35:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sun50i_a64_acodec.c,v 1.8 2018/05/16 10:23:43 jmcneill Exp $ */ +/* $NetBSD: sun50i_a64_acodec.c,v 1.8.6.1 2019/05/04 06:35:15 isaki Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sun50i_a64_acodec.c,v 1.8 2018/05/16 10:23:43 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sun50i_a64_acodec.c,v 1.8.6.1 2019/05/04 06:35:15 isaki Exp $"); #include #include @@ -36,7 +36,7 @@ __KERNEL_RCSID(0, "$NetBSD: sun50i_a64_a #include #include -#include +#include #include Index: src/sys/arch/arm/sunxi/sun8i_codec.c diff -u src/sys/arch/arm/sunxi/sun8i_codec.c:1.5.6.1 src/sys/arch/arm/sunxi/sun8i_codec.c:1.5.6.2 --- src/sys/arch/arm/sunxi/sun8i_codec.c:1.5.6.1 Sat Apr 27 10:17:59 2019 +++ src/sys/arch/arm/sunxi/sun8i_codec.c Sat May 4 06:35:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sun8i_codec.c,v 1.5.6.1 2019/04/27 10:17:59 isaki Exp $ */ +/* $NetBSD: sun8i_codec.c,v 1.5.6.2 2019/05/04 06:35:15 isaki Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sun8i_codec.c,v 1.5.6.1 2019/04/27 10:17:59 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sun8i_codec.c,v 1.5.6.2 2019/05/04 06:35:15 isaki Exp $"); #include #include @@ -38,7 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: sun8i_codec. #include #include -#include +#include #include Index: src/sys/dev/fdt/ausoc.c diff -u src/sys/dev/fdt/ausoc.c:1.3.8.2 src/sys/dev/fdt/ausoc.c:1.3.8.3 --- src/sys/dev/fdt/ausoc.c:1.3.8.2 Sat May 4 04:13:24 2019 +++ src/sys/dev/fdt/ausoc.c Sat May 4 06:35:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ausoc.c,v 1.3.8.2 2019/05/04 04:13:24 isaki Exp $ */ +/* $NetBSD: ausoc.c,v 1.3.8.3 2019/05/04 06:35:16 isaki Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ausoc.c,v 1.3.8.2 2019/05/04 04:13:24 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ausoc.c,v 1.3.8.3 2019/05/04 06:35:16 isaki Exp $"); #include #include @@ -38,7 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: ausoc.c,v 1. #include #include -#include +#include #include Index: src/sys/dev/fdt/fdtvar.h diff -u src/sys/dev/fdt/fdtvar.h:1.50 src/sys/dev/fdt/fdtvar.h:1.50.2.1 --- src/sys/dev/fdt/fdtvar.h:1.50 Wed Feb 27 17:01:57 2019 +++ src/sys/dev/fdt/fdtvar.h Sat May 4 06:35:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fdtvar.h,v 1.50 2019/02/27 17:01:57 jakllsch Exp $ */ +/* $NetBSD: fdtvar.h,v 1.50.2.1 2019/05/04 06:35:16 isaki Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -42,7 +42,7 @@ #include "audio.h" #endif #if NAUDIO > 0 -#include +#include #else typedef void *audio_dai_tag_t; #endif Added files: Index: src/sys/dev/audio/audio_dai.h diff -u /dev/null src/sys/dev/audio/audio_dai.h:1.1.2.1 --- /dev/null Sat May 4 06:35:16 2019 +++ src/sys/dev/audio/audio_dai.h Sat May 4 06:35:16 2019 @@ -0,0 +1,291 @@ +/* $NetBSD: audio_dai.h,v 1.1.2.1 2019/05/04 06:35:16 isaki Exp $ */ + +/*- + * Copyright (c) 2018 Jared McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES,
CVS commit: [isaki-audio2] src/sys
Module Name:src Committed By: isaki Date: Sat May 4 06:13:47 UTC 2019 Modified Files: src/sys/arch/arm/iomd [isaki-audio2]: vidcaudio.c src/sys/dev [isaki-audio2]: files.audio spkr_audio.c Added Files: src/sys/dev/audio [isaki-audio2]: audiobell.c audiobellvar.h Removed Files: src/sys/dev [isaki-audio2]: audiobell.c audiobellvar.h Log Message: Move dev/audiobell* -> dev/audio/audiobell*. To generate a diff of this commit: cvs rdiff -u -r1.57.2.1 -r1.57.2.2 src/sys/arch/arm/iomd/vidcaudio.c cvs rdiff -u -r1.26.2.1 -r0 src/sys/dev/audiobell.c cvs rdiff -u -r1.9 -r0 src/sys/dev/audiobellvar.h cvs rdiff -u -r1.11.16.2 -r1.11.16.3 src/sys/dev/files.audio cvs rdiff -u -r1.6.12.1 -r1.6.12.2 src/sys/dev/spkr_audio.c cvs rdiff -u -r0 -r1.1.2.1 src/sys/dev/audio/audiobell.c \ src/sys/dev/audio/audiobellvar.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/iomd/vidcaudio.c diff -u src/sys/arch/arm/iomd/vidcaudio.c:1.57.2.1 src/sys/arch/arm/iomd/vidcaudio.c:1.57.2.2 --- src/sys/arch/arm/iomd/vidcaudio.c:1.57.2.1 Sun Apr 21 09:12:34 2019 +++ src/sys/arch/arm/iomd/vidcaudio.c Sat May 4 06:13:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vidcaudio.c,v 1.57.2.1 2019/04/21 09:12:34 isaki Exp $ */ +/* $NetBSD: vidcaudio.c,v 1.57.2.2 2019/05/04 06:13:46 isaki Exp $ */ /* * Copyright (c) 1995 Melvin Tang-Richardson @@ -65,7 +65,7 @@ #include /* proc.h */ -__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.57.2.1 2019/04/21 09:12:34 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.57.2.2 2019/05/04 06:13:46 isaki Exp $"); #include #include/* autoconfig functions */ @@ -78,7 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: vidcaudio.c, #include #include -#include +#include #include #include Index: src/sys/dev/files.audio diff -u src/sys/dev/files.audio:1.11.16.2 src/sys/dev/files.audio:1.11.16.3 --- src/sys/dev/files.audio:1.11.16.2 Fri May 3 05:43:46 2019 +++ src/sys/dev/files.audio Sat May 4 06:13:46 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.audio,v 1.11.16.2 2019/05/03 05:43:46 isaki Exp $ +# $NetBSD: files.audio,v 1.11.16.3 2019/05/04 06:13:46 isaki Exp $ define audiobus { } define midibus { } @@ -19,7 +19,7 @@ define audiobell file dev/audio/alaw.c audio file dev/audio/linear.c audio file dev/audio/audio.c audio needs-flag -file dev/audiobell.c spkr_audio needs-flag +file dev/audio/audiobell.c spkr_audio needs-flag file dev/audio/mulaw.c audio file dev/midi.c midi needs-flag file dev/midictl.c midisyn Index: src/sys/dev/spkr_audio.c diff -u src/sys/dev/spkr_audio.c:1.6.12.1 src/sys/dev/spkr_audio.c:1.6.12.2 --- src/sys/dev/spkr_audio.c:1.6.12.1 Fri May 3 06:19:42 2019 +++ src/sys/dev/spkr_audio.c Sat May 4 06:13:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: spkr_audio.c,v 1.6.12.1 2019/05/03 06:19:42 isaki Exp $ */ +/* $NetBSD: spkr_audio.c,v 1.6.12.2 2019/05/04 06:13:46 isaki Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spkr_audio.c,v 1.6.12.1 2019/05/03 06:19:42 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spkr_audio.c,v 1.6.12.2 2019/05/04 06:13:46 isaki Exp $"); #include #include @@ -42,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: spkr_audio.c #include #include -#include +#include #include #include Added files: Index: src/sys/dev/audio/audiobell.c diff -u /dev/null src/sys/dev/audio/audiobell.c:1.1.2.1 --- /dev/null Sat May 4 06:13:47 2019 +++ src/sys/dev/audio/audiobell.c Sat May 4 06:13:47 2019 @@ -0,0 +1,149 @@ +/* $NetBSD: audiobell.c,v 1.1.2.1 2019/05/04 06:13:47 isaki Exp $ */ + +/* + * Copyright (c) 1999 Richard Earnshaw + * Copyright (c) 2004 Ben Harris + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + *must display the following acknowledgement: + * This product includes software developed by the RiscBSD team. + * 4. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL,