Messages in this thread Patch in this message | | | Date | Wed, 07 Jun 2006 12:15:34 +0900 | From | Kenji Kaneshige <> | Subject | [PATCH 4/4] Make Emulex lpfc driver legacy I/O port free |
| |
This patch makes Emulex lpfc driver legacy I/O port free.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
--- drivers/scsi/lpfc/lpfc_init.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
Index: linux-2.6.17-rc6/drivers/scsi/lpfc/lpfc_init.c =================================================================== --- linux-2.6.17-rc6.orig/drivers/scsi/lpfc/lpfc_init.c 2006-06-06 21:39:11.000000000 +0900 +++ linux-2.6.17-rc6/drivers/scsi/lpfc/lpfc_init.c 2006-06-06 21:56:56.000000000 +0900 @@ -1425,10 +1425,11 @@ int error = -ENODEV, retval; int i; 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; host = scsi_host_alloc(&lpfc_template, sizeof (struct lpfc_hba)); @@ -1720,7 +1721,7 @@ phba->host = NULL; scsi_host_put(host); out_release_regions: - pci_release_regions(pdev); + pci_release_selected_regions(pdev, bars); out_disable_device: pci_disable_device(pdev); out: @@ -1734,6 +1735,7 @@ struct Scsi_Host *host = pci_get_drvdata(pdev); struct lpfc_hba *phba = (struct lpfc_hba *)host->hostdata; unsigned long iflag; + int bars = pci_select_bars(pdev, IORESOURCE_MEM); lpfc_free_sysfs_attr(phba); @@ -1777,7 +1779,7 @@ iounmap(phba->ctrl_regs_memmap_p); iounmap(phba->slim_memmap_p); - pci_release_regions(phba->pcidev); + pci_release_selected_regions(phba->pcidev, bars); pci_disable_device(phba->pcidev); idr_remove(&lpfc_hba_index, phba->brd_no); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |