1
0
mirror of https://github.com/openbsd/src.git synced 2026-05-01 17:46:35 +00:00

Nuke softc field 'sc_adapter" and just point sc_link's at shiney new

'adw_switch' like all the cool kids do.
This commit is contained in:
krw
2020-02-07 13:31:47 +00:00
parent a3b4c2abd8
commit 5ceeb3acd4
2 changed files with 7 additions and 10 deletions

View File

@@ -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 */
/******************************************************************************/
@@ -499,18 +503,12 @@ adw_attach(ADW_SOFTC *sc)
break;
}
/*
* 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;

View File

@@ -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;