Re: [PATCH 6/21] advansys: Move to scsi hotplug initialisation model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux