aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2i
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-19 14:17:30 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-19 14:17:30 -0400
commitabaa72d7fd9a20a67b62e6afa0e746e27851dc33 (patch)
treeebe4134fcc93a6e205e6004b3e652d7a62281651 /drivers/scsi/bnx2i
parent67da22d23fa6f3324e03bcd0580b914b2e4afbf3 (diff)
parent3e4b9459fb0e149c6b74c9e89399a8fc39a92b44 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
Diffstat (limited to 'drivers/scsi/bnx2i')
-rw-r--r--drivers/scsi/bnx2i/bnx2i.h1
-rw-r--r--drivers/scsi/bnx2i/bnx2i_hwi.c3
-rw-r--r--drivers/scsi/bnx2i/bnx2i_iscsi.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h
index 2e326145825c..3f9e7061258e 100644
--- a/drivers/scsi/bnx2i/bnx2i.h
+++ b/drivers/scsi/bnx2i/bnx2i.h
@@ -400,6 +400,7 @@ struct bnx2i_hba {
400 struct pci_dev *pcidev; 400 struct pci_dev *pcidev;
401 struct net_device *netdev; 401 struct net_device *netdev;
402 void __iomem *regview; 402 void __iomem *regview;
403 resource_size_t reg_base;
403 404
404 u32 age; 405 u32 age;
405 unsigned long cnic_dev_type; 406 unsigned long cnic_dev_type;
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index 49e8b056ca10..33d6630529de 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -2741,7 +2741,6 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep)
2741 goto arm_cq; 2741 goto arm_cq;
2742 } 2742 }
2743 2743
2744 reg_base = ep->hba->netdev->base_addr;
2745 if ((test_bit(BNX2I_NX2_DEV_5709, &ep->hba->cnic_dev_type)) && 2744 if ((test_bit(BNX2I_NX2_DEV_5709, &ep->hba->cnic_dev_type)) &&
2746 (ep->hba->mail_queue_access == BNX2I_MQ_BIN_MODE)) { 2745 (ep->hba->mail_queue_access == BNX2I_MQ_BIN_MODE)) {
2747 config2 = REG_RD(ep->hba, BNX2_MQ_CONFIG2); 2746 config2 = REG_RD(ep->hba, BNX2_MQ_CONFIG2);
@@ -2757,7 +2756,7 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep)
2757 /* 5709 device in normal node and 5706/5708 devices */ 2756 /* 5709 device in normal node and 5706/5708 devices */
2758 reg_off = CTX_OFFSET + (MB_KERNEL_CTX_SIZE * cid_num); 2757 reg_off = CTX_OFFSET + (MB_KERNEL_CTX_SIZE * cid_num);
2759 2758
2760 ep->qp.ctx_base = ioremap_nocache(reg_base + reg_off, 2759 ep->qp.ctx_base = ioremap_nocache(ep->hba->reg_base + reg_off,
2761 MB_KERNEL_CTX_SIZE); 2760 MB_KERNEL_CTX_SIZE);
2762 if (!ep->qp.ctx_base) 2761 if (!ep->qp.ctx_base)
2763 return -ENOMEM; 2762 return -ENOMEM;
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index b40ac017012c..3b34c13e2f02 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -811,13 +811,13 @@ struct bnx2i_hba *bnx2i_alloc_hba(struct cnic_dev *cnic)
811 bnx2i_identify_device(hba); 811 bnx2i_identify_device(hba);
812 bnx2i_setup_host_queue_size(hba, shost); 812 bnx2i_setup_host_queue_size(hba, shost);
813 813
814 hba->reg_base = pci_resource_start(hba->pcidev, 0);
814 if (test_bit(BNX2I_NX2_DEV_5709, &hba->cnic_dev_type)) { 815 if (test_bit(BNX2I_NX2_DEV_5709, &hba->cnic_dev_type)) {
815 hba->regview = ioremap_nocache(hba->netdev->base_addr, 816 hba->regview = pci_iomap(hba->pcidev, 0, BNX2_MQ_CONFIG2);
816 BNX2_MQ_CONFIG2);
817 if (!hba->regview) 817 if (!hba->regview)
818 goto ioreg_map_err; 818 goto ioreg_map_err;
819 } else if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) { 819 } else if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) {
820 hba->regview = ioremap_nocache(hba->netdev->base_addr, 4096); 820 hba->regview = pci_iomap(hba->pcidev, 0, 4096);
821 if (!hba->regview) 821 if (!hba->regview)
822 goto ioreg_map_err; 822 goto ioreg_map_err;
823 } 823 }
@@ -889,7 +889,7 @@ cid_que_err:
889 bnx2i_free_mp_bdt(hba); 889 bnx2i_free_mp_bdt(hba);
890mp_bdt_mem_err: 890mp_bdt_mem_err:
891 if (hba->regview) { 891 if (hba->regview) {
892 iounmap(hba->regview); 892 pci_iounmap(hba->pcidev, hba->regview);
893 hba->regview = NULL; 893 hba->regview = NULL;
894 } 894 }
895ioreg_map_err: 895ioreg_map_err:
@@ -915,7 +915,7 @@ void bnx2i_free_hba(struct bnx2i_hba *hba)
915 pci_dev_put(hba->pcidev); 915 pci_dev_put(hba->pcidev);
916 916
917 if (hba->regview) { 917 if (hba->regview) {
918 iounmap(hba->regview); 918 pci_iounmap(hba->pcidev, hba->regview);
919 hba->regview = NULL; 919 hba->regview = NULL;
920 } 920 }
921 bnx2i_free_mp_bdt(hba); 921 bnx2i_free_mp_bdt(hba);