linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] libata-sff.c: add another IRQ calls
@ 2007-01-16 10:46 Akira Iguchi
  0 siblings, 0 replies; 3+ messages in thread
From: Akira Iguchi @ 2007-01-16 10:46 UTC (permalink / raw)
  To: linux-ide; +Cc: jeff, arnd, linuxppc-dev, paulus, alan

When enabling IRQ, ap->ops->irq_on is checked.
Because most drivers can use ata_irq_on() as is, this
patch allows ap->ops->irq_on to be NULL.
If it is NULL, ata_irq_on() are used.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
---

--- linux-2.6.20-rc4/drivers/ata/libata-sff.c.orig	2007-01-17 01:45:56.000000000 +0900
+++ linux-2.6.20-rc4/drivers/ata/libata-sff.c	2007-01-17 02:16:00.000000000 +0900
@@ -724,8 +724,12 @@ void ata_bmdma_thaw(struct ata_port *ap)
 	/* clear & re-enable interrupts */
 	ata_chk_status(ap);
 	ap->ops->irq_clear(ap);
-	if (ap->ioaddr.ctl_addr)	/* FIXME: hack. create a hook instead */
-		ata_irq_on(ap);
+	if (ap->ioaddr.ctl_addr) {	/* FIXME: hack. create a hook instead */
+		if (ap->ops->irq_on)
+			ap->ops->irq_on(ap);
+		else
+			ata_irq_on(ap);
+	}
 }
 
 /**

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

* Re: [PATCH 3/4] libata-sff.c: add another IRQ calls
       [not found] <200701161046.l0GAkE5u029367@toshiba.co.jp>
@ 2007-01-16 12:04 ` Alan
  2007-01-16 22:05   ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Alan @ 2007-01-16 12:04 UTC (permalink / raw)
  To: Akira Iguchi; +Cc: jeff, arnd, linuxppc-dev, linux-ide, paulus

On Tue, 16 Jan 2007 19:46:23 +0900
Akira Iguchi <akira2.iguchi@toshiba.co.jp> wrote:

> When enabling IRQ, ap->ops->irq_on is checked.
> Because most drivers can use ata_irq_on() as is, this
> patch allows ap->ops->irq_on to be NULL.
> If it is NULL, ata_irq_on() are used.


I believe you can now remove the if(ap->ioaddr.ctl_addr) check as any
device lacking a ctl_addr can now provide an irq_on() method using your
changes.

You've fixed the FIXME 

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

* Re: [PATCH 3/4] libata-sff.c: add another IRQ calls
  2007-01-16 12:04 ` [PATCH 3/4] libata-sff.c: add another IRQ calls Alan
@ 2007-01-16 22:05   ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-01-16 22:05 UTC (permalink / raw)
  To: Alan; +Cc: arnd, linuxppc-dev, linux-ide, paulus

Alan wrote:
> On Tue, 16 Jan 2007 19:46:23 +0900
> Akira Iguchi <akira2.iguchi@toshiba.co.jp> wrote:
> 
>> When enabling IRQ, ap->ops->irq_on is checked.
>> Because most drivers can use ata_irq_on() as is, this
>> patch allows ap->ops->irq_on to be NULL.
>> If it is NULL, ata_irq_on() are used.
> 
> 
> I believe you can now remove the if(ap->ioaddr.ctl_addr) check as any
> device lacking a ctl_addr can now provide an irq_on() method using your
> changes.
> 
> You've fixed the FIXME 

Agreed.

Abstracting out the Control/Alt-Status register block operations has 
been a long-standing TODO that I knew would be required, sometime down 
the line.  I certainly support adding such abstractions, as they are 
required for several non-x86 IDE drivers, not just Cell.

	Jeff

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

end of thread, other threads:[~2007-01-16 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200701161046.l0GAkE5u029367@toshiba.co.jp>
2007-01-16 12:04 ` [PATCH 3/4] libata-sff.c: add another IRQ calls Alan
2007-01-16 22:05   ` Jeff Garzik
2007-01-16 10:46 Akira Iguchi

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).