From: Hannes Reinecke <hare@suse.de>
To: Sumit.Saxena@avagotech.com, linux-scsi@vger.kernel.org
Cc: stable@vger.kernel.org, martin.petersen@oracle.com,
hch@infradead.org, jbottomley@parallels.com, thenzl@redhat.com,
kashyap.desai@avagotech.com
Subject: Re: [PATCH] megaraid_sas : Modify return value of megasas_issue_blocked_cmd() and wait_and_poll() to consider command status returned by firmware
Date: Fri, 15 May 2015 11:34:06 +0200 [thread overview]
Message-ID: <5555BD8E.1@suse.de> (raw)
In-Reply-To: <201505061333.t46DXdcM032441@palmhbs0.lsi.com>
On 05/06/2015 03:31 PM, Sumit.Saxena@avagotech.com wrote:
> This patch is rebased on top of recently sent 18 patches(submitted by me) for megaraid_sas driver.
>
> Change the return value of wait_and_poll() and megsas_issue_blocked_cmd() based on MFI_STAT returned by firmware for that command. Earlier driver always
> send return type based on command completion (but never check MFI_STAT_OK for that command), so even if command is failed by firmware still driver will
> return SUCCESS status from these functions wait_and_poll() and megsas_issue_blocked_cmd() and if caller of these functions does not check command status
> (MFI_STAT), then it may endup using invalid data returned in DMA buffers(one of the example is megasas_ld_list_query DCMD). Best thing to avoid this type
> of issue is do error handling and set proper return type from caller function wait_and_poll() and megsas_issue_blocked_cmd().
>
> The change proposed in this patch will fix the regression introduced in patch- "90dc9d9 megaraid_sas : MFI MPT linked list corruption fix" inside function
> megasas_ld_list_query().
> Prior to this MFI MPT linked list corruption fix patch, megasas_ld_list_query() function used to check DCMD status(returned by firmware) but with
> this linked list corruption fix patch, DCMD status will not be checked inside function megasas_ld_list_query() and introduced this issue of wrong data
> being used by function megasas_ld_list_query().
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
> ---
> drivers/scsi/megaraid/megaraid_sas.h | 2 +-
> drivers/scsi/megaraid/megaraid_sas_base.c | 67 +++++++++++----------------
> drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 +-
> 3 files changed, 30 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
> index 53a3c3f..20c3754 100644
> --- a/drivers/scsi/megaraid/megaraid_sas.h
> +++ b/drivers/scsi/megaraid/megaraid_sas.h
> @@ -1894,7 +1894,7 @@ struct megasas_cmd {
>
> u32 index;
> u8 sync_cmd;
> - u8 cmd_status;
> + u8 cmd_status_drv;
> u8 abort_aen;
> u8 retry_for_fw_reset;
>
Can you please avoid the renaming here?
It doesn't serve any purpose, and keeping it will make the diff smaller.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
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
WARNING: multiple messages have this Message-ID (diff)
From: Hannes Reinecke <hare@suse.de>
To: Sumit.Saxena@avagotech.com, linux-scsi@vger.kernel.org
Cc: stable@vger.kernel.org, martin.petersen@oracle.com,
hch@infradead.org, jbottomley@parallels.com, thenzl@redhat.com,
kashyap.desai@avagotech.com
Subject: Re: [PATCH] megaraid_sas : Modify return value of megasas_issue_blocked_cmd() and wait_and_poll() to consider command status returned by firmware
Date: Fri, 15 May 2015 11:34:06 +0200 [thread overview]
Message-ID: <5555BD8E.1@suse.de> (raw)
In-Reply-To: <201505061333.t46DXdcM032441@palmhbs0.lsi.com>
On 05/06/2015 03:31 PM, Sumit.Saxena@avagotech.com wrote:
> This patch is rebased on top of recently sent 18 patches(submitted by me) for megaraid_sas driver.
>
> Change the return value of wait_and_poll() and megsas_issue_blocked_cmd() based on MFI_STAT returned by firmware for that command. Earlier driver always
> send return type based on command completion (but never check MFI_STAT_OK for that command), so even if command is failed by firmware still driver will
> return SUCCESS status from these functions wait_and_poll() and megsas_issue_blocked_cmd() and if caller of these functions does not check command status
> (MFI_STAT), then it may endup using invalid data returned in DMA buffers(one of the example is megasas_ld_list_query DCMD). Best thing to avoid this type
> of issue is do error handling and set proper return type from caller function wait_and_poll() and megsas_issue_blocked_cmd().
>
> The change proposed in this patch will fix the regression introduced in patch- "90dc9d9 megaraid_sas : MFI MPT linked list corruption fix" inside function
> megasas_ld_list_query().
> Prior to this MFI MPT linked list corruption fix patch, megasas_ld_list_query() function used to check DCMD status(returned by firmware) but with
> this linked list corruption fix patch, DCMD status will not be checked inside function megasas_ld_list_query() and introduced this issue of wrong data
> being used by function megasas_ld_list_query().
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
> ---
> drivers/scsi/megaraid/megaraid_sas.h | 2 +-
> drivers/scsi/megaraid/megaraid_sas_base.c | 67 +++++++++++----------------
> drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 +-
> 3 files changed, 30 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
> index 53a3c3f..20c3754 100644
> --- a/drivers/scsi/megaraid/megaraid_sas.h
> +++ b/drivers/scsi/megaraid/megaraid_sas.h
> @@ -1894,7 +1894,7 @@ struct megasas_cmd {
>
> u32 index;
> u8 sync_cmd;
> - u8 cmd_status;
> + u8 cmd_status_drv;
> u8 abort_aen;
> u8 retry_for_fw_reset;
>
Can you please avoid the renaming here?
It doesn't serve any purpose, and keeping it will make the diff smaller.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg
GF: F. Imend�rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG N�rnberg)
next prev parent reply other threads:[~2015-05-15 9:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 13:31 [PATCH] megaraid_sas : Modify return value of megasas_issue_blocked_cmd() and wait_and_poll() to consider command status returned by firmware Sumit.Saxena
2015-05-06 13:31 ` Sumit.Saxena
2015-05-15 9:34 ` Hannes Reinecke [this message]
2015-05-15 9:34 ` Hannes Reinecke
2015-05-15 9:44 ` Sumit Saxena
2015-05-15 9:44 ` Sumit Saxena
2015-05-15 9:56 ` Tomas Henzl
2015-05-29 10:22 ` Sumit Saxena
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=5555BD8E.1@suse.de \
--to=hare@suse.de \
--cc=Sumit.Saxena@avagotech.com \
--cc=hch@infradead.org \
--cc=jbottomley@parallels.com \
--cc=kashyap.desai@avagotech.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
--cc=thenzl@redhat.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.