From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Kashyap, Desai" <kashyap.desai@lsi.com>
Cc: linux-scsi@vger.kernel.org, Eric.Moore@lsi.com, Sathya.Prakash@lsi.com
Subject: Re: [PATCH 17/24] mpt fusion: [2.6.30-rc6] Rescan SAS topology added
Date: Wed, 27 May 2009 17:40:13 +0000 [thread overview]
Message-ID: <1243446013.6067.37.camel@localhost.localdomain> (raw)
In-Reply-To: <20090522110733.GK16331@lsi.com>
On Fri, 2009-05-22 at 16:37 +0530, Kashyap, Desai wrote:
> @@ -3176,6 +3220,116 @@ mptsas_send_link_status_event(struct fw_event_work *fw_event)
> mptsas_free_fw_event(ioc, fw_event);
> }
>
> +static void
> +mptsas_not_responding_devices(MPT_ADAPTER *ioc)
> +{
> + struct mptsas_portinfo buffer, *port_info;
> + struct sas_device_info *sas_info;
> + struct mptsas_devinfo sas_device;
> + u32 handle;
> + VirtTarget *vtarget = NULL;
> + struct mptsas_phyinfo *phy_info;
> + u8 found_expander;
> + int retval, retry_count;
> + unsigned long flags;
> +
> + mpt_findImVolumes(ioc);
> +
> + spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
> + if (ioc->ioc_reset_in_progress) {
> + dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT
> + "%s: exiting due to a parallel reset \n", ioc->name,
> + __func__));
> + spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
> + return;
> + }
> + spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
> +
> + /* devices, logical volumes */
> + redo_device_scan:
> + list_for_each_entry(sas_info, &ioc->sas_device_info_list, list) {
This list is supposed to be protected by the sas_device_info_mutex,
isn't it ... where is that taken to protect the traversal?
> + sas_device.handle = 0;
> + retry_count = 0;
> +retry_page:
> + retval = mptsas_sas_device_pg0(ioc, &sas_device,
> + (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID
> + << MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
> + (sas_info->fw.channel << 8) +
> + sas_info->fw.id);
> +
> + if (sas_device.handle)
> + continue;
> + if (retval == -EBUSY) {
> + spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
> + if (ioc->ioc_reset_in_progress) {
> + dfailprintk(ioc,
> + printk(MYIOC_s_DEBUG_FMT
> + "%s: exiting due to reset\n",
> + ioc->name, __func__));
> + spin_unlock_irqrestore
> + (&ioc->taskmgmt_lock, flags);
> + return;
> + }
> + spin_unlock_irqrestore(&ioc->taskmgmt_lock,
> + flags);
> + }
> +
> + if (retval && (retval != -ENODEV)) {
> + if (retry_count < 10) {
> + retry_count++;
> + goto retry_page;
> + } else {
> + devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
> + "%s: Config page retry exceeded retry "
> + "count deleting device 0x%llx\n",
> + ioc->name, __func__,
> + sas_info->sas_address));
> + }
> + }
> +
> + /* delete device */
> + vtarget = mptsas_find_vtarget(ioc,
> + sas_info->fw.channel, sas_info->fw.id);
> + if (vtarget)
> + vtarget->deleted = 1;
> + phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
> + sas_info->sas_address);
> + if (phy_info) {
> + mptsas_del_end_device(ioc, phy_info);
> + goto redo_device_scan;
> + }
> + }
> +
> + /* expanders */
> + redo_expander_scan:
> + list_for_each_entry(port_info, &ioc->sas_topology, list) {
And this one is supposed to be protected by the sas_topology_mutex,
where is that taken?
James
next prev parent reply other threads:[~2009-05-27 17:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 11:07 [PATCH 17/24] mpt fusion: [2.6.30-rc6] Rescan SAS topology added Kashyap, Desai
2009-05-27 17:40 ` James Bottomley [this message]
2009-05-29 13:00 ` Desai, Kashyap
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=1243446013.6067.37.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=Eric.Moore@lsi.com \
--cc=Sathya.Prakash@lsi.com \
--cc=kashyap.desai@lsi.com \
--cc=linux-scsi@vger.kernel.org \
/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