Skip to content

Commit 4530cca

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "The pull requests are getting smaller, that's progress I suppose :-) 1) Fix infinite loop in CIPSO option parsing, from Yujuan Qi. 2) Fix remote checksum handling in VXLAN and GUE tunneling drivers, from Koichiro Den. 3) Missing u64_stats_init() calls in several drivers, from Florian Fainelli. 4) TCP can set the congestion window to an invalid ssthresh value after congestion window reductions, from Yuchung Cheng. 5) Fix BPF jit branch generation on s390, from Daniel Borkmann. 6) Correct MIPS ebpf JIT merge, from David Daney. 7) Correct byte order test in BPF test_verifier.c, from Daniel Borkmann. 8) Fix various crashes and leaks in ASIX driver, from Dean Jenkins. 9) Handle SCTP checksums properly in mlx4 driver, from Davide Caratti. 10) We can potentially enter tcp_connect() with a cached route already, due to fastopen, so we have to explicitly invalidate it. 11) skb_warn_bad_offload() can bark in legitimate situations, fix from Willem de Bruijn" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits) net: avoid skb_warn_bad_offload false positives on UFO qmi_wwan: fix NULL deref on disconnect ppp: fix xmit recursion detection on ppp channels rds: Reintroduce statistics counting tcp: fastopen: tcp_connect() must refresh the route net: sched: set xt_tgchk_param par.net properly in ipt_init_target net: dsa: mediatek: add adjust link support for user ports net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()' hysdn: fix to a race condition in put_log_buffer s390/qeth: fix L3 next-hop in xmit qeth hdr asix: Fix small memory leak in ax88772_unbind() asix: Ensure asix_rx_fixup_info members are all reset asix: Add rx->ax_skb = NULL after usbnet_skb_return() bpf: fix selftest/bpf/test_pkt_md_access on s390x netvsc: fix race on sub channel creation bpf: fix byte order test in test_verifier xgene: Always get clk source, but ignore if it's missing for SGMII ports MIPS: Add missing file for eBPF JIT. bpf, s390: fix build for libbpf and selftest suite ...
2 parents bfa738c + 8d63bee commit 4530cca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2490
-186
lines changed

arch/mips/net/ebpf_jit.c

Lines changed: 1950 additions & 0 deletions
Large diffs are not rendered by default.

arch/s390/net/bpf_jit_comp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,8 @@ static int bpf_jit_prog(struct bpf_jit *jit, struct bpf_prog *fp)
12531253
insn_count = bpf_jit_insn(jit, fp, i);
12541254
if (insn_count < 0)
12551255
return -1;
1256-
jit->addrs[i + 1] = jit->prg; /* Next instruction address */
1256+
/* Next instruction address */
1257+
jit->addrs[i + insn_count] = jit->prg;
12571258
}
12581259
bpf_jit_epilogue(jit);
12591260

drivers/isdn/hysdn/hysdn_proclog.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ struct procdata {
4444
char log_name[15]; /* log filename */
4545
struct log_data *log_head, *log_tail; /* head and tail for queue */
4646
int if_used; /* open count for interface */
47-
int volatile del_lock; /* lock for delete operations */
4847
unsigned char logtmp[LOG_MAX_LINELEN];
4948
wait_queue_head_t rd_queue;
5049
};
@@ -102,7 +101,6 @@ put_log_buffer(hysdn_card *card, char *cp)
102101
{
103102
struct log_data *ib;
104103
struct procdata *pd = card->proclog;
105-
int i;
106104
unsigned long flags;
107105

108106
if (!pd)
@@ -126,21 +124,21 @@ put_log_buffer(hysdn_card *card, char *cp)
126124
else
127125
pd->log_tail->next = ib; /* follows existing messages */
128126
pd->log_tail = ib; /* new tail */
129-
i = pd->del_lock++; /* get lock state */
130-
spin_unlock_irqrestore(&card->hysdn_lock, flags);
131127

132128
/* delete old entrys */
133-
if (!i)
134-
while (pd->log_head->next) {
135-
if ((pd->log_head->usage_cnt <= 0) &&
136-
(pd->log_head->next->usage_cnt <= 0)) {
137-
ib = pd->log_head;
138-
pd->log_head = pd->log_head->next;
139-
kfree(ib);
140-
} else
141-
break;
142-
} /* pd->log_head->next */
143-
pd->del_lock--; /* release lock level */
129+
while (pd->log_head->next) {
130+
if ((pd->log_head->usage_cnt <= 0) &&
131+
(pd->log_head->next->usage_cnt <= 0)) {
132+
ib = pd->log_head;
133+
pd->log_head = pd->log_head->next;
134+
kfree(ib);
135+
} else {
136+
break;
137+
}
138+
} /* pd->log_head->next */
139+
140+
spin_unlock_irqrestore(&card->hysdn_lock, flags);
141+
144142
wake_up_interruptible(&(pd->rd_queue)); /* announce new entry */
145143
} /* put_log_buffer */
146144

drivers/net/dsa/mt7530.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,44 @@ static void mt7530_adjust_link(struct dsa_switch *ds, int port,
625625
* all finished.
626626
*/
627627
mt7623_pad_clk_setup(ds);
628+
} else {
629+
u16 lcl_adv = 0, rmt_adv = 0;
630+
u8 flowctrl;
631+
u32 mcr = PMCR_USERP_LINK | PMCR_FORCE_MODE;
632+
633+
switch (phydev->speed) {
634+
case SPEED_1000:
635+
mcr |= PMCR_FORCE_SPEED_1000;
636+
break;
637+
case SPEED_100:
638+
mcr |= PMCR_FORCE_SPEED_100;
639+
break;
640+
};
641+
642+
if (phydev->link)
643+
mcr |= PMCR_FORCE_LNK;
644+
645+
if (phydev->duplex) {
646+
mcr |= PMCR_FORCE_FDX;
647+
648+
if (phydev->pause)
649+
rmt_adv = LPA_PAUSE_CAP;
650+
if (phydev->asym_pause)
651+
rmt_adv |= LPA_PAUSE_ASYM;
652+
653+
if (phydev->advertising & ADVERTISED_Pause)
654+
lcl_adv |= ADVERTISE_PAUSE_CAP;
655+
if (phydev->advertising & ADVERTISED_Asym_Pause)
656+
lcl_adv |= ADVERTISE_PAUSE_ASYM;
657+
658+
flowctrl = mii_resolve_flowctrl_fdx(lcl_adv, rmt_adv);
659+
660+
if (flowctrl & FLOW_CTRL_TX)
661+
mcr |= PMCR_TX_FC_EN;
662+
if (flowctrl & FLOW_CTRL_RX)
663+
mcr |= PMCR_RX_FC_EN;
664+
}
665+
mt7530_write(priv, MT7530_PMCR_P(port), mcr);
628666
}
629667
}
630668

drivers/net/dsa/mt7530.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ enum mt7530_stp_state {
151151
#define PMCR_TX_FC_EN BIT(5)
152152
#define PMCR_RX_FC_EN BIT(4)
153153
#define PMCR_FORCE_SPEED_1000 BIT(3)
154+
#define PMCR_FORCE_SPEED_100 BIT(2)
154155
#define PMCR_FORCE_FDX BIT(1)
155156
#define PMCR_FORCE_LNK BIT(0)
156157
#define PMCR_COMMON_LINK (PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | \

drivers/net/ethernet/apm/xgene/xgene_enet_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,9 +1785,9 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata)
17851785

17861786
xgene_enet_gpiod_get(pdata);
17871787

1788-
if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
1789-
pdata->clk = devm_clk_get(&pdev->dev, NULL);
1790-
if (IS_ERR(pdata->clk)) {
1788+
pdata->clk = devm_clk_get(&pdev->dev, NULL);
1789+
if (IS_ERR(pdata->clk)) {
1790+
if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
17911791
/* Abort if the clock is defined but couldn't be
17921792
* retrived. Always abort if the clock is missing on
17931793
* DT system as the driver can't cope with this case.

drivers/net/ethernet/broadcom/b44.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,7 @@ static int b44_init_one(struct ssb_device *sdev,
23682368
bp->msg_enable = netif_msg_init(b44_debug, B44_DEF_MSG_ENABLE);
23692369

23702370
spin_lock_init(&bp->lock);
2371+
u64_stats_init(&bp->hw_stats.syncp);
23712372

23722373
bp->rx_pending = B44_DEF_RX_RING_PENDING;
23732374
bp->tx_pending = B44_DEF_TX_RING_PENDING;

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ static void send_request_map(struct ibmvnic_adapter *, dma_addr_t, __be32, u8);
111111
static void send_request_unmap(struct ibmvnic_adapter *, u8);
112112
static void send_login(struct ibmvnic_adapter *adapter);
113113
static void send_cap_queries(struct ibmvnic_adapter *adapter);
114+
static int init_sub_crqs(struct ibmvnic_adapter *);
114115
static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter);
115116
static int ibmvnic_init(struct ibmvnic_adapter *);
116117
static void release_crq_queue(struct ibmvnic_adapter *);
@@ -651,6 +652,7 @@ static int ibmvnic_login(struct net_device *netdev)
651652
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
652653
unsigned long timeout = msecs_to_jiffies(30000);
653654
struct device *dev = &adapter->vdev->dev;
655+
int rc;
654656

655657
do {
656658
if (adapter->renegotiate) {
@@ -664,6 +666,18 @@ static int ibmvnic_login(struct net_device *netdev)
664666
dev_err(dev, "Capabilities query timeout\n");
665667
return -1;
666668
}
669+
rc = init_sub_crqs(adapter);
670+
if (rc) {
671+
dev_err(dev,
672+
"Initialization of SCRQ's failed\n");
673+
return -1;
674+
}
675+
rc = init_sub_crq_irqs(adapter);
676+
if (rc) {
677+
dev_err(dev,
678+
"Initialization of SCRQ's irqs failed\n");
679+
return -1;
680+
}
667681
}
668682

669683
reinit_completion(&adapter->init_done);
@@ -3004,7 +3018,6 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
30043018
*req_value,
30053019
(long int)be64_to_cpu(crq->request_capability_rsp.
30063020
number), name);
3007-
release_sub_crqs(adapter);
30083021
*req_value = be64_to_cpu(crq->request_capability_rsp.number);
30093022
ibmvnic_send_req_caps(adapter, 1);
30103023
return;

drivers/net/ethernet/intel/i40e/i40e_txrx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,8 @@ int i40e_setup_tx_descriptors(struct i40e_ring *tx_ring)
11131113
if (!tx_ring->tx_bi)
11141114
goto err;
11151115

1116+
u64_stats_init(&tx_ring->syncp);
1117+
11161118
/* round up to nearest 4K */
11171119
tx_ring->size = tx_ring->count * sizeof(struct i40e_tx_desc);
11181120
/* add u32 for head writeback, align after this takes care of

drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,6 +2988,8 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_ring *tx_ring)
29882988
if (!tx_ring->tx_buffer_info)
29892989
goto err;
29902990

2991+
u64_stats_init(&tx_ring->syncp);
2992+
29912993
/* round up to nearest 4K */
29922994
tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
29932995
tx_ring->size = ALIGN(tx_ring->size, 4096);
@@ -3046,6 +3048,8 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_ring *rx_ring)
30463048
if (!rx_ring->rx_buffer_info)
30473049
goto err;
30483050

3051+
u64_stats_init(&rx_ring->syncp);
3052+
30493053
/* Round up to nearest 4K */
30503054
rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
30513055
rx_ring->size = ALIGN(rx_ring->size, 4096);

0 commit comments

Comments
 (0)