Skip to content

Commit d9fc151

Browse files
committed
Merge tag 'net-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from rxrpc. The rxrpc changes are noticeable large: to address a recent regression has been necessary completing the threaded refactor. Current release - regressions: - rxrpc: - only disconnect calls in the I/O thread - move client call connection to the I/O thread - fix incoming call setup race - eth: mlx5: - restore pkt rate policing support - fix memory leak on updating vport counters Previous releases - regressions: - gro: take care of DODGY packets - ipv6: deduct extension header length in rawv6_push_pending_frames - tipc: fix unexpected link reset due to discovery messages Previous releases - always broken: - sched: disallow noqueue for qdisc classes - eth: ice: fix potential memory leak in ice_gnss_tty_write() - eth: ixgbe: fix pci device refcount leak - eth: mlx5: - fix command stats access after free - fix macsec possible null dereference when updating MAC security entity (SecY)" * tag 'net-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (64 commits) r8152: add vendor/device ID pair for Microsoft Devkit net: stmmac: add aux timestamps fifo clearance wait bnxt: make sure we return pages to the pool net: hns3: fix wrong use of rss size during VF rss config ipv6: raw: Deduct extension header length in rawv6_push_pending_frames net: lan966x: check for ptp to be enabled in lan966x_ptp_deinit() net: sched: disallow noqueue for qdisc classes iavf/iavf_main: actually log ->src mask when talking about it igc: Fix PPS delta between two synchronized end-points ixgbe: fix pci device refcount leak octeontx2-pf: Fix resource leakage in VF driver unbind selftests/net: l2_tos_ttl_inherit.sh: Ensure environment cleanup on failure. selftests/net: l2_tos_ttl_inherit.sh: Run tests in their own netns. selftests/net: l2_tos_ttl_inherit.sh: Set IPv6 addresses with "nodad". net/mlx5e: Fix macsec possible null dereference when updating MAC security entity (SecY) net/mlx5e: Fix macsec ssci attribute handling in offload path net/mlx5: E-switch, Coverity: overlapping copy net/mlx5e: Don't support encap rules with gbp option net/mlx5: Fix ptp max frequency adjustment range net/mlx5e: Fix memory leak on updating vport counters ...
2 parents 5be413a + be53771 commit d9fc151

Some content is hidden

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

74 files changed

+1954
-1956
lines changed

Documentation/networking/rxrpc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,8 @@ The kernel interface functions are as follows:
880880

881881
notify_end_rx can be NULL or it can be used to specify a function to be
882882
called when the call changes state to end the Tx phase. This function is
883-
called with the call-state spinlock held to prevent any reply or final ACK
884-
from being delivered first.
883+
called with a spinlock held to prevent the last DATA packet from being
884+
transmitted until the function returns.
885885

886886
(#) Receive data from a call::
887887

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ static struct sk_buff *bnxt_rx_multi_page_skb(struct bnxt *bp,
993993
DMA_ATTR_WEAK_ORDERING);
994994
skb = build_skb(page_address(page), PAGE_SIZE);
995995
if (!skb) {
996-
__free_page(page);
996+
page_pool_recycle_direct(rxr->page_pool, page);
997997
return NULL;
998998
}
999999
skb_mark_for_recycle(skb);
@@ -1031,7 +1031,7 @@ static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp,
10311031

10321032
skb = napi_alloc_skb(&rxr->bnapi->napi, payload);
10331033
if (!skb) {
1034-
__free_page(page);
1034+
page_pool_recycle_direct(rxr->page_pool, page);
10351035
return NULL;
10361036
}
10371037

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3130,7 +3130,7 @@ static int hclgevf_set_channels(struct hnae3_handle *handle, u32 new_tqps_num,
31303130

31313131
hclgevf_update_rss_size(handle, new_tqps_num);
31323132

3133-
hclge_comm_get_rss_tc_info(cur_rss_size, hdev->hw_tc_map,
3133+
hclge_comm_get_rss_tc_info(kinfo->rss_size, hdev->hw_tc_map,
31343134
tc_offset, tc_valid, tc_size);
31353135
ret = hclge_comm_set_rss_tc_mode(&hdev->hw.hw, tc_offset,
31363136
tc_valid, tc_size);

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3850,7 +3850,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
38503850
field_flags |= IAVF_CLOUD_FIELD_IIP;
38513851
} else {
38523852
dev_err(&adapter->pdev->dev, "Bad ip src mask 0x%08x\n",
3853-
be32_to_cpu(match.mask->dst));
3853+
be32_to_cpu(match.mask->src));
38543854
return -EINVAL;
38553855
}
38563856
}

drivers/net/ethernet/intel/ice/ice_gnss.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ ice_gnss_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
363363
/* Send the data out to a hardware port */
364364
write_buf = kzalloc(sizeof(*write_buf), GFP_KERNEL);
365365
if (!write_buf) {
366+
kfree(cmd_buf);
366367
err = -ENOMEM;
367368
goto exit;
368369
}
@@ -460,6 +461,9 @@ static struct tty_driver *ice_gnss_create_tty_driver(struct ice_pf *pf)
460461
for (i = 0; i < ICE_GNSS_TTY_MINOR_DEVICES; i++) {
461462
pf->gnss_tty_port[i] = kzalloc(sizeof(*pf->gnss_tty_port[i]),
462463
GFP_KERNEL);
464+
if (!pf->gnss_tty_port[i])
465+
goto err_out;
466+
463467
pf->gnss_serial[i] = NULL;
464468

465469
tty_port_init(pf->gnss_tty_port[i]);
@@ -469,21 +473,23 @@ static struct tty_driver *ice_gnss_create_tty_driver(struct ice_pf *pf)
469473
err = tty_register_driver(tty_driver);
470474
if (err) {
471475
dev_err(dev, "Failed to register TTY driver err=%d\n", err);
472-
473-
for (i = 0; i < ICE_GNSS_TTY_MINOR_DEVICES; i++) {
474-
tty_port_destroy(pf->gnss_tty_port[i]);
475-
kfree(pf->gnss_tty_port[i]);
476-
}
477-
kfree(ttydrv_name);
478-
tty_driver_kref_put(pf->ice_gnss_tty_driver);
479-
480-
return NULL;
476+
goto err_out;
481477
}
482478

483479
for (i = 0; i < ICE_GNSS_TTY_MINOR_DEVICES; i++)
484480
dev_info(dev, "%s%d registered\n", ttydrv_name, i);
485481

486482
return tty_driver;
483+
484+
err_out:
485+
while (i--) {
486+
tty_port_destroy(pf->gnss_tty_port[i]);
487+
kfree(pf->gnss_tty_port[i]);
488+
}
489+
kfree(ttydrv_name);
490+
tty_driver_kref_put(pf->ice_gnss_tty_driver);
491+
492+
return NULL;
487493
}
488494

489495
/**

drivers/net/ethernet/intel/igc/igc_defines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,9 @@
475475
#define IGC_TSAUXC_EN_TT0 BIT(0) /* Enable target time 0. */
476476
#define IGC_TSAUXC_EN_TT1 BIT(1) /* Enable target time 1. */
477477
#define IGC_TSAUXC_EN_CLK0 BIT(2) /* Enable Configurable Frequency Clock 0. */
478+
#define IGC_TSAUXC_ST0 BIT(4) /* Start Clock 0 Toggle on Target Time 0. */
478479
#define IGC_TSAUXC_EN_CLK1 BIT(5) /* Enable Configurable Frequency Clock 1. */
480+
#define IGC_TSAUXC_ST1 BIT(7) /* Start Clock 1 Toggle on Target Time 1. */
479481
#define IGC_TSAUXC_EN_TS0 BIT(8) /* Enable hardware timestamp 0. */
480482
#define IGC_TSAUXC_AUTT0 BIT(9) /* Auxiliary Timestamp Taken. */
481483
#define IGC_TSAUXC_EN_TS1 BIT(10) /* Enable hardware timestamp 0. */

drivers/net/ethernet/intel/igc/igc_ptp.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int igc_ptp_feature_enable_i225(struct ptp_clock_info *ptp,
322322
ts = ns_to_timespec64(ns);
323323
if (rq->perout.index == 1) {
324324
if (use_freq) {
325-
tsauxc_mask = IGC_TSAUXC_EN_CLK1;
325+
tsauxc_mask = IGC_TSAUXC_EN_CLK1 | IGC_TSAUXC_ST1;
326326
tsim_mask = 0;
327327
} else {
328328
tsauxc_mask = IGC_TSAUXC_EN_TT1;
@@ -333,7 +333,7 @@ static int igc_ptp_feature_enable_i225(struct ptp_clock_info *ptp,
333333
freqout = IGC_FREQOUT1;
334334
} else {
335335
if (use_freq) {
336-
tsauxc_mask = IGC_TSAUXC_EN_CLK0;
336+
tsauxc_mask = IGC_TSAUXC_EN_CLK0 | IGC_TSAUXC_ST0;
337337
tsim_mask = 0;
338338
} else {
339339
tsauxc_mask = IGC_TSAUXC_EN_TT0;
@@ -347,10 +347,12 @@ static int igc_ptp_feature_enable_i225(struct ptp_clock_info *ptp,
347347
tsauxc = rd32(IGC_TSAUXC);
348348
tsim = rd32(IGC_TSIM);
349349
if (rq->perout.index == 1) {
350-
tsauxc &= ~(IGC_TSAUXC_EN_TT1 | IGC_TSAUXC_EN_CLK1);
350+
tsauxc &= ~(IGC_TSAUXC_EN_TT1 | IGC_TSAUXC_EN_CLK1 |
351+
IGC_TSAUXC_ST1);
351352
tsim &= ~IGC_TSICR_TT1;
352353
} else {
353-
tsauxc &= ~(IGC_TSAUXC_EN_TT0 | IGC_TSAUXC_EN_CLK0);
354+
tsauxc &= ~(IGC_TSAUXC_EN_TT0 | IGC_TSAUXC_EN_CLK0 |
355+
IGC_TSAUXC_ST0);
354356
tsim &= ~IGC_TSICR_TT0;
355357
}
356358
if (on) {

drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -855,9 +855,11 @@ static struct pci_dev *ixgbe_get_first_secondary_devfn(unsigned int devfn)
855855
rp_pdev = pci_get_domain_bus_and_slot(0, 0, devfn);
856856
if (rp_pdev && rp_pdev->subordinate) {
857857
bus = rp_pdev->subordinate->number;
858+
pci_dev_put(rp_pdev);
858859
return pci_get_domain_bus_and_slot(0, bus, 0);
859860
}
860861

862+
pci_dev_put(rp_pdev);
861863
return NULL;
862864
}
863865

@@ -874,6 +876,7 @@ static bool ixgbe_x550em_a_has_mii(struct ixgbe_hw *hw)
874876
struct ixgbe_adapter *adapter = hw->back;
875877
struct pci_dev *pdev = adapter->pdev;
876878
struct pci_dev *func0_pdev;
879+
bool has_mii = false;
877880

878881
/* For the C3000 family of SoCs (x550em_a) the internal ixgbe devices
879882
* are always downstream of root ports @ 0000:00:16.0 & 0000:00:17.0
@@ -884,15 +887,16 @@ static bool ixgbe_x550em_a_has_mii(struct ixgbe_hw *hw)
884887
func0_pdev = ixgbe_get_first_secondary_devfn(PCI_DEVFN(0x16, 0));
885888
if (func0_pdev) {
886889
if (func0_pdev == pdev)
887-
return true;
888-
else
889-
return false;
890+
has_mii = true;
891+
goto out;
890892
}
891893
func0_pdev = ixgbe_get_first_secondary_devfn(PCI_DEVFN(0x17, 0));
892894
if (func0_pdev == pdev)
893-
return true;
895+
has_mii = true;
894896

895-
return false;
897+
out:
898+
pci_dev_put(func0_pdev);
899+
return has_mii;
896900
}
897901

898902
/**

drivers/net/ethernet/marvell/octeontx2/af/cgx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,9 +774,9 @@ int cgx_lmac_rx_tx_enable(void *cgxd, int lmac_id, bool enable)
774774

775775
cfg = cgx_read(cgx, lmac_id, CGXX_CMRX_CFG);
776776
if (enable)
777-
cfg |= CMR_EN | DATA_PKT_RX_EN | DATA_PKT_TX_EN;
777+
cfg |= DATA_PKT_RX_EN | DATA_PKT_TX_EN;
778778
else
779-
cfg &= ~(CMR_EN | DATA_PKT_RX_EN | DATA_PKT_TX_EN);
779+
cfg &= ~(DATA_PKT_RX_EN | DATA_PKT_TX_EN);
780780
cgx_write(cgx, lmac_id, CGXX_CMRX_CFG, cfg);
781781
return 0;
782782
}

drivers/net/ethernet/marvell/octeontx2/af/cgx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#define CMR_P2X_SEL_SHIFT 59ULL
2727
#define CMR_P2X_SEL_NIX0 1ULL
2828
#define CMR_P2X_SEL_NIX1 2ULL
29-
#define CMR_EN BIT_ULL(55)
3029
#define DATA_PKT_TX_EN BIT_ULL(53)
3130
#define DATA_PKT_RX_EN BIT_ULL(54)
3231
#define CGX_LMAC_TYPE_SHIFT 40

0 commit comments

Comments
 (0)