Skip to content

Commit

Permalink
cnic: Add a signature to indicate valid doorbell offset.
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eddie Wai authored and David S. Miller committed Jan 2, 2014
1 parent 487d9ed commit d15e2a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/broadcom/cnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/broadcom/cnic_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d15e2a9

Please sign in to comment.