Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp829947pxb; Tue, 12 Apr 2022 14:39:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7wY131KeQQiATXjPA4TIpePhcXWHB/CiPMOCSSkVde5vtb7Scgm8zB7XTeUFORFh9OOD+ X-Received: by 2002:a17:90b:380c:b0:1cd:4f85:8385 with SMTP id mq12-20020a17090b380c00b001cd4f858385mr137975pjb.236.1649799554878; Tue, 12 Apr 2022 14:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649799554; cv=none; d=google.com; s=arc-20160816; b=O3xnjKRBpj/6M6lwCBG3H89aTyP3mlpbzZMbGv+YPkp9ibYyzRHTtmRP1NIis8abQ3 VhsWsEIFp5+HMV8nowo2NyKar838rP0oqczJ03ZLKVqypyhytJ3b/jSv3CGQjk/God4N 0XzE9pyizzN1J7e6neLlDYdKjXZf0AMzBVE6fET4SAhvuoqgJ1eoyboAyRE/aAnEMp7y Qxw3qntSu+WHMJCbzp4x2qaK8tXleftkdNJTkaj5PlTDrbMAMqHIIgn2vcXrFJRBVrSH HJslex+uHHQI/EUQ+P0QvZEaUjSBXKyIhzEoDvT7mnaqIi3aJuKtAF0Sm7o66cEipADl tyIg== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=SRVLKg/aN7+mzT/DPEGLjXV+GIyspffPB6TZrFkFZTI=; b=HGlKn1RSRG8KsUvG4lSzKP+jEnk6WfzT4f90U9sTHLxiTrQpJkvVjvuza6qnnGzAp8 3UY36f/0SCnBplX1a+G2XmeU8Q9wnQwp3sL7vD2hKbKPihJLddGyZwZPu0ZujAG1tBwh SbEwEdoMAePUD4dyuWW3fb+EGj7iXdt62gGk9S/vJyIaR2/WWQv8hSkBjFGnDb5/oKHE GNjiceNjBxOzXCaPWM62Hm+iN/1DEQTtNzV3lMumzatdmJr05VV0J2OEZbBVrckswZAp qxeTyyEHEtitKxBv+OLVpOYJZ+XcneGAuDAE+jxsU2DdvS4X0if7vHDiQlO/p8HzaJyg fDLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=DH0o0xau; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=qidKUV31; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r8-20020a63fc48000000b0039d300cade6si3721103pgk.679.2022.04.12.14.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:39:14 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=DH0o0xau; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=qidKUV31; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9333E12FF8D; Tue, 12 Apr 2022 13:44:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233867AbiDKWvO (ORCPT + 99 others); Mon, 11 Apr 2022 18:51:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234169AbiDKWvM (ORCPT ); Mon, 11 Apr 2022 18:51:12 -0400 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E4302ED78 for ; Mon, 11 Apr 2022 15:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1649717337; x=1681253337; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=sU/ZOAq3Zhx+cNy7Kisbffx9HGFTvONOYugeUf6D9Wg=; b=DH0o0xauecXhV6PGFkWtVNbNOeuMVy9jLXkTD4nU+AyM2bnhrkIhARvy H/otNkJUIdZBg9NjIWzl2W+QK/VSoMPY2DQqt+hV/Ie9mErmzU2JR5VBS pLA5NAV5iAuDSOlHOsFmh1bwNBHxTnCN4tA3Zn0ZWEAj0HhVBqYD6Jxjp h3eQcVzcT3Visx6kQxXlHdaZ+rtF4m0NcZP/RMokPhau5iAyZ8DXBs3Oe dmGPL68XPY/f+QWH0ESdMr1NUxPGi8bgLI6DZi7Cjv8ZiyHyeyW3wzCeE vETAesCdEa1GdDAo2HydxGowCrkWh/8l360D/HO3ucdOKw06j+nMNQrBU Q==; X-IronPort-AV: E=Sophos;i="5.90,252,1643644800"; d="scan'208";a="301849854" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 12 Apr 2022 06:48:55 +0800 IronPort-SDR: r9ZOXRXHiGMieeC+3Mnuo9DTyrk6nMLD79/iYYSiWAb3r8B5C7YgC2lXfQPmYEt5uFXrkk57IV b1KFkaoO/TwhMS3ehNwVFFvXGkaTRcyeFFBHSIsmsy4ft+xjNm6zOZSwg7V828vsE/j6S+imcV Qi4a7Wxv4wnV7Zr8/OSNYV+u8JCnvDpYSb2cjegKqzlLUi2+SnBifD6q022JL4t8SzYiqaGIdn 7mhqy5qFZbxXjJuxmAV0RVsBFnuGywr/f66A7UZc4WFjMBcBsJrUlYXzvpXm0R6wJ8+9J04vhl Gq9iuifo2k7jegP+oIOHQL6z Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 11 Apr 2022 15:20:12 -0700 IronPort-SDR: 7d18rQr24Q+QyCQyz2xek28iPefkSYLmBpl3yyqha00pHgS+QaDfzy8XPcwFUg6HwtP6hmdTp6 qxpc8AWkf1/jFtLB95cT4qYWI6NZBnahs/cE47qP9rDlqxvWsHIm+CWrOfzCjwmdVSlxzglSSo 6FKht4mT6Dx9wDOOJ2Oj6ZeopDZFUpZRw3mtaI1pkZ174kac7BNCJZkIwaRpaYPQZNmu8p1+uA hCbBfhRR7FK75cr5Gl3Y2v3HRI1xsOH30JV/uMySRGqrzI9rHLJ1Ut+/hp+4c5MgKUpOliZHI+ /9s= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 11 Apr 2022 15:48:55 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4KckYL33Cdz1SVp4 for ; Mon, 11 Apr 2022 15:48:54 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1649717333; x=1652309334; bh=sU/ZOAq3Zhx+cNy7Kisbffx9HGFTvONOYug eUf6D9Wg=; b=qidKUV31MocT0RrE1UOp/tosJ2pgPBI2P560GwpOnx1onGII2de AtWCsMkU2Nc7TwtY8JIu/OCMJ3cAWmOQmH+fIgAUNbucueZ6VvbLrb010Vh5TP4k BtO91/UuoP9Q43Z2UGZ/tSqGZ7frsRl1ut+CI8mf23geVHoYWVbVQutbDsjR4IuU d3YBFM79XkmwXRCB41+97BckNrhBLo2kjZUO+pqMFndYEZOgaJa9A9uOOSqs3SRa CGt8n1asXGK1w2mdW5dzycc1HDiey8CLDgDiqp1c6PYV3+aOkQV1eLkGT6GPKLQx kS8MkuRJTSMd+UKUeOroDFk0gdKsWeVAu7g== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 7-Wlh5q_xBDB for ; Mon, 11 Apr 2022 15:48:53 -0700 (PDT) Received: from [10.225.163.9] (unknown [10.225.163.9]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4KckYH5f7Rz1Rvlx; Mon, 11 Apr 2022 15:48:51 -0700 (PDT) Message-ID: <5ae5764f-ca51-9c2d-c13f-cfe855bda45e@opensource.wdc.com> Date: Tue, 12 Apr 2022 07:48:50 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 12/21] ata: libahci: Discard redundant force_port_map parameter Content-Language: en-US To: Serge Semin Cc: Serge Semin , Hans de Goede , Jens Axboe , Alexey Malahov , Pavel Parkhomenko , Rob Herring , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20220324001628.13028-1-Sergey.Semin@baikalelectronics.ru> <20220324001628.13028-13-Sergey.Semin@baikalelectronics.ru> <20220411121151.vm6wmtalbl2lgtgo@mobilestation> <20220411205205.p5vnqvscgfb2siej@mobilestation> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20220411205205.p5vnqvscgfb2siej@mobilestation> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE 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 On 4/12/22 05:52, Serge Semin wrote: > On Mon, Apr 11, 2022 at 09:25:03PM +0900, Damien Le Moal wrote: >> On 4/11/22 21:11, Serge Semin wrote: >>> On Thu, Mar 24, 2022 at 11:05:58AM +0900, Damien Le Moal wrote: >>>> On 3/24/22 09:16, Serge Semin wrote: >>>>> Currently there are four port-map-related fields declared in the >>>>> ahci_host_priv structure and used to setup the HBA ports mapping. First >>>>> the ports-mapping is read from the PI register and immediately stored in >>>>> the saved_port_map field. If forced_port_map is initialized with non-zero >>>>> value then its value will have greater priority over the value read from >>>>> PI, thus it will override the saved_port_map field. That value will be then >>>>> masked by a non-zero mask_port_map field and after some sanity checks it >>>>> will be stored in the ahci_host_priv.port_map field as a final port >>>>> mapping. >>>>> >>>>> As you can see the logic is a bit too complicated for such a simple task. >>>>> We can freely get rid from at least one of the fields with no change to >>>>> the implemented semantic. The force_port_map field can be replaced with >>>>> taking non-zero saved_port_map value into account. So if saved_port_map is >>>>> pre-initialized by the glue-driver/platform-specific code then it will >>>> >>> >>>> glue-driver == LLDD (low level device driver), for the entire series please. >>> >>> Why? It's a normal term and well known amongst developers. I've used it >>> in a plenty of my patches before and none of them has been questioned in that >>> part so far. >> > >> This term is not used in libata, nor do I remember seeing it used in SCSI >> or block subsystem either. We always talk about mid-layer (ahci platform) >> and LLDD (adapter driver). > > Great, do we need to learn the subsystem-specific dictionary now > before submitting the patches for it? =) > Really, you are asking me to change one term to its synonym just > because it's mainly unused here. Now you know what it means, the > others can easily google it and get to learn something new. Win-win.) I already knew what it meant, but it was unclear if my idea of what you meant was actually the same as yours. Sticking with the vocabulary already used since *a long time ago* makes life easier for reviewers and avoids confusion. -- Damien Le Moal Western Digital Research