Skip to content

Commit 8a33dcc

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in the fixes we had queued in case there was another -rc. Signed-off-by: Jakub Kicinski <[email protected]>
2 parents b7b98f8 + 6b278c0 commit 8a33dcc

File tree

19 files changed

+233
-39
lines changed

19 files changed

+233
-39
lines changed

drivers/net/ethernet/amd/xgbe/xgbe-common.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,10 @@
13311331
#define MDIO_VEND2_PMA_CDR_CONTROL 0x8056
13321332
#endif
13331333

1334+
#ifndef MDIO_VEND2_PMA_MISC_CTRL0
1335+
#define MDIO_VEND2_PMA_MISC_CTRL0 0x8090
1336+
#endif
1337+
13341338
#ifndef MDIO_CTRL1_SPEED1G
13351339
#define MDIO_CTRL1_SPEED1G (MDIO_CTRL1_SPEED10G & ~BMCR_SPEED100)
13361340
#endif
@@ -1389,6 +1393,10 @@
13891393
#define XGBE_PMA_RX_RST_0_RESET_ON 0x10
13901394
#define XGBE_PMA_RX_RST_0_RESET_OFF 0x00
13911395

1396+
#define XGBE_PMA_PLL_CTRL_MASK BIT(15)
1397+
#define XGBE_PMA_PLL_CTRL_ENABLE BIT(15)
1398+
#define XGBE_PMA_PLL_CTRL_DISABLE 0x0000
1399+
13921400
/* Bit setting and getting macros
13931401
* The get macro will extract the current bit field value from within
13941402
* the variable

drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,12 +1977,26 @@ static void xgbe_phy_rx_reset(struct xgbe_prv_data *pdata)
19771977
}
19781978
}
19791979

1980+
static void xgbe_phy_pll_ctrl(struct xgbe_prv_data *pdata, bool enable)
1981+
{
1982+
XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_MISC_CTRL0,
1983+
XGBE_PMA_PLL_CTRL_MASK,
1984+
enable ? XGBE_PMA_PLL_CTRL_ENABLE
1985+
: XGBE_PMA_PLL_CTRL_DISABLE);
1986+
1987+
/* Wait for command to complete */
1988+
usleep_range(100, 200);
1989+
}
1990+
19801991
static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata,
19811992
unsigned int cmd, unsigned int sub_cmd)
19821993
{
19831994
unsigned int s0 = 0;
19841995
unsigned int wait;
19851996

1997+
/* Disable PLL re-initialization during FW command processing */
1998+
xgbe_phy_pll_ctrl(pdata, false);
1999+
19862000
/* Log if a previous command did not complete */
19872001
if (XP_IOREAD_BITS(pdata, XP_DRIVER_INT_RO, STATUS)) {
19882002
netif_dbg(pdata, link, pdata->netdev,
@@ -2003,7 +2017,7 @@ static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata,
20032017
wait = XGBE_RATECHANGE_COUNT;
20042018
while (wait--) {
20052019
if (!XP_IOREAD_BITS(pdata, XP_DRIVER_INT_RO, STATUS))
2006-
return;
2020+
goto reenable_pll;
20072021

20082022
usleep_range(1000, 2000);
20092023
}
@@ -2013,6 +2027,10 @@ static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata,
20132027

20142028
/* Reset on error */
20152029
xgbe_phy_rx_reset(pdata);
2030+
2031+
reenable_pll:
2032+
/* Enable PLL re-initialization */
2033+
xgbe_phy_pll_ctrl(pdata, true);
20162034
}
20172035

20182036
static void xgbe_phy_rrc(struct xgbe_prv_data *pdata)

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,8 +1914,6 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
19141914
ind_bufp = &tx_scrq->ind_buf;
19151915

19161916
if (test_bit(0, &adapter->resetting)) {
1917-
if (!netif_subqueue_stopped(netdev, skb))
1918-
netif_stop_subqueue(netdev, queue_num);
19191917
dev_kfree_skb_any(skb);
19201918

19211919
tx_send_failed++;
@@ -2757,7 +2755,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
27572755

27582756
if (adapter->state == VNIC_PROBING) {
27592757
netdev_warn(netdev, "Adapter reset during probe\n");
2760-
adapter->init_done_rc = EAGAIN;
2758+
adapter->init_done_rc = -EAGAIN;
27612759
ret = EAGAIN;
27622760
goto err;
27632761
}
@@ -5259,11 +5257,6 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
52595257
*/
52605258
adapter->login_pending = false;
52615259

5262-
if (!completion_done(&adapter->init_done)) {
5263-
complete(&adapter->init_done);
5264-
adapter->init_done_rc = -EIO;
5265-
}
5266-
52675260
if (adapter->state == VNIC_DOWN)
52685261
rc = ibmvnic_reset(adapter, VNIC_RESET_PASSIVE_INIT);
52695262
else
@@ -5284,6 +5277,13 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
52845277
rc);
52855278
adapter->failover_pending = false;
52865279
}
5280+
5281+
if (!completion_done(&adapter->init_done)) {
5282+
complete(&adapter->init_done);
5283+
if (!adapter->init_done_rc)
5284+
adapter->init_done_rc = -EAGAIN;
5285+
}
5286+
52875287
break;
52885288
case IBMVNIC_CRQ_INIT_COMPLETE:
52895289
dev_info(dev, "Partner initialization complete\n");
@@ -5604,6 +5604,9 @@ static int init_crq_queue(struct ibmvnic_adapter *adapter)
56045604
crq->cur = 0;
56055605
spin_lock_init(&crq->lock);
56065606

5607+
/* process any CRQs that were queued before we enabled interrupts */
5608+
tasklet_schedule(&adapter->tasklet);
5609+
56075610
return retrc;
56085611

56095612
req_irq_failed:
@@ -5753,7 +5756,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
57535756
}
57545757

57555758
rc = ibmvnic_reset_init(adapter, false);
5756-
} while (rc == EAGAIN);
5759+
} while (rc == -EAGAIN);
57575760

57585761
/* We are ignoring the error from ibmvnic_reset_init() assuming that the
57595762
* partner is not ready. CRQ is not active. When the partner becomes

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ static int nfp_net_poll(struct napi_struct *napi, int budget)
20672067
if (napi_complete_done(napi, pkts_polled))
20682068
nfp_net_irq_unmask(r_vec->nfp_net, r_vec->irq_entry);
20692069

2070-
if (r_vec->nfp_net->rx_coalesce_adapt_on) {
2070+
if (r_vec->nfp_net->rx_coalesce_adapt_on && r_vec->rx_ring) {
20712071
struct dim_sample dim_sample = {};
20722072
unsigned int start;
20732073
u64 pkts, bytes;
@@ -2082,7 +2082,7 @@ static int nfp_net_poll(struct napi_struct *napi, int budget)
20822082
net_dim(&r_vec->rx_dim, dim_sample);
20832083
}
20842084

2085-
if (r_vec->nfp_net->tx_coalesce_adapt_on) {
2085+
if (r_vec->nfp_net->tx_coalesce_adapt_on && r_vec->tx_ring) {
20862086
struct dim_sample dim_sample = {};
20872087
unsigned int start;
20882088
u64 pkts, bytes;
@@ -3016,10 +3016,8 @@ static void nfp_net_rx_dim_work(struct work_struct *work)
30163016

30173017
/* copy RX interrupt coalesce parameters */
30183018
value = (moder.pkts << 16) | (factor * moder.usec);
3019-
rtnl_lock();
30203019
nn_writel(nn, NFP_NET_CFG_RXR_IRQ_MOD(r_vec->rx_ring->idx), value);
30213020
(void)nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_IRQMOD);
3022-
rtnl_unlock();
30233021

30243022
dim->state = DIM_START_MEASURE;
30253023
}
@@ -3047,10 +3045,8 @@ static void nfp_net_tx_dim_work(struct work_struct *work)
30473045

30483046
/* copy TX interrupt coalesce parameters */
30493047
value = (moder.pkts << 16) | (factor * moder.usec);
3050-
rtnl_lock();
30513048
nn_writel(nn, NFP_NET_CFG_TXR_IRQ_MOD(r_vec->tx_ring->idx), value);
30523049
(void)nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_IRQMOD);
3053-
rtnl_unlock();
30543050

30553051
dim->state = DIM_START_MEASURE;
30563052
}

drivers/net/phy/phylink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,7 @@ int phylink_ethtool_set_pauseparam(struct phylink *pl,
17801780
return -EOPNOTSUPP;
17811781

17821782
if (!phylink_test(pl->supported, Asym_Pause) &&
1783-
!pause->autoneg && pause->rx_pause != pause->tx_pause)
1783+
pause->rx_pause != pause->tx_pause)
17841784
return -EINVAL;
17851785

17861786
pause_state = 0;

include/net/flow_dissector.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ enum flow_dissector_key_id {
287287
#define FLOW_DISSECTOR_F_PARSE_1ST_FRAG BIT(0)
288288
#define FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL BIT(1)
289289
#define FLOW_DISSECTOR_F_STOP_AT_ENCAP BIT(2)
290+
#define FLOW_DISSECTOR_F_STOP_BEFORE_ENCAP BIT(3)
290291

291292
struct flow_dissector_key {
292293
enum flow_dissector_key_id key_id;

include/net/sctp/sctp.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,8 @@ static inline __u32 sctp_min_frag_point(struct sctp_sock *sp, __u16 datasize)
626626

627627
static inline int sctp_transport_pl_hlen(struct sctp_transport *t)
628628
{
629-
return __sctp_mtu_payload(sctp_sk(t->asoc->base.sk), t, 0, 0);
629+
return __sctp_mtu_payload(sctp_sk(t->asoc->base.sk), t, 0, 0) -
630+
sizeof(struct sctphdr);
630631
}
631632

632633
static inline void sctp_transport_pl_reset(struct sctp_transport *t)
@@ -653,12 +654,10 @@ static inline void sctp_transport_pl_update(struct sctp_transport *t)
653654
if (t->pl.state == SCTP_PL_DISABLED)
654655
return;
655656

656-
if (del_timer(&t->probe_timer))
657-
sctp_transport_put(t);
658-
659657
t->pl.state = SCTP_PL_BASE;
660658
t->pl.pmtu = SCTP_BASE_PLPMTU;
661659
t->pl.probe_size = SCTP_BASE_PLPMTU;
660+
sctp_transport_reset_probe_timer(t);
662661
}
663662

664663
static inline bool sctp_transport_pl_enabled(struct sctp_transport *t)

net/bridge/br_private.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,11 +1893,13 @@ static inline int br_cfm_status_fill_info(struct sk_buff *skb,
18931893

18941894
static inline int br_cfm_mep_count(struct net_bridge *br, u32 *count)
18951895
{
1896+
*count = 0;
18961897
return -EOPNOTSUPP;
18971898
}
18981899

18991900
static inline int br_cfm_peer_mep_count(struct net_bridge *br, u32 *count)
19001901
{
1902+
*count = 0;
19011903
return -EOPNOTSUPP;
19021904
}
19031905
#endif

net/core/flow_dissector.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,11 @@ bool __skb_flow_dissect(const struct net *net,
13061306

13071307
switch (ip_proto) {
13081308
case IPPROTO_GRE:
1309+
if (flags & FLOW_DISSECTOR_F_STOP_BEFORE_ENCAP) {
1310+
fdret = FLOW_DISSECT_RET_OUT_GOOD;
1311+
break;
1312+
}
1313+
13091314
fdret = __skb_flow_dissect_gre(skb, key_control, flow_dissector,
13101315
target_container, data,
13111316
&proto, &nhoff, &hlen, flags);
@@ -1363,6 +1368,11 @@ bool __skb_flow_dissect(const struct net *net,
13631368
break;
13641369
}
13651370
case IPPROTO_IPIP:
1371+
if (flags & FLOW_DISSECTOR_F_STOP_BEFORE_ENCAP) {
1372+
fdret = FLOW_DISSECT_RET_OUT_GOOD;
1373+
break;
1374+
}
1375+
13661376
proto = htons(ETH_P_IP);
13671377

13681378
key_control->flags |= FLOW_DIS_ENCAPSULATION;
@@ -1375,6 +1385,11 @@ bool __skb_flow_dissect(const struct net *net,
13751385
break;
13761386

13771387
case IPPROTO_IPV6:
1388+
if (flags & FLOW_DISSECTOR_F_STOP_BEFORE_ENCAP) {
1389+
fdret = FLOW_DISSECT_RET_OUT_GOOD;
1390+
break;
1391+
}
1392+
13781393
proto = htons(ETH_P_IPV6);
13791394

13801395
key_control->flags |= FLOW_DIS_ENCAPSULATION;

net/ipv6/udp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,6 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
14351435
if (!fl6.flowi6_oif)
14361436
fl6.flowi6_oif = np->sticky_pktinfo.ipi6_ifindex;
14371437

1438-
fl6.flowi6_mark = ipc6.sockc.mark;
14391438
fl6.flowi6_uid = sk->sk_uid;
14401439

14411440
if (msg->msg_controllen) {
@@ -1471,6 +1470,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
14711470
ipc6.opt = opt;
14721471

14731472
fl6.flowi6_proto = sk->sk_protocol;
1473+
fl6.flowi6_mark = ipc6.sockc.mark;
14741474
fl6.daddr = *daddr;
14751475
if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr))
14761476
fl6.saddr = np->saddr;

0 commit comments

Comments
 (0)