All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ariel Elior <Ariel.Elior@cavium.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, Ariel Elior <Ariel.Elior@cavium.com>,
	"Michal Kalderon" <Michal.Kalderon@cavium.com>,
	Tomer Tayar <Tomer.Tayar@cavium.com>
Subject: [PATCH net-next v2 5/6] qed: Expose the doorbell overflow recovery mechanism to the protocol drivers
Date: Mon, 22 Oct 2018 19:40:44 +0300	[thread overview]
Message-ID: <20181022164045.25393-6-Ariel.Elior@cavium.com> (raw)
In-Reply-To: <20181022164045.25393-1-Ariel.Elior@cavium.com>

Most of the doorbelling entities are outside of the core module.
L2 queues, Roce queues, iscsi and fcoe all need to register.
Make the APIs available for these drivers.

Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_main.c |  2 ++
 include/linux/qed/qed_if.h                 | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index f2c50ef..a0b761d 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -2238,6 +2238,8 @@ static int qed_read_module_eeprom(struct qed_dev *cdev, char *buf,
 	.update_mac = &qed_update_mac,
 	.update_mtu = &qed_update_mtu,
 	.update_wol = &qed_update_wol,
+	.db_recovery_add = &qed_db_recovery_add,
+	.db_recovery_del = &qed_db_recovery_del,
 	.read_module_eeprom = &qed_read_module_eeprom,
 };
 
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index afb2e4c..cb0f344 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -1017,6 +1017,33 @@ struct qed_common_ops {
  */
 	int (*set_led)(struct qed_dev *cdev,
 		       enum qed_led_mode mode);
+/**
+ * @brief db_recovery_add - add doorbell information to the doorbell
+ * recovery mechanism.
+ *
+ * @param cdev
+ * @param db_addr - doorbell address
+ * @param db_data - address of where db_data is stored
+ * @param db_is_32b - doorbell is 32b pr 64b
+ * @param db_is_user - doorbell recovery addresses are user or kernel space
+ */
+	int (*db_recovery_add)(struct qed_dev *cdev,
+			       void __iomem *db_addr,
+			       void *db_data,
+			       enum qed_db_rec_width db_width,
+			       enum qed_db_rec_space db_space);
+
+/**
+ * @brief db_recovery_del - remove doorbell information from the doorbell
+ * recovery mechanism. db_data serves as key (db_addr is not unique).
+ *
+ * @param cdev
+ * @param db_addr - doorbell address
+ * @param db_data - address where db_data is stored. Serves as key for the
+ *		    entry to delete.
+ */
+	int (*db_recovery_del)(struct qed_dev *cdev,
+			       void __iomem *db_addr, void *db_data);
 
 /**
  * @brief update_drv_state - API to inform the change in the driver state.
-- 
1.8.3.1

  parent reply	other threads:[~2018-10-23  1:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 16:40 [PATCH net-next 0/6 v2] qed*: Doorbell overflow recovery Ariel Elior
2018-10-22 16:40 ` [PATCH net-next v2 1/6] qed: Add doorbell overflow recovery mechanism Ariel Elior
2018-10-23  3:05   ` David Miller
2018-10-23  5:16     ` Elior, Ariel
2018-10-22 16:40 ` [PATCH net-next v2 2/6] qed: Use the doorbell overflow recovery mechanism in case of doorbell overflow Ariel Elior
2018-10-22 16:40 ` [PATCH net-next v2 3/6] qed: Register slowpath queue doorbell with doorbell overflow recovery mechanism Ariel Elior
2018-10-22 16:40 ` [PATCH net-next v2 4/6] qed: Register light L2 queues " Ariel Elior
2018-10-22 16:40 ` Ariel Elior [this message]
2018-10-22 16:40 ` [PATCH net-next v2 6/6] qede: Register l2 " Ariel Elior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181022164045.25393-6-Ariel.Elior@cavium.com \
    --to=ariel.elior@cavium.com \
    --cc=Michal.Kalderon@cavium.com \
    --cc=Tomer.Tayar@cavium.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.