summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/pensando/ionic/ionic_lif.c
diff options
context:
space:
mode:
authorShannon Nelson <snelson@pensando.io>2020-03-06 17:04:07 -0800
committerDavid S. Miller <davem@davemloft.net>2020-03-09 19:34:04 -0700
commitb3f064e9746dbc569fef58975ae435b89737ad59 (patch)
tree84934049f6884379dc728e137bebf9808e6d6623 /drivers/net/ethernet/pensando/ionic/ionic_lif.c
parentc220e52396772eac5b26de4540c87be8b632e20a (diff)
ionic: add support for device id 0x1004
Add support for the management port device id. This is to capture the device and set it up for devlink use, but not set it up for network operations. We still use a netdev object in order to use the napi infrasucture for processing adminq and notifyq messages, we just don't register the netdev. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_lif.c')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_lif.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 4b953f9e9084..aaf4a40fa98b 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1155,6 +1155,10 @@ static int ionic_init_nic_features(struct ionic_lif *lif)
netdev_features_t features;
int err;
+ /* no netdev features on the management device */
+ if (lif->ionic->is_mgmt_nic)
+ return 0;
+
/* set up what we expect to support by default */
features = NETIF_F_HW_VLAN_CTAG_TX |
NETIF_F_HW_VLAN_CTAG_RX |
@@ -2383,6 +2387,12 @@ int ionic_lifs_register(struct ionic *ionic)
{
int err;
+ /* the netdev is not registered on the management device, it is
+ * only used as a vehicle for napi operations on the adminq
+ */
+ if (ionic->is_mgmt_nic)
+ return 0;
+
INIT_WORK(&ionic->nb_work, ionic_lif_notify_work);
ionic->nb.notifier_call = ionic_lif_notify;