Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions drivers/net/dsa/mxl862xx/mxl862xx-phylink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/dsa/mxl862xx/mxl862xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) +
Expand Down
3 changes: 3 additions & 0 deletions net/dsa/tag_mxl862xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 3 additions & 0 deletions net/dsa/tag_mxl862xx_8021q.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down