summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/trm_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/trm_pci.c')
-rw-r--r--sys/dev/pci/trm_pci.c17
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 */