Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1555907

Re: [PATCH net-next 6/8] net: dsa: Add support for platform data

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net-next 6/8] net: dsa: Add support for platform data
Date 2017-01-10 21:50 +0100
Message-ID <sYbwK-5Yo-7@gated-at.bofh.it> (permalink)
References <sYb3H-5OA-15@gated-at.bofh.it> <sYb3H-5OA-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> @@ -452,11 +455,14 @@ static int dsa_cpu_parse(struct dsa_port *port, u32 index,
>  	struct net_device *ethernet_dev;
>  	struct device_node *ethernet;
>  
> -	ethernet = of_parse_phandle(port->dn, "ethernet", 0);
> -	if (!ethernet)
> -		return -EINVAL;
> +	if (port->dn) {
> +		ethernet = of_parse_phandle(port->dn, "ethernet", 0);
> +		if (!ethernet)
> +			return -EINVAL;
> +		ethernet_dev = of_find_net_device_by_node(ethernet);
> +	} else
> +		ethernet_dev = dev_to_net_device(dst->pd->netdev);

Hi Florian

This is not going to work with John's rework of my multi CPU ports
code. I think you are going to have to modify the platform_data
structure to support multi-CPU ports.

I put higher priority on cleanly integrating multi-CPU ports using
device tree, than supporting legacy platforms. I'm O.K. with
preparatory patches, but i think we should wait for actually platform
data changes until after Johns code has landed and we can design the
platform_data to work with it.

	      Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 0/8] net: dsa: Support for pdata in dsa2 Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 21:20 +0100
  [PATCH net-next 6/8] net: dsa: Add support for platform data Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 21:20 +0100
    Re: [PATCH net-next 6/8] net: dsa: Add support for platform data Andrew Lunn <andrew@lunn.ch> - 2017-01-10 21:50 +0100
      Re: [PATCH net-next 6/8] net: dsa: Add support for platform data Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 22:10 +0100
        Re: [PATCH net-next 6/8] net: dsa: Add support for platform data Andrew Lunn <andrew@lunn.ch> - 2017-01-10 22:30 +0100
          Re: [PATCH net-next 6/8] net: dsa: Add support for platform data Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 23:20 +0100
  [PATCH net-next 7/8] net: phy: Allow pre-declaration of MDIO devices Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 21:20 +0100
  [PATCH net-next 5/8] net: dsa: Export dev_to_net_device() Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 21:20 +0100
    Re: [PATCH net-next 5/8] net: dsa: Export dev_to_net_device() David Miller <davem@davemloft.net> - 2017-01-11 03:30 +0100
  [PATCH net-next 1/8] net: dsa: Pass device pointer to dsa_register_switch Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 21:20 +0100
  [PATCH net-next 3/8] net: dsa: Suffix function manipulating device_node with _dn Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 21:20 +0100
  [PATCH net-next 4/8] net: dsa: Move ports assignment closer to error checking Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 21:20 +0100
  [PATCH net-next 2/8] net: dsa: Make most functions take a dsa_port argument Florian Fainelli <f.fainelli@gmail.com> - 2017-01-10 21:20 +0100

csiph-web