diff options
author | 2020-02-07 13:31:47 +0000 | |
---|---|---|
committer | 2020-02-07 13:31:47 +0000 | |
commit | 5ceeb3acd4ac0de68c5edf5708e5fd882c28851f (patch) | |
tree | 165701da15fe279be3639a3b4035858b6a88531b /sys | |
parent | Extend the ipsecctl(8) parser to set the udpencap flag and port (diff) | |
download | wireguard-openbsd-5ceeb3acd4ac0de68c5edf5708e5fd882c28851f.tar.xz wireguard-openbsd-5ceeb3acd4ac0de68c5edf5708e5fd882c28851f.zip |
Nuke softc field 'sc_adapter" and just point sc_link's at shiney new
'adw_switch' like all the cool kids do.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/adw.c | 14 | ||||
-rw-r--r-- | sys/dev/ic/adwlib.h | 3 |
2 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index f441bef19f1..2d1499f60bc 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.57 2020/01/26 00:53:31 krw Exp $ */ +/* $OpenBSD: adw.c,v 1.58 2020/02/07 13:31:47 krw Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -83,6 +83,10 @@ struct cfdriver adw_cd = { NULL, "adw", DV_DULL }; +struct scsi_adapter adw_switch = { + adw_scsi_cmd, adw_minphys, NULL, NULL, NULL +}; + /******************************************************************************/ /* DMA Mapping for Control Blocks */ /******************************************************************************/ @@ -500,17 +504,11 @@ adw_attach(ADW_SOFTC *sc) } /* - * Fill in the adapter. - */ - sc->sc_adapter.scsi_cmd = adw_scsi_cmd; - sc->sc_adapter.dev_minphys = adw_minphys; - - /* * fill in the prototype scsi_link. */ 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.adapter = &adw_switch; sc->sc_link.openings = 4; sc->sc_link.adapter_buswidth = ADW_MAX_TID+1; sc->sc_link.pool = &sc->sc_iopool; diff --git a/sys/dev/ic/adwlib.h b/sys/dev/ic/adwlib.h index 83dad574fbd..5a269d46572 100644 --- a/sys/dev/ic/adwlib.h +++ b/sys/dev/ic/adwlib.h @@ -1,4 +1,4 @@ -/* $OpenBSD: adwlib.h,v 1.13 2010/10/03 21:23:35 krw Exp $ */ +/* $OpenBSD: adwlib.h,v 1.14 2020/02/07 13:31:47 krw Exp $ */ /* $NetBSD: adwlib.h,v 1.14 2000/07/03 18:14:18 dante Exp $ */ /* @@ -745,7 +745,6 @@ typedef struct adw_softc { TAILQ_HEAD(, adw_ccb) sc_free_ccb, sc_waiting_ccb; TAILQ_HEAD(adw_pending_ccb, adw_ccb) sc_pending_ccb; struct scsi_link sc_link; /* prototype for devs */ - struct scsi_adapter sc_adapter; struct mutex sc_ccb_mtx; struct scsi_iopool sc_iopool; |