Matthew Wilcox wrote:
@@ -18511,13 +18493,24 @@ advansys_board_found(int iop, struct device *dev, int bus_type)
}
if (err_code != 0)
- goto err_free_irq;
+ goto err_free_wide_mem;
ASC_DBG_PRT_SCSI_HOST(2, shost);
+ ret = scsi_add_host(shost, dev);
+ if (ret)
+ goto err_free_wide_mem;
+
+ scsi_scan_host(shost);
return shost;
- err_free_irq:
+ err_free_wide_mem:
+ kfree(boardp->orig_carrp);
+ kfree(boardp->orig_reqp);
+ while ((sgp = boardp->adv_sgblkp) != NULL) {
+ boardp->adv_sgblkp = sgp->next_sgblkp;
+ kfree(sgp);
+ }
free_irq(shost->irq, boardp);
err_free_dma:
if (shost->dma_channel != NO_ISA_DMA)
When this patch is considered in context of replies to patch #3, it's
OK... it un-breaks driver which was broken in patch #3.
But like I noted, this should be done -before- PCI hotplug conversion,
for the obvious reasons.
Generally the process involves:
* call foo_detect from module init
* for each scsi host, call foo_release from module exit
* do the scsi conversion as you've presented it here
and then in later patches, rip out the PCI code from foo_detect and
foo_release, etc.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html