summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2019-11-14 15:38:02 +0000
committermartin <martin@NetBSD.org>2019-11-14 15:38:02 +0000
commit55547ae59cfd1c5452052febade96431f4a34d06 (patch)
treecb3a1894ae92434b2152e13233fed3f140e75c6d /sys/dev
parent7ad27b1d2c06b3a90773b820fd74c5c3f9e80c55 (diff)
Pull up following revision(s) (requested by msaitoh in ticket #425):
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 (limited to 'sys/dev')
-rw-r--r--sys/dev/gpib/ct.c5
-rw-r--r--sys/dev/gpib/mt.c5
-rw-r--r--sys/dev/gpib/ppi.c5
-rw-r--r--sys/dev/isa/if_iy.c5
-rw-r--r--sys/dev/isa/mcd.c5
-rw-r--r--sys/dev/isa/tcic2_isa.c5
-rw-r--r--sys/dev/isa/uha_isa.c6
-rw-r--r--sys/dev/pci/if_stge.c5
-rw-r--r--sys/dev/pci/neo.c5
-rw-r--r--sys/dev/pcmcia/if_tr_pcmcia.c5
-rw-r--r--sys/dev/sbus/sio16.c5
11 files changed, 33 insertions, 23 deletions
diff --git a/sys/dev/gpib/ct.c b/sys/dev/gpib/ct.c
index 51f64ea10bf..4c8c34e7224 100644
--- a/sys/dev/gpib/ct.c
+++ b/sys/dev/gpib/ct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ct.c,v 1.30 2019/02/23 11:33:31 kamil Exp $ */
+/* $NetBSD: ct.c,v 1.30.4.1 2019/11/14 15:38:02 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.30 2019/02/23 11:33:31 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.30.4.1 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -260,6 +260,7 @@ ctattach(device_t parent, device_t self, void *aux)
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 --git a/sys/dev/gpib/mt.c b/sys/dev/gpib/mt.c
index 70ffbd379a5..79a8c2c6210 100644
--- a/sys/dev/gpib/mt.c
+++ b/sys/dev/gpib/mt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mt.c,v 1.32 2019/02/24 20:54:13 kamil Exp $ */
+/* $NetBSD: mt.c,v 1.32.4.1 2019/11/14 15:38:02 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.32 2019/02/24 20:54:13 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.32.4.1 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -230,6 +230,7 @@ mtattach(device_t parent, device_t self, void *aux)
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 --git a/sys/dev/gpib/ppi.c b/sys/dev/gpib/ppi.c
index e7a06ea19ad..f07b53ce68d 100644
--- a/sys/dev/gpib/ppi.c
+++ b/sys/dev/gpib/ppi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ppi.c,v 1.24 2018/09/03 16:29:30 riastradh Exp $ */
+/* $NetBSD: ppi.c,v 1.24.4.1 2019/11/14 15:38:02 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.24 2018/09/03 16:29:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.24.4.1 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -167,6 +167,7 @@ ppiattach(device_t parent, device_t self, void *aux)
printf("\n");
+ sc->sc_dev = self;
sc->sc_ic = ga->ga_ic;
sc->sc_address = ga->ga_address;
diff --git a/sys/dev/isa/if_iy.c b/sys/dev/isa/if_iy.c
index 8def5f1c6e2..5b44e010a55 100644
--- a/sys/dev/isa/if_iy.c
+++ b/sys/dev/isa/if_iy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iy.c,v 1.109 2019/05/29 10:07:29 msaitoh Exp $ */
+/* $NetBSD: if_iy.c,v 1.109.2.1 2019/11/14 15:38:02 martin Exp $ */
/* #define IYDEBUG */
/* #define IYMEMDEBUG */
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.109 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.109.2.1 2019/11/14 15:38:02 martin Exp $");
#include "opt_inet.h"
@@ -282,6 +282,7 @@ iyattach(device_t parent, device_t self, void *aux)
uint8_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 --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c
index 612010c8943..00ce9f9c556 100644
--- a/sys/dev/isa/mcd.c
+++ b/sys/dev/isa/mcd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mcd.c,v 1.118 2019/02/24 20:50:03 kamil Exp $ */
+/* $NetBSD: mcd.c,v 1.118.4.1 2019/11/14 15:38:02 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.118 2019/02/24 20:50:03 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.118.4.1 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -262,6 +262,7 @@ mcdattach(device_t parent, device_t self, void *aux)
bus_space_handle_t ioh;
struct mcd_mbox mbx;
+ sc->sc_dev = self;
aprint_naive("\n");
/* Map i/o space */
diff --git a/sys/dev/isa/tcic2_isa.c b/sys/dev/isa/tcic2_isa.c
index afb22b4e09e..26ca428a459 100644
--- a/sys/dev/isa/tcic2_isa.c
+++ b/sys/dev/isa/tcic2_isa.c
@@ -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.24.1 2019/11/14 15:38:02 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.24.1 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -224,6 +224,7 @@ tcic_isa_attach(device_t parent, device_t self, void *aux)
bus_space_handle_t ioh;
bus_space_handle_t memh;
+ sc->sc_dev = self;
aprint_naive("\n");
/* Map i/o space. */
diff --git a/sys/dev/isa/uha_isa.c b/sys/dev/isa/uha_isa.c
index e5bee46f89c..e4a20d372b4 100644
--- a/sys/dev/isa/uha_isa.c
+++ b/sys/dev/isa/uha_isa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uha_isa.c,v 1.41 2014/10/18 08:33:28 snj Exp $ */
+/* $NetBSD: uha_isa.c,v 1.41.26.1 2019/11/14 15:38:02 martin Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uha_isa.c,v 1.41 2014/10/18 08:33:28 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uha_isa.c,v 1.41.26.1 2019/11/14 15:38:02 martin Exp $");
#include "opt_ddb.h"
@@ -143,6 +143,7 @@ uha_isa_attach(device_t parent, device_t self, void *aux)
isa_chipset_tag_t ic = ia->ia_ic;
int error;
+ sc->sc_dev = self;
printf("\n");
if (bus_space_map(iot, ia->ia_io[0].ir_addr, UHA_ISA_IOSIZE, 0, &ioh)) {
@@ -150,7 +151,6 @@ uha_isa_attach(device_t parent, device_t self, void *aux)
return;
}
- sc->sc_dev = self;
sc->sc_iot = iot;
sc->sc_ioh = ioh;
sc->sc_dmat = dmat;
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c
index 37b64bc4eb9..9fc1323821e 100644
--- a/sys/dev/pci/if_stge.c
+++ b/sys/dev/pci/if_stge.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_stge.c,v 1.70.2.1 2019/11/06 09:59:39 martin Exp $ */
+/* $NetBSD: if_stge.c,v 1.70.2.2 2019/11/14 15:38:02 martin Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.70.2.1 2019/11/06 09:59:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.70.2.2 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
@@ -389,6 +389,7 @@ stge_attach(device_t parent, device_t self, void *aux)
uint8_t enaddr[ETHER_ADDR_LEN];
char intrbuf[PCI_INTRSTR_LEN];
+ sc->sc_dev = self;
callout_init(&sc->sc_tick_ch, 0);
sp = stge_lookup(pa);
diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c
index 84fee7f43ed..3ad0c68c2a7 100644
--- a/sys/dev/pci/neo.c
+++ b/sys/dev/pci/neo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: neo.c,v 1.54 2019/06/08 08:02:38 isaki Exp $ */
+/* $NetBSD: neo.c,v 1.54.2.1 2019/11/14 15:38:02 martin Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: neo.c,v 1.54 2019/06/08 08:02:38 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: neo.c,v 1.54.2.1 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -559,6 +559,7 @@ neo_attach(device_t parent, device_t self, void *aux)
char intrbuf[PCI_INTRSTR_LEN];
sc = device_private(self);
+ sc->dev = self;
pa = aux;
pc = pa->pa_pc;
diff --git a/sys/dev/pcmcia/if_tr_pcmcia.c b/sys/dev/pcmcia/if_tr_pcmcia.c
index a6176eb087f..4e9d47cf19f 100644
--- a/sys/dev/pcmcia/if_tr_pcmcia.c
+++ b/sys/dev/pcmcia/if_tr_pcmcia.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tr_pcmcia.c,v 1.28 2019/01/08 08:47:21 msaitoh Exp $ */
+/* $NetBSD: if_tr_pcmcia.c,v 1.28.4.1 2019/11/14 15:38:02 martin Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tr_pcmcia.c,v 1.28 2019/01/08 08:47:21 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tr_pcmcia.c,v 1.28.4.1 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -124,6 +124,7 @@ tr_pcmcia_attach(device_t parent, device_t self, void *aux)
bus_size_t offset;
psc->sc_pf = pa->pf;
+ sc->sc_dev = self;
cfe = SIMPLEQ_FIRST(&pa->pf->cfe_head);
diff --git a/sys/dev/sbus/sio16.c b/sys/dev/sbus/sio16.c
index a544c8befd6..1ee767bc6e3 100644
--- a/sys/dev/sbus/sio16.c
+++ b/sys/dev/sbus/sio16.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sio16.c,v 1.24 2011/07/18 00:58:52 mrg Exp $ */
+/* $NetBSD: sio16.c,v 1.24.60.1 2019/11/14 15:38:02 martin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.24 2011/07/18 00:58:52 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.24.60.1 2019/11/14 15:38:02 martin Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -286,6 +286,7 @@ clcd_attach(device_t parent, device_t self, void *aux)
struct cd18xx_softc *sc = device_private(self);
struct sio16_attach_args *args = aux;
+ sc->sc_dev = self;
sc->sc_tag = args->cd_tag;
sc->sc_handle = args->cd_handle;
sc->sc_osc = args->cd_osc;