Skip to content

Commit

Permalink
Merge branch 'net-next-2025-01-23--18-00' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jan 23, 2025
2 parents 1fb8a7e + d37ed59 commit d0bcd16
Show file tree
Hide file tree
Showing 62 changed files with 377 additions and 155 deletions.
8 changes: 4 additions & 4 deletions Documentation/devicetree/bindings/net/qcom,ethqos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ properties:
oneOf:
- items:
- enum:
- qcom,qcs8300-ethqos
- const: qcom,sa8775p-ethqos
- qcom,qcs615-ethqos
- const: qcom,qcs404-ethqos
- items:
- enum:
- qcom,qcs615-ethqos
- const: qcom,sm8150-ethqos
- qcom,qcs8300-ethqos
- const: qcom,sa8775p-ethqos
- enum:
- qcom,qcs404-ethqos
- qcom,sa8775p-ethqos
Expand Down
4 changes: 2 additions & 2 deletions Documentation/networking/can.rst
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,10 @@ RAW socket option CAN_RAW_JOIN_FILTERS

The CAN_RAW socket can set multiple CAN identifier specific filters that
lead to multiple filters in the af_can.c filter processing. These filters
are indenpendent from each other which leads to logical OR'ed filters when
are independent from each other which leads to logical OR'ed filters when
applied (see :ref:`socketcan-rawfilter`).

This socket option joines the given CAN filters in the way that only CAN
This socket option joins the given CAN filters in the way that only CAN
frames are passed to user space that matched *all* given CAN filters. The
semantic for the applied filters is therefore changed to a logical AND.

Expand Down
2 changes: 1 addition & 1 deletion Documentation/networking/napi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ It is expected that ``irq-suspend-timeout`` will be set to a value much larger
than ``gro_flush_timeout`` as ``irq-suspend-timeout`` should suspend IRQs for
the duration of one userland processing cycle.

While it is not stricly necessary to use ``napi_defer_hard_irqs`` and
While it is not strictly necessary to use ``napi_defer_hard_irqs`` and
``gro_flush_timeout`` to use IRQ suspension, their use is strongly
recommended.

Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -16222,6 +16222,7 @@ F: drivers/scsi/sun3_scsi_vme.c

NCSI LIBRARY
M: Samuel Mendoza-Jonas <[email protected]>
R: Paul Fertser <[email protected]>
S: Maintained
F: net/ncsi/

Expand Down
7 changes: 5 additions & 2 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,10 +1598,13 @@ static void bond_compute_features(struct bonding *bond)
}
bond_dev->hard_header_len = max_hard_header_len;

if (gso_partial_features & NETIF_F_GSO_ESP)
if (gso_partial_features & NETIF_F_GSO_ESP) {
bond_dev->gso_partial_features |= NETIF_F_GSO_ESP;
else
bond_dev->features |= NETIF_F_GSO_PARTIAL;
} else {
bond_dev->gso_partial_features &= ~NETIF_F_GSO_ESP;
bond_dev->features &= ~NETIF_F_GSO_PARTIAL;
}

done:
bond_dev->vlan_features = vlan_features;
Expand Down
35 changes: 31 additions & 4 deletions drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -7424,7 +7424,7 @@ static void tg3_napi_enable(struct tg3 *tp)

for (i = 0; i < tp->irq_cnt; i++) {
tnapi = &tp->napi[i];
napi_enable(&tnapi->napi);
napi_enable_locked(&tnapi->napi);
if (tnapi->tx_buffers) {
netif_queue_set_napi(tp->dev, txq_idx,
NETDEV_QUEUE_TYPE_TX,
Expand All @@ -7445,9 +7445,10 @@ static void tg3_napi_init(struct tg3 *tp)
int i;

for (i = 0; i < tp->irq_cnt; i++) {
netif_napi_add(tp->dev, &tp->napi[i].napi,
i ? tg3_poll_msix : tg3_poll);
netif_napi_set_irq(&tp->napi[i].napi, tp->napi[i].irq_vec);
netif_napi_add_locked(tp->dev, &tp->napi[i].napi,
i ? tg3_poll_msix : tg3_poll);
netif_napi_set_irq_locked(&tp->napi[i].napi,
tp->napi[i].irq_vec);
}
}

Expand Down Expand Up @@ -7489,6 +7490,8 @@ static inline void tg3_netif_start(struct tg3 *tp)
static void tg3_irq_quiesce(struct tg3 *tp)
__releases(tp->lock)
__acquires(tp->lock)
__releases(tp->dev->lock)
__acquires(tp->dev->lock)
{
int i;

Expand Down Expand Up @@ -11271,7 +11274,9 @@ static int tg3_restart_hw(struct tg3 *tp, bool reset_phy)
tg3_timer_stop(tp);
tp->irq_sync = 0;
tg3_napi_enable(tp);
netdev_unlock(tp->dev);
dev_close(tp->dev);
netdev_lock(tp->dev);
tg3_full_lock(tp, 0);
}
return err;
Expand Down Expand Up @@ -11299,6 +11304,7 @@ static void tg3_reset_task(struct work_struct *work)

tg3_netif_stop(tp);

netdev_lock(tp->dev);
tg3_full_lock(tp, 1);

if (tg3_flag(tp, TX_RECOVERY_PENDING)) {
Expand All @@ -11318,12 +11324,14 @@ static void tg3_reset_task(struct work_struct *work)
* call cancel_work_sync() and wait forever.
*/
tg3_flag_clear(tp, RESET_TASK_PENDING);
netdev_unlock(tp->dev);
dev_close(tp->dev);
goto out;
}

tg3_netif_start(tp);
tg3_full_unlock(tp);
netdev_unlock(tp->dev);
tg3_phy_start(tp);
tg3_flag_clear(tp, RESET_TASK_PENDING);
out:
Expand Down Expand Up @@ -11683,9 +11691,11 @@ static int tg3_start(struct tg3 *tp, bool reset_phy, bool test_irq,
if (err)
goto out_ints_fini;

netdev_lock(dev);
tg3_napi_init(tp);

tg3_napi_enable(tp);
netdev_unlock(dev);

for (i = 0; i < tp->irq_cnt; i++) {
err = tg3_request_irq(tp, i);
Expand Down Expand Up @@ -12569,6 +12579,7 @@ static int tg3_set_ringparam(struct net_device *dev,
irq_sync = 1;
}

netdev_lock(dev);
tg3_full_lock(tp, irq_sync);

tp->rx_pending = ering->rx_pending;
Expand Down Expand Up @@ -12597,6 +12608,7 @@ static int tg3_set_ringparam(struct net_device *dev,
}

tg3_full_unlock(tp);
netdev_unlock(dev);

if (irq_sync && !err)
tg3_phy_start(tp);
Expand Down Expand Up @@ -12678,6 +12690,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
irq_sync = 1;
}

netdev_lock(dev);
tg3_full_lock(tp, irq_sync);

if (epause->autoneg)
Expand Down Expand Up @@ -12707,6 +12720,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
}

tg3_full_unlock(tp);
netdev_unlock(dev);
}

tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED;
Expand Down Expand Up @@ -13911,6 +13925,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
data[TG3_INTERRUPT_TEST] = 1;
}

netdev_lock(dev);
tg3_full_lock(tp, 0);

tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
Expand All @@ -13922,6 +13937,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
}

tg3_full_unlock(tp);
netdev_unlock(dev);

if (irq_sync && !err2)
tg3_phy_start(tp);
Expand Down Expand Up @@ -14365,6 +14381,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)

tg3_set_mtu(dev, tp, new_mtu);

netdev_lock(dev);
tg3_full_lock(tp, 1);

tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
Expand All @@ -14384,6 +14401,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
tg3_netif_start(tp);

tg3_full_unlock(tp);
netdev_unlock(dev);

if (!err)
tg3_phy_start(tp);
Expand Down Expand Up @@ -18164,6 +18182,7 @@ static int tg3_resume(struct device *device)

netif_device_attach(dev);

netdev_lock(dev);
tg3_full_lock(tp, 0);

tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
Expand All @@ -18180,6 +18199,7 @@ static int tg3_resume(struct device *device)

out:
tg3_full_unlock(tp);
netdev_unlock(dev);

if (!err)
tg3_phy_start(tp);
Expand Down Expand Up @@ -18260,7 +18280,9 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
done:
if (state == pci_channel_io_perm_failure) {
if (netdev) {
netdev_lock(netdev);
tg3_napi_enable(tp);
netdev_unlock(netdev);
dev_close(netdev);
}
err = PCI_ERS_RESULT_DISCONNECT;
Expand Down Expand Up @@ -18314,7 +18336,9 @@ static pci_ers_result_t tg3_io_slot_reset(struct pci_dev *pdev)

done:
if (rc != PCI_ERS_RESULT_RECOVERED && netdev && netif_running(netdev)) {
netdev_lock(netdev);
tg3_napi_enable(tp);
netdev_unlock(netdev);
dev_close(netdev);
}
rtnl_unlock();
Expand All @@ -18340,12 +18364,14 @@ static void tg3_io_resume(struct pci_dev *pdev)
if (!netdev || !netif_running(netdev))
goto done;

netdev_lock(netdev);
tg3_full_lock(tp, 0);
tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
tg3_flag_set(tp, INIT_COMPLETE);
err = tg3_restart_hw(tp, true);
if (err) {
tg3_full_unlock(tp);
netdev_unlock(netdev);
netdev_err(netdev, "Cannot restart hardware after reset.\n");
goto done;
}
Expand All @@ -18357,6 +18383,7 @@ static void tg3_io_resume(struct pci_dev *pdev)
tg3_netif_start(tp);

tg3_full_unlock(tp);
netdev_unlock(netdev);

tg3_phy_start(tp);

Expand Down
31 changes: 30 additions & 1 deletion drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,8 @@ static int fec_enet_txq_submit_tso(struct fec_enet_priv_tx_q *txq,
struct fec_enet_private *fep = netdev_priv(ndev);
int hdr_len, total_len, data_left;
struct bufdesc *bdp = txq->bd.cur;
struct bufdesc *tmp_bdp;
struct bufdesc_ex *ebdp;
struct tso_t tso;
unsigned int index = 0;
int ret;
Expand Down Expand Up @@ -913,7 +915,34 @@ static int fec_enet_txq_submit_tso(struct fec_enet_priv_tx_q *txq,
return 0;

err_release:
/* TODO: Release all used data descriptors for TSO */
/* Release all used data descriptors for TSO */
tmp_bdp = txq->bd.cur;

while (tmp_bdp != bdp) {
/* Unmap data buffers */
if (tmp_bdp->cbd_bufaddr &&
!IS_TSO_HEADER(txq, fec32_to_cpu(tmp_bdp->cbd_bufaddr)))
dma_unmap_single(&fep->pdev->dev,
fec32_to_cpu(tmp_bdp->cbd_bufaddr),
fec16_to_cpu(tmp_bdp->cbd_datlen),
DMA_TO_DEVICE);

/* Clear standard buffer descriptor fields */
tmp_bdp->cbd_sc = 0;
tmp_bdp->cbd_datlen = 0;
tmp_bdp->cbd_bufaddr = 0;

/* Handle extended descriptor if enabled */
if (fep->bufdesc_ex) {
ebdp = (struct bufdesc_ex *)tmp_bdp;
ebdp->cbd_esc = 0;
}

tmp_bdp = fec_enet_get_nextdesc(tmp_bdp, &txq->bd);
}

dev_kfree_skb_any(skb);

return ret;
}

Expand Down
15 changes: 15 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hnae3.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ EXPORT_SYMBOL(hnae3_unregister_ae_algo_prepare);
*/
static DEFINE_MUTEX(hnae3_common_lock);

/* ensure the drivers being unloaded one by one */
static DEFINE_MUTEX(hnae3_unload_lock);

void hnae3_acquire_unload_lock(void)
{
mutex_lock(&hnae3_unload_lock);
}
EXPORT_SYMBOL(hnae3_acquire_unload_lock);

void hnae3_release_unload_lock(void)
{
mutex_unlock(&hnae3_unload_lock);
}
EXPORT_SYMBOL(hnae3_release_unload_lock);

static bool hnae3_client_match(enum hnae3_client_type client_type)
{
if (client_type == HNAE3_CLIENT_KNIC ||
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hnae3.h
Original file line number Diff line number Diff line change
Expand Up @@ -963,4 +963,6 @@ int hnae3_register_client(struct hnae3_client *client);
void hnae3_set_client_init_flag(struct hnae3_client *client,
struct hnae3_ae_dev *ae_dev,
unsigned int inited);
void hnae3_acquire_unload_lock(void);
void hnae3_release_unload_lock(void);
#endif
2 changes: 2 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -6002,9 +6002,11 @@ module_init(hns3_init_module);
*/
static void __exit hns3_exit_module(void)
{
hnae3_acquire_unload_lock();
pci_unregister_driver(&hns3_driver);
hnae3_unregister_client(&client);
hns3_dbg_unregister_debugfs();
hnae3_release_unload_lock();
}
module_exit(hns3_exit_module);

Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12919,9 +12919,11 @@ static int __init hclge_init(void)

static void __exit hclge_exit(void)
{
hnae3_acquire_unload_lock();
hnae3_unregister_ae_algo_prepare(&ae_algo);
hnae3_unregister_ae_algo(&ae_algo);
destroy_workqueue(hclge_wq);
hnae3_release_unload_lock();
}
module_init(hclge_init);
module_exit(hclge_exit);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3410,8 +3410,10 @@ static int __init hclgevf_init(void)

static void __exit hclgevf_exit(void)
{
hnae3_acquire_unload_lock();
hnae3_unregister_ae_algo(&ae_algovf);
destroy_workqueue(hclgevf_wq);
hnae3_release_unload_lock();
}
module_init(hclgevf_init);
module_exit(hclgevf_exit);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/marvell/mvneta.c
Original file line number Diff line number Diff line change
Expand Up @@ -4432,6 +4432,7 @@ static int mvneta_cpu_online(unsigned int cpu, struct hlist_node *node)
*/
if (pp->is_stopped) {
spin_unlock(&pp->lock);
netdev_unlock(port->napi.dev);
return 0;
}
netif_tx_stop_all_queues(pp->dev);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mediatek/airoha_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@
#define REG_GDM3_FWD_CFG GDM3_BASE
#define GDM3_PAD_EN_MASK BIT(28)

#define REG_GDM4_FWD_CFG (GDM4_BASE + 0x100)
#define REG_GDM4_FWD_CFG GDM4_BASE
#define GDM4_PAD_EN_MASK BIT(28)
#define GDM4_SPORT_OFFSET0_MASK GENMASK(11, 8)

#define REG_GDM4_SRC_PORT_SET (GDM4_BASE + 0x33c)
#define REG_GDM4_SRC_PORT_SET (GDM4_BASE + 0x23c)
#define GDM4_SPORT_OFF2_MASK GENMASK(19, 16)
#define GDM4_SPORT_OFF1_MASK GENMASK(15, 12)
#define GDM4_SPORT_OFF0_MASK GENMASK(11, 8)
Expand Down
Loading

0 comments on commit d0bcd16

Please sign in to comment.