Commit ae0eef66 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

cnic: Fix mmap regression.

commit 1f85d58c
    cnic: Remove uio mem[0].

introduced a regression as older versions of userspace app still rely
on this mmap.  Restore the mmap functionality and get the base address
from pci_resource_start() as the nedev->base_addr has been deprecated for
PCI devices.

Update version to 2.5.12.
Signed-off-by: default avatarMichael Chan <mchan@broadocm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7a9bc9b8
...@@ -1063,9 +1063,13 @@ static int cnic_init_uio(struct cnic_dev *dev) ...@@ -1063,9 +1063,13 @@ static int cnic_init_uio(struct cnic_dev *dev)
uinfo = &udev->cnic_uinfo; uinfo = &udev->cnic_uinfo;
uinfo->mem[0].memtype = UIO_MEM_NONE; uinfo->mem[0].addr = pci_resource_start(dev->pcidev, 0);
uinfo->mem[0].internal_addr = dev->regview;
uinfo->mem[0].memtype = UIO_MEM_PHYS;
if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) { if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) {
uinfo->mem[0].size = MB_GET_CID_ADDR(TX_TSS_CID +
TX_MAX_TSS_RINGS + 1);
uinfo->mem[1].addr = (unsigned long) cp->status_blk.gen & uinfo->mem[1].addr = (unsigned long) cp->status_blk.gen &
PAGE_MASK; PAGE_MASK;
if (cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX) if (cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)
...@@ -1075,6 +1079,8 @@ static int cnic_init_uio(struct cnic_dev *dev) ...@@ -1075,6 +1079,8 @@ static int cnic_init_uio(struct cnic_dev *dev)
uinfo->name = "bnx2_cnic"; uinfo->name = "bnx2_cnic";
} else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) { } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
uinfo->mem[0].size = pci_resource_len(dev->pcidev, 0);
uinfo->mem[1].addr = (unsigned long) cp->bnx2x_def_status_blk & uinfo->mem[1].addr = (unsigned long) cp->bnx2x_def_status_blk &
PAGE_MASK; PAGE_MASK;
uinfo->mem[1].size = sizeof(*cp->bnx2x_def_status_blk); uinfo->mem[1].size = sizeof(*cp->bnx2x_def_status_blk);
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include "bnx2x/bnx2x_mfw_req.h" #include "bnx2x/bnx2x_mfw_req.h"
#define CNIC_MODULE_VERSION "2.5.11" #define CNIC_MODULE_VERSION "2.5.12"
#define CNIC_MODULE_RELDATE "June 27, 2012" #define CNIC_MODULE_RELDATE "June 29, 2012"
#define CNIC_ULP_RDMA 0 #define CNIC_ULP_RDMA 0
#define CNIC_ULP_ISCSI 1 #define CNIC_ULP_ISCSI 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment