[SCSI] bnx2i: Removed the reference to the netdev->base_addr
The netdev->base_addr parameter has been deprecated in the L2 bnx2 driver. This is used by bnx2i for the BARn iomapping. This patch will directly reference the pci_resource_start instead of using the deprecated netdev->base_addr. This patch is actually a critical bug fix as the 1G bnx2 driver no longer supports the netdev->base_addr in the current kernel of the scsi tree. This means that Broadcom's 1G Linux iSCSI offload solution would not work at all without this patch. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
committed by
James Bottomley
parent
6ef1b512f4
commit
a771718065
@@ -811,13 +811,13 @@ struct bnx2i_hba *bnx2i_alloc_hba(struct cnic_dev *cnic)
|
||||
bnx2i_identify_device(hba);
|
||||
bnx2i_setup_host_queue_size(hba, shost);
|
||||
|
||||
hba->reg_base = pci_resource_start(hba->pcidev, 0);
|
||||
if (test_bit(BNX2I_NX2_DEV_5709, &hba->cnic_dev_type)) {
|
||||
hba->regview = ioremap_nocache(hba->netdev->base_addr,
|
||||
BNX2_MQ_CONFIG2);
|
||||
hba->regview = pci_iomap(hba->pcidev, 0, BNX2_MQ_CONFIG2);
|
||||
if (!hba->regview)
|
||||
goto ioreg_map_err;
|
||||
} else if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) {
|
||||
hba->regview = ioremap_nocache(hba->netdev->base_addr, 4096);
|
||||
hba->regview = pci_iomap(hba->pcidev, 0, 4096);
|
||||
if (!hba->regview)
|
||||
goto ioreg_map_err;
|
||||
}
|
||||
@@ -884,7 +884,7 @@ cid_que_err:
|
||||
bnx2i_free_mp_bdt(hba);
|
||||
mp_bdt_mem_err:
|
||||
if (hba->regview) {
|
||||
iounmap(hba->regview);
|
||||
pci_iounmap(hba->pcidev, hba->regview);
|
||||
hba->regview = NULL;
|
||||
}
|
||||
ioreg_map_err:
|
||||
@@ -910,7 +910,7 @@ void bnx2i_free_hba(struct bnx2i_hba *hba)
|
||||
pci_dev_put(hba->pcidev);
|
||||
|
||||
if (hba->regview) {
|
||||
iounmap(hba->regview);
|
||||
pci_iounmap(hba->pcidev, hba->regview);
|
||||
hba->regview = NULL;
|
||||
}
|
||||
bnx2i_free_mp_bdt(hba);
|
||||
|
||||
Reference in New Issue
Block a user