* [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
@ 2009-04-03 11:49 Kashyap, Desai
2009-04-03 17:38 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Kashyap, Desai @ 2009-04-03 11:49 UTC (permalink / raw)
To: linux-scsi; +Cc: James.Bottomley, Eric.Moore, Sathya.Prakash
Small fix for previous Patch applied on 26/02/2009: subject line : "mpt fusion: config, Taskmgmt cmd, Internal cmd, Ioctl cmd changes".
Before returning from function make sure that taskmgmt in progress bit is
cleared.
---
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
---
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 842e4f8..4e90870 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -553,18 +553,20 @@ mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
{
MPT_FRAME_HDR *mf;
SCSITaskMgmt_t *pScsiTm;
+
if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0)
return 0;
-
- mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc);
- if (mf == NULL) {
+ if ((mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc)) == NULL) {
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
- "%s, no msg frames @%d!!\n",
- ioc->name, __func__, __LINE__));
- return 0;
+ "%s, no msg frames @%d!!\n", ioc->name,
+ __func__, __LINE__));
+ goto out_fail;
}
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n",
+ ioc->name, mf));
+
/* Format the Request
*/
pScsiTm = (SCSITaskMgmt_t *) mf;
@@ -577,9 +579,18 @@ mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt type=%d (sas device delete) fw_channel = %d fw_id = %d)\n",
+ ioc->name, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, channel, id));
+
mpt_put_msg_frame_hi_pri(mptsasDeviceResetCtx, ioc, mf);
return 1;
+
+ out_fail:
+
+ mpt_clear_taskmgmt_in_progress_flag(ioc);
+ return 0;
}
/**
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
2009-04-03 11:49 [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return Kashyap, Desai
@ 2009-04-03 17:38 ` James Bottomley
2009-04-04 9:45 ` Desai, Kashyap
0 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2009-04-03 17:38 UTC (permalink / raw)
To: Kashyap, Desai; +Cc: linux-scsi, Eric.Moore, Sathya.Prakash
On Fri, 2009-04-03 at 17:19 +0530, Kashyap, Desai wrote:
> -
> - mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc);
> - if (mf == NULL) {
> + if ((mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc)) == NULL) {
> dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
This is making a clear statement (assignment then check) less clear for
no practical purpose that I can see.
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
2009-04-03 17:38 ` James Bottomley
@ 2009-04-04 9:45 ` Desai, Kashyap
2009-04-04 13:17 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Desai, Kashyap @ 2009-04-04 9:45 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi@vger.kernel.org, Moore, Eric, Prakash, Sathya
James,
After creating patch, I usually run check_patch script available in scripts directory of linux source tree.
Below changes are just to remove warning and error related to coding standards from generated patch.
If you suggest, not to have those changes merge with actual logical patch then please let me know. I can rework and resubmit.
Thanks
Kashyap
________________________________________
From: James Bottomley [James.Bottomley@HansenPartnership.com]
Sent: Friday, April 03, 2009 1:38 PM
To: Desai, Kashyap
Cc: linux-scsi@vger.kernel.org; Moore, Eric; Prakash, Sathya
Subject: Re: [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
On Fri, 2009-04-03 at 17:19 +0530, Kashyap, Desai wrote:
> -
> - mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc);
> - if (mf == NULL) {
> + if ((mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc)) == NULL) {
> dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
This is making a clear statement (assignment then check) less clear for
no practical purpose that I can see.
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
2009-04-04 9:45 ` Desai, Kashyap
@ 2009-04-04 13:17 ` James Bottomley
2009-04-06 4:53 ` Desai, Kashyap
0 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2009-04-04 13:17 UTC (permalink / raw)
To: Desai, Kashyap; +Cc: linux-scsi@vger.kernel.org, Moore, Eric, Prakash, Sathya
On Sat, 2009-04-04 at 15:15 +0530, Desai, Kashyap wrote:
> James,
>
> After creating patch, I usually run check_patch script available in scripts directory of linux source tree.
> Below changes are just to remove warning and error related to coding standards from generated patch.
Hmm, then we have an error in checkpatch.pl if it's saying that
x = y
if (x == NULL)
should become
if ((x = y) == NULL)
Can you attach the warning so I can get the checkpatch maintainers to
explain what's going on?
Thanks,
James
> If you suggest, not to have those changes merge with actual logical
> patch then please let me know. I can rework and resubmit.
>
>
> Thanks
> Kashyap
> ________________________________________
> From: James Bottomley [James.Bottomley@HansenPartnership.com]
> Sent: Friday, April 03, 2009 1:38 PM
> To: Desai, Kashyap
> Cc: linux-scsi@vger.kernel.org; Moore, Eric; Prakash, Sathya
> Subject: Re: [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
>
> On Fri, 2009-04-03 at 17:19 +0530, Kashyap, Desai wrote:
> > -
> > - mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc);
> > - if (mf == NULL) {
> > + if ((mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc)) == NULL) {
> > dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
>
> This is making a clear statement (assignment then check) less clear for
> no practical purpose that I can see.
>
> James
>
>
> --
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
2009-04-04 13:17 ` James Bottomley
@ 2009-04-06 4:53 ` Desai, Kashyap
0 siblings, 0 replies; 5+ messages in thread
From: Desai, Kashyap @ 2009-04-06 4:53 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi@vger.kernel.org, Moore, Eric, Prakash, Sathya
James,
I am really sorry for my previous reply. Actually checkpatch is reporting correctly, but my understanding was wrong. I am going to correct it and resending it back.
Thanks
Kashyap
-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
Sent: Saturday, April 04, 2009 6:47 PM
To: Desai, Kashyap
Cc: linux-scsi@vger.kernel.org; Moore, Eric; Prakash, Sathya
Subject: RE: [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
On Sat, 2009-04-04 at 15:15 +0530, Desai, Kashyap wrote:
> James,
>
> After creating patch, I usually run check_patch script available in scripts directory of linux source tree.
> Below changes are just to remove warning and error related to coding standards from generated patch.
Hmm, then we have an error in checkpatch.pl if it's saying that
x = y
if (x == NULL)
should become
if ((x = y) == NULL)
Can you attach the warning so I can get the checkpatch maintainers to
explain what's going on?
Thanks,
James
> If you suggest, not to have those changes merge with actual logical
> patch then please let me know. I can rework and resubmit.
>
>
> Thanks
> Kashyap
> ________________________________________
> From: James Bottomley [James.Bottomley@HansenPartnership.com]
> Sent: Friday, April 03, 2009 1:38 PM
> To: Desai, Kashyap
> Cc: linux-scsi@vger.kernel.org; Moore, Eric; Prakash, Sathya
> Subject: Re: [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return
>
> On Fri, 2009-04-03 at 17:19 +0530, Kashyap, Desai wrote:
> > -
> > - mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc);
> > - if (mf == NULL) {
> > + if ((mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc)) == NULL) {
> > dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
>
> This is making a clear statement (assignment then check) less clear for
> no practical purpose that I can see.
>
> James
>
>
> --
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-06 4:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-03 11:49 [PATCH 1/6] mpt fusion: fix for previous patch taskmgmt in progress should be cleared before return Kashyap, Desai
2009-04-03 17:38 ` James Bottomley
2009-04-04 9:45 ` Desai, Kashyap
2009-04-04 13:17 ` James Bottomley
2009-04-06 4:53 ` Desai, Kashyap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox