Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2192766imn; Mon, 1 Aug 2022 14:49:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Mc4aM7/dGCAwsGwLFYUt6icyCDdWZSvDmhtE4PmEbfbcZkISQS2mco5S/mJEiSFfLF1St X-Received: by 2002:a17:902:ecd2:b0:16e:d87f:d19e with SMTP id a18-20020a170902ecd200b0016ed87fd19emr11001433plh.75.1659390569489; Mon, 01 Aug 2022 14:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659390569; cv=none; d=google.com; s=arc-20160816; b=RI6vjt0P0GFK4cYeEQouggSNOEhcSdw422JM1CqgLD7GSBKzbdt3oySwfVeM8yidey TItHKZJJeVuo1Y3RpujnZqTB0xeW4mkKwHjH1Kd9c+mJoxO/d1/d3w3ahUs8edAlr1Pd M0dtJ4TunuwV5lj2qHRt6izw/nPb43CGf4BtZK3w0dkgV2/TKMcAtfXdIV2JLOjqplyW ra1zW2p/Wq4CFJRoC2e3MmUs1gSXhJJDt9UwE/WY8Sdetx3BjhVM+r+H5SMZq77H4eE5 NRzO7UqMLTakDPb4VhezU6lKWiwxdVsxErBfooUM74C45qSFIw3PfVvjL2+kjcJGJ/ly 5+LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=/Uj3k4mtLY63OgD/JEu30S8Bzg5zX65s31dnHrHQ/nI=; b=adMhgAUpqAfqjxKl6DcPnK3/WUUT0n72fGQivel1xZKgvBHMwjZmldUnAZhM0V+Ed7 TLRsD8Bo8bmvo25JYC4E/aMR5HUP0KJ6nxltGZP1WUhyxh5uhRi778+ahUi1Hu0cj6bU IFv8/4JzcaKWiJkiFAKqz2KIV1BJzpQX0H7b/UWDDJoW4o2lDQD/ags+ihVVRIK2qiIU yTbD7VxGQvP7PQC8uWgnAbq+8GIxBTxzUrGqH/B9WdNsLktvge6IK5K3958wkmUTeuzP 8J10gf5n8mOD75VIqd41+P3LhL4djKoLrPn5937FlA4ehzLge9AS9nsOOljlTGmrVFWu ScqA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a63fb05000000b00419fc0f56a3si12436447pgh.89.2022.08.01.14.49.14; Mon, 01 Aug 2022 14:49:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234276AbiHAVnF (ORCPT + 99 others); Mon, 1 Aug 2022 17:43:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbiHAVnD (ORCPT ); Mon, 1 Aug 2022 17:43:03 -0400 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E2EA23170; Mon, 1 Aug 2022 14:43:01 -0700 (PDT) Received: by mail-pg1-f178.google.com with SMTP id f11so10771715pgj.7; Mon, 01 Aug 2022 14:43:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=/Uj3k4mtLY63OgD/JEu30S8Bzg5zX65s31dnHrHQ/nI=; b=J6xI+S4dxCFfHt4TUbZAFWUFsZ2hs+uzLlsrPE8VhXSkP3V/Ng4B7bzgtq8m+rmkCi 03j7FZ79KfvcHO4lt2krWIXuCNIxI9jC3vPQuGopG76d9Umi8kNEfBl5csImDJ1ker6y YlbDblFbGQOBQyJBC1EWNv4cMEieghlJaNR2UKfv3Krg/5ly9UnhEAt1vwgEhZhDw7pm ioutNi3Kr64JfwCA2bYb8V8boFSbvHLflqyXIoTB2pJ0rS/Vx9q9bIcB10H5fRhlbq/V emgmVxQRBGmn3mzQSrYzVKAkLSn12Gr3CrcHNSg1OvtjGwlW91mhyZVf8yGUQu2M+L6y 8sIA== X-Gm-Message-State: AJIora9tW0KrwptcYOGeOJ8ZMN3MkX+mZamHu+Onbym+XEeooinSY31m 6Ga8lt25Orl0hHOTHk5q4Hc= X-Received: by 2002:a63:4042:0:b0:411:bbfe:e736 with SMTP id n63-20020a634042000000b00411bbfee736mr14888481pga.1.1659390180950; Mon, 01 Aug 2022 14:43:00 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:6496:b2a7:616f:954d? ([2620:15c:211:201:6496:b2a7:616f:954d]) by smtp.gmail.com with ESMTPSA id d3-20020a170902f14300b0016d5428f041sm9941638plb.199.2022.08.01.14.42.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Aug 2022 14:43:00 -0700 (PDT) Message-ID: Date: Mon, 1 Aug 2022 14:42:57 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v4] ufs: core: print UFSHCD capabilities in controller's sysfs node Content-Language: en-US To: Daniil Lunev 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 References: <20220729151301.v4.1.Ibf9efc9be50783eeee55befa2270b7d38552354c@changeid> <1ca16b27-21e5-3537-400a-25cdae52396e@acm.org> From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no 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 On 8/1/22 14:29, Daniil Lunev wrote: >> 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 be counter-factual > (especially since the controller doesn't really knows anything about > writebooster per-se, it is part's functionality). What would be > suggested wording in that case? Given the above I think we can keep the current wording. This also makes me wonder why the UFSHCD_CAP_WB_EN flag occurs in the hba->caps member variable. That member variable is used to track controller capabilities. My understanding is that the WriteBooster functionality is a UFS device feature and also that no host controller support is required to control the WriteBooster feature. Thanks, Bart.