* [PATCH 7/22] lpfc 8.1.2 : Fixed system panic in lpfc_sli_brdreset during dynamic add of LP11K
@ 2006-02-08 15:41 James Smart
0 siblings, 0 replies; 2+ messages in thread
From: James Smart @ 2006-02-08 15:41 UTC (permalink / raw)
To: linux-scsi
Fixed system panic in lpfc_sli_brdreset during dynamic add of LP11K
Signed-off-by: James Smart <James.Smart@emulex.com>
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1462,9 +1462,23 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
phba->pci_bar2_map = pci_resource_start(phba->pcidev, 2);
bar2map_len = pci_resource_len(phba->pcidev, 2);
- /* Map HBA SLIM and Control Registers to a kernel virtual address. */
+ /* Map HBA SLIM to a kernel virtual address. */
phba->slim_memmap_p = ioremap(phba->pci_bar0_map, bar0map_len);
+ if (!phba->slim_memmap_p) {
+ error = -ENODEV;
+ dev_printk(KERN_ERR, &pdev->dev,
+ "ioremap failed for SLIM memory.\n");
+ goto out_idr_remove;
+ }
+
+ /* Map HBA Control Registers to a kernel virtual address. */
phba->ctrl_regs_memmap_p = ioremap(phba->pci_bar2_map, bar2map_len);
+ if (!phba->ctrl_regs_memmap_p) {
+ error = -ENODEV;
+ dev_printk(KERN_ERR, &pdev->dev,
+ "ioremap failed for HBA control registers.\n");
+ goto out_iounmap_slim;
+ }
/* Allocate memory for SLI-2 structures */
phba->slim2p = dma_alloc_coherent(&phba->pcidev->dev, SLI2_SLIM_SIZE,
@@ -1643,6 +1657,7 @@ out_free_slim:
phba->slim2p_mapping);
out_iounmap:
iounmap(phba->ctrl_regs_memmap_p);
+out_iounmap_slim:
iounmap(phba->slim_memmap_p);
out_idr_remove:
idr_remove(&lpfc_hba_index, phba->brd_no);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 7/22] lpfc 8.1.2: Fixed system panic in lpfc_sli_brdreset during dynamic add of LP11K
@ 2006-03-01 0:25 Jamie Wellnitz
0 siblings, 0 replies; 2+ messages in thread
From: Jamie Wellnitz @ 2006-03-01 0:25 UTC (permalink / raw)
To: linux-scsi
Fixed system panic in lpfc_sli_brdreset during dynamic add of LP11K
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1462,9 +1462,23 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
phba->pci_bar2_map = pci_resource_start(phba->pcidev, 2);
bar2map_len = pci_resource_len(phba->pcidev, 2);
- /* Map HBA SLIM and Control Registers to a kernel virtual address. */
+ /* Map HBA SLIM to a kernel virtual address. */
phba->slim_memmap_p = ioremap(phba->pci_bar0_map, bar0map_len);
+ if (!phba->slim_memmap_p) {
+ error = -ENODEV;
+ dev_printk(KERN_ERR, &pdev->dev,
+ "ioremap failed for SLIM memory.\n");
+ goto out_idr_remove;
+ }
+
+ /* Map HBA Control Registers to a kernel virtual address. */
phba->ctrl_regs_memmap_p = ioremap(phba->pci_bar2_map, bar2map_len);
+ if (!phba->ctrl_regs_memmap_p) {
+ error = -ENODEV;
+ dev_printk(KERN_ERR, &pdev->dev,
+ "ioremap failed for HBA control registers.\n");
+ goto out_iounmap_slim;
+ }
/* Allocate memory for SLI-2 structures */
phba->slim2p = dma_alloc_coherent(&phba->pcidev->dev, SLI2_SLIM_SIZE,
@@ -1643,6 +1657,7 @@ out_free_slim:
phba->slim2p_mapping);
out_iounmap:
iounmap(phba->ctrl_regs_memmap_p);
+out_iounmap_slim:
iounmap(phba->slim_memmap_p);
out_idr_remove:
idr_remove(&lpfc_hba_index, phba->brd_no);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-01 0:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-08 15:41 [PATCH 7/22] lpfc 8.1.2 : Fixed system panic in lpfc_sli_brdreset during dynamic add of LP11K James Smart
-- strict thread matches above, loose matches on Subject: below --
2006-03-01 0:25 [PATCH 7/22] lpfc 8.1.2: " Jamie Wellnitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).