Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77112
b: refs/heads/master
c: 8a4df12
h: refs/heads/master
v: v3
  • Loading branch information
Tomohiro Kusumi authored and James Bottomley committed Jan 23, 2008
1 parent 3b4ab9f commit d2aa40f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0937282036d9ae798e02c9c69a8b2ef044048855
refs/heads/master: 8a4df120b0712a12134d0d9435ccaec1c12b07a7
11 changes: 7 additions & 4 deletions trunk/drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1892,10 +1892,11 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
int error = -ENODEV, retval;
int i, hbq_count;
uint16_t iotag;
int bars = pci_select_bars(pdev, IORESOURCE_MEM);

if (pci_enable_device(pdev))
if (pci_enable_device_bars(pdev, bars))
goto out;
if (pci_request_regions(pdev, LPFC_DRIVER_NAME))
if (pci_request_selected_regions(pdev, bars, LPFC_DRIVER_NAME))
goto out_disable_device;

phba = kzalloc(sizeof (struct lpfc_hba), GFP_KERNEL);
Expand Down Expand Up @@ -2167,7 +2168,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
out_free_phba:
kfree(phba);
out_release_regions:
pci_release_regions(pdev);
pci_release_selected_regions(pdev, bars);
out_disable_device:
pci_disable_device(pdev);
out:
Expand All @@ -2183,6 +2184,8 @@ lpfc_pci_remove_one(struct pci_dev *pdev)
struct Scsi_Host *shost = pci_get_drvdata(pdev);
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
struct lpfc_hba *phba = vport->phba;
int bars = pci_select_bars(pdev, IORESOURCE_MEM);

spin_lock_irq(&phba->hbalock);
vport->load_flag |= FC_UNLOADING;
spin_unlock_irq(&phba->hbalock);
Expand Down Expand Up @@ -2241,7 +2244,7 @@ lpfc_pci_remove_one(struct pci_dev *pdev)

kfree(phba);

pci_release_regions(pdev);
pci_release_selected_regions(pdev, bars);
pci_disable_device(pdev);
}

Expand Down

0 comments on commit d2aa40f

Please sign in to comment.