From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 540881BBBFC for ; Thu, 11 Jun 2026 01:26:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781141209; cv=none; b=qdDMT6Bs+nbjCJbtDJ6EJ6iFXAS1jbiWTNvbE8OrVXUjSS55DVD/nBK+12FoA/DhXPIUls2oGtNELOF5TLNdtdY+aG/avSLN7SBeluCi3OV2kI4se80AgV4F1Or3EZ4qdbGOXfwfGaRKnPAqj9gOCut+PCS7i3/54lZgKClyzOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781141209; c=relaxed/simple; bh=zzAThIjqpu0sM1TOnQcCIDCrUE8XayfKqrpzou6KiGU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Pak2pIaJkekT+JsvIoF0fRqDOFLpgdS0bieXBaYf6YcJrbqSyDOznZ/dVHQx3NCnV8N1RaG9SA68s/dGCbHeEEtJf/kIZDVVmj1epMx9X/O5tDayU9AVbZWtT8U8xw2deDPoUQXSZHcl2FhLixqCXAeTToJUhzCqGYUeZivU67o= 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=ZdxETPBJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Eeb26axW; arc=none smtp.client-ip=205.220.180.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="ZdxETPBJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Eeb26axW" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65B0Nctn3082810 for ; Thu, 11 Jun 2026 01:26:47 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= Rnpup716X2cBe4SElQEx2vvionFYX5DCEvEJtGFq2C8=; b=ZdxETPBJ8/ZfNIgz FOBkIADRPJdkN3IBQtVitnTcpHw/cJrSCd4MmWg1N7i2nioJ+n7leKlhs+P3xRgi oTQDSSOr4VDk+a335MHmR6oTTsmw6wecmKyzFD0qbphBwQaoZb2Ka/SFe0ZzAhc8 tL96z7jhJA+vRyCICB2mFSxRLKrS0ADgnBrZuM4SaH+/aE+nZCArDGPyF7QB+N2X yHiFDxOiYWkWAnYIuU27LlKtHKkL9D68M7VlsID76pzjaId2J9HgYNwRizojM2ts s/VdLxGn8zY0tIC5+VW1oYh480HX3ih8X7uZXKc5wo2Vb0titwIpGFCC680V8rnN Pc7QFg== Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eqe6u926x-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 11 Jun 2026 01:26:47 +0000 (GMT) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-c856470fe9fso4738706a12.2 for ; Wed, 10 Jun 2026 18:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781141206; x=1781746006; 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=Rnpup716X2cBe4SElQEx2vvionFYX5DCEvEJtGFq2C8=; b=Eeb26axWbXz99Y1KkehhojSV6IRULCTwxgdjus3lfJEm996giqC+dtLxzUeOSdcgT3 38vOGzH3ze+tETyDUaVUUvY6/0oPV1xXsmmaTLk/mtBI+x5rjPS4LmHnXUZsul7FP+nG St/IweUR40i1Z2AwMsFKXI+9GW025XiMz3ChXCG18+XXdSM5e5pGWof+CK7FwhXzP5Im RL5C65SXKy3B20kXU9jZRwJ4TqDlWLF7mIZeML87RlB0gqU7WS7zM5rkFqKZGrosD983 6A4NA+nqohR6lr0lr/O/taENK7O72sSL+6/EKCGZ/AWMrFk5sw0o8crURZ3fo/NvCC2G KhXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781141206; x=1781746006; 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=Rnpup716X2cBe4SElQEx2vvionFYX5DCEvEJtGFq2C8=; b=J7Dvogyf6fawHm5eVeDgotZjL0sFQbYCUJGF5RnnYZ1QeX3G2es6ANAqx0170zyTkC Fnnp1kiyKy8Qs7Ql0Zie0kEQ1Tp+E7xr7VRAjkLtqq03OgnTwly1F1g2sZ1DT0fnIlgb RxiBVY5mjjzPbrEc8uqM8EQyG52rFEwJOZZV0LngywXr74/gZtUg0UawcYpYZHuUhS0F IqqQt0ZsWj3UfPTVFMUmg92M+hGHY56oVhho3fxYbsylRBhxowbAOC5vgoVeNtj3452z CYROJ7ebrF3KSvchz1DOpsOgWQpve+58EsMbvdpps83VIbwKSNiGbERHdMVd/Ou78p6t n7YA== X-Forwarded-Encrypted: i=1; AFNElJ/4GcHksdsjfilpsciJjgmnhfyeJWgOb9OCkdMMVvrkmwgbQpKi03H+Yutz+TJeZ7/nSpeD1BSPsWgnfw8=@vger.kernel.org X-Gm-Message-State: AOJu0YxmO0vNrG+Jy6+HTGBatAE19oUJ7iFM/T8ja2AuIdtKG0PX5UCA vAndOprTw3hERAfjiFXMXC261jCehIL3A6DeKmFNXWHVAoDay3d2Gzz0mjABgSH3o+g9zx/6F8p rSQ19O0qRWLX9qHTtjyhHRMjdRFKPUnjnPm2762jvNK8nMxfpb3JdlGeXjBU5pEJAdlVmm33nEA c= X-Gm-Gg: Acq92OFlFccqRTRjto/XIK5/vHAhmfq8kL2KIIaU6/RX75x8Va6nqXLNyTpXemqB2O2 npLyy4QYY96MNlz9juhoTCpZ8OEIhd7xphxqg2Q3bVoJkipEOrxruWs4JI4zqBchMWxKaim/GVS QM11Gv6Cz6vGQ3k0EbByR2TkgWP85mnIkvZlYi4wFvLvrGGEV5b4gTvIRmy8CjWEMNForiUhtj0 AcywbjlYjW3S7kogxFCEmRaXryNM/8nklvtxwixgW4jREvulQB1lr6S9r+CeMwR32otTxPABqfw ay4Nr0IUJwTOFr9+etKtn0GEU6q6CFENuIIsterYeIxGK4pIELnUt+ow3dKBH0IbqqOTIBEqD9B B9Jau9fS+3V8o+rIQX2oPYhtwo0I/Olvjj/10eNIguBMLvwEIK+MF8DtlEFF59xwo+FeFcMS8Ys aRfZKqZGzEIEdmAwqOc+yefg== X-Received: by 2002:a05:6a00:9505:b0:842:6004:3fd9 with SMTP id d2e1a72fcca58-84336bc5b66mr460907b3a.29.1781141206205; Wed, 10 Jun 2026 18:26:46 -0700 (PDT) X-Received: by 2002:a05:6a00:9505:b0:842:6004:3fd9 with SMTP id d2e1a72fcca58-84336bc5b66mr460865b3a.29.1781141205598; Wed, 10 Jun 2026 18:26:45 -0700 (PDT) Received: from [10.133.33.231] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84337bf128bsm109823b3a.27.2026.06.10.18.26.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Jun 2026 18:26:45 -0700 (PDT) Message-ID: <3162fd39-c3c6-4c96-a8d1-0a9819a6f696@oss.qualcomm.com> Date: Thu, 11 Jun 2026 09:26:40 +0800 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 v7 2/2] scsi: ufs: core: Add support for static TX Equalization settings To: Bart Van Assche , krzk@kernel.org, beanhuo@micron.com, peter.wang@mediatek.com, martin.petersen@oracle.com, mani@kernel.org Cc: linux-scsi@vger.kernel.org, Alim Akhtar , Avri Altman , "James E.J. Bottomley" , Ram Kumar Dwivedi , Nitin Rawat , open list References: <20260610071516.3763916-1-can.guo@oss.qualcomm.com> <20260610071516.3763916-3-can.guo@oss.qualcomm.com> <9b304461-2672-470a-91bc-21a5e6935205@acm.org> Content-Language: en-US From: Can Guo In-Reply-To: <9b304461-2672-470a-91bc-21a5e6935205@acm.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNjExMDAxMSBTYWx0ZWRfX8c74ReINijAA OYylWFSr/Wnq25oBysh4O4zeeCO4dkUP4llJZYGNnBkpnLkggC573z80ksr5vX3U8TkRHZy6VAu V+uD0xC3f/sCgh51Q/oTAJ12YxSla90= X-Authority-Analysis: v=2.4 cv=atOCzyZV c=1 sm=1 tr=0 ts=6a2a0ed7 cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=w9uOJpbB8xStSp0LBPAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=3WC7DwWrALyhR5TkjVHa:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjExMDAxMSBTYWx0ZWRfXx9dbcKl6RqQu PqeUtIgmWCLx9dT0G2ff4LuRhUFIfBlIGtafT10rukSCjJKTZBfYwlwU7IV3v4MCPxoWQVydpj4 LHVKHT6HuU26UNk9Q9KYqzZ0gOc0wXRjSjusFKKm1EWBXoDd74tgAGPnwBxRHIweI+qq5mcw+N4 l0Qqx9dcugiyTKrH2XBbEKLBr7QWqbuzXJbuJ3dAscXn8GQtO0pAGrovyahgAksNNs1QIwqCN3x 0jhlrSlGIDwEgOyTgFjC+l7tnY/TaKAG5VtEm2kQMU380Sq3oshDVAUOZ3+4CzpUraput67yz8P K9U6j13OWpSu6i7+lZ4a+zXByuv3qhCsrU6A5cS6jw341LctpUQclqn9eCYAl8WcujtddEg7Pfm RNarb/slClAlaJRBYH2MGjq+TgMpptsrByg8+JpMqZfMuy31c71RDH5N83kP1Qs26l2Sp2aWqmf 4bqOFRDusQhKqRDfXtw== X-Proofpoint-GUID: lQ6DmHE4pgYXJPDweccEe4QqAWTqDlws X-Proofpoint-ORIG-GUID: lQ6DmHE4pgYXJPDweccEe4QqAWTqDlws 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-11_01,2026-06-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 malwarescore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606110011 On 6/11/2026 4:08 AM, Bart Van Assche wrote: > On 6/10/26 12:15 AM, Can Guo wrote: >> Parse board-specific static TX Equalization settings from DT for each HS >> gear and store them in hba->tx_eq_params. > > The word "static" means "showing little change". My understanding is > that the settings from the DT tree are used if equalization training is > not performed. If my understanding is correct, I think the use of the > word "static" is misleading. Maybe "default" or "from_dt" reflects the > purpose of these settings better? Thanks for your review. 'from_dt' sounds better. > >> When adaptive TX Equalization is used, these static settings are not >> final: > > What is the meaning of "adaptive" in the above sentence? I haven't > found that word in the UFSHCI 5.0 standard nor in the UFS 5.0 standard > in the > context of TX equalization. Should that word perhaps be left out? 'adaptive' is not standard term in spec, I used it to refer to on-demand TX Equalization Training procedure I put up in the first patch series. If it is confusing, I can remove it from the commit msg. > >> +    /* >> +     * TX EQTR must run for the following cases: >> +     * 1. TX EQ settings are invalid. >> +     * 2. TX EQ settings are valid but static, i.e., populated from DT. >> +     * 3. TX EQTR procedure is forced. >> +     */ > > What is the difference between "TX EQ" and "TX EQTR"? If both refer to > TX equalization, please use the same acronym for all three bullets. TX EQ is TX Equalization. TX EQTR is TX Equalization Training. > >>       params->is_valid = true; >> +    params->is_static = false; >>   } > > Why is "is_static" changed into false here? A comment might be > appropriate. After TX EQTR procedure, the params is populated with training results, which are no longer 'from_dt'. I will add some comments in next version. > >> + ufshcd_parse_static_tx_eq_settings(hba); > > Please consider changing "static" into "default" or "dt" (device tree) > in the above function name. I think that will make the code easier to > follow. Sure, will use 'from_dt'. Thanks, Can Guo. > > Otherwise this patch looks good to me. > > Thanks, > > Bart.