Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys Pull up following revision(s) (requested by msaitoh i...



details:   https://anonhg.NetBSD.org/src/rev/4fe72753cbda
branches:  netbsd-8
changeset: 461068:4fe72753cbda
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Nov 14 16:04:31 2019 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #1439):

        sys/dev/sbus/sio16.c: revision 1.25
        sys/dev/gpib/mt.c: revision 1.33
        sys/arch/mvme68k/dev/wdsc.c: revision 1.33
        sys/dev/gpib/ct.c: revision 1.31
        sys/dev/isa/mcd.c: revision 1.119
        sys/dev/pci/if_stge.c: revision 1.73
        sys/dev/gpib/ppi.c: revision 1.25
        sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
        sys/arch/amiga/dev/zssc.c: revision 1.46
        sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
        sys/arch/amiga/dev/if_qn.c: revision 1.48
        sys/dev/isa/tcic2_isa.c: revision 1.28
        sys/dev/isa/uha_isa.c: revision 1.42
        sys/dev/pci/neo.c: revision 1.55
        sys/arch/next68k/dev/nextdisplay.c: revision 1.22
        sys/dev/isa/if_iy.c: revision 1.111

 Add missing initialization of sc_dev.


 Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.


 Add missing initialization of sc_dev.

diffstat:

 sys/arch/amiga/dev/if_qn.c         |  5 +++--
 sys/arch/amiga/dev/zssc.c          |  8 ++++----
 sys/arch/mac68k/obio/iwm_fd.c      |  5 +++--
 sys/arch/mvme68k/dev/wdsc.c        |  5 +++--
 sys/arch/next68k/dev/nextdisplay.c |  6 ++++--
 sys/dev/gpib/ct.c                  |  5 +++--
 sys/dev/gpib/mt.c                  |  5 +++--
 sys/dev/gpib/ppi.c                 |  5 +++--
 sys/dev/isa/if_iy.c                |  5 +++--
 sys/dev/isa/mcd.c                  |  5 +++--
 sys/dev/isa/tcic2_isa.c            |  5 +++--
 sys/dev/isa/uha_isa.c              |  6 +++---
 sys/dev/pci/if_stge.c              |  5 +++--
 sys/dev/pci/neo.c                  |  5 +++--
 sys/dev/pcmcia/if_tr_pcmcia.c      |  5 +++--
 sys/dev/sbus/sio16.c               |  5 +++--
 16 files changed, 50 insertions(+), 35 deletions(-)

diffs (truncated from 435 to 300 lines):

diff -r b8a699d92e3b -r 4fe72753cbda sys/arch/amiga/dev/if_qn.c
--- a/sys/arch/amiga/dev/if_qn.c        Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/arch/amiga/dev/if_qn.c        Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_qn.c,v 1.44.6.1 2018/07/26 23:55:28 snj Exp $ */
+/*     $NetBSD: if_qn.c,v 1.44.6.2 2019/11/14 16:04:32 martin Exp $ */
 
 /*
  * Copyright (c) 1995 Mika Kortelainen
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.44.6.1 2018/07/26 23:55:28 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.44.6.2 2019/11/14 16:04:32 martin Exp $");
 
 #include "qn.h"
 #if NQN > 0
@@ -195,6 +195,7 @@
        struct ifnet *ifp = &sc->sc_ethercom.ec_if;
        u_int8_t myaddr[ETHER_ADDR_LEN];
 
+       sc->sc_dev = self;
        zap = (struct zbus_args *)aux;
 
        sc->sc_base = zap->va;
diff -r b8a699d92e3b -r 4fe72753cbda sys/arch/amiga/dev/zssc.c
--- a/sys/arch/amiga/dev/zssc.c Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/arch/amiga/dev/zssc.c Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zssc.c,v 1.45 2012/10/27 17:17:32 chs Exp $ */
+/*     $NetBSD: zssc.c,v 1.45.30.1 2019/11/14 16:04:32 martin Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zssc.c,v 1.45 2012/10/27 17:17:32 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zssc.c,v 1.45.30.1 2019/11/14 16:04:32 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -103,15 +103,15 @@
 void
 zsscattach(device_t parent, device_t self, void *aux)
 {
-       struct siop_softc *sc;
+       struct siop_softc *sc = device_private(self);
        struct zbus_args *zap;
        siop_regmap_p rp;
 
        printf("\n");
 
+       sc->sc_dev = self;
        zap = aux;
 
-       sc = device_private(self);
        sc->sc_siopp = rp = (siop_regmap_p)((char *)zap->va + 0x4000);
 
        /*
diff -r b8a699d92e3b -r 4fe72753cbda sys/arch/mac68k/obio/iwm_fd.c
--- a/sys/arch/mac68k/obio/iwm_fd.c     Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/arch/mac68k/obio/iwm_fd.c     Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iwm_fd.c,v 1.56 2015/04/26 15:15:19 mlelstv Exp $      */
+/*     $NetBSD: iwm_fd.c,v 1.56.10.1 2019/11/14 16:04:32 martin Exp $  */
 
 /*
  * Copyright (c) 1997, 1998 Hauke Fath.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.56 2015/04/26 15:15:19 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.56.10.1 2019/11/14 16:04:32 martin Exp $");
 
 #include "locators.h"
 
@@ -441,6 +441,7 @@
 
        iwm = device_private(parent);
        fd = device_private(self);
+       fd->sc_dev = self;
        ia = aux;
 
        driveInfo = iwmCheckDrive(ia->unit);
diff -r b8a699d92e3b -r 4fe72753cbda sys/arch/mvme68k/dev/wdsc.c
--- a/sys/arch/mvme68k/dev/wdsc.c       Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/arch/mvme68k/dev/wdsc.c       Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdsc.c,v 1.32 2012/10/27 17:18:04 chs Exp $    */
+/*     $NetBSD: wdsc.c,v 1.32.30.1 2019/11/14 16:04:31 martin Exp $    */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.32 2012/10/27 17:18:04 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.32.30.1 2019/11/14 16:04:31 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -125,6 +125,7 @@
        static struct evcnt evcnt;      /* XXXSCW: Temporary hack */
 
        sc = device_private(self);
+       sc->sc_dev = self;
        pa = aux;
 
        bus_space_map(pa->pa_bust, pa->pa_offset, 0x20, 0, &bush);
diff -r b8a699d92e3b -r 4fe72753cbda sys/arch/next68k/dev/nextdisplay.c
--- a/sys/arch/next68k/dev/nextdisplay.c        Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/arch/next68k/dev/nextdisplay.c        Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nextdisplay.c,v 1.21 2012/10/27 17:18:05 chs Exp $ */
+/* $NetBSD: nextdisplay.c,v 1.21.30.1 2019/11/14 16:04:32 martin Exp $ */
 
 /*
  * Copyright (c) 1998 Matt DeBergalis
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nextdisplay.c,v 1.21 2012/10/27 17:18:05 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nextdisplay.c,v 1.21.30.1 2019/11/14 16:04:32 martin Exp $");
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
@@ -234,6 +234,8 @@
        int iscolor;
        paddr_t addr;
 
+       sc->sc_dev = self;
+
        if (rom_machine_type == NeXT_WARP9C ||
            rom_machine_type == NeXT_TURBO_COLOR) {
                iscolor = 1;
diff -r b8a699d92e3b -r 4fe72753cbda sys/dev/gpib/ct.c
--- a/sys/dev/gpib/ct.c Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/dev/gpib/ct.c Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ct.c,v 1.28 2016/07/11 11:31:50 msaitoh Exp $ */
+/*     $NetBSD: ct.c,v 1.28.10.1 2019/11/14 16:04:31 martin Exp $ */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.28 2016/07/11 11:31:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.28.10.1 2019/11/14 16:04:31 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -260,6 +260,7 @@
        char name[7];
        int type, i, n, canstream = 0;
 
+       sc->sc_dev = self;
        sc->sc_ic = ca->ca_ic;
        sc->sc_slave = ca->ca_slave;
        sc->sc_punit = ca->ca_punit;
diff -r b8a699d92e3b -r 4fe72753cbda sys/dev/gpib/mt.c
--- a/sys/dev/gpib/mt.c Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/dev/gpib/mt.c Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mt.c,v 1.30 2016/07/14 04:00:45 msaitoh Exp $ */
+/*     $NetBSD: mt.c,v 1.30.10.1 2019/11/14 16:04:31 martin Exp $ */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.30 2016/07/14 04:00:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.30.10.1 2019/11/14 16:04:31 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -230,6 +230,7 @@
        struct cs80bus_attach_args *ca = aux;
        int type;
 
+       sc->sc_dev = self;
        sc->sc_ic = ca->ca_ic;
        sc->sc_slave = ca->ca_slave;
 
diff -r b8a699d92e3b -r 4fe72753cbda sys/dev/gpib/ppi.c
--- a/sys/dev/gpib/ppi.c        Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/dev/gpib/ppi.c        Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ppi.c,v 1.22 2014/07/25 08:10:36 dholland Exp $        */
+/*     $NetBSD: ppi.c,v 1.22.20.1 2019/11/14 16:04:31 martin Exp $     */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.22 2014/07/25 08:10:36 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.22.20.1 2019/11/14 16:04:31 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -167,6 +167,7 @@
 
        printf("\n");
 
+       sc->sc_dev = self;
        sc->sc_ic = ga->ga_ic;
        sc->sc_address = ga->ga_address;
 
diff -r b8a699d92e3b -r 4fe72753cbda sys/dev/isa/if_iy.c
--- a/sys/dev/isa/if_iy.c       Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/dev/isa/if_iy.c       Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iy.c,v 1.100.6.1 2018/07/26 23:55:30 snj Exp $      */
+/*     $NetBSD: if_iy.c,v 1.100.6.2 2019/11/14 16:04:31 martin Exp $   */
 /* #define IYDEBUG */
 /* #define IYMEMDEBUG */
 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.100.6.1 2018/07/26 23:55:30 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.100.6.2 2019/11/14 16:04:31 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -286,6 +286,7 @@
        u_int8_t myaddr[ETHER_ADDR_LEN];
        int eirq;
 
+       sc->sc_dev = self;
        iot = ia->ia_iot;
 
        if (bus_space_map(iot, ia->ia_io[0].ir_addr, 16, 0, &ioh)) {
diff -r b8a699d92e3b -r 4fe72753cbda sys/dev/isa/mcd.c
--- a/sys/dev/isa/mcd.c Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/dev/isa/mcd.c Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcd.c,v 1.116 2016/07/14 10:19:06 msaitoh Exp $        */
+/*     $NetBSD: mcd.c,v 1.116.10.1 2019/11/14 16:04:31 martin Exp $    */
 
 /*
  * Copyright (c) 1993, 1994, 1995 Charles M. Hannum.  All rights reserved.
@@ -56,7 +56,7 @@
 /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.116 2016/07/14 10:19:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.116.10.1 2019/11/14 16:04:31 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -262,6 +262,7 @@
        bus_space_handle_t ioh;
        struct mcd_mbox mbx;
 
+       sc->sc_dev = self;
        aprint_naive("\n");
 
        /* Map i/o space */
diff -r b8a699d92e3b -r 4fe72753cbda sys/dev/isa/tcic2_isa.c
--- a/sys/dev/isa/tcic2_isa.c   Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/dev/isa/tcic2_isa.c   Thu Nov 14 16:04:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcic2_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $   */
+/*     $NetBSD: tcic2_isa.c,v 1.27.10.1 2019/11/14 16:04:31 martin Exp $       */
 
 /*
  *
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcic2_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcic2_isa.c,v 1.27.10.1 2019/11/14 16:04:31 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -224,6 +224,7 @@
        bus_space_handle_t ioh;
        bus_space_handle_t memh;
 
+       sc->sc_dev = self;
        aprint_naive("\n");
 
        /* Map i/o space. */
diff -r b8a699d92e3b -r 4fe72753cbda sys/dev/isa/uha_isa.c
--- a/sys/dev/isa/uha_isa.c     Thu Nov 14 16:00:51 2019 +0000
+++ b/sys/dev/isa/uha_isa.c     Thu Nov 14 16:04:31 2019 +0000



Home | Main Index | Thread Index | Old Index