Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1873498rdb; Tue, 20 Feb 2024 09:22:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUDBMomCr7GRiNtb7Xnqz9IjxYGIa9R6yAM7ejSZ0UsTj6v1/oHNAhO2jwNXZWf7YzxNUTayiRfRea9JJmdObC1OovHjLqZCxnaLe3qcw== X-Google-Smtp-Source: AGHT+IHYiOhrgzh0+mI2hsilp1MDMNSxJAgbJjLb8+N/EKla6TIIquvNsK/ga9l/rKdPiyaUFoJu X-Received: by 2002:ac2:5e6f:0:b0:512:b297:286f with SMTP id a15-20020ac25e6f000000b00512b297286fmr3993666lfr.52.1708449744959; Tue, 20 Feb 2024 09:22:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708449744; cv=pass; d=google.com; s=arc-20160816; b=mSBabEjOLbNwEGiYwSGP5VDYIuO1S/dHZuLSV1rUv2yVPUcKEAVDerlwBxEqnvF0XG BeoF1RM39+3c/KJq5a+dsoLPyZc3r5+SMb5xJCFDMVdD0OdJ/J6bB8eM26rGKgIJO5yj mSKUGrrE19aLuBaHAeF43tf3uuSjegI7engiNOB52XRzZ0zPGmtinsGzW5dwYR8SHZo3 cPjg+gQ2f0vQnRcSqCUmPr9y7uiCxzxO4nyqdySVBF4kLGHIsHi38ibaoIBYjJjN8BRo SWEztm7rLgEvTiiVmy0apIcReWXA7iWDFSabZ00mVXLSqwNJR5gXvgrezb9HioIwULzu JbNQ== 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=q2yUIPD7foX8u6Xdbasilcg/3p8ULKCtlmQtBTHBRrU=; fh=P3iz4U/FOykWtI7R1OlvICEfWvV/OhbGMvvmEfsv8iE=; b=ijzpfK+CoJJZY4jpiPvLTb/QZiLsZJ60IsS/FZ6bHpkf/69Y0G3nSe3Ul5KmUMnXcq 0Ca0SwQw/T3Bml3zb5it7pfbOfR1/mfRhp7woQflRH1EMOIuAHrMkDstENdTmLBjVt7n codU7Qef7hZRXoUW91dIyFn0enJYhtgEpggDwi2ls+db3PPRkOKzsMniYsLypr7rEbo/ jJ9AWGdBbDLj55RDbkzjVOOm7fYiGdc242ncsMT2lTmZvzQsEhtalAMBXfXNlZaQmlbO ErC1tABzZyseeVdJXKJfiL+C9gg4qgdIzVgxlXViXo12EV2XVkttZTkJR/7rAUWXpz4P IibA==; 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-73433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f22-20020a170906049600b00a3f259df35esi83489eja.712.2024.02.20.09.22.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 09:22:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-73433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73433-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 35BF61F236A8 for ; Tue, 20 Feb 2024 17:22:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A07E7765D; Tue, 20 Feb 2024 17:21:43 +0000 (UTC) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 2ACDC77626; Tue, 20 Feb 2024 17:21:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708449702; cv=none; b=Ga5CSM2k5xwranlZl+YJmESnqyx48h0o8U+jMal1UnpHt9GMjMstHBRrIq+YK1gv+477RogPX4Juxkq+AOYgMuY58TxTfrWlNv++UBuvpqQuGU8JHfj0MwXSjfW69P5bOzRstya1Ibt4WpZAPGFxn8qTV22S2xeiQtGq8HBzUsc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708449702; c=relaxed/simple; bh=mPo+l7s6R2Mn5HzTebtRduD2jfu/x8K/datW8X5vC90=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=q2+OpkUeas4pb8Dt/N4dct68D7PguvkyP2VOMx/sqsztDCcfjNBkfblko2CQ5bVLWJXU4DUQ0Nun/l3hPk/K/SVNoTbS14YzQ7EdCTgfOD+p4rZcZQwruOfa5Kose2kWoISvI4pI/vC2J3MmHinz37U+jxf4uChFLGEU3KRZzd4= 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.179 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-f179.google.com with SMTP id d2e1a72fcca58-6e0f803d9dfso2903171b3a.0; Tue, 20 Feb 2024 09:21:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708449699; x=1709054499; 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=q2yUIPD7foX8u6Xdbasilcg/3p8ULKCtlmQtBTHBRrU=; b=e/kosMAp12J+yiF6DGKXrEZV1tkuDDqC0SOtLxOfO8mgIOy4Dz7r1qSEZf6oupFoF/ 02wKYY1lxGnKrC9NpVd2zzHiStrEUWWy8hAlh97ijzqcm1+YplTxMGAfAeiMgv5xEpHq SPawy8MzbgG+TfY79r8xaHzNpjnbmxKeU9LPCK6+yzzrfxc1aUdVKTkdUTn4je2JbUDz 7c1iiXh4VBkKu6yx7bkYDPGLfSLfW+rJUGkqxONBzpi81tMPQZQ5qddBdoWPX9RpwgwX 8kwexL3MwdrXzI+VyoT8+RsprOIh7c/naz4/E7Et4lERLjdRSu0ovUY/gPB9IaKXsPGv j1wQ== X-Forwarded-Encrypted: i=1; AJvYcCWByMh4C5ZiEkgqW2yRsoX+fRY/iXFnHgIYxgfo2SKz0/Nkp+gLYk7vJiwE0iCzcFEgciuISwTO4TmAsJC/f4ZuXG13o6IiWnH5ZG5lr9bjkb5ioe7UDcmXbVxsyRXX1m2VwLQPAXx/FA== X-Gm-Message-State: AOJu0YxU1vWtfGQeD/WGaUwHy3D96lxG0nyLkpPdtCGWRqz11iqGp4N/ 7GaqVIbhnzFbpE4s+5lEVYd41AoccsBVzZ21VAzgOlxeqSB+rLk8 X-Received: by 2002:a05:6a00:1897:b0:6e4:864a:9f68 with SMTP id x23-20020a056a00189700b006e4864a9f68mr1190636pfh.5.1708449699227; Tue, 20 Feb 2024 09:21:39 -0800 (PST) Received: from ?IPV6:2620:0:1000:8411:455a:b76d:46a7:7189? ([2620:0:1000:8411:455a:b76d:46a7:7189]) by smtp.gmail.com with ESMTPSA id d5-20020aa78685000000b006e2301e702fsm6824989pfo.125.2024.02.20.09.21.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Feb 2024 09:21:38 -0800 (PST) Message-ID: <1920a2f6-e398-47af-a5d7-9dad9c70e03d@acm.org> Date: Tue, 20 Feb 2024 09:21:37 -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 setup_xfer_req invocation Content-Language: en-US To: Rohit Ner , Can Guo , Bean Huo , Stanley Chu , "Martin K. Petersen" , Jaegeuk Kim Cc: Avri Altman , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240220090805.2886914-1-rohitner@google.com> From: Bart Van Assche In-Reply-To: <20240220090805.2886914-1-rohitner@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/20/24 01:08, Rohit Ner wrote: > Allow variant callback to setup transfers without > restricting the transfers to use legacy doorbell > > Signed-off-by: Rohit Ner > --- > drivers/ufs/core/ufshcd.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index d77b25b79ae3..91e483dd3974 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -2280,6 +2280,9 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag, > ufshcd_clk_scaling_start_busy(hba); > if (unlikely(ufshcd_should_inform_monitor(hba, lrbp))) > ufshcd_start_monitor(hba, lrbp); > + if (hba->vops && hba->vops->setup_xfer_req) > + hba->vops->setup_xfer_req(hba, lrbp->task_tag, > + !!lrbp->cmd); > > if (is_mcq_enabled(hba)) { > int utrd_size = sizeof(struct utp_transfer_req_desc); > @@ -2293,9 +2296,6 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag, > spin_unlock(&hwq->sq_lock); > } else { > spin_lock_irqsave(&hba->outstanding_lock, flags); > - if (hba->vops && hba->vops->setup_xfer_req) > - hba->vops->setup_xfer_req(hba, lrbp->task_tag, > - !!lrbp->cmd); > __set_bit(lrbp->task_tag, &hba->outstanding_reqs); > ufshcd_writel(hba, 1 << lrbp->task_tag, > REG_UTP_TRANSFER_REQ_DOOR_BELL); UFS controllers that are compliant with the JEDEC UFSHCI specification do not need the .setup_xfer_req() callback so I think a better motivation is needed to make this change. Thanks, Bart.