Skip to contentSkip to conversation

mpt fusion: [2.6.30-rc6] fix for previous patch taskmgmt in progess should be cleared before return

PATCH In review Kashyap, Desai 2 participants 3 messages May 22, 2009 – May 27, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 12/24 mpt fusion: [2.6.30-rc6] fix for previous patch taskmgmt in progess should be cleared before return

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.
---

---

drivers/message/fusion/mptsas.c +15 -3
index 0aecc13..eb6b10e 100644
@@ -560,11 +560,14 @@ mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
 	mf = mpt_get_msg_frame(mptsasDeviceResetCtx, ioc);
 	if (mf == 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 +580,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;
 }
 
 /**
maintainer
#1 lore raw
Quoted 2 lines · Desai

Small fix for previous Patch applied on 26/02/2009: subject line :
"mpt fusion: config, Taskmgmt cmd, Internal cmd, Ioctl cmd changes".

OK, so this seems to be completely bogus as well since there's no such patch in any of the trees.

If I look at what the patch is doing, it seems it should be merged with your 11/24 "rewrite of ioctl_cmds internal generated function" which introduces the bug?

James

#2 lore raw

James,

I have included all your review comments in my next submission.

Thanks
Kashyap

-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Friday, May 22, 2009 10:32 PM
To: Desai, Kashyap
Cc: [email protected]; Moore, Eric; Prakash, Sathya
Subject: Re: [PATCH 12/24] mpt fusion: [2.6.30-rc6] fix for previous patch taskmgmt in progess should be cleared before return

Quoted 2 lines · Desai

Small fix for previous Patch applied on 26/02/2009: subject line :
"mpt fusion: config, Taskmgmt cmd, Internal cmd, Ioctl cmd changes".

OK, so this seems to be completely bogus as well since there's no such patch in any of the trees.

If I look at what the patch is doing, it seems it should be merged with your 11/24 "rewrite of ioctl_cmds internal generated function" which introduces the bug?

James