From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A577155A25 for ; Wed, 25 Sep 2024 06:55:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727247305; cv=none; b=TSCK6t2LrFF6+A7Adrv8Qyu0Xx1S+UkNLD29ViFq+b4QJPFBe2D5saoGuRAKN9Qw17JhtozMqYkzI44nH/xPxXF1XVheYvbyb5OY8CU9pv3GOU61+7ob88ct0B7wcl1LI5SDUrTiB5hgE1b+RkGUNdGSGaQSWIWaDfScjv772ec= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727247305; c=relaxed/simple; bh=4gOKKEtz+0EI6rj3HqZT27xWK2qDolfvA8v4vKsZ6RU=; h=From:To:Cc:In-Reply-To:Subject:Date:Message-ID:MIME-Version: Content-Type:References; b=QIj57VUgMo+XuaiyCwQmrBDGzNAPf960qysJEHShI44Ue3gPFSARYFtHTbli+oejh+5l6mf9nrIYPsNxo4CO/OAKBULFpvNSQcjYx6AXi6dU49b2nD2vEkb++0z4wdyq3oXrvmyziwe3YXUc4Gcb97HGtMJp+TsNeMgA4gzw61A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=TSFhwR7W; arc=none smtp.client-ip=203.254.224.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="TSFhwR7W" Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20240925065501epoutp034d006ee57022f4fefa2c5bce919481d9~4akTnbY9V1105411054epoutp03t for ; Wed, 25 Sep 2024 06:55:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20240925065501epoutp034d006ee57022f4fefa2c5bce919481d9~4akTnbY9V1105411054epoutp03t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1727247301; bh=npWzJrPmcJ7bQMNX0h6hcxv6OusSwWpLI++E+L4EUvU=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=TSFhwR7WVS85pq9Zo++PTL//bWIhraLamMrsIFsALm8sUybNg2gfxb5fqTomEiZb/ Hu4dsUxgx4BZlKXk0APs+J/xKwZh1RblcB08Mdmz6c1Rbfti9i4MXt8f00Km7qG6aQ ZVrnwnInkr4oaTUdSRfCZFtSo98NOosOcmexkpwA= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20240925065500epcas1p230985f5aa54f41a5df2549418f732a7c~4akTDSehl0821208212epcas1p2e; Wed, 25 Sep 2024 06:55:00 +0000 (GMT) Received: from epsmgec1p1-new.samsung.com (unknown [182.195.38.243]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4XD6tD3zJkz4x9Q1; Wed, 25 Sep 2024 06:55:00 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmgec1p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 5E.6E.19509.4C3B3F66; Wed, 25 Sep 2024 15:55:00 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20240925065459epcas1p3b8e701fd0228bc2670f22cf253a3b02f~4akSaJnxP2690826908epcas1p3I; Wed, 25 Sep 2024 06:54:59 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240925065459epsmtrp2e39f8de490b2cc6f2afb472e175b4937~4akSZP00F1786117861epsmtrp26; Wed, 25 Sep 2024 06:54:59 +0000 (GMT) X-AuditID: b6c32a4c-17bc070000004c35-0a-66f3b3c4a89b Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 7C.67.08456.3C3B3F66; Wed, 25 Sep 2024 15:54:59 +0900 (KST) Received: from sh8267baek02 (unknown [10.253.99.49]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240925065459epsmtip18e825fae86b1134e725dde1488ddc4da~4akSHH87I1980719807epsmtip1w; Wed, 25 Sep 2024 06:54:59 +0000 (GMT) From: "Seunghwan Baek" To: "'Bart Van Assche'" , , , , , , Cc: , , , , , , , , In-Reply-To: <1845f326-e9eb-4351-9ed1-fce373c82cb0@acm.org> Subject: RE: [PATCH v1 1/1] ufs: core: set SDEV_OFFLINE when ufs shutdown. Date: Wed, 25 Sep 2024 15:54:59 +0900 Message-ID: <08b901db0f17$d6a20b50$83e621f0$@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQITd6wvsWq6bg+5ypABxh1kBxxfMwHy7pIVAtyJc3gCDAIdKwI4d05OAHuLQEuxqsQ7wA== Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHJsWRmVeSWpSXmKPExsWy7bCmvu6RzZ/TDJacl7F4MG8bm8XLn1fZ LKZ9+MlsMeNUG6vFvmsn2S1+/V3PbrGxn8OiY+tkJosdz8+wW+z628xkcXnXHDaL7us72CyW H//HZNH0Zx+LxYKNj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duQGfltyfIpA+vcyfv9p2y8kRFpd6pmQG98/5fN/f6PGpblzFlkm BE44zLQ38b/as4vNXkosxRmJhlrMRcWJAFEqB0ZHAwAA X-CMS-MailID: 20240925065459epcas1p3b8e701fd0228bc2670f22cf253a3b02f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240829093921epcas1p35d28696b0f79e2ae39d8e3690f088e64 References: <20240829093913.6282-1-sh8267.baek@samsung.com> <20240829093913.6282-2-sh8267.baek@samsung.com> <003201db0e27$df93f250$9ebbd6f0$@samsung.com> <1845f326-e9eb-4351-9ed1-fce373c82cb0@acm.org> > On 9/23/24 7:17 PM, Seunghwan Baek wrote:> That's because SSU (Start Stop > Unit) command must be sent during > > shutdown process. If SDEV_OFFLINE is set for wlun, SSU command cannot > > be sent because it is rejected by the scsi layer. Therefore, we > > consider to set SDEV_QUIESCE for wlun, and set SDEV_OFFLINE for other > > lus. > Right. Since ufshcd_wl_shutdown() is expected to stop all DMA related to > the UFS host, shouldn't there be a scsi_device_quiesce(sdev) call after > the __ufshcd_wl_suspend(hba, UFS_SHUTDOWN_PM) call? > > Thanks, > > Bart. Yes. __ufshcd_wl_suspend(hba, UFS_SHUTDOWN_PM) should be called after scsi_device_quiesce(sdev). Generally, the SSU command is the last command before UFS power off. Therefore, if __ufshcd_wl_suspend is performed before scsi_device_quiesce, other commands may be performed after the SSU command and UFS may not guarantee the operation of the SSU command, which may cause other problems. This order must be guaranteed. And with SDEV_QUIESCE, deadlock issue cannot be avoided due to requeue. We need to return the i/o error with SDEV_OFFLINE to avoid the mentioned deadlock problem.