scsi: ufs: query descriptor API
Subsystems (2)
PATCH 1/3 scsi: ufs: query descriptor API
Introduces the API for sending queries with descriptors.
A descriptor is a block or page of parameters that describe the device. The descriptors are classified into types and can range in size from 2 bytes through 255 bytes.
All descriptors have a length value as their first element, and a type identification element as their second byte.
All descriptors are readable and some may be write once. They are accessed using their type, index and selector.
Signed-off-by Dolev Raviv <[email protected]>
Signed-off-by Raviv Shvili <[email protected]>
drivers/scsi/ufs/ufs.h +16 -1
@@ -41,7 +41,8 @@#define MAX_CDB_SIZE 16#define GENERAL_UPIU_REQUEST_SIZE 32 -#define QUERY_DESC_MAX_SIZE 256 +#define QUERY_DESC_MAX_SIZE 255 +#define QUERY_DESC_MIN_SIZE 2#define QUERY_OSF_SIZE (GENERAL_UPIU_REQUEST_SIZE - \ (sizeof(struct utp_upiu_header)))
@@ -117,6 +118,20 @@ enum attr_idn { QUERY_ATTR_IDN_EE_STATUS = 0x0E, }; +/* Descriptor idn for Query requests */ +enum desc_idn { +QUERY_DESC_IDN_DEVICE =0x0 , +QUERY_DESC_IDN_CONFIGURAION =0x1 , +QUERY_DESC_IDN_UNIT =0x2 , +QUERY_DESC_IDN_RFU_0 =0x3 , +QUERY_DESC_IDN_INTERCONNECT =0x4 , +QUERY_DESC_IDN_STRING =0x5 , +QUERY_DESC_IDN_RFU_1 =0x6 , +QUERY_DESC_IDN_GEOMETRY =0x7 , +QUERY_DESC_IDN_POWER =0x8 , +QUERY_DESC_IDN_RFU_2 =0x9 , +}; +/* Exception event mask values */ enum {MASK_EE_STATUS =0xFFFF ,
drivers/scsi/ufs/ufshcd.c +112 -26
185 lines not on this page · raw message
Signature · 2 lines
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation