* [SCIS] mpt3sas: wait_for_completion_timeout timeout not reported
@ 2014-12-30 16:19 Nicholas Mc Guire
2014-12-30 16:19 ` [SCSI] mpt2sas: " Nicholas Mc Guire
2014-12-30 21:14 ` [SCIS] mpt3sas: " Joe Lawrence
0 siblings, 2 replies; 3+ messages in thread
From: Nicholas Mc Guire @ 2014-12-30 16:19 UTC (permalink / raw)
To: Nagalakshmi Nandigama
Cc: Praveen Krishnamoorthy, Sreekanth Reddy, Abhijit Mahajan,
James E.J. Bottomley, Joe Lawrence, MPT-FusionLinux.pdl,
linux-scsi, linux-kernel, Nicholas Mc Guire
wait_for_completion_timeout reaching timeout was being ignored,
this also should fail if timeout condition occurs.
Thanks to Joe Lawrence <joe.lawrence@stratus.com> for confirmation.
this was only compile tested with
x86_64_defconfig + CONFIG_SCSI_LOWLEVEL=y + CONFIG_SCSI_MPT3SAS=m
patch is against linux-next 3.19.0-rc1 -next-20141226
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
---
drivers/scsi/mpt3sas/mpt3sas_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c
index 4472c2a..04ff21b 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_config.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_config.c
@@ -393,7 +393,7 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
mpt3sas_base_put_smid_default(ioc, smid);
timeleft = wait_for_completion_timeout(&ioc->config_cmds.done,
timeout*HZ);
- if (!(ioc->config_cmds.status & MPT3_CMD_COMPLETE)) {
+ if (timeleft == 0 || !(ioc->config_cmds.status & MPT3_CMD_COMPLETE)) {
pr_err(MPT3SAS_FMT "%s: timeout\n",
ioc->name, __func__);
_debug_dump_mf(mpi_request,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [SCSI] mpt2sas: wait_for_completion_timeout timeout not reported
2014-12-30 16:19 [SCIS] mpt3sas: wait_for_completion_timeout timeout not reported Nicholas Mc Guire
@ 2014-12-30 16:19 ` Nicholas Mc Guire
2014-12-30 21:14 ` [SCIS] mpt3sas: " Joe Lawrence
1 sibling, 0 replies; 3+ messages in thread
From: Nicholas Mc Guire @ 2014-12-30 16:19 UTC (permalink / raw)
To: Nagalakshmi Nandigama
Cc: Praveen Krishnamoorthy, Sreekanth Reddy, Abhijit Mahajan,
James E.J. Bottomley, Joe Lawrence, MPT-FusionLinux.pdl,
linux-scsi, linux-kernel, Nicholas Mc Guire
wait_for_completion_timeout reaching timeout was being ignored,
this also should fail if timeout condition occurs.
Thanks to Joe Lawrence <joe.lawrence@stratus.com> for confirmation.
this was only compile tested with
x86_64_defconfig + CONFIG_SCSI_LOWLEVEL=y + CONFIG_SCSI_MPT2SAS=m
patch is against linux-next 3.19.0-rc1 -next-20141226
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
---
drivers/scsi/mpt2sas/mpt2sas_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mpt2sas/mpt2sas_config.c b/drivers/scsi/mpt2sas/mpt2sas_config.c
index c72a2ff..02dc2d8 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_config.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_config.c
@@ -391,7 +391,7 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
mpt2sas_base_put_smid_default(ioc, smid);
timeleft = wait_for_completion_timeout(&ioc->config_cmds.done,
timeout*HZ);
- if (!(ioc->config_cmds.status & MPT2_CMD_COMPLETE)) {
+ if (timeleft == 0 || !(ioc->config_cmds.status & MPT2_CMD_COMPLETE)) {
printk(MPT2SAS_ERR_FMT "%s: timeout\n",
ioc->name, __func__);
_debug_dump_mf(mpi_request,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [SCIS] mpt3sas: wait_for_completion_timeout timeout not reported
2014-12-30 16:19 [SCIS] mpt3sas: wait_for_completion_timeout timeout not reported Nicholas Mc Guire
2014-12-30 16:19 ` [SCSI] mpt2sas: " Nicholas Mc Guire
@ 2014-12-30 21:14 ` Joe Lawrence
1 sibling, 0 replies; 3+ messages in thread
From: Joe Lawrence @ 2014-12-30 21:14 UTC (permalink / raw)
To: Nicholas Mc Guire, Nagalakshmi Nandigama
Cc: Praveen Krishnamoorthy, Sreekanth Reddy, Abhijit Mahajan,
James E.J. Bottomley, MPT-FusionLinux.pdl, linux-scsi,
linux-kernel
On 12/30/2014 11:19 AM, Nicholas Mc Guire wrote:
> wait_for_completion_timeout reaching timeout was being ignored,
> this also should fail if timeout condition occurs.
>
> Thanks to Joe Lawrence <joe.lawrence@stratus.com> for confirmation.
How about this instead:
Acked-by: Joe Lawrence <joe.lawrence@stratus.com>
You still probably want a review from the Avago folks though.
BTW, don't worry about the "[SCSI]" subject prefix to the commit,
"[PATCH]" is fine. I believe the former is a convention that the
maintainer applies to patches as he collects them to indicate that they
originated via the SCSI tree.
Thanks,
-- Joe
> this was only compile tested with
> x86_64_defconfig + CONFIG_SCSI_LOWLEVEL=y + CONFIG_SCSI_MPT3SAS=m
>
> patch is against linux-next 3.19.0-rc1 -next-20141226
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
> ---
> drivers/scsi/mpt3sas/mpt3sas_config.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c
> index 4472c2a..04ff21b 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_config.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_config.c
> @@ -393,7 +393,7 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
> mpt3sas_base_put_smid_default(ioc, smid);
> timeleft = wait_for_completion_timeout(&ioc->config_cmds.done,
> timeout*HZ);
> - if (!(ioc->config_cmds.status & MPT3_CMD_COMPLETE)) {
> + if (timeleft == 0 || !(ioc->config_cmds.status & MPT3_CMD_COMPLETE)) {
> pr_err(MPT3SAS_FMT "%s: timeout\n",
> ioc->name, __func__);
> _debug_dump_mf(mpi_request,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-30 21:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-30 16:19 [SCIS] mpt3sas: wait_for_completion_timeout timeout not reported Nicholas Mc Guire
2014-12-30 16:19 ` [SCSI] mpt2sas: " Nicholas Mc Guire
2014-12-30 21:14 ` [SCIS] mpt3sas: " Joe Lawrence
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox