All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Michael Madore <Michael.Madore@aslab.com>,
	linux-ide@vger.kernel.org, albertcc@tw.ibm.com,
	Douglas Gilbert <dougg@torque.net>
Subject: Re: [PATCH linux-2.6.13-rc3] Mod15Write quirk against v2.6.13
Date: Mon, 22 Aug 2005 04:56:14 +0900	[thread overview]
Message-ID: <4308DC5E.9020500@gmail.com> (raw)
In-Reply-To: <4308D73A.9000600@pobox.com>


  Hi, Jeff.

Jeff Garzik wrote:
> Tejun Heo wrote:
> 
>>  sata_sil Mod15Write workaround was broken by the following commit by
>> Albert Lee.
>>
>> Commit: 21b1ed74ee3667dcabcba92e486988ea9119a085
>> [PATCH] libata: Prevent the interrupt handler from completing a 
>> command twice
>>
>>  This commit clears ATA_QCFLAG_ACTIVE in ata_qc_complete() and doesn't
>> handle IRQ if ATA_QCFLAG_ACTIVE is cleared on entry to interrupt
>> routine.  As m15w workaround executes single command multiple times,
>> the flag is cleared after the first chunk completion and the following
>> interrupt gets ignored resulting in "nobody cared" interrupt error.
>>
>>  The following changes are made in m15w workaround to fix this.
>>
>>  * Moved clearing of ATA_QCFLAG_ACTIVE before invoking ->complete_fn,
>>    so that ->complete_fn can mangle with the flag.  This doesn't affect
>>    any users.
>>  * Added setting ATA_QCFLAG_ACTIVE in m15w chunk completion function.
> 
> 
>> diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
>> --- a/drivers/scsi/libata-core.c
>> +++ b/drivers/scsi/libata-core.c
>> @@ -3087,8 +3087,8 @@ void ata_qc_complete(struct ata_queued_c
>>          ata_sg_clean(qc);
>>  
>>      /* call completion callback */
>> -    rc = qc->complete_fn(qc, drv_stat);
>>      qc->flags &= ~ATA_QCFLAG_ACTIVE;
>> +    rc = qc->complete_fn(qc, drv_stat);
>>  
>>      /* if callback indicates not to complete command (non-zero),
>>       * return immediately
> 
> 
> 
> I'm leaning towards applying latest Albert's ATA_QCFLAG_ACTIVE fix, 
> which does the same thing your patch did.
> 
> For various complex tasks in the SCSI translation layer (SAT), we may 
> wish to issue multiple ATA commands, before signalling completion.  As 
> your mod15write patch is an example of this, it helps point out what 
> parts of libata need work in order to accomplish this.
> 
> Any comments before I apply Albert's patch?
> 

  I think the following patch I've posted deal with the same problem.

http://marc.theaimsgroup.com/?l=linux-ide&m=112454734102242&w=2

  Which, I think, is a better way to fix it.  It's dependant on the 
previous patchset you've just NAK'ed, so it cannot be applied but please 
take a look.  The base of the problem is that we run both 
ata_qc_complete and EH concurrently.

-- 
tejun

  reply	other threads:[~2005-08-21 21:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1121894035.4885.15.camel@drevil.aslab.com>
2005-07-28 14:12 ` [PATCH linux-2.6.13-rc3] Mod15Write quirk against v2.6.13 Tejun Heo
2005-08-21 19:19   ` Jeff Garzik
2005-08-21 20:45     ` Tejun Heo
2005-08-21 21:10       ` Jeff Garzik
2005-08-21 21:44         ` Tejun Heo
2005-08-22 10:19           ` Bartlomiej Zolnierkiewicz
2005-08-22 11:46             ` [PATCH libata:upstream] sil: apply M15W quirk selectively Tejun Heo
2005-08-22 19:36               ` Jeff Garzik
2005-08-22 21:39                 ` Tejun Heo
2005-08-22 21:45                   ` Jeff Garzik
2005-08-22 22:27                   ` [PATCH libata:upstream] sil: apply M15W quirk selectively (take 2) Tejun Heo
2005-08-23  5:06                     ` Jeff Garzik
2005-08-21 19:34   ` [PATCH linux-2.6.13-rc3] Mod15Write quirk against v2.6.13 Jeff Garzik
2005-08-21 19:56     ` Tejun Heo [this message]
2005-08-21 20:11       ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4308DC5E.9020500@gmail.com \
    --to=htejun@gmail.com \
    --cc=Michael.Madore@aslab.com \
    --cc=albertcc@tw.ibm.com \
    --cc=dougg@torque.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.