Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp637604ybh; Sun, 12 Jul 2020 18:43:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7i91F5AVZNBw/4Fvk6o2urIxFQRjVsvhIQ6dYuK7DlX6mNu8qhzEHsYzVwgvB84zXgLR6 X-Received: by 2002:a05:6402:2d7:: with SMTP id b23mr76941024edx.145.1594604600216; Sun, 12 Jul 2020 18:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594604600; cv=none; d=google.com; s=arc-20160816; b=r0WJwD3nODvXmzojAd89RiRKWuzojJacQIEjYzLwZGoK3jqqX/Lo1FWioeurEKTbGF BRIimIlliVQezXwK4jgvPlVqdT02CT0DJ138V+DUbapLfvwmCXVw60d7qf0pDAN8peqU 4Fd8BU/vE6pVADeUD/Mhia4vLFxEmDr6lkE1LkDkVvrhEfpSbw+ISESoJKylVelOawZC ecumbql2S5xdwocVmiC24EzYqDeGXc7bv8nBOR/0fi+/laJ+05yCVo3zBs6MnHVbDOKM kpS36SZDA9+9Tc00yLJ6IkytDKHGYiWmH99sYyQ7Hxb3CPGnrGJGn6YS7OKDnb5BJhqt xb7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=2hoCXmRUkmSAyEgVETfaP+qlFXIyx2KPK0JhSxhlAFQ=; b=ma1GQtCh54MqbaRtJRcu2kcwS+LfNn/D9rihW0UceUMeUkqhSb2EiW9pgbNZF2HtSm HJ5ZWIA+xjnjOhJawuIxqfFNhUmmlogiwLiE0QpTsH2hV0RhM3Cbo806jU4JdfqUs8Wj K1lLA18ecBZVUq/UrwNEabL5/tfhZdua6wVg12BEleNBgU6YZ/CXujD2Xi8j5MpeLL2u kkMQNriQowJB/B1rXO8AJAhrXpNmJKzyp11XlhWRw0BCUcmor7aLAnaSFXo7rLZGa9zV aoPbF4uEuwjcKDKi1a/YjKTTHQg0qt+vUJeYFG2xnd/WAwXH8jtQTspy0SEgKD5ap1f7 ipGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz20si7571781ejc.90.2020.07.12.18.42.46; Sun, 12 Jul 2020 18:43:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727826AbgGMBja (ORCPT + 99 others); Sun, 12 Jul 2020 21:39:30 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46561 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbgGMBj3 (ORCPT ); Sun, 12 Jul 2020 21:39:29 -0400 Received: by mail-pl1-f195.google.com with SMTP id k5so4779967plk.13; Sun, 12 Jul 2020 18:39:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=2hoCXmRUkmSAyEgVETfaP+qlFXIyx2KPK0JhSxhlAFQ=; b=Iz3Q5Cr2PUlppj0bHpxo4QtSjOBG6jxjPVn+VWDXvoi+7FFf06H/xdcZmC1t23Fj/P UBr/3cIlaQQd7RsLI99Gffn7sW+/Bvvs9qycmiv7jqXE8nEJUugnxOwFxwAHKZnp4I2W 8+PBJeO8CEWsA4qf6p/OmAJ/gX4+XHNpY8ZcsZU0cXte9oi0KFXpInwxgxBO5EItnHCs g85IUumwq9NLf+hI5bTauNoAjzQ2gU6/89MUFi4rXftMXOzIlK8FeGKb4Ad4g/VHPIPE /Tx/EfYW4kZYXBV6nD7TdplWEZpiWm2z8Prml44bU6tOQAF68PGjFjuFqDxAznAkzEE0 PkpQ== X-Gm-Message-State: AOAM532+C1PIAILD/hlx+91la6O5aoifmpvFJSrwmTr0Xd0UIxRnNPSG 3QZpHiGuNbCib+F4DseAHmU= X-Received: by 2002:a17:902:a50d:: with SMTP id s13mr59728593plq.149.1594604368866; Sun, 12 Jul 2020 18:39:28 -0700 (PDT) Received: from [192.168.50.147] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id m31sm13186578pjb.52.2020.07.12.18.39.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jul 2020 18:39:28 -0700 (PDT) Subject: Re: [PATCH v3] scsi: ufs: Cleanup completed request without interrupt notification To: Stanley Chu , linux-scsi@vger.kernel.org, martin.petersen@oracle.com, avri.altman@wdc.com, alim.akhtar@samsung.com, jejb@linux.ibm.com Cc: beanhuo@micron.com, asutoshd@codeaurora.org, cang@codeaurora.org, matthias.bgg@gmail.com, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kuohong.wang@mediatek.com, peter.wang@mediatek.com, chun-hung.wu@mediatek.com, andy.teng@mediatek.com, chaotian.jing@mediatek.com, cc.chou@mediatek.com References: <20200706132113.21096-1-stanley.chu@mediatek.com> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbt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QEAAYkBHwQYAQIACQUCVI67igIbDAAK CRBxXD01xc4QCZ4dB/0QrnEasxjM0PGeXK5hcZMT9Eo998alUfn5XU0RQDYdwp6/kMEXMdmT oH0F0xB3SQ8WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: <3d509c4b-d66d-2a4a-5fbd-a50a0610ad31@acm.org> Date: Sun, 12 Jul 2020 18:39:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200706132113.21096-1-stanley.chu@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-07-06 06:21, Stanley Chu wrote: > If somehow no interrupt notification is raised for a completed request > and its doorbell bit is cleared by host, UFS driver needs to cleanup > its outstanding bit in ufshcd_abort(). How is it possible that no interrupt notification is raised for a completed request? Is this the result of a hardware shortcoming or rather the result of how the UFS driver works? In the latter case, is this patch perhaps a workaround? If so, has it been considered to fix the root cause instead of implementing a workaround? In section 7.2.3 of the UFS specification I found the following about how to process request completions: "Software determines if new TRs have completed since step #2, by repeating one of the two methods described in step #2. If new TRs have completed, software repeats the sequence from step #3." Is such a loop perhaps missing from the Linux UFS driver? Thanks, Bart.