the device itself has no interrupt line (and
uses the same phy ID)? How to deal with the same Phy ID used for different
devices and different features?
Cheers,
Juergen
PS: please keep me on CC as I'm not subscribed to the netdev list.
--
Pengutronix e.K.
> /* 13.2 System Control and Status Registers
> * Multiply register number by 4 to get address offset.
> */
Maybe we should put this macro into a shared location because
in "net/dsa/tag_lan9303.c" there is already a "#define LAN9303_MAX_PORTS
3".
jb
--
Pen
my setup still
works.
Tested-by: Juergen Borleis
Cheers
Juergen
--
Pengutronix e.K. | Juergen Borleis |
Industrial Linux Solutions | http://www.pengutronix.de/ |
depends on NET_DSA
> + depends on NET_DSA && I2C
> select NET_DSA_SMSC_LAN9303
> select REGMAP_I2C
> ---help---
Thanks, but already found and fixed by Arnd Bergmann.
jb
--
Pengutronix e.K. | Juergen Borleis |
Industrial Linux Solutions | http://www.pengutronix.de/ |
e *dev, struct dsa_switch *ds;
> unsigned int source_port;
>
> - if (unlikely(!dst)) {
> - dev_warn_ratelimited(&dev->dev, "Dropping packet, due to
> missing switch tree device\n");
> - return NULL;
> - }
> -
>
r SPI). I've now compile time tested all module
and static variants (hopefully) and run-time tested the static variant and
the I2C module variant.
jb
--
Pengutronix e.K. | Juergen Borleis |
Industrial Linux Solutions | http://www.pengutronix.de/ |
When the LAN9303 device is in MDIO manged mode, all register accesses must
be done via MDIO.
Please note: this code is compile time tested only due to the absence of such
configured hardware. It is based on a patch from Stefan Roese from 2014.
Signed-off-by: Juergen Borleis
CC: devicet
In this mode the switch device and the internal phys will be managed via
I2C interface. The MDIO interface is still supported, but for the
(emulated) CPU port only.
Signed-off-by: Juergen Borleis
CC: devicet...@vger.kernel.org
CC: robh...@kernel.org
CC: mark.rutl...@arm.com
---
.../devicetree
The LAN9303 is a three port 10/100 ethernet switch with integrated phys
for the two external ethernet ports. The third port is an RMII/MII
interface to a host master network interface (e.g. fixed link).
While the LAN9303 device itself supports offload packet processing, this
driver does not make u
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port
and two external ethernet ports with built-in phys.
This driver uses the DSA framework, but is currently only capable of
separating the two external ports. There is no offload support yet.
Signed-off-by: Juergen Borleis
ontrol the destination and the source of an ethernet packet.
Signed-off-by: Juergen Borleis
---
include/net/dsa.h | 1 +
net/dsa/Kconfig | 4 ++
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 ++
net/dsa/dsa_priv.h| 3 ++
net/dsa/tag_lan93
In this mode the switch device and the internal phys will be managed via
I2C interface. The MDIO interface is still supported, but for the
(emulated) CPU port only.
Signed-off-by: Juergen Borleis
Reviewed-by: Andrew Lunn
CC: devicet...@vger.kernel.org
CC: robh...@kernel.org
CC: mark.rutl
The LAN9303 is a three port 10/100 ethernet switch with integrated phys
for the two external ethernet ports. The third port is an RMII/MII
interface to a host master network interface (e.g. fixed link).
While the LAN9303 device itself supports offload packet processing, this
driver does not make u
When the LAN9303 device is in MDIO manged mode, all register accesses must
be done via MDIO.
Please note: this code is compile time tested only due to the absence of such
configured hardware. It is based on a patch from Stefan Roese from 2014.
Signed-off-by: Juergen Borleis
Reviewed-by: Andrew
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port
and two external ethernet ports with built-in phys.
This driver uses the DSA framework, but is currently only capable of
separating the two external ports. There is no offload support yet.
Signed-off-by: Juergen Borleis
ontrol the destination and the source of an ethernet packet.
Signed-off-by: Juergen Borleis
---
include/net/dsa.h | 1 +
net/dsa/Kconfig | 4 ++
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 ++
net/dsa/dsa_priv.h| 3 ++
net/dsa/tag_lan93
gt;
> Actually, this doesn't even build. Please fix this and resubmit.
Sorry, did a temporary fix in 'dsa_priv.h'a and so this missing #include
slipped through. Fix in v5 is coming soon.
Regards,
Juergen
--
Pengutronix e.K. | Ju
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port
and two external ethernet ports with built-in phys.
This driver uses the DSA framework, but is currently only capable of
separating the two external ports. There is no offload support yet.
Signed-off-by: Juergen Borleis
The LAN9303 is a three port 10/100 ethernet switch with integrated phys
for the two external ethernet ports. The third port is an RMII/MII
interface to a host master network interface (e.g. fixed link).
While the LAN9303 device itself supports offload packet processing, this
driver does not make u
When the LAN9303 device is in MDIO manged mode, all register accesses must
be done via MDIO.
Please note: this code is compile time tested only due to the absence of such
configured hardware. It is based on a patch from Stefan Roese from 2014.
Signed-off-by: Juergen Borleis
Reviewed-by: Andrew
In this mode the switch device and the internal phys will be managed via
I2C interface. The MDIO interface is still supported, but for the
(emulated) CPU port only.
Signed-off-by: Juergen Borleis
Reviewed-by: Andrew Lunn
CC: devicet...@vger.kernel.org
CC: robh...@kernel.org
CC: mark.rutl
ontrol the destination and the source of an ethernet packet.
Signed-off-by: Juergen Borleis
---
include/net/dsa.h | 1 +
net/dsa/Kconfig | 4 ++
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 ++
net/dsa/dsa_priv.h| 3 ++
net/dsa/tag_lan93
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port
and two external ethernet ports with built-in phys.
This driver uses the DSA framework, but is currently only capable of
separating the two external ports. There is no offload support yet.
Signed-off-by: Juergen Borleis
ontrol the destination and the source of an ethernet packet.
Signed-off-by: Juergen Borleis
---
include/net/dsa.h | 1 +
net/dsa/Kconfig | 3 +
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 +
net/dsa/dsa_priv.h| 3 +
net/dsa/tag_lan93
The LAN9303 is a three port 10/100 ethernet switch with integrated phys
for the two external ethernet ports. The third port is an RMII/MII
interface to a host master network interface (e.g. fixed link).
While the LAN9303 device itself supports offload packet processing, this
driver does not make u
In this mode the switch device and the internal phys will be managed via
I2C interface. The MDIO interface is still supported, but for the
(emulated) CPU port only.
Signed-off-by: Juergen Borleis
CC: devicet...@vger.kernel.org
CC: robh...@kernel.org
CC: mark.rutl...@arm.com
---
.../devicetree
When the LAN9303 device is in MDIO manged mode, all register accesses must
be done via MDIO.
Please note: this code is compile time tested only due to the absence of such
configured hardware. It is based on a patch from Stefan Roese from 2014.
Signed-off-by: Juergen Borleis
CC: devicet
reg = <1>;
> > + label = "lan1;
> > + };
>
> These are not PHY nodes, so does this compatible string do anything?
I removed them and nothing changed.
Regards,
Juergen
--
Pengutronix e.K. | Juergen Borleis |
Industrial Linux Solutions | http://www.pengutronix.de/ |
es (MDIO emulation case):
Generic PHY 63fec000.etherne:00: attached PHY driver [Generic PHY]
(mii_bus:phy_addr=63fec000.etherne:00, irq=-1)
And for the fixed-link case:
Generic PHY fixed-0:00: attached PHY driver [Generic PHY]
(mii_bus:phy_addr=fixed-0:00, irq=-1)
Regards,
Juergen
--
Pe
Hi Andrew,
On Friday 07 April 2017 15:06:10 Andrew Lunn wrote:
> On Fri, Apr 07, 2017 at 10:14:59AM +0200, Juergen Borleis wrote:
> > To define the outgoing port and to discover the incoming port a regular
> > VLAN tag is used by the LAN9303. But its VID meaning is 'specia
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port
and two external ethernet ports with built-in phys.
This driver uses the DSA framework, but is currently only capable of
separating the two external ports. There is no offload support yet.
Signed-off-by: Juergen Borleis
In this mode the switch device and the internal phys will be managed via
I2C interface. The MDIO interface is still supported, but for the
(emulated) CPU port only.
Signed-off-by: Juergen Borleis
---
.../devicetree/bindings/net/dsa/lan9303.txt| 64
drivers/net/dsa/Kconfig
When the LAN9303 device is in MDIO manged mode, all register accesses must
be done via MDIO.
Please note: this code is *untested* yet due to the absence of such
configured hardware. It is based on a patch of Stefan Roese from 2014.
Signed-off-by: Juergen Borleis
---
.../devicetree/bindings/net
ontrol the destination and the source of an ethernet packet.
Signed-off-by: Juergen Borleis
---
include/net/dsa.h | 1 +
net/dsa/Kconfig | 3 +
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 +
net/dsa/dsa_priv.h| 3 +
net/dsa/tag_lan93
The LAN9303 is a three port 10/100 ethernet switch with integrated phys
for the two external ethernet ports. The third port is an RMII/MII
interface to a host master network interface (e.g. fixed link).
While the LAN9303 device itself supports offload packet processing, this
driver does not make u
#address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + port@0 { /* RMII fixed link to master */
> > + reg = <0>;
> > + label = "cpu";
> > + ethernet = <&master>;
> > + max-speed = <100>;
>
> max-speed does not do anything i think, since there is no adjust_link
> function.
Removed in v2.
Thanks.
Juergen
--
Pengutronix e.K. | Juergen Borleis |
Industrial Linux Solutions | http://www.pengutronix.de/ |
em in conjunction with calling lan9303_port_disable(). In v2 I do not
> > touch the phy anymore.
>
> So this is touching the BMCR_PDOWN bit? Using the #define would of
> helped explain this.
Okay.
Juergen
--
Pengutronix e.K. | Juergen Borleis |
Industrial Linux Solutions | http://www.pengutronix.de/ |
tween the MAC addresses
> > +* and the current ethertype field.
> > +*/
> > + skb_pull_rcsum(skb, 2 + 2);
> > + memmove(skb->data - ETH_HLEN, skb->data - (ETH_HLEN + LAN9303_TAG_LEN),
> > + 2 * ETH_ALEN);
> > + skb_push(skb, ETH_HL
ilt-in PHYs :)
Juergen
--
Pengutronix e.K. | Juergen Borleis |
Industrial Linux Solutions | http://www.pengutronix.de/ |
return -ENODEV;
> > + }
> > +
> > + return rc;
> > +}
> > +
> > +static void lan9303_port_disable(struct dsa_switch *ds, int port,
> > +struct phy_device *phy)
> > +{
> > + struct lan9303 *chip = ds_to_lan9303(ds);
> > + int rc;
> > +
> > + /* disable internal data handling */
> > + switch (port) {
> > + case 1:
> > + rc = lan9303_phy_reg_write(chip, chip->phy_addr_sel_strap + 1,
> > + 0, BIT(14) | BIT(11));
> > + rc += lan9303_write_switch_reg(chip, LAN9303_MAC_RX_CFG_1,
> > + 0x02);
> > + rc += lan9303_write_switch_reg(chip, LAN9303_MAC_TX_CFG_1,
> > + 0x56);
>
> It seems odd that port_enable does not touch the PHY, but port_disable
> does. What is this doing?
My experience is, the framework powers up the phys by its own in conjunction
with calling lan9303_port_enable(), but do not power down them in conjunction
with calling lan9303_port_disable(). In v2 I do not touch the phy anymore.
> [...]
> > +static int lan9303_register_phys(struct lan9303 *chip)
>
> This one place where the switch is being called a phy.
Renamed in v2.
> [...]
> > +static void lan9303_probe_reset_gpio(struct lan9303 *chip,
> > +struct device_node *np)
> > +{
> > + chip->reset_gpio = devm_gpiod_get_optional(chip->dev, "phy-reset",
>
> This is a reset for the switch, not a PHY in the switch i think. We
> have established a bit of a standard in DSA drivers to just call this
> "reset".
Renamed in v2.
Thanks
Juergen
--
Pengutronix e.K. | Juergen Borleis |
Linux Solutions for Science and Industry | Phone: +49-5121-206917-5128 |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Fax: +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port
and two external ethernet ports with built-in phys.
This driver uses the DSA framework, but is currently only capable of
separating the two external ports. There is no offload support yet.
Signed-off-by: Juergen Borleis
In this mode the switch device and the internal phys will be managed via
I2C interface. The MDIO interface is still supported, but for the
(emulated) CPU port only.
Signed-off-by: Juergen Borleis
---
.../devicetree/bindings/net/dsa/lan9303.txt| 74 ++
drivers/net/phy
When the LAN9303 device is in MDIO manged mode, all register accesse must
be done via MDIO.
Please note: this code is *untested* yet due to the absence of such
configured hardware. It is based on a patch of Stefan Roese from 2014.
Signed-off-by: Juergen Borleis
---
.../devicetree/bindings/net
The LAN9303 is a three port 10/100 ethernet switch with integrated phys
for the two external ethernet ports. The third port is an RMII/MII
interface to a host master network interface (e.g. fixed link).
While the LAN9303 device itself supports offload packet processing, this
driver does not make u
ontrol the destination and the source of an ethernet packet.
Signed-off-by: Juergen Borleis
---
include/net/dsa.h | 1 +
net/dsa/Kconfig | 3 +
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 +
net/dsa/dsa_priv.h| 3 +
net/dsa/tag_lan93
45 matches
Mail list logo