Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp1041914rdb; Wed, 1 Nov 2023 09:39:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGLfrqukoUy+uPSziiDXA58/N8hFlIx8tXkj09hYS6YX/zN/HSyu09a0UqIYUO4BE5KyMT X-Received: by 2002:a05:6870:f70a:b0:1ea:2a:dc59 with SMTP id ej10-20020a056870f70a00b001ea002adc59mr18275207oab.51.1698856791736; Wed, 01 Nov 2023 09:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698856791; cv=none; d=google.com; s=arc-20160816; b=qLZtHiha10BaGuRPvabZcwOvwr6NCPPziC28hFyelFCnBSSjW4jss41wn2T2JTxPCg P4riOpDL1fAaS8/l2mABfZYVXC2pbXnbszYrbr1nDnmFIpke8k6mkjBzc6GRjcZhVx3a YKNESjAz5jW+PWUB/Yy32jBCoHe9ngI2/agA2xbQ4biW4Cm0WBiTUwna071S9pgWmhT0 zsIrbC/7HRb8Yp7Px/wtXkxSn+YeiQmv6cXat07DSSSlN00A84Pm/2MytdTwEV1PWXwp K4DxlZvVb6W+jCdgNt8J/1U741hckyzeWgibuSUQ5HexZDAWdzcs1mLt7SsBPAz/GwbI lVDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=NM0Epbc1VMsDZrKerag8ZHHcxFKYveaKX4D+B9iSczU=; fh=udFry4Xtesxqkp2LnOTtrLI2o55a3R/Nzrm86Sg9/7Q=; b=CkuvhI2NAenzJ9xQA9e2GoI7MLEZv9C0ONlnDMFCe7ESnPEwkkZ7ZaXGHEKIuAY8cT OBwetm5lvbBPHTUEU/4aeU7eBzGy0SXMZf5nspAmWB+9xT0SeqY6/UsYzK9spH36ib2z oXNFRS6ZyAxuYBcxMwpqFRKhlZflWJSZ6mkHdehf7cBNnem9IM8vW4TgSWOLPZSvxQ4K DZy0ltEoRn5SkiEkC4FSHTNEZS8xePnButkJeIznr73wS1cWJYG4jovWk4ytWo1pArTw DYdtE4mgo4Ls5iWxP/PDj7lh75VYGsV+VvxCJCt0wrJDi9SEXZiPTMHJ13y58R1a4Iy5 uRPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id o4-20020a634104000000b005a0018ec786si211806pga.854.2023.11.01.09.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 09:39:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A1A8D80324CC; Wed, 1 Nov 2023 09:39:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231345AbjKAQjZ (ORCPT + 99 others); Wed, 1 Nov 2023 12:39:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233394AbjKAQjX (ORCPT ); Wed, 1 Nov 2023 12:39:23 -0400 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C0C5FD; Wed, 1 Nov 2023 09:39:21 -0700 (PDT) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1cc5b7057d5so27921185ad.2; Wed, 01 Nov 2023 09:39:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698856761; x=1699461561; h=content-transfer-encoding:in-reply-to:from:references: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=NM0Epbc1VMsDZrKerag8ZHHcxFKYveaKX4D+B9iSczU=; b=jc3Z1kYyJwh3r/0bHfu+1pU4HQ0Fikis8gS6rCNUAOZJEcaxarxStBXvpxVziP7PSh QKk8ci7K8zPE0d1enZld4W3MtBZnwS0aoJ9uelWiZCqZsgBjZm9cO7Ox8yg29i+LjJbk lEai8mTZ9TcC+BQA4dWgL5ahZeRleecYZbeJb4wTrOeLWHcwJ2f1akJ5hG1VIRklx5ol XmeT3oEWtmslIB95sEn14LzIMh0SoI+nKNDbDnK69M4Qgo8woSE6VGeCKCIL09wRIuDb DK6XgnE5mKZmH0IFJI4bKOPNIQY9JJuO+1Wl91RkNeVdcAtdzzsr90fCjWm4Wox/I8r8 cNGQ== X-Gm-Message-State: AOJu0YzMphC9ThYd/78r36ZK2HeiPs/jVNyh60c3I+3ngXBarbYfMKwu q8+ni0sKhT5xBTRXvxcDE2Q= X-Received: by 2002:a17:903:228f:b0:1cc:543b:b361 with SMTP id b15-20020a170903228f00b001cc543bb361mr7919656plh.43.1698856760603; Wed, 01 Nov 2023 09:39:20 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:2312:f48f:8e12:6623? ([2620:15c:211:201:2312:f48f:8e12:6623]) by smtp.gmail.com with ESMTPSA id f12-20020a170902ce8c00b001c898328289sm1542038plg.158.2023.11.01.09.39.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Nov 2023 09:39:20 -0700 (PDT) Message-ID: Date: Wed, 1 Nov 2023 09:39:18 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] scsi: ufs: core: Process abort completed command in MCQ mode Content-Language: en-US To: SEO HOYOUNG , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, beanhuo@micron.com, kwangwon.min@samsung.com, kwmad.kim@samsung.com, sh425.lee@samsung.com, sc.suh@samsung.com, quic_nguyenb@quicinc.com, cpgs@samsung.com References: <20231101084504.79087-1-hy50.seo@samsung.com> From: Bart Van Assche In-Reply-To: <20231101084504.79087-1-hy50.seo@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 01 Nov 2023 09:39:46 -0700 (PDT) On 11/1/23 01:45, SEO HOYOUNG wrote: > In MCQ mode, the case where OCS is updated to aborted is as follows > 1. when abort processing is completed > 2. When a duplicate command occurs What is a "duplicate command"? The UFSHCI driver guarantees that each SCSI command has a unique tag. > In case of 1 situation, cmd should be re-request. It should be resubmitted by the SCSI error handler. The UFSHCI driver does not have to request this explicitly. See also the code at the end of scmd_eh_abort_handler(). > case OCS_ABORTED: > - result |= DID_ABORT << 16; > + if (cqe) > + eec = le32_to_cpu(cqe->status) & MASK_EEC; > + > + if (is_mcq_enabled(hba) && !eec) > + result |= DID_REQUEUE << 16; > + else > + result |= DID_ABORT << 16; > break; I don't think this change is necessary. Additionally, introducing different behavior for MCQ compared to legacy mode in this code path is suspicious. Why should how commands are queued affect how aborts are processed? Thanks, Bart.