From: Jack Wang <xjtuwjp@gmail.com>
To: Anand <anandkumar_santhanam@pmc-sierra.com>
Cc: linux-scsi@vger.kernel.org, Sangeetha.Gnanasekaran@pmcs.com,
Nikith.Ganigarakoppal@pmcs.com, Viswas.G@pmcs.com
Subject: Re: [PATCH V2 07/10] pm80xx: Set device state response logic fix.
Date: Thu, 26 Sep 2013 09:05:12 +0200 [thread overview]
Message-ID: <5243DCA8.5010909@gmail.com> (raw)
In-Reply-To: <5243C876.5090008@pmc-sierra.com>
On 09/26/2013 07:39 AM, Anand wrote:
> From edf018a942e0da4da12bad21e5bf0d48621a18de Mon Sep 17 00:00:00 2001
> From: Anand Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>
> Date: Tue, 17 Sep 2013 16:58:10 +0530
> Subject: [PATCH V2 07/10] pm80xx: Set device state response logic fix.
>
> Signed-off-by: Anandkumar.Santhanam@pmcs.com
>
Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
> ---
> drivers/scsi/pm8001/pm8001_hwi.c | 6 ++++--
> drivers/scsi/pm8001/pm8001_sas.c | 9 ++++++++-
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
> index c9cc744..502c7d6 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.c
> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
> @@ -3152,8 +3152,8 @@ void pm8001_mpi_set_dev_state_resp(struct pm8001_hba_info *pm8001_ha,
> struct pm8001_device *pm8001_dev = ccb->device;
> u32 status = le32_to_cpu(pPayload->status);
> u32 device_id = le32_to_cpu(pPayload->device_id);
> - u8 pds = le32_to_cpu(pPayload->pds_nds) | PDS_BITS;
> - u8 nds = le32_to_cpu(pPayload->pds_nds) | NDS_BITS;
> + u8 pds = le32_to_cpu(pPayload->pds_nds) & PDS_BITS;
> + u8 nds = le32_to_cpu(pPayload->pds_nds) & NDS_BITS;
> PM8001_MSG_DBG(pm8001_ha, pm8001_printk("Set device id = 0x%x state "
> "from 0x%x to 0x%x status = 0x%x!\n",
> device_id, pds, nds, status));
> @@ -4765,6 +4765,8 @@ int pm8001_chip_ssp_tm_req(struct pm8001_hba_info *pm8001_ha,
> sspTMCmd.tmf = cpu_to_le32(tmf->tmf);
> memcpy(sspTMCmd.lun, task->ssp_task.LUN, 8);
> sspTMCmd.tag = cpu_to_le32(ccb->ccb_tag);
> + if (pm8001_ha->chip_id != chip_8001)
> + sspTMCmd.ds_ads_m = 0x08;
> circularQ = &pm8001_ha->inbnd_q_tbl[0];
> ret = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &sspTMCmd, 0);
> return ret;
> diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
> index a85d73d..f4eb18e 100644
> --- a/drivers/scsi/pm8001/pm8001_sas.c
> +++ b/drivers/scsi/pm8001/pm8001_sas.c
> @@ -447,7 +447,6 @@ static int pm8001_task_exec(struct sas_task *task, const int num,
> break;
> case SAS_PROTOCOL_SATA:
> case SAS_PROTOCOL_STP:
> - case SAS_PROTOCOL_SATA | SAS_PROTOCOL_STP:
> rc = pm8001_task_prep_ata(pm8001_ha, ccb);
> break;
> default:
> @@ -704,6 +703,8 @@ static int pm8001_exec_internal_tmf_task(struct domain_device *dev,
> int res, retry;
> struct sas_task *task = NULL;
> struct pm8001_hba_info *pm8001_ha = pm8001_find_ha_by_dev(dev);
> + struct pm8001_device *pm8001_dev = dev->lldd_dev;
> + DECLARE_COMPLETION_ONSTACK(completion_setstate);
>
> for (retry = 0; retry < 3; retry++) {
> task = sas_alloc_slow_task(GFP_KERNEL);
> @@ -729,6 +730,12 @@ static int pm8001_exec_internal_tmf_task(struct domain_device *dev,
> goto ex_err;
> }
> wait_for_completion(&task->slow_task->completion);
> + if (pm8001_ha->chip_id != chip_8001) {
> + pm8001_dev->setds_completion = &completion_setstate;
> + PM8001_CHIP_DISP->set_dev_state_req(pm8001_ha,
> + pm8001_dev, 0x01);
> + wait_for_completion(&completion_setstate);
> + }
> res = -TMF_RESP_FUNC_FAILED;
> /* Even TMF timed out, return direct. */
> if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) {
>
prev parent reply other threads:[~2013-09-26 7:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 5:39 [PATCH V2 07/10] pm80xx: Set device state response logic fix Anand
2013-09-26 7:05 ` Jack Wang [this message]
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=5243DCA8.5010909@gmail.com \
--to=xjtuwjp@gmail.com \
--cc=Nikith.Ganigarakoppal@pmcs.com \
--cc=Sangeetha.Gnanasekaran@pmcs.com \
--cc=Viswas.G@pmcs.com \
--cc=anandkumar_santhanam@pmc-sierra.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;
as well as URLs for NNTP newsgroup(s).