All of lore.kernel.org
 help / color / mirror / Atom feed
From: "lindar_liu" <lindar_liu@usish.com>
To: 'XinHong Zhu' <zxh3737@163.com>, linux-scsi@vger.kernel.org
Subject: RE: [PATCH] [scsi] : pm80xx : fix problem of pm8001_work_fn reseting uncorrect phy device
Date: Fri, 14 Feb 2014 17:00:14 +0800	[thread overview]
Message-ID: <004001cf2963$30b40900$921c1b00$@com> (raw)
In-Reply-To: <1392364888-6996-1-git-send-email-zxh3737@163.com>

On Friday, February 14, 2014 4:01 PM, XinHong Zhu wrote: 
> If a phy device is removed ,the device can get error of I/O and HBA maybe
> receieve IO_OPEN_CNX_ERROR_IT_NEXUS_LOSS of event which causes
pm8001_work_fn
> to reset the phy device ,but in pm8001_task_exec don't assign a value for
> field device of ccb  and in other case a ccb used have device field set ,
when
> ccb is freeed the field device of the ccb don't be set NULL.So there is
> possibility of getting another devcie reset in fun of mpi_ssp_completion
.Also
> there are another way to solve problem by adding following code in
> mpi_SSP_completion:
>   pm8001_dev = t->dev->lldd_dev;
> Signed-off-by: zhuxh <zxh3737@163.com>
> ---
>  drivers/scsi/pm8001/pm8001_sas.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/scsi/pm8001/pm8001_sas.c
> b/drivers/scsi/pm8001/pm8001_sas.c
> index f50ac44..f0ea5db 100644
> --- a/drivers/scsi/pm8001/pm8001_sas.c
> +++ b/drivers/scsi/pm8001/pm8001_sas.c
> @@ -434,6 +434,7 @@ static int pm8001_task_exec(struct sas_task *task,
const
> int num,
>  		ccb->n_elem = n_elem;
>  		ccb->ccb_tag = tag;
>  		ccb->task = t;
> +		ccb->device = pm8001_dev;
>  		switch (t->task_proto) {
>  		case SAS_PROTOCOL_SMP:
>  			rc = pm8001_task_prep_smp(pm8001_ha, ccb);

Acked-by: Lindar Liu <lindar_liu@usish.com>

This is the best way to fix such issue. Thanks.

> --
> 1.7.9



  reply	other threads:[~2014-02-14  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14  8:01 [PATCH] [scsi] : pm80xx : fix problem of pm8001_work_fn reseting uncorrect phy device XinHong Zhu
2014-02-14  9:00 ` lindar_liu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-01-14  9:41 XinHong Zhu

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='004001cf2963$30b40900$921c1b00$@com' \
    --to=lindar_liu@usish.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=zxh3737@163.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.