From: mglocker Date: Sat, 15 Jun 2024 18:26:25 +0000 (+0000) Subject: To my current knowledge, UFSHCI has a single target design. Reflect this X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2ee5e2653cc2d6297c58cdb66f5f06de2cfdbd19;p=openbsd To my current knowledge, UFSHCI has a single target design. Reflect this in the code, and remove some XXXs by that. No functional changes. --- 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 @@ -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 @@ -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 */