|
|
786c6d |
From 77245b944b7d14a4e139984c3773e994c6ef6703 Mon Sep 17 00:00:00 2001
|
|
|
786c6d |
From: Eddie Wai <eddie.wai@broadcom.com>
|
|
|
786c6d |
Date: Wed, 11 Dec 2013 15:38:12 -0800
|
|
|
786c6d |
Subject: [PATCH] ISCSIUIO: Added tx doorbell override mechanism
|
|
|
786c6d |
|
|
|
786c6d |
Added a new tx doorbell field in the uio path to work with new
|
|
|
786c6d |
bnx2x/cnic drivers that supports VF_RSS.
|
|
|
786c6d |
|
|
|
786c6d |
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
|
|
|
786c6d |
---
|
|
|
786c6d |
iscsiuio/src/unix/libs/bnx2x.c | 13 ++++++++++---
|
|
|
786c6d |
iscsiuio/src/unix/libs/bnx2x.h | 9 ++++++++-
|
|
|
786c6d |
2 files changed, 18 insertions(+), 4 deletions(-)
|
|
|
786c6d |
|
|
|
786c6d |
diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c
|
|
|
786c6d |
index 36fc48e..748b59d 100644
|
|
|
786c6d |
--- a/iscsiuio/src/unix/libs/bnx2x.c
|
|
|
786c6d |
+++ b/iscsiuio/src/unix/libs/bnx2x.c
|
|
|
786c6d |
@@ -900,8 +900,14 @@ static int bnx2x_open(nic_t *nic)
|
|
|
786c6d |
struct client_init_general_data *data = bp->bufs;
|
|
|
786c6d |
|
|
|
786c6d |
bp->client_id = data->client_id;
|
|
|
786c6d |
- if (data->reserved0)
|
|
|
786c6d |
- bp->cid = data->reserved0;
|
|
|
786c6d |
+ if (data->uid.cid)
|
|
|
786c6d |
+ bp->cid = data->uid.cid;
|
|
|
786c6d |
+ if (bp->version.minor >= 78 && bp->version.sub_minor >= 55 &&
|
|
|
786c6d |
+ data->uid.cid_override_key == UIO_USE_TX_DOORBELL) {
|
|
|
786c6d |
+ bp->tx_doorbell = data->uid.tx_db_off;
|
|
|
786c6d |
+ LOG_INFO(PFX "%s: tx doorbell override offset = 0x%x",
|
|
|
786c6d |
+ nic->log_name, bp->tx_doorbell);
|
|
|
786c6d |
+ }
|
|
|
786c6d |
}
|
|
|
786c6d |
|
|
|
786c6d |
LOG_INFO(PFX "%s: func 0x%x, pfid 0x%x, client_id 0x%x, cid 0x%x",
|
|
|
786c6d |
@@ -928,7 +934,8 @@ static int bnx2x_open(nic_t *nic)
|
|
|
786c6d |
USTORM_RX_PRODS_E2_OFFSET(cl_qzone_id) :
|
|
|
786c6d |
USTORM_RX_PRODS_E1X_OFFSET(bp->port, bp->client_id));
|
|
|
786c6d |
|
|
|
786c6d |
- bp->tx_doorbell = bp->cid * 0x80 + 0x40;
|
|
|
786c6d |
+ if (!bp->tx_doorbell)
|
|
|
786c6d |
+ bp->tx_doorbell = bp->cid * 0x80 + 0x40;
|
|
|
786c6d |
|
|
|
786c6d |
bp->get_rx_cons = bnx2x_get_rx_60;
|
|
|
786c6d |
bp->get_tx_cons = bnx2x_get_tx_60;
|
|
|
786c6d |
diff --git a/iscsiuio/src/unix/libs/bnx2x.h b/iscsiuio/src/unix/libs/bnx2x.h
|
|
|
786c6d |
index 0b74e44..ce55cfc 100644
|
|
|
786c6d |
--- a/iscsiuio/src/unix/libs/bnx2x.h
|
|
|
786c6d |
+++ b/iscsiuio/src/unix/libs/bnx2x.h
|
|
|
786c6d |
@@ -382,6 +382,13 @@ union eth_rx_cqe_70 {
|
|
|
786c6d |
struct eth_rx_cqe_next_page_70 next_page_cqe_70;
|
|
|
786c6d |
};
|
|
|
786c6d |
|
|
|
786c6d |
+struct uio_init_data {
|
|
|
786c6d |
+ __u32 cid;
|
|
|
786c6d |
+ __u32 tx_db_off;
|
|
|
786c6d |
+ __u32 cid_override_key;
|
|
|
786c6d |
+#define UIO_USE_TX_DOORBELL 0x017855DB
|
|
|
786c6d |
+};
|
|
|
786c6d |
+
|
|
|
786c6d |
struct client_init_general_data {
|
|
|
786c6d |
__u8 client_id;
|
|
|
786c6d |
__u8 statistics_counter_id;
|
|
|
786c6d |
@@ -394,7 +401,7 @@ struct client_init_general_data {
|
|
|
786c6d |
__u8 func_id;
|
|
|
786c6d |
__u8 cos;
|
|
|
786c6d |
__u8 traffic_type;
|
|
|
786c6d |
- __u32 reserved0;
|
|
|
786c6d |
+ struct uio_init_data uid;
|
|
|
786c6d |
};
|
|
|
786c6d |
|
|
|
786c6d |
/******************************************************************************
|
|
|
786c6d |
--
|
|
|
786c6d |
1.8.3.1
|
|
|
786c6d |
|