aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/cam_ccb.h
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2021-04-29 15:48:49 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2021-05-21 15:34:05 +0000
commitaf2253f61c43a7608cdf6995701c1dc361320064 (patch)
tree7a71070876a9ede5fbbd34c4eb53c66753a34e72 /sys/cam/cam_ccb.h
parent788401188f950001cd9796cdcea9a7e5f92050ab (diff)
downloadsrc-af2253f61c43a7608cdf6995701c1dc361320064.tar.gz
src-af2253f61c43a7608cdf6995701c1dc361320064.zip
mmccam: Add two new XPT for MMC and use them in mmc_sim and sdhci
For the discovery phase of SD/eMMC we need to do some transaction in a async way. The classic CAM XPT_{GET,SET}_TRAN_SETTING cannot be used in a async way. This also allow us to split the discovery phase into a more complete state machine and we don't mtx_sleep with a random number to wait for completion of the tasks. For mmc_sim we now do the SET_TRAN_SETTING in a taskqueue so we can call the needed function for regulators/clocks without the cam lock(s). This part is still needed to be done for sdhci. We also now save the host OCR in the discovery phase as it wasn't done before and only worked because the same ccb was reused. Reviewed by: imp, kibab, bz Differential Revision: https://reviews.freebsd.org/D30038
Diffstat (limited to 'sys/cam/cam_ccb.h')
-rw-r--r--sys/cam/cam_ccb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h
index 2545e40e192d..3a01cde1a442 100644
--- a/sys/cam/cam_ccb.h
+++ b/sys/cam/cam_ccb.h
@@ -253,6 +253,9 @@ typedef enum {
XPT_REPROBE_LUN = 0x38 | XPT_FC_QUEUED | XPT_FC_USER_CCB,
/* Query device capacity and notify GEOM */
+ XPT_MMC_SET_TRAN_SETTINGS = 0x40 | XPT_FC_DEV_QUEUED,
+ XPT_MMC_GET_TRAN_SETTINGS = 0x41 | XPT_FC_DEV_QUEUED,
+
/* Vendor Unique codes: 0x80->0x8F */
XPT_VUNIQUE = 0x80
} xpt_opcode;