Re: [patch 0/4] aha152x.c - Cleanup, need help in testing and auditing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Randy Dunlap wrote:
> On Mon, 16 Jul 2007 12:22:20 +0300 Boaz Harrosh wrote:
> 
>> If you could do some testing it is grate. The first 3 patches do not
>> need scsi-misc specifically. Any post 2.6.20 tree will do. The last patch
>> could be done together with attached patch on any 2.6.22 tree.
>> (Apply attached patch anywhere before the last patch (4/4) of the patchset)
>> Though I do recommend scsi-misc tree.
> 
> I took 2.6.22, backed out Christoph's aha152x.c patch (using
> completion for timeouts), added your 5 patches, and then tested.
> Does that sound OK?
> 
Yes what you did is perfect
I was not aware of "Christoph's aha152x.c patch" is that in scsi-misc?
I'm almost positive I did a git-pull before I sent the patches.
Sorry about that.

>> Testing:
> 
> I booted/tested 4 times.  2 Oopsen and 2 of
> could-never-mount-the-device-due-to-reset-problems.
> Log is attached.
> 
> 
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***

Thank you for testing and helping me with this.

I found one thing that should definitely trash the Reset
and do funny things. But I'm not sure it is it at all.
If below does not work, could you pleas do a small bisect
of my patches.

first patch first, than 2nd, 3rd ,accessors thing, and 4th 

git-diff
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index f2f0619..6762cc8 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -1151,6 +1151,7 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
 	struct Scsi_Host *shpnt = SCpnt->device->host;
 	DECLARE_COMPLETION(done);
 	int ret, issued, disconnected;
+	unsigned short old_cmd_len = SCpnt->cmd_len;
 	unsigned long flags;
 	unsigned long timeleft;
 
@@ -1171,6 +1172,8 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
 	disconnected = issued && remove_SC(&DISCONNECTED_SC, SCpnt);
 	DO_UNLOCK(flags);
 
+	SCpnt->cmd_len         = 0;
+
 	aha152x_internal_queue(SCpnt, &done, resetting, reset_done);
 
 	timeleft = wait_for_completion_timeout(&done, 100*HZ);
@@ -1181,6 +1184,8 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
 		DO_UNLOCK(flags);
 	}
 
+	SCpnt->cmd_len         = old_cmd_len;
+
 	DO_LOCK(flags);
 
 	if(SCpnt->SCp.phase & resetted) {

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux