linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: james.bottomley@suse.de
Cc: Haipao Fan <haipao.fan@intel.com>,
	linux-scsi@vger.kernel.org, David Milburn <dmilburn@redhat.com>,
	Maciej Trela <maciej.trela@intel.com>,
	linux-ide@vger.kernel.org, "Darrick J. Wong" <djwong@us.ibm.com>
Subject: Re: [PATCH 2/3] libsas: fix/amend device gone notification in sas_deform_port()
Date: Thu, 5 May 2011 17:13:44 -0700	[thread overview]
Message-ID: <BANLkTikhUQ6b3Y=ZAqOmHF8BtP57DQ4zqg@mail.gmail.com> (raw)
In-Reply-To: <20110503183627.21471.57988.stgit@localhost6.localdomain6>

On Tue, May 3, 2011 at 11:36 AM, Dan Williams <dan.j.williams@intel.com> wrote:
> This patch also introduces sas_device_gone() which hopefully allows
> subtle/tricky locking to be dropped from lldd drivers, like the
> following in mvsas which is broken if the ata path is ever converted to
> call lldd_execute_task() with irqs enabled:
[..]
> diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
> index 505ffe3..7a785df 100644
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> @@ -1721,13 +1721,27 @@ out:
>        return res;
>  }
>
> +/* FIXME: delete this routine when/if sas_ata stops submitting tasks
> + * with host_lock held
> + */
> +void sas_device_gone(struct domain_device *dev)
> +{
> +       struct sas_rphy *rphy = dev->rphy;
> +       struct Scsi_Host *shost = dev_to_shost(rphy->dev.parent);
> +
> +       /* take the lock to synchronize against incoming sata i/o */
> +       spin_lock_irq(shost->host_lock);
> +       dev->gone = 1;
> +       spin_unlock_irq(shost->host_lock);
> +}

Commit a29b5dad "libata: fix locking for sas paths" has gone in since
this patch was created so this locking no longer has any effect.

Now needs to be dev->sata_dev.ap->lock, will resubmit.

--
Dan

  reply	other threads:[~2011-05-06  0:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 18:36 [PATCH 0/3] libsas fixlets for 2.6.40 Dan Williams
2011-05-03 18:36 ` [PATCH 1/3] libsas: flush initial device discovery before completing ->scan_finished() Dan Williams
2011-05-04  1:14   ` [PATCH 1/3] libsas: flush initial device discovery before completing->scan_finished() Jack Wang
2011-05-03 18:36 ` [PATCH 2/3] libsas: fix/amend device gone notification in sas_deform_port() Dan Williams
2011-05-06  0:13   ` Dan Williams [this message]
2011-05-06 23:43   ` Dan Williams
2011-05-03 18:36 ` [PATCH 3/3] libsas: check dev->gone before submitting sata i/o Dan Williams

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='BANLkTikhUQ6b3Y=ZAqOmHF8BtP57DQ4zqg@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=djwong@us.ibm.com \
    --cc=dmilburn@redhat.com \
    --cc=haipao.fan@intel.com \
    --cc=james.bottomley@suse.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=maciej.trela@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).