Re: [PATCH 3/21] advansys: Convert to pci_register_driver interface

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

 




I'll respond to the other stuff soon, but I wanted to add:

+	for (i = 0; i < asc_board_count; i++) {
+		struct Scsi_Host *host = asc_host[i];
+		if (!host)
+			continue;
+		scsi_remove_host(host);
+		advansys_release(host);
+		asc_host[i] = NULL;


It is wise to have two loops in module exit:

1) For each host, call scsi_remove_host()

2) For each host, {do the rest of the cleanup}

scsi_module.c behaves in this way.

There is no strict requirement to do this, but IMO it is wise because you don't have to worry about the SCSI midlayer passing new traffic to asc_host[x+1] while you are deactivating and freeing asc_host[x].

Obviously this goes away for the new-style PCI/EISA/ISA probe APIs, once asc_host[] goes away.

	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