diff --git a/drivers/net/dsa/mxl862xx/mxl862xx-phylink.c b/drivers/net/dsa/mxl862xx/mxl862xx-phylink.c index 8fdfb689333c..e64537b7b0e2 100644 --- a/drivers/net/dsa/mxl862xx/mxl862xx-phylink.c +++ b/drivers/net/dsa/mxl862xx/mxl862xx-phylink.c @@ -114,6 +114,12 @@ static void mxl862xx_legacy_pcs_get_state(struct phylink_pcs *pcs, }; int ret; + /* phylink presets state->link = 1 before calling pcs_get_state(); + * make sure a failed firmware read reports link down instead of a + * spurious link up with SPEED_UNKNOWN. + */ + state->link = false; + ret = MXL862XX_API_READ(priv, MXL862XX_COMMON_PORTLINKCFGGET, port_link_cfg); if (ret) @@ -409,6 +415,12 @@ static void mxl862xx_pcs_get_state(struct phylink_pcs *pcs, int if_mode, ret; u16 fw_speed, lpa, bmsr; + /* phylink presets state->link = 1 before calling pcs_get_state(); + * make sure a failed firmware read reports link down instead of a + * spurious link up with SPEED_UNKNOWN. + */ + state->link = false; + if_mode = mxl862xx_xpcs_if_mode(state->interface); if (if_mode < 0) return; diff --git a/drivers/net/dsa/mxl862xx/mxl862xx.c b/drivers/net/dsa/mxl862xx/mxl862xx.c index 5bde382a8290..eb4cc8c868c3 100644 --- a/drivers/net/dsa/mxl862xx/mxl862xx.c +++ b/drivers/net/dsa/mxl862xx/mxl862xx.c @@ -4412,8 +4412,6 @@ static void mxl862xx_stats_poll(struct dsa_switch *ds, int port) mxl862xx_delta32(rx_under, s->prev_rx_under_size_error_pkts) + mxl862xx_delta32(rx_over, s->prev_rx_oversize_error_pkts) + mxl862xx_delta32(rx_align, s->prev_rx_align_error_pkts); - s->tx_errors += - mxl862xx_delta32(tx_drop, s->prev_tx_dropped_pkts); s->rx_dropped += mxl862xx_delta32(rx_drop, s->prev_rx_dropped_pkts) + diff --git a/net/dsa/tag_mxl862xx.c b/net/dsa/tag_mxl862xx.c index 882415f46afb..0d81ae8df11c 100644 --- a/net/dsa/tag_mxl862xx.c +++ b/net/dsa/tag_mxl862xx.c @@ -53,6 +53,9 @@ static struct sk_buff *mxl862_tag_xmit(struct sk_buff *skb, mxl862_tag[2] = htons(FIELD_PREP(MXL862_SUBIF_ID, sub_interface)); mxl862_tag[3] = htons(FIELD_PREP(MXL862_IGP_EGP, cpu_port)); + /* Tag the frame for the conduit's per-port TX queue */ + skb_set_queue_mapping(skb, dp->index); + return skb; } diff --git a/net/dsa/tag_mxl862xx_8021q.c b/net/dsa/tag_mxl862xx_8021q.c index ba2bc52291bf..9b74de3c71ae 100644 --- a/net/dsa/tag_mxl862xx_8021q.c +++ b/net/dsa/tag_mxl862xx_8021q.c @@ -23,6 +23,9 @@ static struct sk_buff *mxl862_8021q_xmit(struct sk_buff *skb, u16 queue_mapping = skb_get_queue_mapping(skb); u8 pcp = netdev_txq_to_tc(netdev, queue_mapping); + /* Tag the frame for the conduit's per-port TX queue */ + skb_set_queue_mapping(skb, dp->index); + return dsa_8021q_xmit(skb, netdev, ETH_P_8021Q, (pcp << VLAN_PRIO_SHIFT) | tx_vid); }