/* ufshcd_comp_devman_upiu - UFS Protocol Information Unit(UPIU) for Device Management Purposes  */
static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, enum dev_cmd_type cmd_type)
/* ufshcd_comp_devman_upiu - UFS Protocol Information Unit(UPIU) for Device Management Purposes  */
static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, enum dev_cmd_type cmd_type)
{
	u32 upiu_flags;
	int ret = 0;
	struct utp_transfer_req_desc *req_desc = hba->utrdl;
	hba->dev_cmd.type = cmd_type;
	ufshcd_prepare_req_desc_hdr(req_desc, &upiu_flags, DMA_NONE);
	switch (cmd_type) {
	case DEV_CMD_TYPE_QUERY:
		ufshcd_prepare_utp_query_req_upiu(hba, upiu_flags);
		break;
	case DEV_CMD_TYPE_NOP:
		ufshcd_prepare_utp_nop_upiu(hba);
		break;
	default:
		ret = -EINVAL;
	}
	return ret;
}