Skip to contentSkip to conversation

cnic: Add a signature to indicate valid doorbell offset.

PATCH Applied Michael Chan 2 participants 2 messages Jan 1, 2014 – Jan 2, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cnic: Add a signature to indicate valid doorbell offset.

From: Eddie Wai <[email protected]>

The buffer that is used to pass doorbell offset to the userspace UIO driver may contain nonzero value in older versions of bnx2x driver. Userspace cannot easily tell whether it contains a valid doorbell offset or not. With the added signature, userspace will only use the doorbell offset if the signature is present.

Update version to 2.5.19.

---
 drivers/net/ethernet/broadcom/cnic.c    |    1 +
 drivers/net/ethernet/broadcom/cnic.h    |    2 ++
 drivers/net/ethernet/broadcom/cnic_if.h |    4 ++--
 3 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/cnic.c +1 -0
index f58a8b8..fcf9105 100644
@@ -5220,6 +5220,7 @@ static void cnic_init_rings(struct cnic_dev *dev)
 		cnic_ring_ctl(dev, cid, cli, 1);
 		*cid_ptr = cid >> 4;
 		*(cid_ptr + 1) = cid * bp->db_size;
+		*(cid_ptr + 2) = UIO_USE_TX_DOORBELL;
 	}
 }
 
drivers/net/ethernet/broadcom/cnic.h +2 -0
index 0121a5d..0d6b13f 100644
@@ -186,6 +186,8 @@ struct kcq_info {
 	u16		(*hw_idx)(u16);
 };
 
+#define UIO_USE_TX_DOORBELL 0x017855DB
+
 struct cnic_uio_dev {
 	struct uio_info		cnic_uinfo;
 	u32			uio_dev;
drivers/net/ethernet/broadcom/cnic_if.h +2 -2
index ebbfe25..8cf6b19 100644
@@ -14,8 +14,8 @@
 
 #include "bnx2x/bnx2x_mfw_req.h"
 
-#define CNIC_MODULE_VERSION	"2.5.18"
-#define CNIC_MODULE_RELDATE	"Sept 01, 2013"
+#define CNIC_MODULE_VERSION	"2.5.19"
+#define CNIC_MODULE_RELDATE	"December 19, 2013"
 
 #define CNIC_ULP_RDMA		0
 #define CNIC_ULP_ISCSI		1
Signature · 1 line
1.7.1
maintainer Applied
#1 lore raw

From: Michael Chan <[email protected]>
Date: Tue, 31 Dec 2013 23:18:34 -0800

Quoted 8 lines

From: Eddie Wai <[email protected]>

The buffer that is used to pass doorbell offset to the userspace UIO driver may contain nonzero value in older versions of bnx2x driver. Userspace cannot easily tell whether it contains a valid doorbell offset or not. With the added signature, userspace will only use the doorbell offset if the signature is present.

Quoted 4 lines

Update version to 2.5.19.

Applied, thanks.