diff options
author | 2020-07-02 13:29:20 +0000 | |
---|---|---|
committer | 2020-07-02 13:29:20 +0000 | |
commit | cf229201a559a43e72968ab348a1940d29e9584c (patch) | |
tree | be8c2d48ca90748883e076da829eaa6eb1f06279 /sys/dev/pci/trm_pci.c | |
parent | Shuffle things around so that sc->sc_link initialization is (diff) | |
download | wireguard-openbsd-cf229201a559a43e72968ab348a1940d29e9584c.tar.xz wireguard-openbsd-cf229201a559a43e72968ab348a1940d29e9584c.zip |
Shuffle things around so that sc->sc_link initialization is
done just before config_found(), as all other drivers do.
Diffstat (limited to 'sys/dev/pci/trm_pci.c')
-rw-r--r-- | sys/dev/pci/trm_pci.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/pci/trm_pci.c b/sys/dev/pci/trm_pci.c index f39f9a4d555..e95fadde6d0 100644 --- a/sys/dev/pci/trm_pci.c +++ b/sys/dev/pci/trm_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trm_pci.c,v 1.6 2020/06/27 17:28:58 krw Exp $ +/* $OpenBSD: trm_pci.c,v 1.7 2020/07/02 13:29:20 krw Exp $ * ------------------------------------------------------------ * O.S : OpenBSD * FILE NAME : trm_pci.c @@ -65,6 +65,14 @@ struct cfattach trm_pci_ca = { NULL, /* Activate */ }; +struct cfdriver trm_cd = { + NULL, "trm", DV_DULL +}; + +struct scsi_adapter trm_switch = { + trm_scsi_cmd, NULL, NULL, NULL, NULL +}; + /* * ------------------------------------------------------------ @@ -153,6 +161,13 @@ trm_pci_attach(struct device *parent, struct device *self, void *aux) if (intrstr != NULL) printf(": %s\n", intrstr); + 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.adapter = &trm_switch; + sc->sc_link.adapter_buswidth = ((sc->sc_config & HCC_WIDE_CARD) == 0) ? 8:16; + sc->sc_link.pool = &sc->sc_iopool; + saa.saa_sc_link = &sc->sc_link; /* Tell SCSI layer about our SCSI bus */ |