Skip to content

Commit 0e1f104

Browse files
Ariel Eliordavem330
authored andcommitted
qed: Expose the doorbell overflow recovery mechanism to the protocol drivers
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b78d540 commit 0e1f104

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎drivers/net/ethernet/qlogic/qed/qed_main.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,6 +2384,8 @@ const struct qed_common_ops qed_common_ops_pass = {
23842384
.update_mac = &qed_update_mac,
23852385
.update_mtu = &qed_update_mtu,
23862386
.update_wol = &qed_update_wol,
2387+
.db_recovery_add = &qed_db_recovery_add,
2388+
.db_recovery_del = &qed_db_recovery_del,
23872389
.read_module_eeprom = &qed_read_module_eeprom,
23882390
};
23892391

‎include/linux/qed/qed_if.h‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,33 @@ struct qed_common_ops {
10291029
*/
10301030
int (*set_led)(struct qed_dev *cdev,
10311031
enum qed_led_mode mode);
1032+
/**
1033+
* @brief db_recovery_add - add doorbell information to the doorbell
1034+
* recovery mechanism.
1035+
*
1036+
* @param cdev
1037+
* @param db_addr - doorbell address
1038+
* @param db_data - address of where db_data is stored
1039+
* @param db_is_32b - doorbell is 32b pr 64b
1040+
* @param db_is_user - doorbell recovery addresses are user or kernel space
1041+
*/
1042+
int (*db_recovery_add)(struct qed_dev *cdev,
1043+
void __iomem *db_addr,
1044+
void *db_data,
1045+
enum qed_db_rec_width db_width,
1046+
enum qed_db_rec_space db_space);
1047+
1048+
/**
1049+
* @brief db_recovery_del - remove doorbell information from the doorbell
1050+
* recovery mechanism. db_data serves as key (db_addr is not unique).
1051+
*
1052+
* @param cdev
1053+
* @param db_addr - doorbell address
1054+
* @param db_data - address where db_data is stored. Serves as key for the
1055+
* entry to delete.
1056+
*/
1057+
int (*db_recovery_del)(struct qed_dev *cdev,
1058+
void __iomem *db_addr, void *db_data);
10321059

10331060
/**
10341061
* @brief update_drv_state - API to inform the change in the driver state.

0 commit comments

Comments
 (0)