From 6461b446f2a0f40c038f1d09c69d1e5565a84a43 Mon Sep 17 00:00:00 2001 From: Shannon Nelson Date: Tue, 3 Sep 2019 15:28:08 -0700 Subject: ionic: Add interrupts and doorbells The ionic interrupt model is based on interrupt control blocks accessed through the PCI BAR. Doorbell registers are used by the driver to signal to the NIC that requests are waiting on the message queues. Interrupts are used by the NIC to signal to the driver that answers are waiting on the completion queues. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller --- drivers/net/ethernet/pensando/ionic/ionic_dev.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/net/ethernet/pensando/ionic/ionic_dev.c') diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.c b/drivers/net/ethernet/pensando/ionic/ionic_dev.c index 01e922fa9366..dbdde548848e 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.c @@ -9,6 +9,7 @@ #include #include "ionic.h" #include "ionic_dev.h" +#include "ionic_lif.h" void ionic_init_devinfo(struct ionic *ionic) { @@ -260,3 +261,8 @@ void ionic_dev_cmd_lif_reset(struct ionic_dev *idev, u16 lif_index) ionic_dev_cmd_go(idev, &cmd); } + +int ionic_db_page_num(struct ionic_lif *lif, int pid) +{ + return (lif->hw_index * lif->dbid_count) + pid; +} -- cgit v1.2.3