On 03/14/2011 12:24 AM, Vikas Chaudhary wrote:
index 6068f80..59c5552 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -27,6 +27,11 @@ static char qla4xxx_version_str[40]; static struct kmem_cache *srb_cachep; /* + * List of host adapters + */ +static struct klist qla4xxx_hostlist; +
/** + * qla4xxx_prevent_other_port_reinit - Mark the other ISP-4xxx port to indicate + * that the driver is being removed, so that the other port will not + * re-initialize while in the process of removing the ha due to driver unload + * or hba hotplug.
For docbook comments you use a one line description on the first line, then add more informative stuff after the params.
+ * @ha: pointer to adapter structure + **/ +static void qla4xxx_prevent_other_port_reinit(struct scsi_qla_host *ha) +{ + struct scsi_qla_host *ha_listp; + struct klist_iter i; + struct klist_node *n; + + klist_iter_init(&qla4xxx_hostlist,&i); + while ((n = klist_next(&i)) != NULL) { + ha_listp = container_of(n, struct scsi_qla_host, node); + if (ha == ha_listp) + continue; + + if ((pci_domain_nr(ha->pdev->bus) == + pci_domain_nr(ha_listp->pdev->bus))&& + (ha->pdev->bus->number == + ha_listp->pdev->bus->number)&& + (PCI_SLOT(ha->pdev->devfn) == + PCI_SLOT(ha_listp->pdev->devfn))) { +
Is there a qla4xxx specific reason why you need to prevent other ports from re-initing when removing a port? Does the hardware cause the other ports to be disrupted and that causes them to run the re-init code?
-- 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