Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp102447ybv; Thu, 6 Feb 2020 18:58:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzQ9jRFS5Llo8ncz1sgp4Arpvi58SyoS8Djpyd7DZgDOzKPJYjP9t87gVnmMml7RqxfVSSk X-Received: by 2002:a05:6830:1651:: with SMTP id h17mr944939otr.167.1581044280039; Thu, 06 Feb 2020 18:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581044280; cv=none; d=google.com; s=arc-20160816; b=ePx6apZfB+g9gqO4CP36/Ort6nj8k7eTuppVTaGTNqhEYGEOJiO3LBz60VFoSvz27c 6T4vd22uo5/BQbS+ayIDVnoACi93RIkw4Y8svXjDACD7CVK44XtFTACcW/tHuUDsoUs8 uKpj1ZagyBrbK7W23NaTx3Y07/medWEoKPCmwPjkpFVB+kNv/s83xC9KnjHaGBUYXBCO OdtA70xNd2HYlusoveKGgJRaUhACAtDdPYfN+6WEl0JExcQwHrEnih9zX6yPPxyq2ZY9 IKgLt2cvFhr8+mGWwXYhsoRTHLCc4vzhyI/FAuhHr5Eumc0q574L4c63T2Ke2A9mi7Xb Tz6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=Z2ngNi5NIR7v5uodoWYsy15J0gqkfXzftyHIU77ZYU8=; b=zzBqQgmdmf2oXZhL7zp6TD5k0T1bb4ChcMoT376KhI0agIncqbrQFMk/5lBZtE+mg6 cyXFZpPnGqEyNp8kHGnkUUjIsRP1DhA/prN/4BginqWTLXIyutG6F1rALV1lgZMpKIpj HnBwtUZI71BL8lKELpMAah8UJZ54cjBmsPxXe/mRqNN+d62UWViZo/l6yXANq/Zh3/RP Y3uZCHIWo0HY/BJdXblWDrlBEoM695MrP5u+xJQRgxKlTSwfhj9tCas6jn5fj7BHUDph Uy5QurvGU8pW69KkagxuU2LnmxIWlUYzKAwQ5CS9lGSUJmby66XyGO6nD+VfiEQk7o9O vF9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=KBa3eIUU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si2993999oij.125.2020.02.06.18.57.47; Thu, 06 Feb 2020 18:58:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=KBa3eIUU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727178AbgBGC4q (ORCPT + 99 others); Thu, 6 Feb 2020 21:56:46 -0500 Received: from mail25.static.mailgun.info ([104.130.122.25]:32366 "EHLO mail25.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbgBGC4p (ORCPT ); Thu, 6 Feb 2020 21:56:45 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1581044205; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=Z2ngNi5NIR7v5uodoWYsy15J0gqkfXzftyHIU77ZYU8=; b=KBa3eIUUvqUS8rV43wU6TLkx8L4Hxu7jmSwx5GJSRO4fUGt4dPmDKcbKk4VvavIuhWk2BjG+ U628+gT4aHFsUf/6sfbjrrtcB8bB2Kj+GuBiDmkPpU9Yoh+hfZxCJv1E1k6D8XXrLN1jbAws yJq7Dc0P/LEduy+kpXML6lJPYbQ= X-Mailgun-Sending-Ip: 104.130.122.25 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e3cd1e5.7f789ea755a8-smtp-out-n03; Fri, 07 Feb 2020 02:56:37 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C3E06C43383; Fri, 7 Feb 2020 02:56:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3E36AC433CB; Fri, 7 Feb 2020 02:56:36 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 07 Feb 2020 10:56:36 +0800 From: Can Guo To: Avri Altman Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, Alim Akhtar , "James E.J. Bottomley" , "Martin K. Petersen" , Bean Huo , Stanley Chu , Bart Van Assche , Venkat Gopalakrishnan , Tomas Winkler , Thomas Gleixner , Pedro Sousa , open list Subject: Re: [PATCH v7 8/8] scsi: ufs: Select INITIAL adapt for HS Gear4 In-Reply-To: References: <1580978008-9327-1-git-send-email-cang@codeaurora.org> <1580978008-9327-9-git-send-email-cang@codeaurora.org> Message-ID: <08101e2924d6262579beec488fcbd93f@codeaurora.org> X-Sender: cang@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-02-06 21:20, Avri Altman wrote: > Hi Can, > > >> ADAPT is added specifically for HS Gear4 mode only, select INITIAL >> adapt >> before do power mode change to G4 and select no adapt before switch to >> non-G4 modes. > > UFSHCI 3.0 says: > 7.4.1 Adapt > The use of Adapt isn't mandatory but the specification provides some > guidelines on its use. > The HCI should perform an Initial Adapt in the following cases if the > link is running at HS-G4 > speed: > - If DME_RESET is initiated. > - If an unused line is activated for HS-G4. > - If UECDME.EC is triggered with bit 3 set to '1'. > - If a change between Rate A and Rate B in HS-G4 is performed. > > If it's not mandatory - why are we setting this for all vendors on all > platforms? > Or am I miss-reading the spec? > > Thanks, > Avri Hi Avri, Yes, it is not mandatory, but I don't know a flash vendor that refuses to use ADAPT so far, it is even recommended by flash vendors. So there is no meaning of adding a specific quirk for it, as all flash vendors need this quirk. Otherwise, we would need to add another vops to allow platform vendors to control it before send PMC. Any other suggestions? FYI, ADAPT sequence is used to train an M-RX equalizer. It gives both sides better signal integrity against the influence caused by temperature and voltage variations. ADAPT is also used by Quality of Service Monitoring for HS-G4. As for the usage of it, here is just setting the type of it before PMC to HS-G4, HW will use ADAPT, only if both sides support ADAPT, when it is required as what the spec is saying. Thanks, Can Guo.