diff options
| author | 2015-10-06 15:01:52 +0100 | |
|---|---|---|
| committer | 2015-10-06 15:01:52 +0100 | |
| commit | c39b7eef7d92f5ffef1abf04227a62fa2a6a62b2 (patch) | |
| tree | 00aff822e9208ab2f2ac41c6e1a0f61c6eb9b57f /net/dsa/slave.c | |
| parent | Revert "iommu: Allow iova to be used without requiring IOMMU_SUPPORT" (diff) | |
| parent | Linux 4.3-rc4 (diff) | |
| download | linux-dev-c39b7eef7d92f5ffef1abf04227a62fa2a6a62b2.tar.xz linux-dev-c39b7eef7d92f5ffef1abf04227a62fa2a6a62b2.zip | |
Merge 4.3-rc4 into char-misc-next
This is needed due to the duplicated iommu stuff to help with the merge
and to prevent future issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/dsa/slave.c')
| -rw-r--r-- | net/dsa/slave.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index cce97385f743..7d91f4612ac0 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -458,12 +458,17 @@ static int dsa_slave_stp_update(struct net_device *dev, u8 state) static int dsa_slave_port_attr_set(struct net_device *dev, struct switchdev_attr *attr) { - int ret = 0; + struct dsa_slave_priv *p = netdev_priv(dev); + struct dsa_switch *ds = p->parent; + int ret; switch (attr->id) { case SWITCHDEV_ATTR_PORT_STP_STATE: - if (attr->trans == SWITCHDEV_TRANS_COMMIT) - ret = dsa_slave_stp_update(dev, attr->u.stp_state); + if (attr->trans == SWITCHDEV_TRANS_PREPARE) + ret = ds->drv->port_stp_update ? 0 : -EOPNOTSUPP; + else + ret = ds->drv->port_stp_update(ds, p->port, + attr->u.stp_state); break; default: ret = -EOPNOTSUPP; |
