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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzxbogPClCjNgN+m@shell.armlinux.org.uk>
Date:   Tue, 4 Oct 2022 17:13:22 +0100
From:   "Russell King (Oracle)" <linux@...linux.org.uk>
To:     Sean Anderson <sean.anderson@...o.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Madalin Bucur <madalin.bucur@....com>,
        Camelia Alexandra Groza <camelia.groza@....com>,
        netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>,
        "linuxppc-dev @ lists . ozlabs . org" <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH net-next v6 6/9] net: dpaa: Convert to phylink

On Fri, Sep 30, 2022 at 04:09:30PM -0400, Sean Anderson wrote:
> @@ -1064,43 +1061,50 @@ static struct phylink_pcs *memac_pcs_create(struct device_node *mac_node,
>  	return pcs;
>  }
>  
> +static bool memac_supports(struct mac_device *mac_dev, phy_interface_t iface)
> +{
> +	/* If there's no serdes device, assume that it's been configured for
> +	 * whatever the default interface mode is.
> +	 */
> +	if (!mac_dev->fman_mac->serdes)
> +		return mac_dev->phy_if == iface;
> +	/* Otherwise, ask the serdes */
> +	return !phy_validate(mac_dev->fman_mac->serdes, PHY_MODE_ETHERNET,
> +			     iface, NULL);
> +}
> +
>  int memac_initialization(struct mac_device *mac_dev,
>  			 struct device_node *mac_node,
>  			 struct fman_mac_params *params)
>  {
>  	int			 err;
> +	struct device_node      *fixed;
>  	struct phylink_pcs	*pcs;
> -	struct fixed_phy_status *fixed_link;
>  	struct fman_mac		*memac;
> +	unsigned long		 capabilities;
> +	unsigned long		*supported;
>  
> +	mac_dev->phylink_ops		= &memac_mac_ops;
>  	mac_dev->set_promisc		= memac_set_promiscuous;
>  	mac_dev->change_addr		= memac_modify_mac_address;
>  	mac_dev->add_hash_mac_addr	= memac_add_hash_mac_address;
>  	mac_dev->remove_hash_mac_addr	= memac_del_hash_mac_address;
> -	mac_dev->set_tx_pause		= memac_set_tx_pause_frames;
> -	mac_dev->set_rx_pause		= memac_accept_rx_pause_frames;
>  	mac_dev->set_exception		= memac_set_exception;
>  	mac_dev->set_allmulti		= memac_set_allmulti;
>  	mac_dev->set_tstamp		= memac_set_tstamp;
>  	mac_dev->set_multi		= fman_set_multi;
> -	mac_dev->adjust_link            = adjust_link_memac;
>  	mac_dev->enable			= memac_enable;
>  	mac_dev->disable		= memac_disable;
>  
> -	if (params->max_speed == SPEED_10000)
> -		mac_dev->phy_if = PHY_INTERFACE_MODE_XGMII;
> -
>  	mac_dev->fman_mac = memac_config(mac_dev, params);
> -	if (!mac_dev->fman_mac) {
> -		err = -EINVAL;
> -		goto _return;
> -	}
> +	if (!mac_dev->fman_mac)
> +		return -EINVAL;
>  
>  	memac = mac_dev->fman_mac;
>  	memac->memac_drv_param->max_frame_length = fman_get_max_frm();
>  	memac->memac_drv_param->reset_on_init = true;
>  
> -	err = of_property_match_string(mac_node, "pcs-names", "xfi");
> +	err = of_property_match_string(mac_node, "pcs-handle-names", "xfi");

While reading through the patch, I stumbled upon this - in the previous
patch, you introduce this code with "pcs-names" and then in this patch
you change the name of the property. I don't think this was mentioned in
the commit message (searching it for "pcs" didn't reveal anything) so
I'm wondering whether this name update should've been merged into the
previous patch instead of this one?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ