Added a new tx doorbell field in the uio path to work with new
bnx2x/cnic drivers that supports VF_RSS.

Signed-off-by: Eddie Wai <eddie....@broadcom.com>
---
 iscsiuio/src/unix/libs/bnx2x.c |   13 ++++++++++---
 iscsiuio/src/unix/libs/bnx2x.h |    9 ++++++++-
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c
index 36fc48e..748b59d 100644
--- a/iscsiuio/src/unix/libs/bnx2x.c
+++ b/iscsiuio/src/unix/libs/bnx2x.c
@@ -900,8 +900,14 @@ static int bnx2x_open(nic_t *nic)
                struct client_init_general_data *data = bp->bufs;
 
                bp->client_id = data->client_id;
-               if (data->reserved0)
-                       bp->cid = data->reserved0;
+               if (data->uid.cid)
+                       bp->cid = data->uid.cid;
+               if (bp->version.minor >= 78 && bp->version.sub_minor >= 55 &&
+                   data->uid.cid_override_key == UIO_USE_TX_DOORBELL) {
+                       bp->tx_doorbell = data->uid.tx_db_off;
+                       LOG_INFO(PFX "%s: tx doorbell override offset = 0x%x",
+                                nic->log_name, bp->tx_doorbell);
+               }
        }
 
        LOG_INFO(PFX "%s: func 0x%x, pfid 0x%x, client_id 0x%x, cid 0x%x",
@@ -928,7 +934,8 @@ static int bnx2x_open(nic_t *nic)
                     USTORM_RX_PRODS_E2_OFFSET(cl_qzone_id) :
                     USTORM_RX_PRODS_E1X_OFFSET(bp->port, bp->client_id));
 
-               bp->tx_doorbell = bp->cid * 0x80 + 0x40;
+               if (!bp->tx_doorbell)
+                       bp->tx_doorbell = bp->cid * 0x80 + 0x40;
 
                bp->get_rx_cons = bnx2x_get_rx_60;
                bp->get_tx_cons = bnx2x_get_tx_60;
diff --git a/iscsiuio/src/unix/libs/bnx2x.h b/iscsiuio/src/unix/libs/bnx2x.h
index 0b74e44..ce55cfc 100644
--- a/iscsiuio/src/unix/libs/bnx2x.h
+++ b/iscsiuio/src/unix/libs/bnx2x.h
@@ -382,6 +382,13 @@ union eth_rx_cqe_70 {
        struct eth_rx_cqe_next_page_70 next_page_cqe_70;
 };
 
+struct uio_init_data {
+       __u32 cid;
+       __u32 tx_db_off;
+       __u32 cid_override_key;
+#define UIO_USE_TX_DOORBELL    0x017855DB
+};
+
 struct client_init_general_data {
        __u8 client_id;
        __u8 statistics_counter_id;
@@ -394,7 +401,7 @@ struct client_init_general_data {
        __u8 func_id;
        __u8 cos;
        __u8 traffic_type;
-       __u32 reserved0;
+       struct uio_init_data uid;
 };
 
 /******************************************************************************
-- 
1.7.1

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to