aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/cnic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index c95e7b5e2b85..3c95065e0def 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -1053,12 +1053,13 @@ static int cnic_init_uio(struct cnic_dev *dev)
1053 1053
1054 uinfo = &udev->cnic_uinfo; 1054 uinfo = &udev->cnic_uinfo;
1055 1055
1056 uinfo->mem[0].addr = dev->netdev->base_addr; 1056 uinfo->mem[0].addr = pci_resource_start(dev->pcidev, 0);
1057 uinfo->mem[0].internal_addr = dev->regview; 1057 uinfo->mem[0].internal_addr = dev->regview;
1058 uinfo->mem[0].size = dev->netdev->mem_end - dev->netdev->mem_start;
1059 uinfo->mem[0].memtype = UIO_MEM_PHYS; 1058 uinfo->mem[0].memtype = UIO_MEM_PHYS;
1060 1059
1061 if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) { 1060 if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) {
1061 uinfo->mem[0].size = MB_GET_CID_ADDR(TX_TSS_CID +
1062 TX_MAX_TSS_RINGS + 1);
1062 uinfo->mem[1].addr = (unsigned long) cp->status_blk.gen & 1063 uinfo->mem[1].addr = (unsigned long) cp->status_blk.gen &
1063 PAGE_MASK; 1064 PAGE_MASK;
1064 if (cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX) 1065 if (cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)
@@ -1068,6 +1069,8 @@ static int cnic_init_uio(struct cnic_dev *dev)
1068 1069
1069 uinfo->name = "bnx2_cnic"; 1070 uinfo->name = "bnx2_cnic";
1070 } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) { 1071 } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
1072 uinfo->mem[0].size = pci_resource_len(dev->pcidev, 0);
1073
1071 uinfo->mem[1].addr = (unsigned long) cp->bnx2x_def_status_blk & 1074 uinfo->mem[1].addr = (unsigned long) cp->bnx2x_def_status_blk &
1072 PAGE_MASK; 1075 PAGE_MASK;
1073 uinfo->mem[1].size = sizeof(*cp->bnx2x_def_status_blk); 1076 uinfo->mem[1].size = sizeof(*cp->bnx2x_def_status_blk);