lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc9c3e08-a83c-4748-89e4-8b7b0c62da7f@quicinc.com>
Date: Mon, 22 Jan 2024 23:01:26 +0800
From: Lei Wei <quic_leiwei@...cinc.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>,
        Luo Jie
	<quic_luoj@...cinc.com>
CC: <agross@...nel.org>, <andersson@...nel.org>, <konrad.dybcio@...aro.org>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
        <corbet@....net>, <catalin.marinas@....com>, <will@...nel.org>,
        <p.zabel@...gutronix.de>, <shannon.nelson@....com>,
        <anthony.l.nguyen@...el.com>, <jasowang@...hat.com>,
        <brett.creeley@....com>, <rrameshbabu@...dia.com>,
        <joshua.a.hay@...el.com>, <arnd@...db.de>, <geert+renesas@...der.be>,
        <neil.armstrong@...aro.org>, <dmitry.baryshkov@...aro.org>,
        <nfraprado@...labora.com>, <m.szyprowski@...sung.com>,
        <u-kumar1@...com>, <jacob.e.keller@...el.com>, <andrew@...n.ch>,
        <netdev@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-doc@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
        <ryazanov.s.a@...il.com>, <ansuelsmth@...il.com>,
        <quic_kkumarcs@...cinc.com>, <quic_suruchia@...cinc.com>,
        <quic_soni@...cinc.com>, <quic_pavir@...cinc.com>,
        <quic_souravp@...cinc.com>, <quic_linchen@...cinc.com>
Subject: Re: [PATCH net-next 18/20] net: ethernet: qualcomm: Add PPE MAC
 support for phylink



On 1/10/2024 8:18 PM, Russell King (Oracle) wrote:
> On Wed, Jan 10, 2024 at 07:40:30PM +0800, Luo Jie wrote:
>> +static void ppe_phylink_mac_link_up(struct ppe_device *ppe_dev, int port,
>> +				    struct phy_device *phy,
>> +				    unsigned int mode, phy_interface_t interface,
>> +				    int speed, int duplex, bool tx_pause, bool rx_pause)
>> +{
>> +	struct phylink_pcs *pcs = ppe_phylink_mac_select_pcs(ppe_dev, port, interface);
>> +	struct ppe_uniphy *uniphy = pcs_to_ppe_uniphy(pcs);
>> +	struct ppe_port *ppe_port = ppe_port_get(ppe_dev, port);
>> +
>> +	/* Wait uniphy auto-negotiation completion */
>> +	ppe_uniphy_autoneg_complete_check(uniphy, port);
> 
> Way too late...
> 


Yes agree, this will be removed. If inband autoneg is used, 
.pcs_get_state should report the link status.  Then this function call 
should not be needed and should be removed.

>> @@ -352,6 +1230,12 @@ static int ppe_port_maxframe_set(struct ppe_device *ppe_dev,
>>   }
>>   
>>   static struct ppe_device_ops qcom_ppe_ops = {
>> +	.phylink_setup = ppe_phylink_setup,
>> +	.phylink_destroy = ppe_phylink_destroy,
>> +	.phylink_mac_config = ppe_phylink_mac_config,
>> +	.phylink_mac_link_up = ppe_phylink_mac_link_up,
>> +	.phylink_mac_link_down = ppe_phylink_mac_link_down,
>> +	.phylink_mac_select_pcs = ppe_phylink_mac_select_pcs,
>>   	.set_maxframe = ppe_port_maxframe_set,
>>   };
> 
> Why this extra layer of abstraction? If you need separate phylink
> operations, why not implement separate phylink_mac_ops structures?
> 

This PPE driver will serve as the base driver for higher level drivers
such as the ethernet DMA (EDMA) driver and the DSA switch driver. The
ppe_device_ops is exported to these higher level drivers, to allow 
access to PPE operations. For example, the EDMA driver (ethernet 
netdevice driver to be pushed for review after the PPE driver) will use 
the phylink_setup/destroy ops for managing netdevice to PHY linkage. The 
set_maxframe op is also to be used by the EDMA driver during MTU change 
operation on the ethernet port.

I also mentioned it in the section "Exported PPE Device Operations" in 
PPE driver documentation:
https://lore.kernel.org/netdev/20240110114033.32575-2-quic_luoj@quicinc.com/

Whereas the PPE DSA switch driver is expected to use the phylink_mac 
ops. However,we will remove the phylink_mac ops from this patch now 
since it is currently unused.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ