From: jack_wang <jack_wang@usish.com>
To: Mark Salyzyn <mark_salyzyn@xyratex.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Cc: James Bottomley <JBottomley@parallels.com>,
crystal_yu <crystal_yu@usish.com>,
john_gong <john_gong@usish.com>,
lindar_liu <lindar_liu@usish.com>
Subject: Re: [PATCH] pm8001: optimization surrounding call to sas_ssp_task_response
Date: Sat, 14 Jan 2012 10:29:27 +0800 [thread overview]
Message-ID: <201201141029242033621@usish.com> (raw)
In-Reply-To: 46C64AF8-8DB5-4380-AB15-DF861E10F3A8@xyratex.com
Thanks Mark for fix.
Acked-by: jack_wang@usish.com
Sorry for reply twice, forget to change text format.
--------------
jack_wang
>Optimization. Since sas_ssp_task_response sets both the ts->resp and ts->stat values, there is no need to set them before the call. Remaining changes are all cosmetic debug print messages.
>
>Signed-off-by: mark_salyzyn@xyratex.com
>Cc: jack_wang@usish.com
>Cc: JBottomley@parallels.com
>Cc: crystal_yu@usish.com
>Cc: john_gong@usish.com
>Cc: lindar_liu <lindar_liu@usish.com>
>
> drivers/scsi/pm8001/pm8001_hwi.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
>diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
>index b7b92f7..6b63a54 100644
>--- a/drivers/scsi/pm8001/pm8001_hwi.c
>+++ b/drivers/scsi/pm8001/pm8001_hwi.c
>@@ -1474,13 +1474,11 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb)
> switch (status) {
> case IO_SUCCESS:
> PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_SUCCESS"
>- ",param = %d\n", param));
>+ ", param = %d\n", param));
> if (param == 0) {
> ts->resp = SAS_TASK_COMPLETE;
> ts->stat = SAM_STAT_GOOD;
> } else {
>- ts->resp = SAS_TASK_COMPLETE;
>- ts->stat = SAS_PROTO_RESPONSE;
> ts->residual = param;
> iu = &psspPayload->ssp_resp_iu;
> sas_ssp_task_response(pm8001_ha->dev, t, iu);
>@@ -1497,7 +1495,7 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb)
> case IO_UNDERFLOW:
> /* SSP Completion with error */
> PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_UNDERFLOW"
>- ",param = %d\n", param));
>+ ", param = %d\n", param));
> ts->resp = SAS_TASK_COMPLETE;
> ts->stat = SAS_DATA_UNDERRUN;
> ts->residual = param;
>@@ -1659,7 +1657,7 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb)
> break;
> }
> PM8001_IO_DBG(pm8001_ha,
>- pm8001_printk("scsi_status = %x \n ",
>+ pm8001_printk("scsi_status = %x\n",
> psspPayload->ssp_resp_iu.status));
> spin_lock_irqsave(&t->task_state_lock, flags);
> t->task_state_flags &= ~SAS_TASK_STATE_PENDING;
>@@ -1842,7 +1840,7 @@ static void mpi_ssp_event(struct pm8001_hba_info *pm8001_ha , void *piomb)
> break;
> case IO_XFER_CMD_FRAME_ISSUED:
> PM8001_IO_DBG(pm8001_ha,
>- pm8001_printk(" IO_XFER_CMD_FRAME_ISSUED\n"));
>+ pm8001_printk("IO_XFER_CMD_FRAME_ISSUED\n"));
> return;
> default:
> PM8001_IO_DBG(pm8001_ha,
>@@ -3137,7 +3135,7 @@ static int mpi_dereg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
> device_id = le32_to_cpu(registerRespPayload->device_id);
> if (status != 0)
> PM8001_MSG_DBG(pm8001_ha,
>- pm8001_printk(" deregister device failed ,status = %x"
>+ pm8001_printk("deregister device failed, status = %x"
> ", device_id = %x\n", status, device_id));
> return 0;
> }
>@@ -3218,7 +3216,7 @@ mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb)
> (struct general_event_resp *)(piomb + 4);
> status = le32_to_cpu(pPayload->status);
> PM8001_MSG_DBG(pm8001_ha,
>- pm8001_printk(" status = 0x%x\n", status));
>+ pm8001_printk("OPC_OUB_GENERAL_EVENT: status = 0x%x\n", status);
> for (i = 0; i < GENERAL_EVENT_PAYLOAD; i++)
> PM8001_MSG_DBG(pm8001_ha,
> pm8001_printk("inb_IOMB_payload[0x%x] 0x%x,\n", i,
>@@ -3532,7 +3530,7 @@ static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb)
> break;
> case OPC_OUB_DEREG_DEV:
> PM8001_MSG_DBG(pm8001_ha,
>- pm8001_printk("unresgister the deviece\n"));
>+ pm8001_printk("OPC_OUB_DEREG_DEV\n"));
> mpi_dereg_resp(pm8001_ha, piomb);
> break;
> case OPC_OUB_GET_DEV_HANDLE:
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>__________ Information from ESET NOD32 Antivirus, version of virus signature database 5659 (20101129) __________
>
>The message was checked by ESET NOD32 Antivirus.
>
>http://www.eset.com
>
>
>
prev parent reply other threads:[~2012-01-14 2:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-13 16:46 [PATCH] pm8001: optimization surrounding call to sas_ssp_task_response Mark Salyzyn
2012-01-13 17:53 ` [PATCH] pm8001: Add FUNC_GET_EVENTS Mark Salyzyn
2012-01-14 2:31 ` jack_wang
2012-01-17 14:18 ` [PATCH] pm8001: Add FUNC_GET_EVENTS (take 2) Mark Salyzyn
2012-01-17 14:44 ` jack_wang
2012-01-19 2:34 ` Jack Wang
[not found] ` <4B4F725B-AA77-4FDD-9A03-6456B5E13906@xyratex.com>
2012-01-19 14:11 ` jack_wang
2012-01-14 2:29 ` 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=201201141029242033621@usish.com \
--to=jack_wang@usish.com \
--cc=JBottomley@parallels.com \
--cc=crystal_yu@usish.com \
--cc=john_gong@usish.com \
--cc=lindar_liu@usish.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mark_salyzyn@xyratex.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.