Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2192168imn; Mon, 1 Aug 2022 14:48:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vQIxvBTgj7+UB7CRg6C6xvyMb1Tn6X1TIJEynq4moss7hDENfzRqO93Tmi+tqBSnUPk22W X-Received: by 2002:a05:6402:518d:b0:43c:32b2:a0a with SMTP id q13-20020a056402518d00b0043c32b20a0amr18184778edd.388.1659390504983; Mon, 01 Aug 2022 14:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659390504; cv=none; d=google.com; s=arc-20160816; b=NUyz58BRzNyBl8w/V80SehDfweb9sDr6TzYfeqaf60s1c853M9CW2PCaA9OYjW9zVg K/evTKdPGpTa1HIclTdoJlAbCEDU8FIDI0qVCkEt6CX7k4L+z/DU5FIM9hidg2ERQNkS Mi2nQUsKOv2PTUm7ibnSelDhhHjGSfjfA5WDxyb+b0nsLyZ/23QNb0q3sp7WMBw/OJ8W H5ZeEIvJ3na/IKP70EiQm8PMj+c9n/GjDX4ElJFLQXRBBEcrCHNbk2XsxCrl9eXPSFJc l2lotuv61M4pwSXXeDcUUoNTskSKoOPde3494OJlcVNoy5uSYcW7TXPhS8u9kpOuwPn1 9wwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BJhneIs24eJv4ukierhtqacrrE32PmvIZRJVAVZL+KU=; b=0A2rejOcOVlvKKy8LNxnGtBwMb5FKmRHb7+XrshgXW6cvYqlGbBvzNoueGJJnV8Re0 pwK8F7aYF9O27pKqiyb0fKt+taS4KBuiv21L5cJL7QqsrHHOXD8xshByW40GI8Hh1Lsl J6+eyHG8cjMSSIe0FcNvB6HNBUcSdUI4MSxmuxAsAc+pQNRaJGujvAsaw+q/EzBJxJbg /WsOOqLL/Awy7w8iID+znRzIwIHuq/UIjASvmuf5D/Hvjn1baMJIXgo8lb5rgqEzdiBJ BL/Pb83Q7gPDmM3J3S4fIABDgJc/OWkRTSXMfxrqmpKkap/fhVKohvyYgJi16KLqQ5DJ OOkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=i7PDO41u; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd19-20020a170907969300b0072f1be0dff8si9811831ejc.133.2022.08.01.14.48.00; Mon, 01 Aug 2022 14:48:24 -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=@chromium.org header.s=google header.b=i7PDO41u; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235221AbiHAVbS (ORCPT + 99 others); Mon, 1 Aug 2022 17:31:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235381AbiHAVae (ORCPT ); Mon, 1 Aug 2022 17:30:34 -0400 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40B5922BE0 for ; Mon, 1 Aug 2022 14:29:30 -0700 (PDT) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-31f56c42ab5so122245687b3.10 for ; Mon, 01 Aug 2022 14:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BJhneIs24eJv4ukierhtqacrrE32PmvIZRJVAVZL+KU=; b=i7PDO41unYnFJQoVscy3Nu89f90rGxroCFDcTvi/H7u+L9k1OuxQYEpW8vJALQy9sb DWLoIfoVnuCby8ibe6ZxfCqBNW7NE84+9VadRx+x8hOA2ZjDaEJZocgRkX1SNVS/i/IQ /bp7FrkWXo7dKxoBcEPFJuCjYG8G+Dse+pQjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BJhneIs24eJv4ukierhtqacrrE32PmvIZRJVAVZL+KU=; b=rZaIlmGCEVFwAdnoNPuVQ/hbiF6p5oymcf0QtWcElMAFBrVnf8XfU+W2lKzwBecISS mRH2MVqippSIipK9pU05vz57nm3/IfngjL++0OhN1nDkhvFr+Eqmdk8SmbnSpvoaqo/c CE4FS4QcHyQVZCzdZD7Sn4brqIkFnwlRxsiKlVA4YsjLY8R/6RtB9liobYzOAVrHqntg JdeoyQbiPWiIf4K7qN+Sm6PrMZRsJZzdTWNFwxIUgCI9/Qhu9IuntCSR1UjAtotymazv WLGDm7mbbsD5OG7GhaJ91jfUSaKLZ9Hn1iYbFzvO/Cbo5g1OPtEs1bFFJMyYgfQIRMFv nbwg== X-Gm-Message-State: ACgBeo1H+Q3xTp2O7+MzitZPzHVBEnm4pAbsqvxzzTaIUt07c+rncUiH 2wdAUS6bLpRd3uZK5ziyLQ7PGNirngjlxgrze4HLIA== X-Received: by 2002:a0d:cb0b:0:b0:322:6f04:9262 with SMTP id n11-20020a0dcb0b000000b003226f049262mr14681907ywd.224.1659389369472; Mon, 01 Aug 2022 14:29:29 -0700 (PDT) MIME-Version: 1.0 References: <20220729151301.v4.1.Ibf9efc9be50783eeee55befa2270b7d38552354c@changeid> <1ca16b27-21e5-3537-400a-25cdae52396e@acm.org> In-Reply-To: <1ca16b27-21e5-3537-400a-25cdae52396e@acm.org> From: Daniil Lunev Date: Tue, 2 Aug 2022 07:29:18 +1000 Message-ID: Subject: Re: [PATCH v4] ufs: core: print UFSHCD capabilities in controller's sysfs node To: Bart Van Assche Cc: Adrian Hunter , Greg Kroah-Hartman , Alim Akhtar , Avri Altman , Bean Huo , Can Guo , Daejun Park , "James E.J. Bottomley" , "Martin K. Petersen" , Mauro Carvalho Chehab , Sohaib Mohamed , Stanley Chu , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Bart > The above sentence is not complete. Did you perhaps want to write "are > supported by the host controller" instead of "status"? Will fix it in the next version. > I don't think the above documentation is correct. My understanding is > that the UFSHCD_CAP_CLK_SCALING flag indicates whether or not the host > controller supports clock scaling. It does not indicate whether or not > clock scaling is enabled. Ah, right, there is a control for it in sysfs, it is just hidden in ufshcd.c I was under a wrong impression that it is like the writebooster capability that has quite a bit of conditions for staying present. WIll fix it in the next version. > Please change "can not / can be enabled" into "is not supported by the > host controller / is supported by the host controller". That would be incorrect. The "caps" variable semantics is a bit weird in the sense that it is used at times to convey "active" capabilities, not just supported one. For example, for the writebooster capability to be present in caps, first controller driver should indicate it is ready to support it, then the part that is attached to the host controller has to indicate support in the device descriptor, then WB has to be configured and its lifetime should not be exhausted. If any of those parameters are not satisfied, the capability will be removed from the set despite generally being supported. I am not sure how to properly word it, but just saying "controller supports it" would becounter-factual (especially since the controller doesn't really knows anything about writebooster per-ce, it is part's functionality). What would be suggested wording in that case? --Daniil