mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 14:02:06 -04:00
ionic: Add basic framework for IONIC Network device driver
This patch adds a basic driver framework for the Pensando IONIC network device. There is no functionality right now other than the ability to load and unload. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7d5aa9a524
commit
df69ba4321
35
drivers/net/ethernet/pensando/ionic/ionic_devlink.c
Normal file
35
drivers/net/ethernet/pensando/ionic/ionic_devlink.c
Normal file
@@ -0,0 +1,35 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
#include "ionic.h"
|
||||
#include "ionic_bus.h"
|
||||
#include "ionic_devlink.h"
|
||||
|
||||
static int ionic_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
return devlink_info_driver_name_put(req, IONIC_DRV_NAME);
|
||||
}
|
||||
|
||||
static const struct devlink_ops ionic_dl_ops = {
|
||||
.info_get = ionic_dl_info_get,
|
||||
};
|
||||
|
||||
struct ionic *ionic_devlink_alloc(struct device *dev)
|
||||
{
|
||||
struct devlink *dl;
|
||||
|
||||
dl = devlink_alloc(&ionic_dl_ops, sizeof(struct ionic));
|
||||
|
||||
return devlink_priv(dl);
|
||||
}
|
||||
|
||||
void ionic_devlink_free(struct ionic *ionic)
|
||||
{
|
||||
struct devlink *dl = priv_to_devlink(ionic);
|
||||
|
||||
devlink_free(dl);
|
||||
}
|
||||
Reference in New Issue
Block a user