]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
eth: bnxt: always set the queue mgmt ops
authorJakub Kicinski <kuba@kernel.org>
Thu, 22 Jan 2026 00:51:08 +0000 (16:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Jan 2026 19:49:01 +0000 (11:49 -0800)
Core provides a centralized callback for validating per-queue settings
but the callback is part of the queue management ops. Having the ops
conditionally set complicates the parts of the driver which could
otherwise lean on the core to feed it the correct settings.

Always set the queue ops, but provide no restart-related callbacks if
queue ops are not supported by the device. This should maintain current
behavior, the check in netdev_rx_queue_restart() looks both at op struct
and individual ops.

Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
Link: https://patch.msgid.link/20260122005113.2476634-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 0e0c88c122f8163971ec6c9682936f93dd1adf50..0b95100a7c361c0aeaf4c827ee0ae1480801452e 100644 (file)
@@ -16314,6 +16314,9 @@ static const struct netdev_queue_mgmt_ops bnxt_queue_mgmt_ops = {
        .supported_params       = QCFG_RX_PAGE_SIZE,
 };
 
+static const struct netdev_queue_mgmt_ops bnxt_queue_mgmt_ops_unsupp = {
+};
+
 static void bnxt_remove_one(struct pci_dev *pdev)
 {
        struct net_device *dev = pci_get_drvdata(pdev);
@@ -16966,9 +16969,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        if (BNXT_SUPPORTS_NTUPLE_VNIC(bp))
                bp->rss_cap |= BNXT_RSS_CAP_MULTI_RSS_CTX;
+
+       dev->queue_mgmt_ops = &bnxt_queue_mgmt_ops_unsupp;
        if (BNXT_SUPPORTS_QUEUE_API(bp))
                dev->queue_mgmt_ops = &bnxt_queue_mgmt_ops;
-       dev->request_ops_lock = true;
        dev->netmem_tx = true;
 
        rc = register_netdev(dev);