diff options
| author | Brett Creeley <brett.creeley@amd.com> | 2024-06-18 17:32:57 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-19 18:31:49 -0700 |
| commit | da0262c2c931eff97714ec1e89827796b783d234 (patch) | |
| tree | 4e3e8e8115489a1f60d0fa95dadd0c9ac292a4ee /drivers/net/ethernet/pensando/ionic/ionic_dev.c | |
| parent | ionic: Use an u16 for rx_copybreak (diff) | |
| download | linux-da0262c2c931eff97714ec1e89827796b783d234.tar.gz linux-da0262c2c931eff97714ec1e89827796b783d234.zip | |
ionic: Only run the doorbell workaround for certain asic_type
If the doorbell workaround isn't required for a certain
asic_type then there is no need to run the associated
code. Since newer FW versions are finally reporting their
asic_type we can use a flag to determine whether or not to
do the workaround.
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://lore.kernel.org/r/20240619003257.6138-9-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_dev.c')
| -rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_dev.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.c b/drivers/net/ethernet/pensando/ionic/ionic_dev.c index ec36ace6d010..9e42d599840d 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.c @@ -128,6 +128,13 @@ static void ionic_doorbell_check_dwork(struct work_struct *work) ionic_queue_doorbell_check(ionic, IONIC_NAPI_DEADLINE); } +bool ionic_doorbell_wa(struct ionic *ionic) +{ + u8 asic_type = ionic->idev.dev_info.asic_type; + + return !asic_type || asic_type == IONIC_ASIC_TYPE_ELBA; +} + static int ionic_watchdog_init(struct ionic *ionic) { struct ionic_dev *idev = &ionic->idev; @@ -151,8 +158,10 @@ static int ionic_watchdog_init(struct ionic *ionic) dev_err(ionic->dev, "alloc_workqueue failed"); return -ENOMEM; } - INIT_DELAYED_WORK(&ionic->doorbell_check_dwork, - ionic_doorbell_check_dwork); + + if (ionic_doorbell_wa(ionic)) + INIT_DELAYED_WORK(&ionic->doorbell_check_dwork, + ionic_doorbell_check_dwork); return 0; } @@ -161,6 +170,9 @@ void ionic_queue_doorbell_check(struct ionic *ionic, int delay) { int cpu; + if (!ionic->lif->doorbell_wa) + return; + cpu = ionic_get_preferred_cpu(ionic, &ionic->lif->adminqcq->intr); queue_delayed_work_on(cpu, ionic->wq, &ionic->doorbell_check_dwork, delay); |
