Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp154943ybh; Tue, 14 Jul 2020 21:20:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw00OzG1tcohMOROA3Hh9Th7NFvsCrgQRwsOLrSIJhRZ/39HENI9m9L1hotPuct7vNCdTx X-Received: by 2002:a17:906:ca57:: with SMTP id jx23mr7259522ejb.256.1594786814505; Tue, 14 Jul 2020 21:20:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594786814; cv=none; d=google.com; s=arc-20160816; b=H0ifquoJVkwFWql4huUa3Rv/pB/vyi/vprXZMm7ORsuZrwYWt3InuXupDO6Nrlh9Vj HCrmGvIrOYxFGFHsme5W6i4ZckR3NzDIpbGX5mqapkckdFtwR/AmB4JJaTvrhGjgtCA7 gtlyLMUbbqfqi6JHTFv7alnpwIC6kzX/C6UgVJG6MxZzl/ABZnBD0J/LPZSJQDXsPnZU rNMizwnQZQ3heCJfJX7tGnk+T60HdQEUewyqii8cocPG+n+Aom1Ubp48lYKzWgmHfGRM c6qbowC/fyj31lmyH/Nz/D0MyiRX7G50Ar4+LILa4CUailZ7kSwPOKQcXkZyRugyrbrW nFdA== 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=lERFJsVziUIHdDubkh5EQsGRx2WiD8PPl5yIF/RY6ck=; b=G8w3aE974oDLuDsmScgcqEPjPoW33mBd9wCjcQas8CIfh6Xa0VjxvjLxyhAmMnkgTl aSJV+RiyXp+KWNixV9jsTHsNWktnJHXDJvO+9DLWUz6HbozxQp2H5EThrKbf2r3jKSWC qiof9s2kjYIfjAkjkudtkAvQjPJJ4zGH/77Jz8xIdwm0iq1iFF0Ijv6YFSYHo4kVdhC2 BSlEY2jPdn6usz/kOKoTuT6lgKLr2S2cgHhqHYZxySN7j0q7sIROye7iPK13bqBwO9lO Wo5fq2qaHICbNjX7Pr44kEsVuGjAxCmbF93LbnPeIig/nHjfp267FUroiOY4s3jlj8r2 Z8rA== 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 s24si513757edw.69.2020.07.14.21.19.51; Tue, 14 Jul 2020 21:20:14 -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 S1725811AbgGOEAs (ORCPT + 99 others); Wed, 15 Jul 2020 00:00:48 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:40944 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725770AbgGOEAr (ORCPT ); Wed, 15 Jul 2020 00:00:47 -0400 Received: by mail-pj1-f66.google.com with SMTP id t15so2014321pjq.5; Tue, 14 Jul 2020 21:00:47 -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=lERFJsVziUIHdDubkh5EQsGRx2WiD8PPl5yIF/RY6ck=; b=Nv2Rkw7Xrczm2KEgi3kdQVC2yk6r3J/TrCnDoMEwi6y5ouLa1Ti7V28sgnNed+knFT aTGuz74f1xKCvjj4IM6JS9xAX6WX9QZhSbIMXvkveznnEkb0GRurKCUFZ5Q2z27m7vKj FsK/mwfE2MUQlJCK7Qx3ijqg4ZPmfdR/O9DxdZMu4pyAgkvr3NF+HgZK26bEPPqaNK3R T+0luXxLI/ZMWnToRrDqrjholVJ9T9+T4Qs/JZXrBs7KhadOcilPema6IGEA7qOPZMxl SOwpuNwuOEP9EW8/IqU3DAaGIMOb33KJ6Sbj6MUwute4uPiQcYNi5Cqw2YTXLIwAv/hU tECg== X-Gm-Message-State: AOAM531eChbYjvp+9Erxl1imVLJYBV3ljvN3eG7Wg9hR0z9egCpD7bom cgBobHnMsM7k6vMxWZp2ZDE= X-Received: by 2002:a17:902:b589:: with SMTP id a9mr6097265pls.98.1594785647018; Tue, 14 Jul 2020 21:00:47 -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 i132sm568002pfe.9.2020.07.14.21.00.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jul 2020 21:00:46 -0700 (PDT) Subject: Re: [PATCH v3] scsi: ufs: Cleanup completed request without interrupt notification To: Avri Altman , Stanley Chu Cc: "linux-scsi@vger.kernel.org" , "martin.petersen@oracle.com" , "alim.akhtar@samsung.com" , "jejb@linux.ibm.com" , "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> <3d509c4b-d66d-2a4a-5fbd-a50a0610ad31@acm.org> <1594607245.22878.8.camel@mtkswgap22> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5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A+BMCxBH4LvUmHYhpS+W6CiZ3ZMxjO8Hgc ++w1mLeRUvda3i4/U8wDT3SWuHcB3DWlcppECLkAEQEAAYkBHwQYAQIACQUCVI67igIbDAAK CRBxXD01xc4QCZ4dB/0QrnEasxjM0PGeXK5hcZMT9Eo998alUfn5XU0RQDYdwp6/kMEXMdmT oH0F0xB3SQ8WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: <912623e8-5915-8380-f39a-fac7b5868a6d@acm.org> Date: Tue, 14 Jul 2020 21:00:44 -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: 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-13 01:10, Avri Altman wrote: > Artificially injecting errors is a very common validation mechanism, > Provided that you are not breaking anything of the upper-layers, > Which I don't think you are doing. Hi Avri, My concern is that the code that is being added in the abort handler sooner or later will evolve into a duplicate of the regular completion path. Wouldn't it be better to poll for completions from the timeout handler by calling ufshcd_transfer_req_compl() instead of duplicating that function? >>> 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? > > Could not find that citation. > What version of the spec are you using? That quote comes from the following document: "Universal Flash Storage Host Controller Interface (UFSHCI); Version 2.1; JESD223C; (Revision of JESD223B, September 2013); MARCH 2016". Bart.