Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1973234rdb; Tue, 20 Feb 2024 12:44:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWEbdj4pNslN/VYc8vBrvbl/WfekKlyS5//wedxNQ0gsvkUQyPa0pw3kq2j4o3pgYnRgzUHLNZhinti2mc6RW9FG0/1B1kcSBYOQ6X6lw== X-Google-Smtp-Source: AGHT+IHnItoQqiuSeUd8uHpnZqVFZ5YEgjdHtwf7iP4wVIP3IhycuYmWSDkyHZD+HLaeskPc8ITp X-Received: by 2002:a05:6a20:ce48:b0:1a0:726a:6e44 with SMTP id id8-20020a056a20ce4800b001a0726a6e44mr15207277pzb.3.1708461876651; Tue, 20 Feb 2024 12:44:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708461876; cv=pass; d=google.com; s=arc-20160816; b=wb/QZMUK0Zay8CC/SVTFYfUAfMuU9bAilTzeWY98oD4bZ759vkAE2rr7+RjKR14EpH rfUCFwdsPfRkILe4DEILw91lM1W2SdRxNqUl5DqJds2rsnXdshiKoSCRSrBCnJb02hEI SktLNJJqsJc2XBgsEApBVzRvVM2rsFNl2yxFDWj3c2zCtGqe2Ua0YhFgON1i3fKZZ+Zn QLWmRIiPCaHZQgiK5xSaCWiDBCv3siUyDoK+k03pYq6+Q9MN/vb93gIZTjPUfOH8Kwft Qp7X9vDP4RpJ6wuFbsmevB+TgeUbO8O7tzf0BvUbNbZHfM6VVbsnwE2bsvwCAm0wy3jk QfFw== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=Trult/QkhUE0ZEVtyLMGE83zvxu+D5mSE1btytOTGTA=; fh=h+Rm2rDKpoOF7RY9Ixl8vOWMizRj5ln/IjHm8BTU4MQ=; b=hWNEz/aAUFMiCDNb99O6qgbddT+RX++nFn25P1alVLEvkx7+sYfpppfiS/Y9cQfxqM 6mBQkUam4RebdbplMm7anjZExHRj80fR+JOQi2m3d5QAT41AZm9UZVgxi6t77jsQ+29P TkcSJbriQMReOlD/kqjcntdrsLxHAWsGIumqj1JocBXw9uMRP4HcLUKkeYCpWOI0dA8X TYh9CU/sDhG2iyy4PS9l2TRNoWiJ2DS6Oea6BibvgU5Xk/z7JZ+6oR7LRch6gbLJBcBR ZDGTJ5mOPL4D9fXmX72TdKq25d4WFFY/qfAGPhEp3FUSeVpADsNn964OOu4+oH0fW8Lk vgkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-73691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73691-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t19-20020a62d153000000b006e3469650bfsi5985467pfl.224.2024.02.20.12.44.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 12:44:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-73691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73691-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5ED412828AB for ; Tue, 20 Feb 2024 20:44:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E10714F9DA; Tue, 20 Feb 2024 20:44:28 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C8141FDB; Tue, 20 Feb 2024 20:44:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708461867; cv=none; b=pllSomz8G/rFHlASi+XSatoUGNCMo9hA99BkYwal1BRc+7swCiDecMWeFU3L6rz736WuXGaLrB7mQHUh+XDQI2IGVBiK2dJAITjU8JeoedombzrMe2VNUvl8jbtYhu8ymzoPB1nuOdrFZ7VeSQTko/Q8xZhMvw5+QoWnOQFCxC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708461867; c=relaxed/simple; bh=+NpirNdlapHEfcSl96xe1oRXZz3bdX/1ki2AhBoKygA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dmt62F7qfCMDJxJRonS7RM4aZh+aSoao+MkcsheyGAqwAMIjL+FYawh1WYBdn11IRcMcgPA3QBanO6Z6nfEFBQObDAVT4qkzGMxDAakxDMAh3DkoPOiHYU7Q0IJcdaW1d3K4sPSdh+tQjhIMBb5DqHh6WeOJaJezVCOVGRM1iH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=acm.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6e47a104c2eso813581b3a.2; Tue, 20 Feb 2024 12:44:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708461866; x=1709066666; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Trult/QkhUE0ZEVtyLMGE83zvxu+D5mSE1btytOTGTA=; b=qjjwwbAfO2ur8OuxV4s0jUUxsB4i+KfOpN2SCkFZ9nOv+WWTDBbo1Pgmpt+xbh+43s l30HvdFoLrIS7fnAGzPnA0V5azKPZ+/l7VasxySf/JzK3WDwundlB9XTNDlBdDD6S46/ fiV0vCXui8kWtEChw+5anb4U9BCwxJYPSBHjrcXoDv6yFNZu9+w7hcU4azKfaRioOWTM NAt3KgT5IVfvtAdRykri7J1RD+QYEIZaedJyhmoD927iP5aE+KI6RLcrWlE5YGCKI4Cl 8ZH045fQxQlPJ9ZY9IjAS/aiHxk8rKmNBzQUXljZuxv1OHPug1noV/i/iZc0ACVAzBYJ b2Xw== X-Forwarded-Encrypted: i=1; AJvYcCUS35MEk8/Irxv7YW7NtkVr96GS58fiMoJUHp9sImDFTjFd664HFKKGDYSWmQUsS0oIARGAEztZ1N8ehMjgKJwT5kgrluJXgIk0B7HvtxwKnzc+JWfNh8lr/JRRpJpCdxex9lGyuU6NmA== X-Gm-Message-State: AOJu0YxVSXriXQuN7JIiYqAQnBj/N7lBUQ3ZaSMatAaQLD2IfYxwGx+m POwfRMbutlo2ZjeWNRRSY6nPmOTiDTc7ZQN/ZnIeUzawZmS6OmOS X-Received: by 2002:a05:6a20:c90a:b0:19c:ad6b:e1c2 with SMTP id gx10-20020a056a20c90a00b0019cad6be1c2mr17347405pzb.12.1708461865534; Tue, 20 Feb 2024 12:44:25 -0800 (PST) Received: from ?IPV6:2620:0:1000:8411:d74f:a168:a26a:d7fe? ([2620:0:1000:8411:d74f:a168:a26a:d7fe]) by smtp.gmail.com with ESMTPSA id o74-20020a62cd4d000000b006e3f09fd6a7sm5932938pfg.85.2024.02.20.12.44.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Feb 2024 12:44:24 -0800 (PST) Message-ID: Date: Tue, 20 Feb 2024 12:44:23 -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 Content-Language: en-US To: Rohit Ner , Can Guo , Bean Huo , "Martin K. Petersen" Cc: Avri Altman , "Bao D. Nguyen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Can Guo References: <20240220095637.2900067-1-rohitner@google.com> From: Bart Van Assche In-Reply-To: <20240220095637.2900067-1-rohitner@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/20/24 01:56, 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); I'd like to hear the feedback from the UFS controller vendors about this patch since the UFSHCI specification of the MaxActiveCommand controller field is ambiguous. While the example shows that 32 should be configured as 1Fh, this is not documented in any other way. Thanks, Bart.