summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2010-06-28 18:31:01 +0000
committerkrw <krw@openbsd.org>2010-06-28 18:31:01 +0000
commit8952d2e01a836be8c6602edcd10a105fd837aee4 (patch)
tree7f8c56b5fcd6e61d834328df10e42768fb7badee /sys/dev/ic
parentUpdate the Safe module to version 2.2.7 for CVE-2010-1168 and (diff)
downloadwireguard-openbsd-8952d2e01a836be8c6602edcd10a105fd837aee4.tar.xz
wireguard-openbsd-8952d2e01a836be8c6602edcd10a105fd837aee4.zip
Remove all adapter-specific 'struct scsi_device's. They are never used. First
step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/aac.c7
-rw-r--r--sys/dev/ic/adv.c13
-rw-r--r--sys/dev/ic/adw.c13
-rw-r--r--sys/dev/ic/aic6360.c11
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c12
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c12
-rw-r--r--sys/dev/ic/ami.c12
-rw-r--r--sys/dev/ic/bha.c11
-rw-r--r--sys/dev/ic/cac.c7
-rw-r--r--sys/dev/ic/ciss.c7
-rw-r--r--sys/dev/ic/dpt.c11
-rw-r--r--sys/dev/ic/gdt_common.c8
-rw-r--r--sys/dev/ic/iha.c10
-rw-r--r--sys/dev/ic/isp_openbsd.c6
-rw-r--r--sys/dev/ic/mfi.c7
-rw-r--r--sys/dev/ic/mpi.c10
-rw-r--r--sys/dev/ic/ncr53c9x.c6
-rw-r--r--sys/dev/ic/ncr53c9xvar.h4
-rw-r--r--sys/dev/ic/oosiop.c10
-rw-r--r--sys/dev/ic/osiop.c10
-rw-r--r--sys/dev/ic/siop.c10
-rw-r--r--sys/dev/ic/trm.c10
-rw-r--r--sys/dev/ic/twe.c7
-rw-r--r--sys/dev/ic/uha.c11
24 files changed, 29 insertions, 196 deletions
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index f192533f9be..7bab303cc4e 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.46 2010/05/20 00:55:17 krw Exp $ */
+/* $OpenBSD: aac.c,v 1.47 2010/06/28 18:31:01 krw Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -136,10 +136,6 @@ struct scsi_adapter aac_raw_switch = {
};
#endif
-struct scsi_device aac_dev = {
- NULL, NULL, NULL, NULL
-};
-
/* Falcon/PPC interface */
int aac_fa_get_fwstatus(struct aac_softc *);
void aac_fa_qnotify(struct aac_softc *, int);
@@ -274,7 +270,6 @@ aac_attach(struct aac_softc *sc)
/* Fill in the prototype scsi_link. */
sc->aac_link.adapter_softc = sc;
sc->aac_link.adapter = &aac_switch;
- sc->aac_link.device = &aac_dev;
sc->aac_link.openings = (sc->total_fibs - 8) /
(sc->aac_container_count ? sc->aac_container_count : 1);
sc->aac_link.adapter_buswidth = AAC_MAX_CONTAINERS;
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index 5f54e023499..bd56742bc06 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.31 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: adv.c,v 1.32 2010/06/28 18:31:01 krw Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -93,16 +93,6 @@ struct scsi_adapter adv_switch =
};
-/* the below structure is so we have a default dev struct for out link struct */
-struct scsi_device adv_dev =
-{
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
-
#define ADV_ABORT_TIMEOUT 2000 /* time to wait for abort (mSec) */
#define ADV_WATCH_TIMEOUT 1000 /* time to wait for watchdog (mSec) */
@@ -523,7 +513,6 @@ adv_attach(sc)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter_target = sc->chip_scsi_id;
sc->sc_link.adapter = &adv_switch;
- sc->sc_link.device = &adv_dev;
sc->sc_link.openings = 4;
sc->sc_link.adapter_buswidth = 7;
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index d510df69c64..805b6be0c9f 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.45 2010/06/26 04:04:24 krw Exp $ */
+/* $OpenBSD: adw.c,v 1.46 2010/06/28 18:31:01 krw Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -86,16 +86,6 @@ struct cfdriver adw_cd = {
NULL, "adw", DV_DULL
};
-/* the below structure is so we have a default dev struct for our link struct */
-struct scsi_device adw_dev =
-{
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
-
/******************************************************************************/
/* DMA Mapping for Control Blocks */
/******************************************************************************/
@@ -562,7 +552,6 @@ adw_attach(sc)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter_target = sc->chip_scsi_id;
sc->sc_link.adapter = &sc->sc_adapter;
- sc->sc_link.device = &adw_dev;
sc->sc_link.openings = 4;
sc->sc_link.adapter_buswidth = ADW_MAX_TID+1;
diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c
index 148f8b25406..ca796621ee1 100644
--- a/sys/dev/ic/aic6360.c
+++ b/sys/dev/ic/aic6360.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6360.c,v 1.24 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: aic6360.c,v 1.25 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
#ifdef DDB
@@ -198,14 +198,6 @@ struct scsi_adapter aic_switch = {
0,
};
-struct scsi_device aic_dev = {
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
-
/*
* Do the real search-for-device.
*/
@@ -287,7 +279,6 @@ aicattach(struct aic_softc *sc)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter_target = sc->sc_initiator;
sc->sc_link.adapter = &aic_switch;
- sc->sc_link.device = &aic_dev;
sc->sc_link.openings = 2;
bzero(&saa, sizeof(saa));
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index 5ed0e0f8a26..bba6da338e3 100644
--- a/sys/dev/ic/aic79xx_openbsd.c
+++ b/sys/dev/ic/aic79xx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx_openbsd.c,v 1.36 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.37 2010/06/28 18:31:02 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -95,15 +95,6 @@ static struct scsi_adapter ahd_switch =
0,
};
-/* the below structure is so we have a default dev struct for our link struct */
-static struct scsi_device ahd_dev =
-{
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
/*
* Attach all the sub-devices we can find
*/
@@ -127,7 +118,6 @@ ahd_attach(struct ahd_softc *ahd)
ahd->sc_channel.adapter_softc = ahd;
ahd->sc_channel.adapter = &ahd_switch;
ahd->sc_channel.openings = 16;
- ahd->sc_channel.device = &ahd_dev;
if (bootverbose) {
ahd_controller_info(ahd, ahd_info, sizeof ahd_info);
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index 953bf316d13..ebca6a2989d 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.47 2010/06/02 08:19:35 dlg Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.48 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -69,15 +69,6 @@ static struct scsi_adapter ahc_switch =
0,
};
-/* the below structure is so we have a default dev struct for our link struct */
-static struct scsi_device ahc_dev =
-{
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
/*
* Attach all the sub-devices we can find
*/
@@ -98,7 +89,6 @@ ahc_attach(struct ahc_softc *ahc)
ahc->sc_channel.adapter_softc = ahc;
ahc->sc_channel.adapter = &ahc_switch;
ahc->sc_channel.openings = 16;
- ahc->sc_channel.device = &ahc_dev;
if (ahc->features & AHC_TWIN) {
/* Configure the second scsi bus */
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index d0dcfa34310..659a60d01a2 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.210 2010/06/28 05:43:46 jsg Exp $ */
+/* $OpenBSD: ami.c,v 1.211 2010/06/28 18:31:02 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -100,20 +100,12 @@ struct scsi_adapter ami_switch = {
ami_scsi_cmd, amiminphys, 0, 0, ami_scsi_ioctl
};
-struct scsi_device ami_dev = {
- NULL, NULL, NULL, NULL
-};
-
void ami_scsi_raw_cmd(struct scsi_xfer *);
struct scsi_adapter ami_raw_switch = {
ami_scsi_raw_cmd, amiminphys, 0, 0,
};
-struct scsi_device ami_raw_dev = {
- NULL, NULL, NULL, NULL
-};
-
void * ami_get_ccb(void *);
void ami_put_ccb(void *, void *);
@@ -529,7 +521,6 @@ ami_attach(struct ami_softc *sc)
/* TODO: fetch & print cache strategy */
/* TODO: fetch & print scsi and raid info */
- sc->sc_link.device = &ami_dev;
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &ami_switch;
sc->sc_link.adapter_target = sc->sc_maxunits;
@@ -590,7 +581,6 @@ ami_attach(struct ami_softc *sc)
rsc->sc_softc = sc;
rsc->sc_channel = rsc - sc->sc_rawsoftcs;
- rsc->sc_link.device = &ami_raw_dev;
rsc->sc_link.openings = AMI_MAXRAWCMDS;
rsc->sc_link.adapter_softc = rsc;
rsc->sc_link.adapter = &ami_raw_switch;
diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c
index 27efefda195..9d380cdc1f0 100644
--- a/sys/dev/ic/bha.c
+++ b/sys/dev/ic/bha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bha.c,v 1.24 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: bha.c,v 1.25 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: bha.c,v 1.27 1998/11/19 21:53:00 thorpej Exp $ */
#undef BHADEBUG
@@ -101,14 +101,6 @@ struct cfdriver bha_cd = {
NULL, "bha", DV_DULL
};
-/* the below structure is so we have a default dev struct for out link struct */
-struct scsi_device bha_dev = {
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
#define BHA_RESET_TIMEOUT 2000 /* time to wait for reset (mSec) */
#define BHA_ABORT_TIMEOUT 2000 /* time to wait for abort (mSec) */
@@ -272,7 +264,6 @@ bha_attach(sc, bpd)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter_target = bpd->sc_scsi_dev;
sc->sc_link.adapter = &sc->sc_adapter;
- sc->sc_link.device = &bha_dev;
sc->sc_link.openings = 4;
TAILQ_INIT(&sc->sc_free_ccb);
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 25bbf52da87..090cfb4f10a 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.38 2010/05/20 00:55:17 krw Exp $ */
+/* $OpenBSD: cac.c,v 1.39 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -103,10 +103,6 @@ struct scsi_adapter cac_switch = {
cac_scsi_cmd, cacminphys, 0, 0,
};
-struct scsi_device cac_dev = {
- NULL, NULL, NULL, NULL
-};
-
struct cac_ccb *cac_ccb_alloc(struct cac_softc *, int);
void cac_ccb_done(struct cac_softc *, struct cac_ccb *);
void cac_ccb_free(struct cac_softc *, struct cac_ccb *);
@@ -246,7 +242,6 @@ cac_init(struct cac_softc *sc, int startfw)
sc->sc_link.adapter = &cac_switch;
sc->sc_link.adapter_target = cinfo.num_drvs;
sc->sc_link.adapter_buswidth = cinfo.num_drvs;
- sc->sc_link.device = &cac_dev;
sc->sc_link.openings = CAC_MAX_CCBS / sc->sc_nunits;
if (sc->sc_link.openings < 4 )
sc->sc_link.openings = 4;
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index 74a9d090a4f..1e8c8782c4a 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.56 2010/06/26 22:14:32 krw Exp $ */
+/* $OpenBSD: ciss.c,v 1.57 2010/06/28 18:31:02 krw Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -76,10 +76,6 @@ struct scsi_adapter ciss_switch = {
ciss_scsi_cmd, cissminphys, NULL, NULL, ciss_scsi_ioctl
};
-struct scsi_device ciss_dev = {
- NULL, NULL, NULL, NULL
-};
-
#if NBIO > 0
int ciss_ioctl(struct device *, u_long, caddr_t);
#endif
@@ -367,7 +363,6 @@ ciss_attach(struct ciss_softc *sc)
return -1;
}
- sc->sc_link.device = &ciss_dev;
sc->sc_link.adapter_softc = sc;
sc->sc_link.openings = sc->maxcmd / (sc->maxunits? sc->maxunits : 1);
sc->sc_link.adapter = &ciss_switch;
diff --git a/sys/dev/ic/dpt.c b/sys/dev/ic/dpt.c
index c4cdab8c1b6..ccd9b7b1046 100644
--- a/sys/dev/ic/dpt.c
+++ b/sys/dev/ic/dpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dpt.c,v 1.25 2010/05/20 00:55:17 krw Exp $ */
+/* $OpenBSD: dpt.c,v 1.26 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: dpt.c,v 1.12 1999/10/23 16:26:33 ad Exp $ */
/*-
@@ -95,18 +95,15 @@ struct cfdriver dpt_cd = {
};
#endif /* __OpenBSD__ */
-/* A default for our link struct */
#ifdef __NetBSD__
+/* A default for our link struct */
static struct scsipi_device dpt_dev = {
-#endif /* __NetBSD__ */
-#ifdef __OpenBSD__
-static struct scsi_device dpt_dev = {
-#endif /* __OpenBSD__ */
NULL, /* Use default error handler */
NULL, /* have a queue, served by this */
NULL, /* have no async handler */
NULL, /* Use default 'done' routine */
};
+#endif /* __NetBSD__ */
#ifndef offsetof
#define offsetof(type, member) (int)((&((type *)0)->member))
@@ -394,6 +391,7 @@ dpt_init(sc, intrstr)
link->scsipi_scsi.max_lun = ec->ec_maxlun;
link->scsipi_scsi.max_target = ec->ec_maxtarget;
link->type = BUS_SCSI;
+ link->device = &dpt_dev;
#endif /* __NetBSD__ */
#ifdef __OpenBSD__
link->scsibus = i;
@@ -401,7 +399,6 @@ dpt_init(sc, intrstr)
link->luns = ec->ec_maxlun + 1;
link->adapter_buswidth = ec->ec_maxtarget + 1;
#endif /* __OpenBSD__ */
- link->device = &dpt_dev;
link->adapter = &sc->sc_adapter;
link->adapter_softc = sc;
link->openings = sc->sc_nccbs;
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c
index e6eb2eb2606..01ff8c10acb 100644
--- a/sys/dev/ic/gdt_common.c
+++ b/sys/dev/ic/gdt_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt_common.c,v 1.50 2010/05/20 00:55:17 krw Exp $ */
+/* $OpenBSD: gdt_common.c,v 1.51 2010/06/28 18:31:02 krw Exp $ */
/*
* Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved.
@@ -103,10 +103,6 @@ struct scsi_adapter gdt_raw_switch = {
gdt_raw_scsi_cmd, gdtminphys, 0, 0,
};
-struct scsi_device gdt_dev = {
- NULL, NULL, NULL, NULL
-};
-
int gdt_cnt = 0;
u_int8_t gdt_polling;
u_int8_t gdt_from_wait;
@@ -161,7 +157,6 @@ gdt_attach(struct gdt_softc *sc)
/* Fill in the prototype scsi_link. */
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &gdt_switch;
- sc->sc_link.device = &gdt_dev;
/* openings will be filled in later. */
sc->sc_link.adapter_buswidth =
(sc->sc_class & GDT_FC) ? GDT_MAXID : GDT_MAX_HDRIVES;
@@ -499,7 +494,6 @@ gdt_attach(struct gdt_softc *sc)
sc->sc_raw_link[i].adapter_softc = sc;
sc->sc_raw_link[i].adapter = &gdt_raw_switch;
sc->sc_raw_link[i].adapter_target = 7;
- sc->sc_raw_link[i].device = &gdt_dev;
sc->sc_raw_link[i].openings = 4; /* XXX a guess */
sc->sc_raw_link[i].adapter_buswidth =
(sc->sc_class & GDT_FC) ? GDT_MAXID : 16; /* XXX */
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index 7ad622b13fe..df700a9808d 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.c,v 1.38 2010/05/20 00:55:17 krw Exp $ */
+/* $OpenBSD: iha.c,v 1.39 2010/06/28 18:31:02 krw Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -60,13 +60,6 @@ struct scsi_adapter iha_switch = {
NULL /* free_dev() */
};
-struct scsi_device iha_dev = {
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
/*
* SCSI Rate Table, indexed by FLAG_SCSI_RATE field of
* TCS_Flags.
@@ -373,7 +366,6 @@ iha_init_tulip(sc)
*/
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &iha_switch;
- sc->sc_link.device = &iha_dev;
sc->sc_link.openings = 4; /* # xs's allowed per device */
sc->sc_link.adapter_target = pScsi->NVM_SCSI_Id;
sc->sc_link.adapter_buswidth = pScsi->NVM_SCSI_Targets;
diff --git a/sys/dev/ic/isp_openbsd.c b/sys/dev/ic/isp_openbsd.c
index 5ae1db210c2..95bb99140fc 100644
--- a/sys/dev/ic/isp_openbsd.c
+++ b/sys/dev/ic/isp_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_openbsd.c,v 1.43 2010/03/27 02:06:03 krw Exp $ */
+/* $OpenBSD: isp_openbsd.c,v 1.44 2010/06/28 18:31:02 krw Exp $ */
/*
* Platform (OpenBSD) dependent common attachment code for QLogic adapters.
*
@@ -64,8 +64,6 @@ static void ispminphys(struct buf *, struct scsi_link *);
static void ispcmd_slow(XS_T *);
static void ispcmd(XS_T *);
-struct scsi_device isp_dev = { NULL, NULL, NULL, NULL };
-
void isp_polled_cmd (struct ispsoftc *, XS_T *);
void isp_wdog (void *);
void isp_make_here(ispsoftc_t *, int);
@@ -106,7 +104,6 @@ isp_attach(struct ispsoftc *isp)
isp->isp_osinfo.wqf = isp->isp_osinfo.wqt = NULL;
lptr->adapter_softc = isp;
- lptr->device = &isp_dev;
lptr->adapter = &isp->isp_osinfo._adapter;
lptr->openings = imin(isp->isp_maxcmds, MAXISPREQUEST(isp));
isp->isp_osinfo._adapter.scsi_cmd = ispcmd_slow;
@@ -124,7 +121,6 @@ isp_attach(struct ispsoftc *isp)
if (IS_DUALBUS(isp)) {
struct scsi_link *lptrb = &isp->isp_osinfo._link[1];
lptrb->adapter_softc = isp;
- lptrb->device = &isp_dev;
lptrb->adapter = &isp->isp_osinfo._adapter;
lptrb->openings = lptr->openings;
lptrb->adapter_buswidth = MAX_TARGETS;
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 5ff67943330..d710ba652d6 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.106 2010/06/15 04:11:34 dlg Exp $ */
+/* $OpenBSD: mfi.c,v 1.107 2010/06/28 18:31:02 krw Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -63,10 +63,6 @@ struct scsi_adapter mfi_switch = {
mfi_scsi_cmd, mfiminphys, 0, 0, mfi_scsi_ioctl
};
-struct scsi_device mfi_dev = {
- NULL, NULL, NULL, NULL
-};
-
struct mfi_ccb *mfi_get_ccb(struct mfi_softc *);
void mfi_put_ccb(struct mfi_ccb *);
int mfi_init_ccb(struct mfi_softc *);
@@ -718,7 +714,6 @@ mfi_attach(struct mfi_softc *sc, enum mfi_iop iop)
else
sc->sc_link.openings = sc->sc_max_cmds;
- sc->sc_link.device = &mfi_dev;
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &mfi_switch;
sc->sc_link.adapter_target = MFI_MAX_LD;
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index ee3a74de361..e13a4878ff5 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.151 2010/06/15 04:30:26 dlg Exp $ */
+/* $OpenBSD: mpi.c,v 1.152 2010/06/28 18:31:02 krw Exp $ */
/*
* Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org>
@@ -78,13 +78,6 @@ struct scsi_adapter mpi_switch = {
mpi_scsi_ioctl
};
-struct scsi_device mpi_dev = {
- NULL,
- NULL,
- NULL,
- NULL
-};
-
struct mpi_dmamem *mpi_dmamem_alloc(struct mpi_softc *, size_t);
void mpi_dmamem_free(struct mpi_softc *,
struct mpi_dmamem *);
@@ -328,7 +321,6 @@ mpi_attach(struct mpi_softc *sc)
#endif /* NBIO > 0 */
/* we should be good to go now, attach scsibus */
- sc->sc_link.device = &mpi_dev;
sc->sc_link.adapter = &mpi_switch;
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter_target = sc->sc_target;
diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c
index 1ac3d435d06..691887aed7b 100644
--- a/sys/dev/ic/ncr53c9x.c
+++ b/sys/dev/ic/ncr53c9x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53c9x.c,v 1.47 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: ncr53c9x.c,v 1.48 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */
/*
@@ -185,10 +185,9 @@ ncr53c9x_lunsearch(ti, lun)
* Attach this instance, and then all the sub-devices
*/
void
-ncr53c9x_attach(sc, adapter, dev)
+ncr53c9x_attach(sc, adapter)
struct ncr53c9x_softc *sc;
struct scsi_adapter *adapter;
- struct scsi_device *dev;
{
struct scsibus_attach_args saa;
@@ -265,7 +264,6 @@ ncr53c9x_attach(sc, adapter, dev)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter_target = sc->sc_id;
sc->sc_link.adapter = adapter;
- sc->sc_link.device = dev;
sc->sc_link.openings = 2;
sc->sc_link.adapter_buswidth = sc->sc_ntarg;
diff --git a/sys/dev/ic/ncr53c9xvar.h b/sys/dev/ic/ncr53c9xvar.h
index 00761c471a5..65c8208d586 100644
--- a/sys/dev/ic/ncr53c9xvar.h
+++ b/sys/dev/ic/ncr53c9xvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53c9xvar.h,v 1.19 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: ncr53c9xvar.h,v 1.20 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: ncr53c9xvar.h,v 1.13 1998/05/26 23:17:34 thorpej Exp $ */
/*-
@@ -425,7 +425,7 @@ struct ncr53c9x_softc {
((250 * (cpb)) / (sc)->sc_freq)
void ncr53c9x_attach(struct ncr53c9x_softc *,
- struct scsi_adapter *, struct scsi_device *);
+ struct scsi_adapter *);
void ncr53c9x_scsi_cmd(struct scsi_xfer *);
void ncr53c9x_reset(struct ncr53c9x_softc *);
int ncr53c9x_intr(void *);
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c
index 28d46e3eed4..5f922ff3448 100644
--- a/sys/dev/ic/oosiop.c
+++ b/sys/dev/ic/oosiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oosiop.c,v 1.16 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: oosiop.c,v 1.17 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
/*
@@ -135,13 +135,6 @@ struct scsi_adapter oosiop_adapter = {
NULL
};
-struct scsi_device oosiop_dev = {
- NULL,
- NULL,
- NULL,
- NULL
-};
-
void
oosiop_attach(struct oosiop_softc *sc)
{
@@ -242,7 +235,6 @@ oosiop_attach(struct oosiop_softc *sc)
*/
sc->sc_link.adapter = &oosiop_adapter;
sc->sc_link.adapter_softc = sc;
- sc->sc_link.device = &oosiop_dev;
sc->sc_link.openings = 1; /* XXX */
sc->sc_link.adapter_buswidth = OOSIOP_NTGT;
sc->sc_link.adapter_target = sc->sc_id;
diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c
index a5665f523b8..57675a2cf1b 100644
--- a/sys/dev/ic/osiop.c
+++ b/sys/dev/ic/osiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osiop.c,v 1.44 2010/06/28 04:39:57 dlg Exp $ */
+/* $OpenBSD: osiop.c,v 1.45 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */
/*
@@ -187,13 +187,6 @@ struct scsi_adapter osiop_adapter = {
NULL,
};
-struct scsi_device osiop_dev = {
- NULL,
- NULL,
- NULL,
- NULL,
-};
-
void
osiop_attach(sc)
struct osiop_softc *sc;
@@ -340,7 +333,6 @@ osiop_attach(sc)
*/
sc->sc_link.adapter = &osiop_adapter;
sc->sc_link.adapter_softc = sc;
- sc->sc_link.device = &osiop_dev;
sc->sc_link.openings = 4;
sc->sc_link.adapter_buswidth = OSIOP_NTGT;
sc->sc_link.adapter_target = sc->sc_id;
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index 89185a69dbf..daefcb5d54f 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.59 2010/06/03 11:37:45 krw Exp $ */
+/* $OpenBSD: siop.c,v 1.60 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */
/*
@@ -111,13 +111,6 @@ struct scsi_adapter siop_adapter = {
NULL,
};
-struct scsi_device siop_dev = {
- NULL,
- NULL,
- NULL,
- NULL,
-};
-
#ifdef SIOP_STATS
static int siop_stat_intr = 0;
static int siop_stat_intr_shortxfer = 0;
@@ -201,7 +194,6 @@ siop_attach(sc)
scsi_iopool_init(&sc->iopool, sc, siop_cmd_get, siop_cmd_put);
sc->sc_currschedslot = 0;
sc->sc_c.sc_link.adapter = &siop_adapter;
- sc->sc_c.sc_link.device = &siop_dev;
sc->sc_c.sc_link.openings = SIOP_NTAG;
sc->sc_c.sc_link.pool = &sc->iopool;
diff --git a/sys/dev/ic/trm.c b/sys/dev/ic/trm.c
index 460a904e314..8788eace01d 100644
--- a/sys/dev/ic/trm.c
+++ b/sys/dev/ic/trm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trm.c,v 1.20 2010/06/19 21:43:16 krw Exp $
+/* $OpenBSD: trm.c,v 1.21 2010/06/28 18:31:02 krw Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* File Name : trm.c
@@ -139,13 +139,6 @@ struct scsi_adapter trm_switch = {
NULL
};
-static struct scsi_device trm_device = {
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
/*
* ------------------------------------------------------------
*
@@ -2435,7 +2428,6 @@ trm_initACB(struct trm_softc *sc, int unit)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter_target = sc->sc_AdaptSCSIID;
sc->sc_link.openings = 30; /* So TagMask (32 bit integer) always has space */
- sc->sc_link.device = &trm_device;
sc->sc_link.adapter = &sc->sc_adapter;
sc->sc_link.adapter_buswidth = ((sc->sc_config & HCC_WIDE_CARD) == 0) ? 8:16;
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index 3d1b02dac5f..2e1751dfaa6 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.36 2010/05/20 00:55:17 krw Exp $ */
+/* $OpenBSD: twe.c,v 1.37 2010/06/28 18:31:02 krw Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -70,10 +70,6 @@ struct scsi_adapter twe_switch = {
twe_scsi_cmd, tweminphys, 0, 0,
};
-struct scsi_device twe_dev = {
- NULL, NULL, NULL, NULL
-};
-
static __inline struct twe_ccb *twe_get_ccb(struct twe_softc *sc);
static __inline void twe_put_ccb(struct twe_ccb *ccb);
void twe_dispose(struct twe_softc *sc);
@@ -383,7 +379,6 @@ twe_attach(sc)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &twe_switch;
sc->sc_link.adapter_target = TWE_MAX_UNITS;
- sc->sc_link.device = &twe_dev;
sc->sc_link.openings = TWE_MAXCMDS / nunits;
sc->sc_link.adapter_buswidth = TWE_MAX_UNITS;
diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c
index 2f68bedbabe..c5acaa50b57 100644
--- a/sys/dev/ic/uha.c
+++ b/sys/dev/ic/uha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uha.c,v 1.18 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: uha.c,v 1.19 2010/06/28 18:31:02 krw Exp $ */
/* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */
#undef UHADEBUG
@@ -96,14 +96,6 @@ struct scsi_adapter uha_switch = {
0,
};
-/* the below structure is so we have a default dev struct for out link struct */
-struct scsi_device uha_dev = {
- NULL, /* Use default error handler */
- NULL, /* have a queue, served by this */
- NULL, /* have no async handler */
- NULL, /* Use default 'done' routine */
-};
-
struct cfdriver uha_cd = {
NULL, "uha", DV_DULL
};
@@ -143,7 +135,6 @@ uha_attach(sc)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter_target = sc->sc_scsi_dev;
sc->sc_link.adapter = &uha_switch;
- sc->sc_link.device = &uha_dev;
sc->sc_link.openings = 2;
bzero(&saa, sizeof(saa));