Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5664488pxb; Wed, 26 Jan 2022 18:03:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9HGET4BI+rIchQg6y16t+qRq6dUKRP83HxQ8iLMhLuU+vS5uy4YV/QqyN+2erVME+kUqb X-Received: by 2002:a17:907:7e8a:: with SMTP id qb10mr1191333ejc.565.1643249037254; Wed, 26 Jan 2022 18:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643249037; cv=none; d=google.com; s=arc-20160816; b=GKFSgIb8YvHKXefqcYvS0DUf1QYDA6fHoCGwWjOEOwdXXmCKgxN1/a/jkSjsfopbOv bIB6POI1/+/RUmA12EFDBXsq97SsBOS4b6K8gRnr3bZ4yDRhbNgyqGc0ipMoQmXvfVPw y9jYm8j1m9HCBrVFAsp674a6ysKndzEMinqSsEHwFpIhDcEtVRLImGu29hfph31Ck/Zm M9/DgpunrsmzXbEQTx/mS4ZWonG53TWE8hN5JutMMQUS0GmX810ePFMlVBVNkzrgqAae Ogmq363FEkCvas+G3K6ki0sczTfyHt6k7+BbH6BRHeNMucns1Oa3DAph2o6R0IvuKIBI 4uSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OxILoILCkoMLSMTN/6RX7BA5Ckr169OhivC4CXZZE/Y=; b=KwDCpH2KFAbFg6CmLvbpHpLd2jbmr0tF5Oi2F5NRkEdtO1LkmpnKulPUkiXsP1A9Ew tOurMublUce2Ri+z1UZlizWjuE9ptpgPdm/iIa7GZ29l3/o2vc6g8pdDZ6g0I9fCzhuU GyHpA7oIVf0u1ZCYQGfZyxGOi6J8bMtBWDIzbPOql8II7FeRaJjHu4UTmlHUJGPDkhRE Ja5GpFGX9QgCBX0/aLQnjhXdArueKk2E7HKDiJpwkmtOeAhIZ9bOKPvIFpqBfTH8HmKx gIzcEnXdgLZ7skgECcxynQekhws6eMxZcxb4Xau9eQgVqXp2oNx31uraPFVh/Fs5PUCt gZTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FwSQklzT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs41si568074ejc.489.2022.01.26.18.03.32; Wed, 26 Jan 2022 18:03:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FwSQklzT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232856AbiAZWFK (ORCPT + 99 others); Wed, 26 Jan 2022 17:05:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232435AbiAZWFJ (ORCPT ); Wed, 26 Jan 2022 17:05:09 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAEF5C06161C; Wed, 26 Jan 2022 14:05:08 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id h7so1620514ejf.1; Wed, 26 Jan 2022 14:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OxILoILCkoMLSMTN/6RX7BA5Ckr169OhivC4CXZZE/Y=; b=FwSQklzT+27SbdvfgyJEAr62I92RVD7qL22jZex/Lfr6miGFBfr9CYhEfYQsAiDyXm ZEMdeWiFkmVPIsFifqZAviKg7QUJDCq6A6kpqnj5/Sc+cGfRSP51Cv58XwAdDd0/nvW/ BnT02AyRMp3zQPQWscAsH+ZgWd5p+wBUuEzCR7/Bf4kyh4IALjujm8adqAdr7tHAOHqZ WqbNDLmWPQqp2cMCUglrdb7iEqhKLrjuHcCPB1d0osjnbKhjsjuF62BZ3cDd1YcBOUA2 X/vLWcfl9/7nnSK09eC1smKOYUPK0DS/iSVjqefvLxSXtZ8OHMUe4zFYIX4mSibnXWqw 7+fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OxILoILCkoMLSMTN/6RX7BA5Ckr169OhivC4CXZZE/Y=; b=lXYHU/8+ovfqMUWzEREaTBNWUF5WwCpvLNrCSDTX6qwLnN0v/9wcw6N71pZP3VoNd2 x/IRGGC2bNIQiz24Fg3WR+hPYGXUDhRU1aNSJePP6a3aUWx18wDqrT+yV+8zMqJFKl0m o95kp5YQFPTtfQl/9eylK5o0nsxVJeIsYg55fPSnqgLGSiFA1dUrZ6iKiBpfj+BSfG27 zqnYmyl+SUQ3eKRK5N4bHAmk1ox2iaDeAMWQjzkONt3bApzG585Owz/nMe49JPvd/dWf hU2Y/KkGSzun4+AT7ACwEbsIIr/PRWncBn2S1OHcPe4y2caD0zZWqpcVSpMozh4UCNNY kCfQ== X-Gm-Message-State: AOAM5302+esNOnlOXSdZvs/s/1C5iHEWsxLbDRhVBR8mrDaE/Px7/csw M8wITqrx6hRUSTvx7xdoIqs= X-Received: by 2002:a17:907:7b87:: with SMTP id ne7mr631722ejc.556.1643234707061; Wed, 26 Jan 2022 14:05:07 -0800 (PST) Received: from skbuf ([188.27.184.105]) by smtp.gmail.com with ESMTPSA id by22sm7939933ejb.5.2022.01.26.14.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 14:05:06 -0800 (PST) Date: Thu, 27 Jan 2022 00:05:05 +0200 From: Vladimir Oltean To: Ansuel Smith Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RFC PATCH v7 12/16] net: dsa: qca8k: add support for phy read/write with mgmt Ethernet Message-ID: <20220126220505.iccabgu3olbaxhbi@skbuf> References: <20220123013337.20945-1-ansuelsmth@gmail.com> <20220123013337.20945-13-ansuelsmth@gmail.com> <20220125150355.5ywi4fe3puxaphq3@skbuf> <61f08471.1c69fb81.a3d6.4d94@mx.google.com> <20220126014854.opnyrd56nsrk7udp@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 02:57:03AM +0100, Ansuel Smith wrote: > > > > Shouldn't qca8k_master_change() also take phy_hdr_data->mutex? > > > > > > > > > > Is actually the normal mgmg_hdr_data. > > > > > > phy_hdr_data = &priv->mgmt_hdr_data; > > > > > > Should I remove this and use mgmt_hdr_data directly to remove any > > > confusion? > > > > I am not thrilled by the naming of this data structure anyway > > (why "hdr"?), but yes, I also got tricked by inconsistent naming. > > Please choose a consistent name and stick with it. > > Hdr as header stuff since all this stuff is put in the hdr. Should I > just drop hdr and use mgmt_data directly? Or mgmt_eth? I don't have a strong preference because I can't find a good name. Consistency in naming this feature is the most important part. Maybe it is just me who is reading it this way, but I associate a structure whose name contains "hdr" with something that pertains to data from an skb (such as "mgmt_ethhdr" which is exactly that), hence the earlier comment. I opened the manual and the phrasing that the vendor uses is that "[ the switch ] supports the read/write register (sic) through the Atheros header". So it makes more sense now and it's in line with that, at least to some degree. I understand if you prefer not to change it, but "mgmt_data" sounds less confusing to me.