Commit 15dbed6c authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] move scsi_add_host back to where it belongs in aacraid

looks like you applied a premature version of the last aacraid patch.
This one moves the scsi_add_host back so it's not called before the
driver is ready to accept queued commands.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 0ed32242
...@@ -579,10 +579,6 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, ...@@ -579,10 +579,6 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
for (container = 0; container < MAXIMUM_NUM_CONTAINERS; container++) for (container = 0; container < MAXIMUM_NUM_CONTAINERS; container++)
fsa_dev_ptr->devname[container][0] = '\0'; fsa_dev_ptr->devname[container][0] = '\0';
error = scsi_add_host(shost, &pdev->dev);
if (error)
goto out_free_fibs;
if ((*aac_drivers[index].init)(aac)) if ((*aac_drivers[index].init)(aac))
goto out_free_fibs; goto out_free_fibs;
...@@ -619,12 +615,25 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, ...@@ -619,12 +615,25 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
shost->max_lun = AAC_MAX_LUN; shost->max_lun = AAC_MAX_LUN;
pci_set_drvdata(pdev, shost); pci_set_drvdata(pdev, shost);
error = scsi_add_host(shost, &pdev->dev);
if (error)
goto out_deinit;
scsi_scan_host(shost); scsi_scan_host(shost);
return 0; return 0;
out_deinit:
kill_proc(aac->thread_pid, SIGKILL, 0);
wait_for_completion(&aac->aif_completion);
aac_send_shutdown(aac);
fib_map_free(aac);
pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);
kfree(aac->queues);
free_irq(pdev->irq, aac);
iounmap((void * )aac->regs.sa);
out_free_fibs: out_free_fibs:
scsi_remove_host(shost);
kfree(aac->fibs); kfree(aac->fibs);
out_free_host: out_free_host:
scsi_host_put(shost); scsi_host_put(shost);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment