snic: add scsi host after determining max IOs.
scsi host is added after negotiating the max number of IOs with Firmware. Signed-off-by: Narsimhulu Musini <nmusini@cisco.com> Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
0da8519b2b
commit
be2a266d2a
1 changed files with 17 additions and 18 deletions
|
@ -631,19 +631,6 @@ snic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
goto err_free_tmreq_pool;
|
goto err_free_tmreq_pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialization done with PCI system, hardware, firmware.
|
|
||||||
* Add shost to SCSI
|
|
||||||
*/
|
|
||||||
ret = snic_add_host(shost, pdev);
|
|
||||||
if (ret) {
|
|
||||||
SNIC_HOST_ERR(shost,
|
|
||||||
"Adding scsi host Failed ... exiting. %d\n",
|
|
||||||
ret);
|
|
||||||
|
|
||||||
goto err_notify_unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_irqsave(&snic_glob->snic_list_lock, flags);
|
spin_lock_irqsave(&snic_glob->snic_list_lock, flags);
|
||||||
list_add_tail(&snic->list, &snic_glob->snic_list);
|
list_add_tail(&snic->list, &snic_glob->snic_list);
|
||||||
spin_unlock_irqrestore(&snic_glob->snic_list_lock, flags);
|
spin_unlock_irqrestore(&snic_glob->snic_list_lock, flags);
|
||||||
|
@ -676,8 +663,6 @@ snic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
for (i = 0; i < snic->intr_count; i++)
|
for (i = 0; i < snic->intr_count; i++)
|
||||||
svnic_intr_unmask(&snic->intr[i]);
|
svnic_intr_unmask(&snic->intr[i]);
|
||||||
|
|
||||||
snic_set_state(snic, SNIC_ONLINE);
|
|
||||||
|
|
||||||
/* Get snic params */
|
/* Get snic params */
|
||||||
ret = snic_get_conf(snic);
|
ret = snic_get_conf(snic);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
@ -688,6 +673,21 @@ snic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
goto err_get_conf;
|
goto err_get_conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialization done with PCI system, hardware, firmware.
|
||||||
|
* Add shost to SCSI
|
||||||
|
*/
|
||||||
|
ret = snic_add_host(shost, pdev);
|
||||||
|
if (ret) {
|
||||||
|
SNIC_HOST_ERR(shost,
|
||||||
|
"Adding scsi host Failed ... exiting. %d\n",
|
||||||
|
ret);
|
||||||
|
|
||||||
|
goto err_get_conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
snic_set_state(snic, SNIC_ONLINE);
|
||||||
|
|
||||||
ret = snic_disc_start(snic);
|
ret = snic_disc_start(snic);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
SNIC_HOST_ERR(shost, "snic_probe:Discovery Failed w err = %d\n",
|
SNIC_HOST_ERR(shost, "snic_probe:Discovery Failed w err = %d\n",
|
||||||
|
@ -712,6 +712,8 @@ err_req_intr:
|
||||||
svnic_dev_disable(snic->vdev);
|
svnic_dev_disable(snic->vdev);
|
||||||
|
|
||||||
err_vdev_enable:
|
err_vdev_enable:
|
||||||
|
svnic_dev_notify_unset(snic->vdev);
|
||||||
|
|
||||||
for (i = 0; i < snic->wq_count; i++) {
|
for (i = 0; i < snic->wq_count; i++) {
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
@ -725,9 +727,6 @@ err_vdev_enable:
|
||||||
}
|
}
|
||||||
snic_del_host(snic->shost);
|
snic_del_host(snic->shost);
|
||||||
|
|
||||||
err_notify_unset:
|
|
||||||
svnic_dev_notify_unset(snic->vdev);
|
|
||||||
|
|
||||||
err_free_tmreq_pool:
|
err_free_tmreq_pool:
|
||||||
mempool_destroy(snic->req_pool[SNIC_REQ_TM_CACHE]);
|
mempool_destroy(snic->req_pool[SNIC_REQ_TM_CACHE]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue