Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fwctl/bnxt_en: Create an aux device for fwctl

Create an additional auxiliary device to support fwctl.
The next patch will create bnxt_fwctl and bind to this
device.

Link: https://patch.msgid.link/r/20260314151605.932749-4-pavan.chebbi@broadcom.com
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

authored by

Pavan Chebbi and committed by
Jason Gunthorpe
5102836d 2c7c85c8

+11 -2
+10 -2
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
··· 50 50 51 51 static struct bnxt_aux_device bnxt_aux_devices[__BNXT_AUXDEV_MAX] = {{ 52 52 .name = "rdma", 53 + }, { 54 + .name = "fwctl", 53 55 }}; 54 56 55 57 static void bnxt_fill_msix_vecs(struct bnxt *bp, struct bnxt_msix_entry *ent) ··· 280 278 aux_priv = bp->aux_priv[i]; 281 279 edev = bp->edev[i]; 282 280 mutex_lock(&edev->en_dev_lock); 281 + if (i == BNXT_AUXDEV_FWCTL) { 282 + edev->flags |= BNXT_EN_FLAG_ULP_STOPPED; 283 + mutex_unlock(&edev->en_dev_lock); 284 + continue; 285 + } 283 286 if (!bnxt_ulp_registered(edev) || 284 287 (edev->flags & BNXT_EN_FLAG_ULP_STOPPED)) { 285 288 mutex_unlock(&edev->en_dev_lock); ··· 323 316 aux_priv = bp->aux_priv[i]; 324 317 edev = bp->edev[i]; 325 318 mutex_lock(&edev->en_dev_lock); 326 - if (!bnxt_ulp_registered(edev) || 319 + if (i == BNXT_AUXDEV_FWCTL || !bnxt_ulp_registered(edev) || 327 320 !(edev->flags & BNXT_EN_FLAG_ULP_STOPPED)) { 328 321 goto clear_flag_continue; 329 322 } ··· 527 520 aux_dev = &bp->aux_priv[idx]->aux_dev; 528 521 rc = auxiliary_device_add(aux_dev); 529 522 if (rc) { 530 - netdev_warn(bp->dev, "Failed to add auxiliary device for ROCE\n"); 523 + netdev_warn(bp->dev, "Failed to add auxiliary device for auxdev type %d\n", 524 + idx); 531 525 auxiliary_device_uninit(aux_dev); 532 526 if (idx == BNXT_AUXDEV_RDMA) 533 527 bp->flags &= ~BNXT_FLAG_ROCE_CAP;
+1
include/linux/bnxt/ulp.h
··· 24 24 25 25 enum bnxt_auxdev_type { 26 26 BNXT_AUXDEV_RDMA = 0, 27 + BNXT_AUXDEV_FWCTL, 27 28 __BNXT_AUXDEV_MAX 28 29 }; 29 30