Hi Florian,
Florian Fainelli writes:
> On 10/12/2017 03:51 PM, Vivien Didelot wrote:
>> The dsa_port structure has a "netdev" member, which can be used for
>> either the master device, or the slave device, depending on its type.
>>
>> It is true
t is still slightly confusing, so split it into more explicit
"master" and "slave" members.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
drivers/net/dsa/bcm_sf2.c| 6 +++---
drivers/net/dsa/mt7530.c | 2 +-
drivers/net/dsa/mv88e6x
t is still slightly confusing, so split it into more explicit
"master" and "slave" members.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/bcm_sf2.c| 6 +++---
drivers/net/dsa/mt7530.c | 2 +-
drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
include/net/dsa.h
Many portions of DSA core code require to get the dsa_port structure
corresponding to a slave net_device. For this purpose, introduce a
dsa_slave_to_port() helper.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/dsa_priv.h| 7 +++
net/dsa/legacy.c
members to avoid confusion, even though it is
not planned to create a slave for DSA or CPU ports for the moment.
Vivien Didelot (5):
net: dsa: use port's cpu_dp when creating a slave
net: dsa: add slave notify helper
net: dsa: add slave to port helper
net: dsa: add slave get master helper
net
Many portions of DSA core code require to get the dsa_port structure
corresponding to a slave net_device. For this purpose, introduce a
dsa_slave_to_port() helper.
Signed-off-by: Vivien Didelot
---
net/dsa/dsa_priv.h| 7 +++
net/dsa/legacy.c | 6 +-
net/dsa/slave.c | 167
members to avoid confusion, even though it is
not planned to create a slave for DSA or CPU ports for the moment.
Vivien Didelot (5):
net: dsa: use port's cpu_dp when creating a slave
net: dsa: add slave notify helper
net: dsa: add slave to port helper
net: dsa: add slave get master helper
net
When dsa_slave_create is called, the related port already has a CPU port
assigned to it, available in its cpu_dp member. Use it instead of the
unique tree cpu_dp.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/slave.c | 7 ++-
1 file changed, 2 inse
When dsa_slave_create is called, the related port already has a CPU port
assigned to it, available in its cpu_dp member. Use it instead of the
unique tree cpu_dp.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/dsa
Both DSA slave create and destroy functions call call_dsa_notifiers with
respectively DSA_PORT_REGISTER and DSA_PORT_UNREGISTER and the same
dsa_notifier_register_info structure.
Wrap this in a dsa_slave_notify helper so prevent cluttering these
functions.
Signed-off-by: Vivien Didelot
Many part of the DSA slave code require to get the master device
assigned to a slave device. Remove dsa_master_netdev() in favor of a
dsa_slave_get_master() helper which does that.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/dsa_priv.h | 13
Both DSA slave create and destroy functions call call_dsa_notifiers with
respectively DSA_PORT_REGISTER and DSA_PORT_UNREGISTER and the same
dsa_notifier_register_info structure.
Wrap this in a dsa_slave_notify helper so prevent cluttering these
functions.
Signed-off-by: Vivien Didelot
---
net
Many part of the DSA slave code require to get the master device
assigned to a slave device. Remove dsa_master_netdev() in favor of a
dsa_slave_get_master() helper which does that.
Signed-off-by: Vivien Didelot
---
net/dsa/dsa_priv.h | 13 -
net/dsa/slave.c| 26
Hi Florian,
Florian Fainelli <f.faine...@gmail.com> writes:
> On 10/12/2017 03:10 PM, Vivien Didelot wrote:
>> An Ethernet switch may support having a MAC address, which can be used
>> as the switch's source address in transmitted full-duplex Pause frames.
>>
Hi Florian,
Florian Fainelli writes:
> On 10/12/2017 03:10 PM, Vivien Didelot wrote:
>> An Ethernet switch may support having a MAC address, which can be used
>> as the switch's source address in transmitted full-duplex Pause frames.
>>
>> If a DSA switch sup
in a multi-CPU ports system, because there
won't be a unique master device assigned to a switch tree.
To fix this, assign a random MAC address to the switch chip instead.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/dsa2.c | 8 +++-
net/dsa/dsa_priv.
in a multi-CPU ports system, because there
won't be a unique master device assigned to a switch tree.
To fix this, assign a random MAC address to the switch chip instead.
Signed-off-by: Vivien Didelot
---
net/dsa/dsa2.c | 8 +++-
net/dsa/dsa_priv.h | 1 +
net/dsa/legacy.c | 8 +++-
net
Hi Egil,
Egil Hjelmeland writes:
>>> + val = LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0;
>>> + return lan9303_write_switch_reg(chip,
>>> LAN9303_BM_EGRSS_PORT_TYPE, val);
>> Specific reason to use val then using
>> LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0
Hi Egil,
Egil Hjelmeland writes:
>>> + val = LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0;
>>> + return lan9303_write_switch_reg(chip,
>>> LAN9303_BM_EGRSS_PORT_TYPE, val);
>> Specific reason to use val then using
>> LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0
>> like previous line?
>>
>
, provide an inline dsa_master_get_slave helper which
validates the device and port indexes and look up the slave device.
This makes the tagging rcv functions more concise and robust, and also
makes dsa_get_cpu_port obsolete.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
--
, provide an inline dsa_master_get_slave helper which
validates the device and port indexes and look up the slave device.
This makes the tagging rcv functions more concise and robust, and also
makes dsa_get_cpu_port obsolete.
Signed-off-by: Vivien Didelot
---
net/dsa/dsa_priv.h| 24
switch fabric.
Change the master interface's dsa_ptr for the CPU dsa_port pointer.
This is a step towards supporting multiple CPU ports.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
include/linux/netdevice.h | 4 ++--
net/dsa/dsa.c | 6 +++---
n
switch fabric.
Change the master interface's dsa_ptr for the CPU dsa_port pointer.
This is a step towards supporting multiple CPU ports.
Signed-off-by: Vivien Didelot
---
include/linux/netdevice.h | 4 ++--
net/dsa/dsa.c | 6 +++---
net/dsa/dsa2.c| 2 +-
net/dsa
Now that the dsa_ptr is a dsa_port instance, there is no need to keep
the tag operations in the dsa_switch_tree structure. Remove it.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
---
include/ne
patches prepare the xmit and
receive hot paths and finally change dsa_ptr.
Changes in v2:
- introduce dsa_master_get_slave helper to simplify patch 6
- keep hot path data at beginning of dsa_port for cacheline 1
Vivien Didelot (7):
net: dsa: add master helper to look up slaves
net: dsa: use
Now that the dsa_ptr is a dsa_port instance, there is no need to keep
the tag operations in the dsa_switch_tree structure. Remove it.
Signed-off-by: Vivien Didelot
Reviewed-by: Florian Fainelli
---
include/net/dsa.h | 11 ---
net/dsa/dsa2.c| 2 --
net/dsa/legacy.c | 2 --
3
patches prepare the xmit and
receive hot paths and finally change dsa_ptr.
Changes in v2:
- introduce dsa_master_get_slave helper to simplify patch 6
- keep hot path data at beginning of dsa_port for cacheline 1
Vivien Didelot (7):
net: dsa: add master helper to look up slaves
net: dsa: use
they are available in cacheline 1.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
include/net/dsa.h | 5 +
net/dsa/dsa2.c| 4
net/dsa/legacy.c | 4
3 files changed, 13 insertions(+)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 4d1df2
they are available in cacheline 1.
Signed-off-by: Vivien Didelot
---
include/net/dsa.h | 5 +
net/dsa/dsa2.c| 4
net/dsa/legacy.c | 4
3 files changed, 13 insertions(+)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 4d1df2f086e8..6bda01fa5747 100644
--- a/include/net
When resolving the DSA tagging protocol used by a CPU switch, use a
temporary "tag_ops" variable to store the dsa_device_ops instead of
using directly dst->tag_ops. This will make the future patches moving
this pointer around easier to read.
There is no functional changes.
Signed-o
When resolving the DSA tagging protocol used by a CPU switch, use a
temporary "tag_ops" variable to store the dsa_device_ops instead of
using directly dst->tag_ops. This will make the future patches moving
this pointer around easier to read.
There is no functional changes.
Signed-o
ops at the beginning of the dsa_port structure so that
we ensure copies for hot path are in cacheline 1.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
include/net/dsa.h | 3 +++
net/dsa/dsa2.c | 1 +
net/dsa/dsa_priv.h | 2 +-
net/dsa/legacy.c | 1 +
net/dsa/slave
re patch touching dsa_ptr more readable. There is
no functional changes.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
---
net/dsa/master.c | 42 ++
1 file changed, 22 insertions
ops at the beginning of the dsa_port structure so that
we ensure copies for hot path are in cacheline 1.
Signed-off-by: Vivien Didelot
---
include/net/dsa.h | 3 +++
net/dsa/dsa2.c | 1 +
net/dsa/dsa_priv.h | 2 +-
net/dsa/legacy.c | 1 +
net/dsa/slave.c| 3 +--
5 files changed, 7 inserti
re patch touching dsa_ptr more readable. There is
no functional changes.
Signed-off-by: Vivien Didelot
Reviewed-by: Florian Fainelli
---
net/dsa/master.c | 42 ++
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/net/dsa/master.c b/net/d
Hi Florian,
Florian Fainelli <f.faine...@gmail.com> writes:
> On 09/29/2017 11:36 AM, Vivien Didelot wrote:
>> With DSA, a master net_device is physically wired to a dedicated CPU
>> switch port. For interaction with the DSA layer, the struct net_device
>> contains
Hi Florian,
Florian Fainelli writes:
> On 09/29/2017 11:36 AM, Vivien Didelot wrote:
>> With DSA, a master net_device is physically wired to a dedicated CPU
>> switch port. For interaction with the DSA layer, the struct net_device
>> contains a dsa_ptr, w
Hi Florian,
Florian Fainelli writes:
>> @@ -72,11 +72,10 @@ static struct sk_buff *lan9303_rcv(struct sk_buff *skb,
>> struct net_device *dev,
>> {
>> u16 *lan9303_tag;
>> struct dsa_switch_tree *dst = dev->dsa_ptr;
>> -struct dsa_switch *ds;
>> +struct
Hi Florian,
Florian Fainelli writes:
>> @@ -72,11 +72,10 @@ static struct sk_buff *lan9303_rcv(struct sk_buff *skb,
>> struct net_device *dev,
>> {
>> u16 *lan9303_tag;
>> struct dsa_switch_tree *dst = dev->dsa_ptr;
>> -struct dsa_switch *ds;
>> +struct dsa_port *cpu_dp =
The DSA tagging protocol operations are specific to each CPU port,
thus the dsa_device_ops pointer belongs to the dsa_port structure.
>From now on assign a slave's xmit copy from its CPU port tagging
operations. This will ease the future support for multiple CPU ports.
Signed-off-by: Viv
paths and finally change dsa_ptr.
Vivien Didelot (8):
net: dsa: directly fetch switch in mtk_tag_rcv
net: dsa: directly fetch switch in lan9303_rcv
net: dsa: use cpu_dp in master code
net: dsa: use temporary dsa_device_ops variable
net: dsa: add tagging ops to port
net: dsa: prepare
Now that the dsa_ptr is a dsa_port instance, there is no need to keep
the tag operations in the dsa_switch_tree structure. Remove it.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
include/net/dsa.h | 11 ---
net/dsa/dsa2.c| 2 --
net/dsa/legacy.c
paths and finally change dsa_ptr.
Vivien Didelot (8):
net: dsa: directly fetch switch in mtk_tag_rcv
net: dsa: directly fetch switch in lan9303_rcv
net: dsa: use cpu_dp in master code
net: dsa: use temporary dsa_device_ops variable
net: dsa: add tagging ops to port
net: dsa: prepare
Now that the dsa_ptr is a dsa_port instance, there is no need to keep
the tag operations in the dsa_switch_tree structure. Remove it.
Signed-off-by: Vivien Didelot
---
include/net/dsa.h | 11 ---
net/dsa/dsa2.c| 2 --
net/dsa/legacy.c | 2 --
3 files changed, 15 deletions
The DSA tagging protocol operations are specific to each CPU port,
thus the dsa_device_ops pointer belongs to the dsa_port structure.
>From now on assign a slave's xmit copy from its CPU port tagging
operations. This will ease the future support for multiple CPU ports.
Signed-off-by: Viv
In preparation to make DSA master devices point to their corresponding
CPU port instead of the whole tree, add copies of dst and rcv in the
dsa_port structure so that we keep fast access in the receive hot path.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
inclu
switch fabric.
Change the master interface's dsa_ptr for the CPU dsa_port pointer.
This is a step towards supporting multiple CPU ports. Also remove
dsa_get_cpu_port which is now unneeded.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
include/linux/netdevice.
In preparation to make DSA master devices point to their corresponding
CPU port instead of the whole tree, add copies of dst and rcv in the
dsa_port structure so that we keep fast access in the receive hot path.
Signed-off-by: Vivien Didelot
---
include/net/dsa.h | 5 +
net/dsa/dsa2.c
switch fabric.
Change the master interface's dsa_ptr for the CPU dsa_port pointer.
This is a step towards supporting multiple CPU ports. Also remove
dsa_get_cpu_port which is now unneeded.
Signed-off-by: Vivien Didelot
---
include/linux/netdevice.h | 4 ++--
net/dsa/dsa.c | 6
In a single-chip switch fabric, there is no need to fetch the dsa_switch
structure from the tree, directly use the CPU port's "ds" member.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/tag_lan9303.c | 5 ++---
1 file changed, 2 insertions
In a single-chip switch fabric, there is no need to fetch the dsa_switch
structure from the tree, directly use the CPU port's "ds" member.
Signed-off-by: Vivien Didelot
---
net/dsa/tag_lan9303.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/dsa/tag_lan93
When resolving the DSA tagging protocol used by a CPU switch, use a
temporary "tag_ops" variable to store the dsa_device_ops instead of
using directly dst->tag_ops. This will make the future patches moving
this pointer around easier to read.
There is no functional changes.
Signed-o
re patch touching dsa_ptr more readable. There is
no functional changes.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/master.c | 42 ++
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/net/dsa/master.c b
When resolving the DSA tagging protocol used by a CPU switch, use a
temporary "tag_ops" variable to store the dsa_device_ops instead of
using directly dst->tag_ops. This will make the future patches moving
this pointer around easier to read.
There is no functional changes.
Signed-o
re patch touching dsa_ptr more readable. There is
no functional changes.
Signed-off-by: Vivien Didelot
---
net/dsa/master.c | 42 ++
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/net/dsa/master.c b/net/dsa/master.c
index 5e5147ec5a44..ef15d35f1574
In a single-chip switch fabric, there is no need to fetch the dsa_switch
structure from the tree, directly use the CPU port's "ds" member.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/tag_mtk.c | 11 ++-
1 file changed, 2 insertions
In a single-chip switch fabric, there is no need to fetch the dsa_switch
structure from the tree, directly use the CPU port's "ds" member.
Signed-off-by: Vivien Didelot
---
net/dsa/tag_mtk.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/net/dsa/tag_m
Hi Brandon,
>> Would there be any value in implementing a proper gpiochip structure
>> here such that other pieces of SW can see this GPIO controller as a
>> provider and you can reference it from e.g: Device Tree using GPIO
>> descriptors?
>
> That would be my preference as well, or maybe a
Hi Brandon,
>> Would there be any value in implementing a proper gpiochip structure
>> here such that other pieces of SW can see this GPIO controller as a
>> provider and you can reference it from e.g: Device Tree using GPIO
>> descriptors?
>
> That would be my preference as well, or maybe a
Hi Brandon,
Brandon Streiff writes:
> static int dsa_slave_ioctl(struct net_device *dev, struct ifreq *ifr, int
> cmd)
> {
> + struct dsa_slave_priv *p = netdev_priv(dev);
> + struct dsa_switch *ds = p->dp->ds;
> + int port = p->dp->index;
> +
> if
Hi Brandon,
Brandon Streiff writes:
> static int dsa_slave_ioctl(struct net_device *dev, struct ifreq *ifr, int
> cmd)
> {
> + struct dsa_slave_priv *p = netdev_priv(dev);
> + struct dsa_switch *ds = p->dp->ds;
> + int port = p->dp->index;
> +
> if (!dev->phydev)
>
organization, very clear patch:
Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Vivien
tp_read,
> + .ptp_write = mv88e6390_ptp_write,
> + .tai_read = mv88e6390_tai_read,
> + .tai_write = mv88e6390_tai_write,
Only nitpick: please keep the mv88e63{52,90}_g2_avb_ prefix here.
Otherwise thanks for respecting the code organization, very clear
Instead of returning -EOPNOTSUPP when a slave device has no PHY,
directly return -ENODEV as ethtool and phylib do.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/slave.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
Instead of returning -EOPNOTSUPP when a slave device has no PHY,
directly return -ENODEV as ethtool and phylib do.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa
Use phy_ethtool_set_link_ksettings now that dsa_slave_set_link_ksettings
does exactly the same.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/slave.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/net/dsa/slave.c b/n
Use phy_ethtool_nway_reset now that dsa_slave_nway_reset does exactly
the same.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/slave.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
Use phy_ethtool_set_link_ksettings now that dsa_slave_set_link_ksettings
does exactly the same.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index bb0f64f47ae7..d2b632cae468
Use phy_ethtool_nway_reset now that dsa_slave_nway_reset does exactly
the same.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index d2b632cae468..bf8800de13c1 100644
--- a/net/dsa
Use phy_ethtool_get_link_ksettings now that dsa_slave_get_link_ksettings
does exactly the same.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/slave.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/net/dsa/slave.c b/n
Use phy_ethtool_get_link_ksettings now that dsa_slave_get_link_ksettings
does exactly the same.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 4ea1c6eb0da8..bb0f64f47ae7
phy_ethtool_* functions.
Vivien Didelot (5):
net: dsa: return -ENODEV is there is no slave PHY
net: dsa: use slave device phydev
net: dsa: use phy_ethtool_get_link_ksettings
net: dsa: use phy_ethtool_set_link_ksettings
net: dsa: use phy_ethtool_nway_reset
net/dsa/dsa_priv.h | 1 -
net/dsa
phy_ethtool_* functions.
Vivien Didelot (5):
net: dsa: return -ENODEV is there is no slave PHY
net: dsa: use slave device phydev
net: dsa: use phy_ethtool_get_link_ksettings
net: dsa: use phy_ethtool_set_link_ksettings
net: dsa: use phy_ethtool_nway_reset
net/dsa/dsa_priv.h | 1 -
net/dsa
There is no need to store a phy_device in dsa_slave_priv since
net_device already provides one. Simply s/p->phy/dev->phydev/.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/dsa_priv.h | 1 -
net/dsa/slav
There is no need to store a phy_device in dsa_slave_priv since
net_device already provides one. Simply s/p->phy/dev->phydev/.
Signed-off-by: Vivien Didelot
---
net/dsa/dsa_priv.h | 1 -
net/dsa/slave.c| 116 -
2 files chang
mv88e6xxx_g2_irq_free locks the registers mutex, but not
mv88e6xxx_g1_irq_free, which results in a stack trace from
assert_reg_lock when unloading the mv88e6xxx module. Fix this.
Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free
interrupt")
Signed-off-by: Vivi
mv88e6xxx_g2_irq_free locks the registers mutex, but not
mv88e6xxx_g1_irq_free, which results in a stack trace from
assert_reg_lock when unloading the mv88e6xxx module. Fix this.
Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free
interrupt")
Signed-off-by: Vivi
Hi Andrew,
Andrew Lunn writes:
> In general, i tried to keep the mutex out of the interrupt code. That
> is not totally possible, the IRQ thread handler needs it. But
> otherwise, the IRQ code assumes it is called with the mutex taken.
>
> So i think it is better to hold the
Hi Andrew,
Andrew Lunn writes:
> In general, i tried to keep the mutex out of the interrupt code. That
> is not totally possible, the IRQ thread handler needs it. But
> otherwise, the IRQ code assumes it is called with the mutex taken.
>
> So i think it is better to hold the mutex in
mv88e6xxx_g2_irq_free locks the registers mutex, but not
mv88e6xxx_g1_irq_free, which results in a stack trace from
assert_reg_lock when unloading the mv88e6xxx module. Fix this.
Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free
interrupt")
Signed-off-by: Vivi
mv88e6xxx_g2_irq_free locks the registers mutex, but not
mv88e6xxx_g1_irq_free, which results in a stack trace from
assert_reg_lock when unloading the mv88e6xxx module. Fix this.
Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free
interrupt")
Signed-off-by: Vivi
the
master device.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
Reviewed-by: Andrew Lunn <and...@lunn.ch>
---
net/dsa/slave.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a
the
master device.
Signed-off-by: Vivien Didelot
Reviewed-by: Florian Fainelli
Reviewed-by: Andrew Lunn
---
net/dsa/slave.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 02ace7d462c4..c2bb48579032 100644
--- a/net/dsa
Provide dsa_port_enable and dsa_port_disable helpers to respectively
enable and disable a switch port. This makes the dsa_port_set_state_now
helper static.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
Reviewe
Provide dsa_port_enable and dsa_port_disable helpers to respectively
enable and disable a switch port. This makes the dsa_port_set_state_now
helper static.
Signed-off-by: Vivien Didelot
Reviewed-by: Florian Fainelli
Reviewed-by: Andrew Lunn
---
net/dsa/dsa_priv.h | 3 ++-
net/dsa/port.c
This patchset makes slave open and close symmetrical and provides
helpers for enabling or disabling a given DSA port.
Changes in v3:
- save the phy_device change for a future patchset
Changes in v2:
- do not remove the phy argument from port enable/disable
Vivien Didelot (2):
net: dsa
This patchset makes slave open and close symmetrical and provides
helpers for enabling or disabling a given DSA port.
Changes in v3:
- save the phy_device change for a future patchset
Changes in v2:
- do not remove the phy argument from port enable/disable
Vivien Didelot (2):
net: dsa
Hi Florian,
Florian Fainelli <f.faine...@gmail.com> writes:
> On 09/22/2017 12:40 PM, Vivien Didelot wrote:
>> There is no need to store a phy_device in dsa_slave_priv since
>> net_device already provides one. Simply s/p->phy/dev->phydev/.
>
> You can the
Hi Florian,
Florian Fainelli writes:
> On 09/22/2017 12:40 PM, Vivien Didelot wrote:
>> There is no need to store a phy_device in dsa_slave_priv since
>> net_device already provides one. Simply s/p->phy/dev->phydev/.
>
> You can therefore remove the phy_device fro
the
master device.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
Reviewed-by: Andrew Lunn <and...@lunn.ch>
---
net/dsa/slave.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a
the
master device.
Signed-off-by: Vivien Didelot
Reviewed-by: Florian Fainelli
Reviewed-by: Andrew Lunn
---
net/dsa/slave.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 3760472bf41d..0aab29928152 100644
--- a/net/dsa
Provide dsa_port_enable and dsa_port_disable helpers to respectively
enable and disable a switch port. This makes the dsa_port_set_state_now
helper static.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
Reviewe
Provide dsa_port_enable and dsa_port_disable helpers to respectively
enable and disable a switch port. This makes the dsa_port_set_state_now
helper static.
Signed-off-by: Vivien Didelot
Reviewed-by: Florian Fainelli
Reviewed-by: Andrew Lunn
---
net/dsa/dsa_priv.h | 3 ++-
net/dsa/port.c
This patchset removes the private phy_device in favor of the one
provided by the slave net_device, makes slave open and close symmetrical
and finally provides helpers for enabling or disabling a DSA port.
Changes in v2:
- do not remove the phy argument from port enable/disable
Vivien Didelot
This patchset removes the private phy_device in favor of the one
provided by the slave net_device, makes slave open and close symmetrical
and finally provides helpers for enabling or disabling a DSA port.
Changes in v2:
- do not remove the phy argument from port enable/disable
Vivien Didelot
There is no need to store a phy_device in dsa_slave_priv since
net_device already provides one. Simply s/p->phy/dev->phydev/.
While at it, return -ENODEV when it is NULL instead of -EOPNOTSUPP.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
net/dsa/s
There is no need to store a phy_device in dsa_slave_priv since
net_device already provides one. Simply s/p->phy/dev->phydev/.
While at it, return -ENODEV when it is NULL instead of -EOPNOTSUPP.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c
Hi Florian,
Florian Fainelli <f.faine...@gmail.com> writes:
> On 09/22/2017 09:17 AM, Vivien Didelot wrote:
>> The .port_enable and .port_disable functions are meant to deal with the
>> switch ports only, and no driver is using the phy argument anyway.
>> Remove it.
&
Hi Florian,
Florian Fainelli writes:
> On 09/22/2017 09:17 AM, Vivien Didelot wrote:
>> The .port_enable and .port_disable functions are meant to deal with the
>> switch ports only, and no driver is using the phy argument anyway.
>> Remove it.
>
> I d
bcm_sf2 is currently the only driver using the phy argument passed to
.port_enable. It resets the state machine if the phy has been hard
reset. This check is generic and can be moved to DSA core.
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
drivers/net/dsa/bcm
401 - 500 of 3273 matches
Mail list logo