Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9239
b: refs/heads/master
c: 0cdc82e
h: refs/heads/master
i:
  9237: 2e606c1
  9235: 01c9cc7
  9231: 40f5f16
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed Sep 23, 2005
1 parent ac831e7 commit 5730213
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98b4f5929ce5e616d0d0e13c71baf50083ab7397
refs/heads/master: 0cdc82ee1ae36c1ae4631fc3a782faeb0b90df38
29 changes: 21 additions & 8 deletions trunk/drivers/scsi/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1959,22 +1959,35 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match)
/* Set it up */
mesh_init(ms);

/* XXX FIXME: error should be fatal */
if (request_irq(ms->meshintr, do_mesh_interrupt, 0, "MESH", ms))
/* Request interrupt */
if (request_irq(ms->meshintr, do_mesh_interrupt, 0, "MESH", ms)) {
printk(KERN_ERR "MESH: can't get irq %d\n", ms->meshintr);
goto out_shutdown;
}

/* XXX FIXME: handle failure */
scsi_add_host(mesh_host, &mdev->ofdev.dev);
/* Add scsi host & scan */
if (scsi_add_host(mesh_host, &mdev->ofdev.dev))
goto out_release_irq;
scsi_scan_host(mesh_host);

return 0;

out_unmap:
out_release_irq:
free_irq(ms->meshintr, ms);
out_shutdown:
/* shutdown & reset bus in case of error or macos can be confused
* at reboot if the bus was set to synchronous mode already
*/
mesh_shutdown(mdev);
set_mesh_power(ms, 0);
pci_free_consistent(macio_get_pci_dev(mdev), ms->dma_cmd_size,
ms->dma_cmd_space, ms->dma_cmd_bus);
out_unmap:
iounmap(ms->dma);
iounmap(ms->mesh);
out_free:
out_free:
scsi_host_put(mesh_host);
out_release:
out_release:
macio_release_resources(mdev);

return -ENODEV;
Expand All @@ -2001,7 +2014,7 @@ static int mesh_remove(struct macio_dev *mdev)

/* Free DMA commands memory */
pci_free_consistent(macio_get_pci_dev(mdev), ms->dma_cmd_size,
ms->dma_cmd_space, ms->dma_cmd_bus);
ms->dma_cmd_space, ms->dma_cmd_bus);

/* Release memory resources */
macio_release_resources(mdev);
Expand Down

0 comments on commit 5730213

Please sign in to comment.