From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 62FEF2E739A for ; Mon, 8 Jun 2026 09:33:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780911188; cv=none; b=dO5clGhv2CaNBHIQmV5d84zsXaratJzYKGwKmDPKS8LbnBm1A3tXIYmbQu7y2reDQ0M7qsKLxg4k1rvwmW55eUYH9tThvgopymSNO0iBYTRgfIU9phk+qZDICoMPfRCm3CLT1UfM1FVaTxcM3myb6xWDGKpqCWKficblTHELAg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780911188; c=relaxed/simple; bh=2mKuoNeczjYmLgNRJsQsMc3RGm1bt+Gt8+Odq/otNCA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=knzgxgdx/baSBlRfZTlw2wGKTKXYeGQytO/kiMeGN8o0ROulcsQp763sFHmCBipp6dHUqdCBrUng/vEEF7WJ4liDgjdk8pxLIvR0LctHT35+33PNkkEVMoKI6dJ/tZAQf2NpaoUQWm36sq6a0+JS9qOv9eKzkGxgW8poZF0TRKk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=h/FSNtbJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=FGscSEv8; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="h/FSNtbJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="FGscSEv8" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6586OexQ2385872 for ; Mon, 8 Jun 2026 09:33:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= BZtl15ww4PXc5flceKtv+LPJ3x3xJtHYHA2F+jHkfLs=; b=h/FSNtbJsjoVXbt3 Dzkg8y6u7GxupvGXgs6sS15rhtrQ0p+i5A5xECXxovdmyBJ7wM7Mt3PssJUTDBd+ oKlhiMTLfRtoDJ+aH8hikFv/vSrYGv2bXmHtUoPrehanPTGRURwM9VTIWkatXphQ o0pjmL/OxuTKvGGBHZVgoIaa6/azJVPYX5oKg5yDQSVEZUMozGJdiPkMO2mnDZja DACEu20q+2LIodR+KJmVY27DtY3s2az4ifNYtUbqUSFtCDqZGwhSte3QfOrv5PY0 Sa7XHgbYuRbK7Dw3lOa8UMRYHU+PDAFv8o+pwe8Ra7Q8+j+K4Pmi20LD0ZvGOuYl VYyHyQ== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4emcu8xww3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 08 Jun 2026 09:33:06 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-517bdeceb54so1252141cf.2 for ; Mon, 08 Jun 2026 02:33:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780911186; x=1781515986; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BZtl15ww4PXc5flceKtv+LPJ3x3xJtHYHA2F+jHkfLs=; b=FGscSEv8H22tjO+kkZH1qKapc2mgkhFgP0Co0YwXLiIC69JD71o2kCy/ua9p4sZegy SMHmbNhLJi87/Jpzu6zp74Cu24WxVgkK8mr6QW3xIEV4WQ853VRwJM+TkMlV4ZvuFIBT 3z6ibdL7WIZ9+F8AluOyprZHjnzFN+eHfPrgXVdxZaPvX01fsuNrqv9IpR0u0RaK0XG7 xno3PYsfendRlyy4WVvgKRTJiZI2x2VzPjjgZo6llxfO8eyhT9dtMMsuOYV/W53N4BVb WdPLDdFRRI5zJ046uiSvyGr8uvKu9pCaOzdLAMirXesyc8BabV3FHibNmOPbeqJnDHHD YcIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780911186; x=1781515986; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BZtl15ww4PXc5flceKtv+LPJ3x3xJtHYHA2F+jHkfLs=; b=BO1l4LJMcUQoLxScBmALMY3jx4MnIZOzPfQ9Om2hYFAcx5kHLnHn0MssH1e15ORkb0 a7RsGbdbtG8bMCkThZqMdPgelKLZ1pQzKdYRyEqh3tK+db7L9vWnMXjLeHib4NNewq4J mvogELtFYMORTT/xQCcZc0TGeBhk1jmZ/gST09WkqNvv1LBJKWW/EOlfH5tixkSePqkx rYHxJejfPFFdM4KtYvpPjdy+XyOTgrIRaADlaext8cU93CEX/q4GR2yhBO5h92H5MBCe WWd9oiJuU+yyLhNTIQMFK4QXNCpZX14TkZCnKGHsQKu0UhQL30HoAnChQ4W8D1IT1BC1 MZ2Q== X-Forwarded-Encrypted: i=1; AFNElJ/gW+7bAxuzDfbIIssh4oMZBCGGthdWxZHYkv2zHReii5DHGikn8sCTUh6GYLPcWCD2/Mm1rPWvFfOJ2gw=@vger.kernel.org X-Gm-Message-State: AOJu0YyEJLBktEvq2/v8bknbBtpMtTU7h/c6d4YxA28FSieC5bOgpq9r cNa1N8ymCBTlQAHGmoNeJ8GNY38+JzzcUJUw1B4Exzodka83F5cKKxyHnZw3uO1CGMELrP4/sDo g+AJibkVMjMjTWtqtX4kRvEX/yYtGt3KVyvwpy1iZzsm34+iHBpsSiWCEb3pWXFtoedwjYPqK1M c= X-Gm-Gg: Acq92OFCMpThHD//eLyFo6WCdKw20Gitb7llkDGq6S6f8ix9BqgrulqkWNi+OPfQe0d hIDzTf/q1SQueaZptnoM0j4Keq3VClsaMc1FCEIvcevAniA/a013+YyDk5S1lKXSA2fqGSUb3PX yheGPM1kKm/SzT0S+7/ouX+BGL8Hwq7tvK2GqtfC296Nq7v+SYUC/z3/oMiEDUegOGzt1yiALh5 x8wHLWWi2fTBNw7Uz1e5CVgaiorfuAWb/UZx7zNwTrNZU88JtPbfJJ/8my0TIc+ByW9K+F4fV/p TvsT5fx8KnYp/xKBgxTU4KyO88BSlleSTNIZABDR25zmcj++fuRO1FJi18Aq9z8gVe8BF99kN2o xFukyLCez8vLRHb9W00n4MMByC59JU3/83JGmYnvhUF/CMLaSVzV7n3z8 X-Received: by 2002:a05:622a:58cf:b0:50f:bea5:52a with SMTP id d75a77b69052e-517958e7faemr125040581cf.0.1780911185749; Mon, 08 Jun 2026 02:33:05 -0700 (PDT) X-Received: by 2002:a05:622a:58cf:b0:50f:bea5:52a with SMTP id d75a77b69052e-517958e7faemr125040321cf.0.1780911185313; Mon, 08 Jun 2026 02:33:05 -0700 (PDT) Received: from [192.168.120.170] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bf05176fd07sm852062466b.1.2026.06.08.02.33.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2026 02:33:04 -0700 (PDT) Message-ID: Date: Mon, 8 Jun 2026 11:33:02 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V1 1/2] scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk To: Nitin Rawat , mani@kernel.org, James.Bottomley@HansenPartnership.com, alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20260531235011.1052706-1-nitin.rawat@oss.qualcomm.com> <20260531235011.1052706-2-nitin.rawat@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260531235011.1052706-2-nitin.rawat@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: RhEq7G7G4TXLk47Vv-xrPo3KNQzO-J8g X-Authority-Analysis: v=2.4 cv=deGwG3Xe c=1 sm=1 tr=0 ts=6a268c52 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=Am--5WPmF5lAGn9LL3QA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjA4MDA4OSBTYWx0ZWRfX8o/qGDnD/HZI h9NIC9EibwN2ozPyUUhS5hA0Zg2C2JD6p/2dIVEWyOcY2WrCUx+LSBwW0J8inGuCjkkNI+RDipM DpgzuzOMkk2epMxB0gXmcF7yWJCR7egLv5ecmD+D4QbU6h9CyzjZUSa0RX3+w64TMmq5U7twY0f 9j6vkGPTkPGL3gec/BsNSspvaKOmSERx4y4INTnuskRbmIPRDR7oK0dWnu/QF+nm9OZnwKBjGnI RzvLUehhl4uDuUrP7IL3j1mKiTvpeuG/ynktyyx9Vi/I/rVje5VsqjNrbJaqEzrz8qYdWHWFSUL NBWOiUqa5+DO0Bv2lWKELu27O1L3Zh9OWUXa/+ay48qvPb2C8UXzuxSAL4dgXbw0Xf2yvPcUY/d nYP5E0N/x42t7IoXfvc9ekjAJyVuM3/fb3c6IcTEjmWH/+04Zt30uNLQg44k5k5I4MaMzTnyMcj bY9mEGm8Gn6xxO1ionw== X-Proofpoint-GUID: RhEq7G7G4TXLk47Vv-xrPo3KNQzO-J8g X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-08_02,2026-06-05_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 phishscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606080089 On 6/1/26 1:50 AM, Nitin Rawat wrote: > Add a new host quirk UFSHCD_QUIRK_SKIP_DEVICE_RESET to allow host > controller drivers to skip asserting device reset during UFS power > down. > > When RST_N is asserted, the UFS device firmware wakes up and executes > its internal reset routine. This routine initializes multiple hardware > blocks and causing the device to draw a large curreny during this time. > If the power rail transitions to LPM (Low Power Mode) while the device > is still drawing this elevated current, it may trigger an > OCP (Over Current Protection) fault in the regulator. > > For some UFS devices (e.g., Micron), the elevated current draw persists > until the reset line is deasserted, making a fixed delay insufficient > to prevent OCP. This quirk allows such devices to skip device reset > during UFS power down. The device reset will instead be asserted as > part of the platform shutdown sequence. > > Signed-off-by: Nitin Rawat > --- > include/ufs/ufshcd.h | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h > index 3eaae082329c..18d634499ce5 100644 > --- a/include/ufs/ufshcd.h > +++ b/include/ufs/ufshcd.h > @@ -813,6 +813,20 @@ enum ufshcd_quirks { > * allowed by M-PHY spec ver 6.0. > */ > UFSHCD_QUIRK_EXTENDED_TX_EQTR_ADAPT_LENGTH_L0L1L2L3 = 1 << 28, > + > + /* > + * Some UFS devices keep drawing larger current after reset is > + * asserted until it is deasserted. Asserting device reset > + * during UFS power down causes the device firmware to wake up and > + * execute its reset routine, drawing current beyond the permissible > + * limit for low-power mode (LPM). This may trigger an OCP fault on Is that UFS-LPM, or Qualcomm-regulator-LPM? Konrad > + * the regulator supplying power to UFS. > + * > + * Enable this quirk to skip asserting device reset during UFS power > + * down. This is handled only in shutdown; the device reset will be > + * asserted as part of the platform shutdown sequence. > + */ > + UFSHCD_QUIRK_SKIP_DEVICE_RESET = 1 << 29, > }; > > enum ufshcd_caps { > -- > 2.34.1 > >