Re: [PATCH 02/15] ide-tape: remove back-to-back REQUEST_SENSE detection

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

 



Hi,

On Sun, Apr 19, 2009 at 06:39:42AM +0900, Tejun Heo wrote:
> Hello, Borislav.
> 
> Borislav Petkov wrote:
> > sorry for I wasn't that clear. We need the drive->pc ptr valid in order to
> > retry a packet command couple lines below in the ->do_request callback:
> > 
> >         /* Retry a failed packet command */
> >         if (drive->failed_pc && drive->pc->c[0] == REQUEST_SENSE) {
> >                 pc = drive->failed_pc;
> >                 goto out;
> >         }
> 
> No, that's checking whether the _previous_ command was REQUEST_SENSE
> which is guaranteed to be set if drive->failed_pc is not NULL.
> drive->pc is set to the current command at the start of
> ide_tape_issue_pc().

Damn! Now it all falls into place nicely, thanks for clarifying that. My
original bug analysis was simply plain wrong.

So, drive->pc means two things: the previous command - until the moment
when it is overwritten with the upcoming command from the current
request _and_ the current command which is being issued. This is all
quite b0rked...

I think your original fix is just fine, let's go with that.

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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux