Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2242464rdb; Wed, 21 Feb 2024 01:12:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXpBUJfXVFio5TY9AOTkFjMTtFKj4ExYS8RcjZtb1FGz82wnBdFXxP2MtTVm7nKAQeoZ/12zejulMzbTAiUtwF2G34WpvQ7dm80QPoWKA== X-Google-Smtp-Source: AGHT+IEAP85dG7ZTbgB2SCamWwrrTcs7CfipbUzBKgISZWbFyx/h8HnlFI0TSs6Hy2wByunK/GRO X-Received: by 2002:aa7:c655:0:b0:561:8918:9f5d with SMTP id z21-20020aa7c655000000b0056189189f5dmr11500597edr.20.1708506727010; Wed, 21 Feb 2024 01:12:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708506726; cv=pass; d=google.com; s=arc-20160816; b=l8g3tI2s1v1amFAPjtAFPxF8PPT64jIzfbl2xiqIUldSrnHQ9guagGroMGIQZDNL4A E8VINWKtSQVmsodcFHdK5fkSN4DZKUUw52CKYt+dgXQvKtoGbxBQV8ce9QLF2kUk+jTq 1KRqI0+GrOM/Mj+/A+rEUFLvuwVT0inmyAz0II9lHFiNJqDdIedXHf3FTKwhXmcYWg/U aKp/kr0Ben6CTpSySFB8Gt+B4X0VmlNYq3bcj2H6WPtyFRYtO+rfc20aJZZ/msAHSIzy RMn1l8vPuZb/FyMFSd+yIDj1qmctVEwvusSU7myo1s0XKmP3ddhrKatOVpkYPVcu1gO/ B+zQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Rm9nfXyllOUZ4Ibd5UKs+r2t8KUwgkJ+x+imnhOfPek=; fh=npFtlKqI6L2PzdDAD+NylbOFJAVp71ZueGvWc9YLbi0=; b=y+Vp0PePNS0HOXRzzoai1CBAuqZD3rzJdrCT//htuqb0cx7+tPVusPuR5tzjjGi6QT bzSu/Jae5S9p8QVd7GWxGCgIS530QtngQyLrSNhhFqE1pHeDhfFruKgOywChtfgIB1YB KjpuheXRgE8Sze1vMPqNvLveqc1BKmnhLZhWhPNmgilpwY8UlSR6laXeGS4inbjo1sqj EWU6VffdJe9eFpEKVZx9NWE0W1Cl2Md1lweStLScPhIy6aJpJqNXCTb5NB63YIywl+7n GFd5aZW93mUnSgByU+rdJTE1TBYsWUHmpyApqFFqrAnhLnGo7OvxdTjy0RHFLS5A64wj YB0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cXEZj7+0; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-74367-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w14-20020a05640234ce00b0056494a58cf1si2234708edc.422.2024.02.21.01.12.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 01:12:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74367-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cXEZj7+0; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-74367-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B39B51F214A4 for ; Wed, 21 Feb 2024 09:12:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F1D13D3B1; Wed, 21 Feb 2024 09:07:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="cXEZj7+0" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A2E23A269; Wed, 21 Feb 2024 09:07:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708506461; cv=none; b=sWmrqcEmHXtVv2eri0Vt/mA35IhtAw4/5x1vks9WCctVqyCc9I4+PRMHz8Wot1dXYEJ6JhPDKzxl40ES+wGyxEK+c+fRbQl6mRtzX3y0lLucsHnsmwAEX9DPQGKIZVvj2l0pyGf/HVhDhLGhGZtXNNLnfZjLDOM/NXr043Zl6c0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708506461; c=relaxed/simple; bh=mciGcG1/7XQyHXY9pTQf0Pnd9D3SNVyA+vi37R1v1PE=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Ypotl8itmJ61GG/Z/g+6T4D+OT7YnpShJ8Uv1WClY4nCpOgeg3JpM2Ad510sUx6ENzU7K4OfG5OhRlgjyWUd8tsWnZitf5vOenJiU6sPJyPRf9RSsq/Dr7Wfuo+72jp0AqY6WYd96+C3INrPx6OiY4quOaGQAE0ytfLQV7qazs8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=cXEZj7+0; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41L7hgtc015736; Wed, 21 Feb 2024 09:07:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=Rm9nfXyllOUZ4Ibd5UKs+r2t8KUwgkJ+x+imnhOfPek=; b=cX EZj7+0P12cPG+nxnzIP3cykoFWzA4w3PPmZhz1KjB+xwUWMqiaD+5LA7fU4ZFb/m psOD8bceG4X+LN2x1kneoD3stSbyDCI3fFOog6kbP34id3QlhxyB+zOF4/6e0D1B eRj8LW/2zf0xQ9BK4VMjwPEMnGI1v2NsGOZ9M2ZcV1O2S1UJ7rHq8zmGLVn4pykT l1KOvnzbzGPy0yHrzoqOJZ/rBs1L3z925sCNSwM7US0YlVKDKrLlWx6hvN49nMFi gGO5wmCG+wS1+Eq0C9WHp4PilBX6CmTBz1V0LRJNBbvD2fiW5l2WKI7O4/yi/qhL Gknzw1q9vgk2up3o/WJg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wd22rhfpk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 09:07:29 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41L97SEC020735 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 09:07:28 GMT Received: from [10.253.11.235] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 21 Feb 2024 01:07:26 -0800 Message-ID: <5ac69cde-24d6-4d31-a1bb-10e91dd289ce@quicinc.com> Date: Wed, 21 Feb 2024 17:07:06 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] scsi: ufs: core: Fix mcq mac configuration To: Rohit Ner , Bean Huo , "Bart Van Assche" , "Martin K. Petersen" CC: Avri Altman , "Bao D. Nguyen" , , References: <20240220095637.2900067-1-rohitner@google.com> Content-Language: en-US From: Can Guo In-Reply-To: <20240220095637.2900067-1-rohitner@google.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: hLHaYREpg8i8MLinWT63Eeuvb_fR_0wZ X-Proofpoint-GUID: hLHaYREpg8i8MLinWT63Eeuvb_fR_0wZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-20_06,2024-02-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 adultscore=0 priorityscore=1501 phishscore=0 impostorscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402210071 On 2/20/2024 5:56 PM, Rohit Ner wrote: > As per JEDEC Standard No. 223E Section 5.9.2, > the max # active commands value programmed by the host sw > in MCQConfig.MAC should be one less than the actual value. > > Signed-off-by: Rohit Ner > --- > drivers/ufs/core/ufs-mcq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c > index 0787456c2b89..c873fd823942 100644 > --- a/drivers/ufs/core/ufs-mcq.c > +++ b/drivers/ufs/core/ufs-mcq.c > @@ -94,7 +94,7 @@ void ufshcd_mcq_config_mac(struct ufs_hba *hba, u32 max_active_cmds) > > val = ufshcd_readl(hba, REG_UFS_MCQ_CFG); > val &= ~MCQ_CFG_MAC_MASK; > - val |= FIELD_PREP(MCQ_CFG_MAC_MASK, max_active_cmds); > + val |= FIELD_PREP(MCQ_CFG_MAC_MASK, max_active_cmds - 1); > ufshcd_writel(hba, val, REG_UFS_MCQ_CFG); > } > EXPORT_SYMBOL_GPL(ufshcd_mcq_config_mac); Reviewed-by: Can Guo