Skip to content

Commit 0598b8a

Browse files
Jayamohan KallickalChristoph Hellwig
authored andcommitted
be2iscsi: Fix exposing Host in sysfs after adapter initialization is complete
Before probe for function was completed, iSCSI Daemon had initiated login to target while OS was coming up. The targets which had node.startup=automatic, login process was initiated.Since function specific initialization was still in progress this lead to kernel panic. Fixed the issue by moving iscsi_host_add() call after adapter initialization is done. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent daa8dc0 commit 0598b8a

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

‎drivers/scsi/be2iscsi/be_main.c‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -599,15 +599,7 @@ static struct beiscsi_hba *beiscsi_hba_alloc(struct pci_dev *pcidev)
599599
pci_set_drvdata(pcidev, phba);
600600
phba->interface_handle = 0xFFFFFFFF;
601601

602-
if (iscsi_host_add(shost, &phba->pcidev->dev))
603-
goto free_devices;
604-
605602
return phba;
606-
607-
free_devices:
608-
pci_dev_put(phba->pcidev);
609-
iscsi_host_free(phba->shost);
610-
return NULL;
611603
}
612604

613605
static void beiscsi_unmap_pci_function(struct beiscsi_hba *phba)
@@ -5621,6 +5613,9 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
56215613
}
56225614
hwi_enable_intr(phba);
56235615

5616+
if (iscsi_host_add(phba->shost, &phba->pcidev->dev))
5617+
goto free_blkenbld;
5618+
56245619
if (beiscsi_setup_boot_info(phba))
56255620
/*
56265621
* log error but continue, because we may not be using

0 commit comments

Comments
 (0)