summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2024-06-15 18:26:26 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2024-06-15 18:26:26 +0000
commitc35577d3b08f07e0b23c07544bf781036f7228b7 (patch)
treef946d130fbb3d20e6aeb3a9dfb01b05a4a56c9e2
parentb9d8abb10feb3cfd2bd273ee3d3b91850e6529cd (diff)
To my current knowledge, UFSHCI has a single target design. Reflect this
in the code, and remove some XXXs by that. No functional changes.
-rw-r--r--sys/dev/ic/ufshci.c6
-rw-r--r--sys/dev/ic/ufshcireg.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ic/ufshci.c b/sys/dev/ic/ufshci.c
index bcf49091f73..28b9aa17e12 100644
--- a/sys/dev/ic/ufshci.c
+++ b/sys/dev/ic/ufshci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufshci.c,v 1.37 2024/06/14 20:52:07 mglocker Exp $ */
+/* $OpenBSD: ufshci.c,v 1.38 2024/06/15 18:26:25 mglocker Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@@ -263,8 +263,8 @@ ufshci_attach(struct ufshci_softc *sc)
/* Attach to SCSI layer */
saa.saa_adapter = &ufshci_switch;
saa.saa_adapter_softc = sc;
- saa.saa_adapter_buswidth = 2; /* XXX: What's the right value? */
- saa.saa_luns = 1; /* XXX: Should we use ufshci_utr_cmd_lun() */
+ saa.saa_adapter_buswidth = UFSHCI_TARGETS_MAX + 1;
+ saa.saa_luns = 1;
saa.saa_adapter_target = 0;
saa.saa_openings = sc->sc_nutrs;
saa.saa_pool = &sc->sc_iopool;
diff --git a/sys/dev/ic/ufshcireg.h b/sys/dev/ic/ufshcireg.h
index b96bef52e2c..47e05ba6c04 100644
--- a/sys/dev/ic/ufshcireg.h
+++ b/sys/dev/ic/ufshcireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufshcireg.h,v 1.13 2024/05/24 20:34:06 mglocker Exp $ */
+/* $OpenBSD: ufshcireg.h,v 1.14 2024/06/15 18:26:25 mglocker Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@@ -25,6 +25,7 @@
#define UFSHCI_INTR_AGGR_COUNT_MAX 31
#define UFSHCI_SLOTS_MIN 1
#define UFSHCI_SLOTS_MAX 32
+#define UFSHCI_TARGETS_MAX 1
#define UFSHCI_LBS 4096 /* UFS Logical Block Size:
For UFS minimum size shall be
4096 bytes */