Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp403773rwi; Fri, 14 Oct 2022 03:51:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7yaEgQ2yC653uPs3Q0q2j5bkl/lgAJLU1wViMpStFWN2qUVLAkj6dOW1ZwV+FL/8a/26Vq X-Received: by 2002:a17:902:9690:b0:17a:4cf:edeb with SMTP id n16-20020a170902969000b0017a04cfedebmr4682363plp.129.1665744688909; Fri, 14 Oct 2022 03:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665744688; cv=none; d=google.com; s=arc-20160816; b=iTLfNCXNuat/LycMf23rcScSYAtH83i8b4uLJcVp2vSaLoiAv8xMW+/Hm5P0oPVxtd eaXEQWeaOe8knaz+ejJ/TlO9J0tkpSpC6DK1no33/iO6Twr+pTNUUkmhu8avtVgJkbQ4 hMxUfocHoTnYXGQFNRPIEp3Ir/jNUexUK+M4eisjhG4fuSjWqNBh7U21kCkUcyaD6Wx3 Z3MZ9yYNmnh45qpjySG8HIus6poOd21HA9OxvngtB3GEWEB8xoGUdxvwE2kVCEUdIsJj 3p6st1peJHm9sAZNZOyzXFnovX8o3BNV7nmhI3VbsNklAe70L3PXV1DGLNc+cpNAzRWR /y/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=B+gKmpXKgt1tAoH04/NabLDpfsbAN80C2OC0RyjXBWk=; b=TIpV89tXtXB67o4e0ZhxVl8DWIEwscNH6owOshSkwJRXVCyXVYHurlwQ3zXQbfmRI2 o00X8TqfYHncul/Be7YWwgbeEQARyMTZdqCk6eo4zAYdmlYLtCiCWCRcqGVejGs0CE3G 8w0MQavWrRguUkORhSdETt+TQH61NyrPtJh92nsCn6xYbtqK591kgwsYX6/PezMSiPdC UIg5qzwyj4x/8juMqBSSbCwzXPLu6I0x0VZ/C6XaGAqrFmZJYlhSx1dFeh26xtAgkjJh +c7B8rZhH/ru4Vcpj6COnr74fTidSB1Nvd21VM3x+UeGNyyTCxqa4oP7SyBCqpb/Yjb4 qluw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MXnxk1uq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y2-20020a655282000000b00469e1f7dcbesi2379403pgp.603.2022.10.14.03.51.16; Fri, 14 Oct 2022 03:51:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MXnxk1uq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229900AbiJNKPx (ORCPT + 99 others); Fri, 14 Oct 2022 06:15:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbiJNKPt (ORCPT ); Fri, 14 Oct 2022 06:15:49 -0400 Received: from mail-vk1-xa34.google.com (mail-vk1-xa34.google.com [IPv6:2607:f8b0:4864:20::a34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8613814D8CB; Fri, 14 Oct 2022 03:15:46 -0700 (PDT) Received: by mail-vk1-xa34.google.com with SMTP id w185so2028495vkb.7; Fri, 14 Oct 2022 03:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=B+gKmpXKgt1tAoH04/NabLDpfsbAN80C2OC0RyjXBWk=; b=MXnxk1uqshMOeR+5b0Qh5CEwJSTgTL7gpkXjyIXGG2GatnTYBTtOHxIAGFOF9BAyUG qv6gRE0JJhCb0pcOfEIOKeDGIqRrlKLZGKkNeROXWOX+WRlFTssrPWia+3dOUmhWouT5 82Iei2Y8tuLe+5s6/fsTJ3jxH524aZA4bALwyM7wiT+ULEH/9Bh31VLjl8UUe+W8peUp IjdnS5g8OJSaNv+QYfJfpuOFQqg7ElQydxmhl/9hLun/POwexJANXh0H7egTc3T8jve1 cE8y9bmTRzFcRC1u0Bh4sF7CNcFznTqY5Z7IDdPGBltSSPdjvORmuIYxOU0kfEwEukwQ 1WJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B+gKmpXKgt1tAoH04/NabLDpfsbAN80C2OC0RyjXBWk=; b=AvxETRs8AJ1euVPyEnD3fivp2czw2qxWVrj0syRvY/0sCv6hQ3f0rRe0p833CfJROH O047/r5dP0GhxpR7FlwiQ76o9XfypdEhvT6IACwuwio0UwmMfREb4hV5weY/QwEHjvgG SDVtDXCrFCdzcpDYJYF8Qy4BkJFB5Xq7uAi9tK3enZNe/naPJ0ygsYQcvrZ0N6mi7vQt SX479XpIURkiixZOGJ60aAhPcnhYkJksbRhh2L9C0XvYTr7f/MM7vV9J3itlSXIgU9Jr iZaqx0CF4nehhOVuKVZHoFePWjbBJPcqISGCSgzRGaP+UnYGlT8n2LcR2xCIR6ni6Eas gbTA== X-Gm-Message-State: ACrzQf16cD1TvfzlVqdFBIn8R/o56n8S/ZJzz3wfnsudSgb/g8cfAkIJ TPFnLQJ9YTeVvPQdAE7z9RTMrSnXlY8gr09AGWU= X-Received: by 2002:a1f:9bd0:0:b0:3af:163a:72f9 with SMTP id d199-20020a1f9bd0000000b003af163a72f9mr2354444vke.0.1665742545064; Fri, 14 Oct 2022 03:15:45 -0700 (PDT) MIME-Version: 1.0 References: <20221011021653.27277-1-gaoyankaigeren@gmail.com> <8678f69aa94003b357c4c8ef42cd6ce5c7487f8d.camel@gmail.com> In-Reply-To: <8678f69aa94003b357c4c8ef42cd6ce5c7487f8d.camel@gmail.com> From: =?UTF-8?B?6auY5Lil5Yev?= Date: Fri, 14 Oct 2022 18:15:33 +0800 Message-ID: Subject: Re: [PATCH] ufs: core: Disable auto h8 before ssu To: Bean Huo Cc: Avri Altman , Alim Akhtar , Bart Van Assche , "James E . J . Bottomley" , Bean Huo , Adrian Hunter , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi Bean Yes, This is the time from when the system enters idle to when auto h8 is issued. This patch is just to ensure that there is no continuous action of "auto h8 exit" before dme h8 enter, it has nothing to do with idle time. The reason I want to ensure this order is because when there is an action of "auto h8 exit", most devices take a certain amount of time to get the state ready. Immediately after the action of "auto h8 exit" is completed and "dme h8 enter" is followed, the device will be abnormal. And I think it's more of a common patch for all platforms, Patch can adapt different vendors,and align to ufshcd_auto_hibern8_enable in __ufshcd_wl_resume. Bean Huo =E4=BA=8E2022=E5=B9=B410=E6=9C=8814=E6=97=A5= =E5=91=A8=E4=BA=94 13:48=E5=86=99=E9=81=93=EF=BC=9A > > On Fri, 2022-10-14 at 10:44 +0800, =E9=AB=98=E4=B8=A5=E5=87=AF wrote: > > " UFSHCI has idle time before bringing Link into hibern8 mode, " I > > think ufs put the link to h8 during the time > > > no, it is ufs controller. see the ufshci spec: > > "Auto-Hibern8 Idle Timer Value (AH8ITV): This is the timer that UFS > subsystem must be idle before UFS host *controller* may put UniPro link > into Hibernate state autonomously. The idle timer value is multiplied > by the indicated timer scale to yield an absolute timer value. .... > > ... > Any non-zero value will enable Auto-Hibernate idle timer. > UFS host controller shall put Unipro link out of Hibernate state when > the link communication is required. The mechanism to decide when the > Unipro link needs to become active is host controller specific > implementation, and is transparent to the software." > >