All of lore.kernel.org
 help / color / mirror / Atom feed
From: XinHong Zhu <zxh3737@163.com>
To: linux-scsi@vger.kernel.org
Cc: XinHong Zhu <zxh3737@163.com>
Subject: [PATCH] [scsi] : pm80xx : fix problem of pm8001_work_fn reseting uncorrect phy device
Date: Tue, 14 Jan 2014 17:41:05 +0800	[thread overview]
Message-ID: <1389692465-7628-1-git-send-email-zxh3737@163.com> (raw)
In-Reply-To: <y>

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);
-- 
1.7.9



             reply	other threads:[~2014-01-14  9:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14  9:41 XinHong Zhu [this message]
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

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=1389692465-7628-1-git-send-email-zxh3737@163.com \
    --to=zxh3737@163.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 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.