Skip to content

Commit 8a2cb8b

Browse files
committed
Merge tag 'net-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from can and bpf. Closing three hw-dependent regressions. Any fixes of note are in the 'old code' category. Nothing blocking release from our perspective. Current release - regressions: - stmmac: revert "stmmac: align RX buffers" - usb: asix: ax88772: move embedded PHY detection as early as possible - usb: asix: do not call phy_disconnect() for ax88178 - Revert "net: really fix the build...", from Kalle to fix QCA6390 Current release - new code bugs: - phy: mediatek: add the missing suspend/resume callbacks Previous releases - regressions: - qrtr: fix another OOB Read in qrtr_endpoint_post - stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings Previous releases - always broken: - inet: use siphash in exception handling - ip_gre: add validation for csum_start - bpf: fix ringbuf helper function compatibility - rtnetlink: return correct error on changing device netns - e1000e: do not try to recover the NVM checksum on Tiger Lake" * tag 'net-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (43 commits) Revert "net: really fix the build..." net: hns3: fix get wrong pfc_en when query PFC configuration net: hns3: fix GRO configuration error after reset net: hns3: change the method of getting cmd index in debugfs net: hns3: fix duplicate node in VLAN list net: hns3: fix speed unknown issue in bond 4 net: hns3: add waiting time before cmdq memory is released net: hns3: clear hardware resource when loading driver net: fix NULL pointer reference in cipso_v4_doi_free rtnetlink: Return correct error on changing device netns net: dsa: hellcreek: Adjust schedule look ahead window net: dsa: hellcreek: Fix incorrect setting of GCL cxgb4: dont touch blocked freelist bitmap after free ipv4: use siphash instead of Jenkins in fnhe_hashfun() ipv6: use siphash in rt6_exception_hash() can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters net: usb: asix: ax88772: fix boolconv.cocci warnings net/sched: ets: fix crash when flipping from 'strict' to 'quantum' qede: Fix memset corruption net: stmmac: fix kernel panic due to NULL pointer dereference of buf->xdp ...
2 parents 1a6d80f + 9ebc275 commit 8a2cb8b

Some content is hidden

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

52 files changed

+293
-186
lines changed

drivers/bus/mhi/core/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ void mhi_rddm_prepare(struct mhi_controller *mhi_cntrl,
682682
struct image_info *img_info);
683683
void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl);
684684
int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
685-
struct mhi_chan *mhi_chan, unsigned int flags);
685+
struct mhi_chan *mhi_chan);
686686
int mhi_init_chan_ctxt(struct mhi_controller *mhi_cntrl,
687687
struct mhi_chan *mhi_chan);
688688
void mhi_deinit_chan_ctxt(struct mhi_controller *mhi_cntrl,

drivers/bus/mhi/core/main.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ static void mhi_unprepare_channel(struct mhi_controller *mhi_cntrl,
14301430
}
14311431

14321432
int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
1433-
struct mhi_chan *mhi_chan, unsigned int flags)
1433+
struct mhi_chan *mhi_chan)
14341434
{
14351435
int ret = 0;
14361436
struct device *dev = &mhi_chan->mhi_dev->dev;
@@ -1455,9 +1455,6 @@ int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
14551455
if (ret)
14561456
goto error_pm_state;
14571457

1458-
if (mhi_chan->dir == DMA_FROM_DEVICE)
1459-
mhi_chan->pre_alloc = !!(flags & MHI_CH_INBOUND_ALLOC_BUFS);
1460-
14611458
/* Pre-allocate buffer for xfer ring */
14621459
if (mhi_chan->pre_alloc) {
14631460
int nr_el = get_nr_avail_ring_elements(mhi_cntrl,
@@ -1613,7 +1610,7 @@ void mhi_reset_chan(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan)
16131610
}
16141611

16151612
/* Move channel to start state */
1616-
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev, unsigned int flags)
1613+
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev)
16171614
{
16181615
int ret, dir;
16191616
struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;
@@ -1624,7 +1621,7 @@ int mhi_prepare_for_transfer(struct mhi_device *mhi_dev, unsigned int flags)
16241621
if (!mhi_chan)
16251622
continue;
16261623

1627-
ret = mhi_prepare_channel(mhi_cntrl, mhi_chan, flags);
1624+
ret = mhi_prepare_channel(mhi_cntrl, mhi_chan);
16281625
if (ret)
16291626
goto error_open_chan;
16301627
}

drivers/net/can/usb/esd_usb2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
224224
if (id == ESD_EV_CAN_ERROR_EXT) {
225225
u8 state = msg->msg.rx.data[0];
226226
u8 ecc = msg->msg.rx.data[1];
227-
u8 txerr = msg->msg.rx.data[2];
228-
u8 rxerr = msg->msg.rx.data[3];
227+
u8 rxerr = msg->msg.rx.data[2];
228+
u8 txerr = msg->msg.rx.data[3];
229229

230230
skb = alloc_can_err_skb(priv->netdev, &cf);
231231
if (skb == NULL) {

drivers/net/dsa/hirschmann/hellcreek.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,9 +1472,6 @@ static void hellcreek_setup_gcl(struct hellcreek *hellcreek, int port,
14721472
u16 data;
14731473
u8 gates;
14741474

1475-
cur++;
1476-
next++;
1477-
14781475
if (i == schedule->num_entries)
14791476
gates = initial->gate_mask ^
14801477
cur->gate_mask;
@@ -1503,6 +1500,9 @@ static void hellcreek_setup_gcl(struct hellcreek *hellcreek, int port,
15031500
(initial->gate_mask <<
15041501
TR_GCLCMD_INIT_GATE_STATES_SHIFT);
15051502
hellcreek_write(hellcreek, data, TR_GCLCMD);
1503+
1504+
cur++;
1505+
next++;
15061506
}
15071507
}
15081508

@@ -1550,7 +1550,7 @@ static bool hellcreek_schedule_startable(struct hellcreek *hellcreek, int port)
15501550
/* Calculate difference to admin base time */
15511551
base_time_ns = ktime_to_ns(hellcreek_port->current_schedule->base_time);
15521552

1553-
return base_time_ns - current_ns < (s64)8 * NSEC_PER_SEC;
1553+
return base_time_ns - current_ns < (s64)4 * NSEC_PER_SEC;
15541554
}
15551555

15561556
static void hellcreek_start_schedule(struct hellcreek *hellcreek, int port)

drivers/net/dsa/mv88e6xxx/serdes.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,15 +1277,16 @@ static int mv88e6393x_serdes_port_errata(struct mv88e6xxx_chip *chip, int lane)
12771277
int err;
12781278

12791279
/* mv88e6393x family errata 4.6:
1280-
* Cannot clear PwrDn bit on SERDES on port 0 if device is configured
1281-
* CPU_MGD mode or P0_mode is configured for [x]MII.
1282-
* Workaround: Set Port0 SERDES register 4.F002 bit 5=0 and bit 15=1.
1280+
* Cannot clear PwrDn bit on SERDES if device is configured CPU_MGD
1281+
* mode or P0_mode is configured for [x]MII.
1282+
* Workaround: Set SERDES register 4.F002 bit 5=0 and bit 15=1.
12831283
*
12841284
* It seems that after this workaround the SERDES is automatically
12851285
* powered up (the bit is cleared), so power it down.
12861286
*/
1287-
if (lane == MV88E6393X_PORT0_LANE) {
1288-
err = mv88e6390_serdes_read(chip, MV88E6393X_PORT0_LANE,
1287+
if (lane == MV88E6393X_PORT0_LANE || lane == MV88E6393X_PORT9_LANE ||
1288+
lane == MV88E6393X_PORT10_LANE) {
1289+
err = mv88e6390_serdes_read(chip, lane,
12891290
MDIO_MMD_PHYXS,
12901291
MV88E6393X_SERDES_POC, &reg);
12911292
if (err)

drivers/net/ethernet/apm/xgene-v2/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,11 +677,13 @@ static int xge_probe(struct platform_device *pdev)
677677
ret = register_netdev(ndev);
678678
if (ret) {
679679
netdev_err(ndev, "Failed to register netdev\n");
680-
goto err;
680+
goto err_mdio_remove;
681681
}
682682

683683
return 0;
684684

685+
err_mdio_remove:
686+
xge_mdio_remove(ndev);
685687
err:
686688
free_netdev(ndev);
687689

drivers/net/ethernet/cadence/macb_ptp.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ void gem_ptp_rxstamp(struct macb *bp, struct sk_buff *skb,
275275

276276
if (GEM_BFEXT(DMA_RXVALID, desc->addr)) {
277277
desc_ptp = macb_ptp_desc(bp, desc);
278+
/* Unlikely but check */
279+
if (!desc_ptp) {
280+
dev_warn_ratelimited(&bp->pdev->dev,
281+
"Timestamp not supported in BD\n");
282+
return;
283+
}
278284
gem_hw_timestamp(bp, desc_ptp->ts_1, desc_ptp->ts_2, &ts);
279285
memset(shhwtstamps, 0, sizeof(struct skb_shared_hwtstamps));
280286
shhwtstamps->hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
@@ -307,8 +313,11 @@ int gem_ptp_txstamp(struct macb_queue *queue, struct sk_buff *skb,
307313
if (CIRC_SPACE(head, tail, PTP_TS_BUFFER_SIZE) == 0)
308314
return -ENOMEM;
309315

310-
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
311316
desc_ptp = macb_ptp_desc(queue->bp, desc);
317+
/* Unlikely but check */
318+
if (!desc_ptp)
319+
return -EINVAL;
320+
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
312321
tx_timestamp = &queue->tx_timestamps[head];
313322
tx_timestamp->skb = skb;
314323
/* ensure ts_1/ts_2 is loaded after ctrl (TX_USED check) */

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5068,6 +5068,7 @@ static int adap_init0(struct adapter *adap, int vpd_skip)
50685068
ret = -ENOMEM;
50695069
goto bye;
50705070
}
5071+
bitmap_zero(adap->sge.blocked_fl, adap->sge.egr_sz);
50715072
#endif
50725073

50735074
params[0] = FW_PARAM_PFVF(CLIP_START);
@@ -6788,13 +6789,11 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
67886789

67896790
setup_memwin(adapter);
67906791
err = adap_init0(adapter, 0);
6791-
#ifdef CONFIG_DEBUG_FS
6792-
bitmap_zero(adapter->sge.blocked_fl, adapter->sge.egr_sz);
6793-
#endif
6794-
setup_memwin_rdma(adapter);
67956792
if (err)
67966793
goto out_unmap_bar;
67976794

6795+
setup_memwin_rdma(adapter);
6796+
67986797
/* configure SGE_STAT_CFG_A to read WC stats */
67996798
if (!is_t4(adapter->params.chip))
68006799
t4_write_reg(adapter, SGE_STAT_CFG_A, STATSOURCE_T5_V(7) |

drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -938,20 +938,19 @@ static int hns3_dbg_dev_info(struct hnae3_handle *h, char *buf, int len)
938938
return 0;
939939
}
940940

941-
static int hns3_dbg_get_cmd_index(struct hnae3_handle *handle,
942-
const unsigned char *name, u32 *index)
941+
static int hns3_dbg_get_cmd_index(struct hns3_dbg_data *dbg_data, u32 *index)
943942
{
944943
u32 i;
945944

946945
for (i = 0; i < ARRAY_SIZE(hns3_dbg_cmd); i++) {
947-
if (!strncmp(name, hns3_dbg_cmd[i].name,
948-
strlen(hns3_dbg_cmd[i].name))) {
946+
if (hns3_dbg_cmd[i].cmd == dbg_data->cmd) {
949947
*index = i;
950948
return 0;
951949
}
952950
}
953951

954-
dev_err(&handle->pdev->dev, "unknown command(%s)\n", name);
952+
dev_err(&dbg_data->handle->pdev->dev, "unknown command(%d)\n",
953+
dbg_data->cmd);
955954
return -EINVAL;
956955
}
957956

@@ -1019,8 +1018,7 @@ static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer,
10191018
u32 index;
10201019
int ret;
10211020

1022-
ret = hns3_dbg_get_cmd_index(handle, filp->f_path.dentry->d_iname,
1023-
&index);
1021+
ret = hns3_dbg_get_cmd_index(dbg_data, &index);
10241022
if (ret)
10251023
return ret;
10261024

@@ -1090,6 +1088,7 @@ static int hns3_dbg_bd_file_init(struct hnae3_handle *handle, u32 cmd)
10901088
char name[HNS3_DBG_FILE_NAME_LEN];
10911089

10921090
data[i].handle = handle;
1091+
data[i].cmd = hns3_dbg_cmd[cmd].cmd;
10931092
data[i].qid = i;
10941093
sprintf(name, "%s%u", hns3_dbg_cmd[cmd].name, i);
10951094
debugfs_create_file(name, 0400, entry_dir, &data[i],
@@ -1110,6 +1109,7 @@ hns3_dbg_common_file_init(struct hnae3_handle *handle, u32 cmd)
11101109
return -ENOMEM;
11111110

11121111
data->handle = handle;
1112+
data->cmd = hns3_dbg_cmd[cmd].cmd;
11131113
entry_dir = hns3_dbg_dentry[hns3_dbg_cmd[cmd].dentry].dentry;
11141114
debugfs_create_file(hns3_dbg_cmd[cmd].name, 0400, entry_dir,
11151115
data, &hns3_dbg_fops);

drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct hns3_dbg_item {
2222

2323
struct hns3_dbg_data {
2424
struct hnae3_handle *handle;
25+
enum hnae3_dbg_cmd cmd;
2526
u16 qid;
2627
};
2728

0 commit comments

Comments
 (0)