On 7/18/07, Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:
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) { -
I forgot. If it fails could you also do below on the failing patch. Get some extra prints ... Thanks Boaz diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index f2f0619..ca6f8fc 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -278,6 +278,8 @@ static LIST_HEAD(aha152x_host_list); #error define AUTOCONF or SETUP0 #endif +#define AHA152X_DEBUG + #if defined(AHA152X_DEBUG) #define DEBUG_DEFAULT debug_eh - 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