Skip to content

Commit d64c6f9

Browse files
committed
Merge tag 'net-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Current release - always broken: - net/smc: fix access to parent of an ib device - devlink: use _BITUL() macro instead of BIT() in the UAPI header - handful of mptcp fixes Previous release - regressions: - intel: AF_XDP: clear the status bits for the next_to_use descriptor - dpaa2-eth: fix the size of the mapped SGT buffer Previous release - always broken: - mptcp: fix security context on server socket - ethtool: fix string set id check - ethtool: fix error paths in ethnl_set_channels() - lan743x: fix rx_napi_poll/interrupt ping-pong - qca: ar9331: fix sleeping function called from invalid context bug" * tag 'net-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (32 commits) net/sched: sch_taprio: reset child qdiscs before freeing them nfp: move indirect block cleanup to flower app stop callback octeontx2-af: Fix undetected unmap PF error check net: nixge: fix spelling mistake in Kconfig: "Instuments" -> "Instruments" qlcnic: Fix error code in probe mptcp: fix pending data accounting mptcp: push pending frames when subflow has free space mptcp: properly annotate nested lock mptcp: fix security context on server socket net/mlx5: Fix compilation warning for 32-bit platform mptcp: clear use_ack and use_map when dropping other suboptions devlink: use _BITUL() macro instead of BIT() in the UAPI header net: korina: fix return value net/smc: fix access to parent of an ib device ethtool: fix error paths in ethnl_set_channels() nfc: s3fwrn5: Remove unused NCI prop commands nfc: s3fwrn5: Remove the delay for NFC sleep phy: fix kdoc warning tipc: do sanity check payload of a netlink message use __netdev_notify_peers in hyperv ...
2 parents 0c6c887 + 44d4775 commit d64c6f9

36 files changed

Lines changed: 198 additions & 158 deletions

File tree

Documentation/driver-api/connector.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ handling, etc... The Connector driver allows any kernelspace agents to use
2525
netlink based networking for inter-process communication in a significantly
2626
easier way::
2727

28-
int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *));
28+
int cn_add_callback(const struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *));
2929
void cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask);
3030
void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask);
3131

drivers/connector/cn_queue.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
static struct cn_callback_entry *
2121
cn_queue_alloc_callback_entry(struct cn_queue_dev *dev, const char *name,
22-
struct cb_id *id,
22+
const struct cb_id *id,
2323
void (*callback)(struct cn_msg *,
2424
struct netlink_skb_parms *))
2525
{
@@ -51,13 +51,13 @@ void cn_queue_release_callback(struct cn_callback_entry *cbq)
5151
kfree(cbq);
5252
}
5353

54-
int cn_cb_equal(struct cb_id *i1, struct cb_id *i2)
54+
int cn_cb_equal(const struct cb_id *i1, const struct cb_id *i2)
5555
{
5656
return ((i1->idx == i2->idx) && (i1->val == i2->val));
5757
}
5858

5959
int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
60-
struct cb_id *id,
60+
const struct cb_id *id,
6161
void (*callback)(struct cn_msg *,
6262
struct netlink_skb_parms *))
6363
{
@@ -90,7 +90,7 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
9090
return 0;
9191
}
9292

93-
void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id)
93+
void cn_queue_del_callback(struct cn_queue_dev *dev, const struct cb_id *id)
9494
{
9595
struct cn_callback_entry *cbq, *n;
9696
int found = 0;

drivers/connector/connector.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static void cn_rx_skb(struct sk_buff *skb)
193193
*
194194
* May sleep.
195195
*/
196-
int cn_add_callback(struct cb_id *id, const char *name,
196+
int cn_add_callback(const struct cb_id *id, const char *name,
197197
void (*callback)(struct cn_msg *,
198198
struct netlink_skb_parms *))
199199
{
@@ -214,7 +214,7 @@ EXPORT_SYMBOL_GPL(cn_add_callback);
214214
*
215215
* May sleep while waiting for reference counter to become zero.
216216
*/
217-
void cn_del_callback(struct cb_id *id)
217+
void cn_del_callback(const struct cb_id *id)
218218
{
219219
struct cn_dev *dev = &cdev;
220220

drivers/net/dsa/qca/ar9331.c

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ struct ar9331_sw_priv {
159159
struct dsa_switch ds;
160160
struct dsa_switch_ops ops;
161161
struct irq_domain *irqdomain;
162+
u32 irq_mask;
163+
struct mutex lock_irq;
162164
struct mii_bus *mbus; /* mdio master */
163165
struct mii_bus *sbus; /* mdio slave */
164166
struct regmap *regmap;
@@ -520,32 +522,44 @@ static irqreturn_t ar9331_sw_irq(int irq, void *data)
520522
static void ar9331_sw_mask_irq(struct irq_data *d)
521523
{
522524
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
523-
struct regmap *regmap = priv->regmap;
524-
int ret;
525525

526-
ret = regmap_update_bits(regmap, AR9331_SW_REG_GINT_MASK,
527-
AR9331_SW_GINT_PHY_INT, 0);
528-
if (ret)
529-
dev_err(priv->dev, "could not mask IRQ\n");
526+
priv->irq_mask = 0;
530527
}
531528

532529
static void ar9331_sw_unmask_irq(struct irq_data *d)
530+
{
531+
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
532+
533+
priv->irq_mask = AR9331_SW_GINT_PHY_INT;
534+
}
535+
536+
static void ar9331_sw_irq_bus_lock(struct irq_data *d)
537+
{
538+
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
539+
540+
mutex_lock(&priv->lock_irq);
541+
}
542+
543+
static void ar9331_sw_irq_bus_sync_unlock(struct irq_data *d)
533544
{
534545
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
535546
struct regmap *regmap = priv->regmap;
536547
int ret;
537548

538549
ret = regmap_update_bits(regmap, AR9331_SW_REG_GINT_MASK,
539-
AR9331_SW_GINT_PHY_INT,
540-
AR9331_SW_GINT_PHY_INT);
550+
AR9331_SW_GINT_PHY_INT, priv->irq_mask);
541551
if (ret)
542-
dev_err(priv->dev, "could not unmask IRQ\n");
552+
dev_err(priv->dev, "failed to change IRQ mask\n");
553+
554+
mutex_unlock(&priv->lock_irq);
543555
}
544556

545557
static struct irq_chip ar9331_sw_irq_chip = {
546558
.name = AR9331_SW_NAME,
547559
.irq_mask = ar9331_sw_mask_irq,
548560
.irq_unmask = ar9331_sw_unmask_irq,
561+
.irq_bus_lock = ar9331_sw_irq_bus_lock,
562+
.irq_bus_sync_unlock = ar9331_sw_irq_bus_sync_unlock,
549563
};
550564

551565
static int ar9331_sw_irq_map(struct irq_domain *domain, unsigned int irq,
@@ -584,6 +598,7 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *priv)
584598
return irq ? irq : -EINVAL;
585599
}
586600

601+
mutex_init(&priv->lock_irq);
587602
ret = devm_request_threaded_irq(dev, irq, NULL, ar9331_sw_irq,
588603
IRQF_ONESHOT, AR9331_SW_NAME, priv);
589604
if (ret) {

drivers/net/ethernet/allwinner/sun4i-emac.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,13 +828,13 @@ static int emac_probe(struct platform_device *pdev)
828828
db->clk = devm_clk_get(&pdev->dev, NULL);
829829
if (IS_ERR(db->clk)) {
830830
ret = PTR_ERR(db->clk);
831-
goto out_iounmap;
831+
goto out_dispose_mapping;
832832
}
833833

834834
ret = clk_prepare_enable(db->clk);
835835
if (ret) {
836836
dev_err(&pdev->dev, "Error couldn't enable clock (%d)\n", ret);
837-
goto out_iounmap;
837+
goto out_dispose_mapping;
838838
}
839839

840840
ret = sunxi_sram_claim(&pdev->dev);
@@ -893,6 +893,8 @@ static int emac_probe(struct platform_device *pdev)
893893
sunxi_sram_release(&pdev->dev);
894894
out_clk_disable_unprepare:
895895
clk_disable_unprepare(db->clk);
896+
out_dispose_mapping:
897+
irq_dispose_mapping(ndev->irq);
896898
out_iounmap:
897899
iounmap(db->membase);
898900
out:
@@ -911,6 +913,7 @@ static int emac_remove(struct platform_device *pdev)
911913
unregister_netdev(ndev);
912914
sunxi_sram_release(&pdev->dev);
913915
clk_disable_unprepare(db->clk);
916+
irq_dispose_mapping(ndev->irq);
914917
iounmap(db->membase);
915918
free_netdev(ndev);
916919

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4069,8 +4069,10 @@ static int bcmgenet_probe(struct platform_device *pdev)
40694069
clk_disable_unprepare(priv->clk);
40704070

40714071
err = register_netdev(dev);
4072-
if (err)
4072+
if (err) {
4073+
bcmgenet_mii_exit(dev);
40734074
goto err;
4075+
}
40744076

40754077
return err;
40764078

drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ static int dpaa2_eth_build_sg_fd_single_buf(struct dpaa2_eth_priv *priv,
878878
swa = (struct dpaa2_eth_swa *)sgt_buf;
879879
swa->type = DPAA2_ETH_SWA_SINGLE;
880880
swa->single.skb = skb;
881-
swa->sg.sgt_size = sgt_buf_size;
881+
swa->single.sgt_size = sgt_buf_size;
882882

883883
/* Separately map the SGT buffer */
884884
sgt_addr = dma_map_single(dev, sgt_buf, sgt_buf_size, DMA_BIDIRECTIONAL);

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,10 +2171,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
21712171
napi_schedule(&adapter->napi[i]);
21722172

21732173
if (adapter->reset_reason == VNIC_RESET_FAILOVER ||
2174-
adapter->reset_reason == VNIC_RESET_MOBILITY) {
2175-
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
2176-
call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
2177-
}
2174+
adapter->reset_reason == VNIC_RESET_MOBILITY)
2175+
__netdev_notify_peers(netdev);
21782176

21792177
rc = 0;
21802178

@@ -2249,8 +2247,7 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter,
22492247
goto out;
22502248
}
22512249

2252-
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
2253-
call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
2250+
__netdev_notify_peers(netdev);
22542251
out:
22552252
/* restore adapter state if reset failed */
22562253
if (rc)

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,11 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count)
220220
} while (count);
221221

222222
no_buffers:
223-
if (rx_ring->next_to_use != ntu)
223+
if (rx_ring->next_to_use != ntu) {
224+
/* clear the status bits for the next_to_use descriptor */
225+
rx_desc->wb.qword1.status_error_len = 0;
224226
i40e_release_rx_desc(rx_ring, ntu);
227+
}
225228

226229
return ok;
227230
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,11 @@ bool ice_alloc_rx_bufs_zc(struct ice_ring *rx_ring, u16 count)
446446
}
447447
} while (--count);
448448

449-
if (rx_ring->next_to_use != ntu)
449+
if (rx_ring->next_to_use != ntu) {
450+
/* clear the status bits for the next_to_use descriptor */
451+
rx_desc->wb.status_error0 = 0;
450452
ice_release_rx_desc(rx_ring, ntu);
453+
}
451454

452455
return ret;
453456
}

0 commit comments

Comments
 (0)