linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] libata-dev: add flush task to ata_exec_internal()
@ 2006-03-14  3:19 Albert Lee
  2006-03-14  6:12 ` Tejun Heo
  2006-03-22  1:40 ` Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: Albert Lee @ 2006-03-14  3:19 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Tejun Heo, IDE Linux

Add ata_port_flush_task() to ata_exec_internal().

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
---

It seems we also need ata_port_flush_task() in ata_exec_internal().

Patch against the upstream branch
(fb21f0d0ec7e31cc814165e1a9d2662d9c9dd980).

For your review, thanks,

Albert

--- upstream0/drivers/scsi/libata-core.c	2006-03-14 10:31:01.000000000 +0800
+++ exec_internal/drivers/scsi/libata-core.c	2006-03-14 10:55:24.000000000 +0800
@@ -962,6 +962,8 @@ ata_exec_internal(struct ata_port *ap, s
 	spin_unlock_irqrestore(&ap->host_set->lock, flags);
 
 	if (!wait_for_completion_timeout(&wait, ATA_TMOUT_INTERNAL)) {
+		ata_port_flush_task(ap);
+
 		spin_lock_irqsave(&ap->host_set->lock, flags);
 
 		/* We're racing with irq here.  If we lose, the


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] libata-dev: add flush task to ata_exec_internal()
  2006-03-14  3:19 [PATCH 1/1] libata-dev: add flush task to ata_exec_internal() Albert Lee
@ 2006-03-14  6:12 ` Tejun Heo
  2006-03-14  7:08   ` Jeff Garzik
  2006-03-22  1:40 ` Jeff Garzik
  1 sibling, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2006-03-14  6:12 UTC (permalink / raw)
  To: albertl; +Cc: Jeff Garzik, IDE Linux

Albert Lee wrote:
> Add ata_port_flush_task() to ata_exec_internal().
> 
> Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
> ---
> 
> It seems we also need ata_port_flush_task() in ata_exec_internal().
> 
> Patch against the upstream branch
> (fb21f0d0ec7e31cc814165e1a9d2662d9c9dd980).
> 
> For your review, thanks,
> 
> Albert
> 
> --- upstream0/drivers/scsi/libata-core.c	2006-03-14 10:31:01.000000000 +0800
> +++ exec_internal/drivers/scsi/libata-core.c	2006-03-14 10:55:24.000000000 +0800
> @@ -962,6 +962,8 @@ ata_exec_internal(struct ata_port *ap, s
>  	spin_unlock_irqrestore(&ap->host_set->lock, flags);
>  
>  	if (!wait_for_completion_timeout(&wait, ATA_TMOUT_INTERNAL)) {
> +		ata_port_flush_task(ap);
> +
>  		spin_lock_irqsave(&ap->host_set->lock, flags);
>  
>  		/* We're racing with irq here.  If we lose, the
> 

Yes, we certainly need this. The irq handling isn't really correct 
either as irq handlers don't clear interrupt conditions on spurious 
interrupts. I hope/plan to address this during EH work.

Anyways, ACK.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] libata-dev: add flush task to ata_exec_internal()
  2006-03-14  6:12 ` Tejun Heo
@ 2006-03-14  7:08   ` Jeff Garzik
  2006-03-14  9:10     ` Tejun Heo
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2006-03-14  7:08 UTC (permalink / raw)
  To: Tejun Heo; +Cc: albertl, IDE Linux

Tejun Heo wrote:
> Yes, we certainly need this. The irq handling isn't really correct 
> either as irq handlers don't clear interrupt conditions on spurious 
> interrupts. I hope/plan to address this during EH work.

Except for the HSM, there is no guaranteed way to know if an interrupt 
is spurious or not on many controllers, who lack an "I have an 
interrupt" bit.

	Jeff



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] libata-dev: add flush task to ata_exec_internal()
  2006-03-14  7:08   ` Jeff Garzik
@ 2006-03-14  9:10     ` Tejun Heo
  0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2006-03-14  9:10 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: albertl, IDE Linux

Jeff Garzik wrote:
> Tejun Heo wrote:
> 
>> Yes, we certainly need this. The irq handling isn't really correct 
>> either as irq handlers don't clear interrupt conditions on spurious 
>> interrupts. I hope/plan to address this during EH work.
> 
> 
> Except for the HSM, there is no guaranteed way to know if an interrupt 
> is spurious or not on many controllers, who lack an "I have an 
> interrupt" bit.
> 

What I'm thinking is to disable interrupt (hopefully using controller 
flag, maybe PCI IRQ disable, ATA_NIEN if nothing else is possible) on 
error condition which may breach HSM and force controller and device to 
a known state in ->error_handler() or ->post_internal_command() before 
reenabling interrupt. This method will also make libata resistant to 
screaming IRQ cases some controllers/drives show under certain 
circumstances.

And I think clearing ->hsm_task_state belongs to (to-be-added) 
->post_internal_command() as it belongs to ->eng_timeout but not to EH 
framework.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] libata-dev: add flush task to ata_exec_internal()
  2006-03-14  3:19 [PATCH 1/1] libata-dev: add flush task to ata_exec_internal() Albert Lee
  2006-03-14  6:12 ` Tejun Heo
@ 2006-03-22  1:40 ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2006-03-22  1:40 UTC (permalink / raw)
  To: albertl; +Cc: Tejun Heo, IDE Linux

Albert Lee wrote:
> Add ata_port_flush_task() to ata_exec_internal().
> 
> Signed-off-by: Albert Lee <albertcc@tw.ibm.com>

applied



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-03-22  1:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-14  3:19 [PATCH 1/1] libata-dev: add flush task to ata_exec_internal() Albert Lee
2006-03-14  6:12 ` Tejun Heo
2006-03-14  7:08   ` Jeff Garzik
2006-03-14  9:10     ` Tejun Heo
2006-03-22  1:40 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).