All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Cc: James Bottomley <James.Bottomley@suse.de>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Ravi Anand <ravi.anand@qlogic.com>,
	Lalit Chandivade <lalit.chandivade@qlogic.com>,
	Karen Higgins <karen.higgins@qlogic.com>
Subject: Re: [PATCH 06/13] qla4xxx: Prevent other port reinitialization during remove_adapter
Date: Mon, 14 Mar 2011 17:07:04 -0500	[thread overview]
Message-ID: <4D7E9188.8010606@cs.wisc.edu> (raw)
In-Reply-To: <5E4F49720D0BAD499EE1F01232234BA872263B150C@AVEXMB1.qlogic.org>

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?

  reply	other threads:[~2011-03-14 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14  5:24 [PATCH 06/13] qla4xxx: Prevent other port reinitialization during remove_adapter Vikas Chaudhary
2011-03-14 22:07 ` Mike Christie [this message]
2011-03-15  9:21   ` Vikas Chaudhary
2011-03-16  1:21     ` Mike Christie
2011-03-16 12:27       ` Vikas Chaudhary
  -- strict thread matches above, loose matches on Subject: below --
2011-03-15  9:23 Vikas Chaudhary
2011-03-16 12:29 Vikas Chaudhary
2011-03-16 19:23 ` Mike Christie
2011-03-17  8:44   ` Vikas Chaudhary
2011-03-17  8:44 Vikas Chaudhary
2011-03-21 10:34 [PATCH 01/13] qla4xxx: cleanup qla4xxx_initialize_ddb_list() vikas.chaudhary
2011-03-21 10:34 ` [PATCH 06/13] qla4xxx: Prevent other port reinitialization during remove_adapter vikas.chaudhary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D7E9188.8010606@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@suse.de \
    --cc=karen.higgins@qlogic.com \
    --cc=lalit.chandivade@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ravi.anand@qlogic.com \
    --cc=vikas.chaudhary@qlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.