public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
To: Desai Kashyap <kashyap.desai@lsi.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Subject: Re: [PATCH] mptsas: fixed hot-removal processing
Date: Tue, 20 Jul 2010 09:30:00 +0900	[thread overview]
Message-ID: <4C44EE08.4080500@jp.fujitsu.com> (raw)
In-Reply-To: <4BBC5BB4.2050805@jp.fujitsu.com>

Kei Tokunaga wrote:
> Hi Kashyap,
> 
> This patch fixes mptsas disk hot-removal processing.  The
> hot-removal processing doesn't complete because of this condition.
> 
>   drivers/message/fusion/mptsas.c:
>   mptsas_taskmgmt_complete()
> 
>   if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
>     mptsas_queue_device_delete(...);
> 
> mptsas_queue_device_delete(), which must be called for
> hot-removal, never gets called because mptsas_find_vtarget()
> always returns 0 here.  At that time, the vtarget has already
> been freed in mptsas_target_destroy(), and also the scsi_device
> has been marked as SDEV_DEL.
> 
> As a result of the issue, port deletion functions won't get
> called and the device ends up being in an incomplete state.
> (Some data structures and sysfs entries, which should be
> removed in hot-removal, remain.)  One side effect of this is
> that a hot-addition of the device (bringing the device back
> on) fails.
> 
> This patch just removes mptsas_find_vtarget() from the if-state
> condition.
> 
> This applies to 2.6.34-rc3.

Kashyap, can you please give it an ACK?  I confirmed it still
applies to the latest git tree (scsi-misc-2.6).

Thanks,
Kei


> Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
> ---
> 
>  linux-2.6.34-rc3-kei/drivers/message/fusion/mptsas.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -puN drivers/message/fusion/mptsas.c~fix-mptsas_hot_removal drivers/message/fusion/mptsas.c
> --- linux-2.6.34-rc3/drivers/message/fusion/mptsas.c~fix-mptsas_hot_removal	2010-04-07 16:47:36.000000000 +0900
> +++ linux-2.6.34-rc3-kei/drivers/message/fusion/mptsas.c	2010-04-07 16:48:17.000000000 +0900
> @@ -1221,7 +1221,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *io
>  	 * enable work queue to remove device from upper layers
>  	 */
>  	list_del(&target_reset_list->list);
> -	if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
> +	if (!ioc->fw_events_off)
>  		mptsas_queue_device_delete(ioc,
>  			&target_reset_list->sas_event_data);
>  
> 
> _
> 
> 
> 
> 
> 


  reply	other threads:[~2010-07-20  0:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-07 10:17 [PATCH] mptsas: fixed hot-removal processing Kei Tokunaga
2010-07-20  0:30 ` Kei Tokunaga [this message]
2010-07-20  6:03   ` 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=4C44EE08.4080500@jp.fujitsu.com \
    --to=tokunaga.keiich@jp.fujitsu.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