Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp882471pxt; Fri, 6 Aug 2021 16:52:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDbp+3M1kKRWHQJpG6LZLqlBkpN50E5piLiaI8wY/ps8La2cxPEZH47wqiBNnJqZVlzC2w X-Received: by 2002:a02:8807:: with SMTP id r7mr7139204jai.35.1628293974353; Fri, 06 Aug 2021 16:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628293974; cv=none; d=google.com; s=arc-20160816; b=nvAeEPpWTz/wlWBSKa6uUUoLOQYng4bffTv14ub+jEeV+BD1iPTwrpLiRs/AiiW6f6 zMp1uw/DcymrsDrId1y6ffu/pzAHPDaqyPQhbfh5OcWB0xczes4pwSkIC2pYs5DCYvZJ sOvpczJoSeDvm5DdI369a9dLkcI11IqEH365DmMrRjI/abVJ8asKcHsuBCRt7mkWEqZK renFlzAPnMNNb1ThoAn6JWGbHX/hZ1ZfbDI2YuvANo1BblHKcAeY9ByjIBPOn8Bl0La3 hNVOUbwgL5NJydo+5YSERk9Cnoe9OU3TDx4B29TtM6HKNENkaXFkDOmslP3OaQ7OhEbt OGRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=Eed/Vd3ZBT9dv64+e9iMg0kWdbsU8GjPWvNnrpC/C8E=; b=UZ7e8JloD8AH9uhxEKPdxlntSkjIG7YJ20Ct11zX8GFzrBqc0USftgN4//Ylx3Qg+Q zxK4Zk5MVWQ2GlYRQOPxoxRhLFtU9lF0t1pSeahkHH2dpea0etQpotmboet2uwbH0G7r gW/3MPwY7gCiw1qwdI4yBV+qh7xRsaVd9/U60xrcq7sRqW5krP61okE8oiRY2UjLCAqa YQboqI+1yT5chrfACtPZI0iwqnlQRt+1LNGpqFEWWm3PuUVR+NHTZsFKdEaGuyoh8ska Zup1RFKUAcbUpYVVuCbq4TSjR+LEHGs5yXS7idYSj2K1luk+wgBvB2N2/yAjUgzkn7k9 6jGA== 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 b16si10668027iln.129.2021.08.06.16.52.43; Fri, 06 Aug 2021 16:52:54 -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 S233299AbhHFQhc (ORCPT + 99 others); Fri, 6 Aug 2021 12:37:32 -0400 Received: from mail-pl1-f178.google.com ([209.85.214.178]:40926 "EHLO mail-pl1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232925AbhHFQh1 (ORCPT ); Fri, 6 Aug 2021 12:37:27 -0400 Received: by mail-pl1-f178.google.com with SMTP id c16so7799527plh.7; Fri, 06 Aug 2021 09:37:11 -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:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Eed/Vd3ZBT9dv64+e9iMg0kWdbsU8GjPWvNnrpC/C8E=; b=tWrJ6dA/dUgxl+IRrplbCyZE81g6Gv+A8E9xUUxNeCyraR/CigvrHJpkn4px9Aomsu VQSS36sbVTJ7vLuQJ56H+agQrH/ewJB9jedRuF1zK+N3Kv1R4wT9GWYDjIDRvXHt/PkW J//1oRR5lyhM4BzNFbJJP6LJFtSgDpmnjHe3KJrNOt/h2/SiWKbAhNiB8KTcx9UDHVty Se5SKuedrw23MT1LPOdYpE9x+7U7il4qU98Rh4VcLhi4vLRiCAkF8qHMlOAKiU2MBXrr n9Uo7bfskTVkx8ahQaQX4leqDOe/E+kFKEy0rwi+tUGDXfKOt6kA/sjURG3a6T4NhxF9 Y50w== X-Gm-Message-State: AOAM532aL+OzMXjOKGvVFiP+7oh/oc6fEizHQ5A5QfO9kANPbVhg9MWP JVXv6JXRgphxrUBTY732E8o= X-Received: by 2002:a17:90a:d308:: with SMTP id p8mr11396925pju.65.1628267831025; Fri, 06 Aug 2021 09:37:11 -0700 (PDT) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:1:1655:15af:599e:3de1]) by smtp.gmail.com with ESMTPSA id y4sm9601666pjw.57.2021.08.06.09.37.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Aug 2021 09:37:09 -0700 (PDT) Subject: Re: [RFC PATCH v1 2/2] scsi: ufs: ufs-exynos: implement exynos isr To: Kiwoong Kim , 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, cang@codeaurora.org, adrian.hunter@intel.com, sc.suh@samsung.com, hy50.seo@samsung.com, sh425.lee@samsung.com, bhoon95.kim@samsung.com References: <7d2030d91425a01f964f7a9309c1aa3a0ce6a2d6.1628231581.git.kwmad.kim@samsung.com> From: Bart Van Assche Message-ID: <597a96f4-9cd4-c1bb-5c8d-dd5d00f0948d@acm.org> Date: Fri, 6 Aug 2021 09:37:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <7d2030d91425a01f964f7a9309c1aa3a0ce6a2d6.1628231581.git.kwmad.kim@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/5/21 11:34 PM, Kiwoong Kim wrote: > Based on some events in the real world Which events? Please clarify. > I implement > this to block the host's working in some abnormal > conditions using an vendor specific interrupt for > cases that some contexts of a pending request in the > host isn't the same with those of its corresponding UPIUs > if they should have been the same exactly. The entire patch description sounds very vague to me. Please make the description more clear. > +enum exynos_ufs_vs_interrupt { > + /* > + * This occurs when information of a pending request isn't > + * the same with incoming UPIU for the request. For example, > + * if UFS driver rings with task tag #1, subsequential UPIUs > + * for this must have one as the value of task tag. But if > + * it's corrutped until the host receives it or incoming UPIUs > + * has an unexpected value for task tag, this raises. > + */ > + RX_UPIU_HIT_ERROR = 1 << 19, > +}; The above description needs to be improved. If a request is submitted with task tag one, only one UPIU can have that task tag instead of all subsequent UPIUs. > hci_writel(ufs, UFS_SW_RST_MASK, HCI_SW_RST); > - > do { > if (!(hci_readl(ufs, HCI_SW_RST) & UFS_SW_RST_MASK)) > - goto out; > + return 0; > } while (time_before(jiffies, timeout)); Since the above loop is a busy-waiting loop, please insert an msleep() or cpu_relax() call. > + * some unexpected events could happen, such as tranferring ^^^^^^^^^^^ Please fix the spelling of this word. Thanks, Bart.