linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/10] libata: irq_on/off restructuring
@ 2007-07-04  8:38 Albert Lee
  2007-07-04  8:43 ` [PATCH 1/10] libata: remove irq_on from ata_bus_reset() and ata_std_postreset() Albert Lee
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  8:38 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE

For ATA, there are two levels of mechanism available to turn irq on/off.
- device level: nIEN bit in the control register. This masks INTRQ from the device.
- host adapter level: some controller can mask out per-port irq from the host adapter.

Currently various parts of libata deal with irq on/off.
  ex. tf_load() can alter the nIEN bit.
  ex. irq_on() also alters the device level nIEN bit.
  ex. freeze()/thaw() deal with the host adapter irq mask.

It seems these irq on/off codes could be better structured.
Patches against libata-dev tree for your review/advice, thanks.

1/10: remove irq_on from ata_bus_reset() and ata_std_postreset()
2/10: add ->irq_off() for symmetry
3/10: implement ->irq_off() in LLDDs
4/10: use irq_off from bmdma_freeze()
5/10: use freeze()/thaw() for polling
6/10: add freeze()/thaw() to old EH LLDDs
7/10: pdc_freeze() semantic change
8/10: remove writing of tf->ctl from ata_tf_load()
9/10: integrate freeze()/thaw() with irq_on/off.
10/10: integrate freeze/thaw with irq_on/off in LLDDs


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

* [PATCH 1/10] libata: remove irq_on from ata_bus_reset() and ata_std_postreset()
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
@ 2007-07-04  8:43 ` Albert Lee
  2007-07-05 10:18   ` Tejun Heo
  2007-07-04  8:46 ` [PATCH 2/10] libata: add irq_off Albert Lee
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Albert Lee @ 2007-07-04  8:43 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Doug Maxey, Linux IDE

Patch 1/10:
  After checking, it seems calling irq_on() in ata_bus_reset() and ata_std_postreset()
are leftover of the EDD reset. Remove them.

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


diff -Nrup 00_libata-dev/drivers/ata/libata-core.c 01_remove_leftover_irqon/drivers/ata/libata-core.c
--- 00_libata-dev/drivers/ata/libata-core.c	2007-07-04 11:26:30.000000000 +0800
+++ 01_remove_leftover_irqon/drivers/ata/libata-core.c	2007-07-04 11:43:30.000000000 +0800
@@ -3194,9 +3194,6 @@ void ata_bus_reset(struct ata_port *ap)
 	if ((slave_possible) && (err != 0x81))
 		ap->device[1].class = ata_dev_try_classify(ap, 1, &err);
 
-	/* re-enable interrupts */
-	ap->ops->irq_on(ap);
-
 	/* is double-select really necessary? */
 	if (ap->device[1].class != ATA_DEV_NONE)
 		ap->ops->dev_select(ap, 1);
@@ -3581,10 +3578,6 @@ void ata_std_postreset(struct ata_port *
 	if (sata_scr_read(ap, SCR_ERROR, &serror) == 0)
 		sata_scr_write(ap, SCR_ERROR, serror);
 
-	/* re-enable interrupts */
-	if (!ap->ops->error_handler)
-		ap->ops->irq_on(ap);
-
 	/* is double-select really necessary? */
 	if (classes[0] != ATA_DEV_NONE)
 		ap->ops->dev_select(ap, 1);
diff -Nrup 00_libata-dev/drivers/ata/pata_scc.c 01_remove_leftover_irqon/drivers/ata/pata_scc.c
--- 00_libata-dev/drivers/ata/pata_scc.c	2007-07-04 11:26:30.000000000 +0800
+++ 01_remove_leftover_irqon/drivers/ata/pata_scc.c	2007-07-04 11:43:30.000000000 +0800
@@ -892,10 +892,6 @@ static void scc_std_postreset (struct at
 {
 	DPRINTK("ENTER\n");
 
-	/* re-enable interrupts */
-	if (!ap->ops->error_handler)
-		ap->ops->irq_on(ap);
-
 	/* is double-select really necessary? */
 	if (classes[0] != ATA_DEV_NONE)
 		ap->ops->dev_select(ap, 1);



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

* [PATCH 2/10] libata: add irq_off
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
  2007-07-04  8:43 ` [PATCH 1/10] libata: remove irq_on from ata_bus_reset() and ata_std_postreset() Albert Lee
@ 2007-07-04  8:46 ` Albert Lee
  2007-07-04  8:49 ` [PATCH 3/10] libata: implement ->irq_off in LLDDs Albert Lee
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  8:46 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Patch 2/10:
  Currently there is ->irq_on but no ->irq_off.
Turning irq off is done via altering the nIEN bit of qc->tf, together with tf_load().

This patch adds ->irq_off for symmetry.
tf_load() and ata_qc_set_polling() will be fixed/removed in later patches.

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

diff -Nrup 01_remove_leftover_irqon/drivers/ata/libata-core.c 02_add_irq_off/drivers/ata/libata-core.c
--- 01_remove_leftover_irqon/drivers/ata/libata-core.c	2007-07-04 11:43:30.000000000 +0800
+++ 02_add_irq_off/drivers/ata/libata-core.c	2007-07-04 11:57:33.000000000 +0800
@@ -6901,6 +6901,8 @@ EXPORT_SYMBOL_GPL(ata_eh_qc_retry);
 EXPORT_SYMBOL_GPL(ata_do_eh);
 EXPORT_SYMBOL_GPL(ata_irq_on);
 EXPORT_SYMBOL_GPL(ata_dummy_irq_on);
+EXPORT_SYMBOL_GPL(ata_irq_off);
+EXPORT_SYMBOL_GPL(ata_dummy_irq_off);
 EXPORT_SYMBOL_GPL(ata_irq_ack);
 EXPORT_SYMBOL_GPL(ata_dummy_irq_ack);
 EXPORT_SYMBOL_GPL(ata_dev_try_classify);
diff -Nrup 01_remove_leftover_irqon/drivers/ata/libata-sff.c 02_add_irq_off/drivers/ata/libata-sff.c
--- 01_remove_leftover_irqon/drivers/ata/libata-sff.c	2007-07-04 11:26:30.000000000 +0800
+++ 02_add_irq_off/drivers/ata/libata-sff.c	2007-07-04 11:57:33.000000000 +0800
@@ -67,6 +67,39 @@ u8 ata_irq_on(struct ata_port *ap)
 u8 ata_dummy_irq_on (struct ata_port *ap) 	{ return 0; }
 
 /**
+ *	ata_irq_off - Disable interrupts on a port.
+ *	@ap: Port on which interrupts are disabled.
+ *
+ *	Disable interrupts on a legacy IDE device using MMIO or PIO,
+ *	wait for idle, clear any pending interrupts.
+ *
+ *	LOCKING:
+ *	Inherited from caller.
+ */
+u8 ata_irq_off(struct ata_port *ap)
+{
+	struct ata_ioports *ioaddr = &ap->ioaddr;
+	u8 tmp;
+
+	ap->ctl |= ATA_NIEN;
+	ap->last_ctl = ap->ctl;
+
+	iowrite8(ap->ctl, ioaddr->ctl_addr);
+
+	/* Under certain circumstances, some controllers raise IRQ on
+	 * ATA_NIEN manipulation.  Also, many controllers fail to mask
+	 * previously pending IRQ on ATA_NIEN assertion.  Clear it.
+	 */
+	tmp = ata_wait_idle(ap);
+
+	ap->ops->irq_clear(ap);
+
+	return tmp;
+}
+
+u8 ata_dummy_irq_off (struct ata_port *ap) 	{ return 0; }
+
+/**
  *	ata_irq_ack - Acknowledge a device interrupt.
  *	@ap: Port on which interrupts are enabled.
  *
diff -Nrup 01_remove_leftover_irqon/drivers/ata/libata.h 02_add_irq_off/drivers/ata/libata.h
--- 01_remove_leftover_irqon/drivers/ata/libata.h	2007-07-04 11:26:30.000000000 +0800
+++ 02_add_irq_off/drivers/ata/libata.h	2007-07-04 11:57:33.000000000 +0800
@@ -156,7 +156,5 @@ extern void ata_port_wait_eh(struct ata_
 extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc);
 
 /* libata-sff.c */
-extern u8 ata_irq_on(struct ata_port *ap);
-
 
 #endif /* __LIBATA_H__ */
diff -Nrup 01_remove_leftover_irqon/include/linux/libata.h 02_add_irq_off/include/linux/libata.h
--- 01_remove_leftover_irqon/include/linux/libata.h	2007-07-04 11:26:45.000000000 +0800
+++ 02_add_irq_off/include/linux/libata.h	2007-07-04 11:57:33.000000000 +0800
@@ -597,6 +597,7 @@ struct ata_port_operations {
 	irq_handler_t irq_handler;
 	void (*irq_clear) (struct ata_port *);
 	u8 (*irq_on) (struct ata_port *);
+	u8 (*irq_off) (struct ata_port *);
 	u8 (*irq_ack) (struct ata_port *ap, unsigned int chk_drq);
 
 	u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg);
@@ -804,6 +805,8 @@ extern struct ata_device *ata_dev_pair(s
 extern int ata_do_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
 extern u8 ata_irq_on(struct ata_port *ap);
 extern u8 ata_dummy_irq_on(struct ata_port *ap);
+extern u8 ata_irq_off(struct ata_port *ap);
+extern u8 ata_dummy_irq_off(struct ata_port *ap);
 extern u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq);
 extern u8 ata_dummy_irq_ack(struct ata_port *ap, unsigned int chk_drq);
 



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

* [PATCH 3/10] libata: implement ->irq_off in LLDDs
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
  2007-07-04  8:43 ` [PATCH 1/10] libata: remove irq_on from ata_bus_reset() and ata_std_postreset() Albert Lee
  2007-07-04  8:46 ` [PATCH 2/10] libata: add irq_off Albert Lee
@ 2007-07-04  8:49 ` Albert Lee
  2007-07-04  8:52 ` [PATCH 4/10] libata: call irq_off from bmdma_freeze() Albert Lee
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  8:49 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Patch 3/10: 

Implement the newly added ->irq_off in LLDDs.

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

diff -Nrup 02_add_irq_off/drivers/ata/ahci.c 03_add_irq_off_lldd/drivers/ata/ahci.c
--- 02_add_irq_off/drivers/ata/ahci.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/ahci.c	2007-07-04 12:09:29.000000000 +0800
@@ -268,6 +268,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= ahci_irq_clear,
 	.irq_on			= ata_dummy_irq_on,
+	.irq_off		= ata_dummy_irq_off,
 	.irq_ack		= ata_dummy_irq_ack,
 
 	.scr_read		= ahci_scr_read,
@@ -302,6 +303,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= ahci_irq_clear,
 	.irq_on			= ata_dummy_irq_on,
+	.irq_off		= ata_dummy_irq_off,
 	.irq_ack		= ata_dummy_irq_ack,
 
 	.scr_read		= ahci_scr_read,
diff -Nrup 02_add_irq_off/drivers/ata/ata_generic.c 03_add_irq_off_lldd/drivers/ata/ata_generic.c
--- 02_add_irq_off/drivers/ata/ata_generic.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/ata_generic.c	2007-07-04 12:09:29.000000000 +0800
@@ -121,6 +121,7 @@ static struct ata_port_operations generi
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/ata_piix.c 03_add_irq_off_lldd/drivers/ata/ata_piix.c
--- 02_add_irq_off/drivers/ata/ata_piix.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/ata_piix.c	2007-07-04 12:09:29.000000000 +0800
@@ -305,6 +305,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -339,6 +340,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -369,6 +371,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_ali.c 03_add_irq_off_lldd/drivers/ata/pata_ali.c
--- 02_add_irq_off/drivers/ata/pata_ali.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_ali.c	2007-07-04 12:09:29.000000000 +0800
@@ -320,6 +320,7 @@ static struct ata_port_operations ali_ea
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -362,6 +363,7 @@ static struct ata_port_operations ali_20
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -401,6 +403,7 @@ static struct ata_port_operations ali_c2
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -439,6 +442,7 @@ static struct ata_port_operations ali_c5
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_amd.c 03_add_irq_off_lldd/drivers/ata/pata_amd.c
--- 02_add_irq_off/drivers/ata/pata_amd.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_amd.c	2007-07-04 12:09:29.000000000 +0800
@@ -356,6 +356,7 @@ static struct ata_port_operations amd33_
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -391,6 +392,7 @@ static struct ata_port_operations amd66_
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -426,6 +428,7 @@ static struct ata_port_operations amd100
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -461,6 +464,7 @@ static struct ata_port_operations amd133
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -496,6 +500,7 @@ static struct ata_port_operations nv100_
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -531,6 +536,7 @@ static struct ata_port_operations nv133_
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_artop.c 03_add_irq_off_lldd/drivers/ata/pata_artop.c
--- 02_add_irq_off/drivers/ata/pata_artop.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_artop.c	2007-07-04 12:09:29.000000000 +0800
@@ -358,6 +358,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -391,6 +392,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_atiixp.c 03_add_irq_off_lldd/drivers/ata/pata_atiixp.c
--- 02_add_irq_off/drivers/ata/pata_atiixp.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_atiixp.c	2007-07-04 12:09:29.000000000 +0800
@@ -261,6 +261,7 @@ static struct ata_port_operations atiixp
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_cmd640.c 03_add_irq_off_lldd/drivers/ata/pata_cmd640.c
--- 02_add_irq_off/drivers/ata/pata_cmd640.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_cmd640.c	2007-07-04 12:09:29.000000000 +0800
@@ -213,6 +213,7 @@ static struct ata_port_operations cmd640
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= cmd640_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_cmd64x.c 03_add_irq_off_lldd/drivers/ata/pata_cmd64x.c
--- 02_add_irq_off/drivers/ata/pata_cmd64x.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_cmd64x.c	2007-07-04 12:09:29.000000000 +0800
@@ -298,6 +298,7 @@ static struct ata_port_operations cmd64x
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -333,6 +334,7 @@ static struct ata_port_operations cmd646
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -368,6 +370,7 @@ static struct ata_port_operations cmd648
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_cs5520.c 03_add_irq_off_lldd/drivers/ata/pata_cs5520.c
--- 02_add_irq_off/drivers/ata/pata_cs5520.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_cs5520.c	2007-07-04 12:09:29.000000000 +0800
@@ -184,6 +184,7 @@ static struct ata_port_operations cs5520
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_cs5530.c 03_add_irq_off_lldd/drivers/ata/pata_cs5530.c
--- 02_add_irq_off/drivers/ata/pata_cs5530.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_cs5530.c	2007-07-04 12:09:29.000000000 +0800
@@ -209,6 +209,7 @@ static struct ata_port_operations cs5530
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_cs5535.c 03_add_irq_off_lldd/drivers/ata/pata_cs5535.c
--- 02_add_irq_off/drivers/ata/pata_cs5535.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_cs5535.c	2007-07-04 12:09:29.000000000 +0800
@@ -206,6 +206,7 @@ static struct ata_port_operations cs5535
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_cypress.c 03_add_irq_off_lldd/drivers/ata/pata_cypress.c
--- 02_add_irq_off/drivers/ata/pata_cypress.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_cypress.c	2007-07-04 12:09:29.000000000 +0800
@@ -158,6 +158,7 @@ static struct ata_port_operations cy82c6
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_efar.c 03_add_irq_off_lldd/drivers/ata/pata_efar.c
--- 02_add_irq_off/drivers/ata/pata_efar.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_efar.c	2007-07-04 12:09:29.000000000 +0800
@@ -278,6 +278,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_hpt366.c 03_add_irq_off_lldd/drivers/ata/pata_hpt366.c
--- 02_add_irq_off/drivers/ata/pata_hpt366.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_hpt366.c	2007-07-04 12:09:29.000000000 +0800
@@ -342,6 +342,7 @@ static struct ata_port_operations hpt366
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_hpt37x.c 03_add_irq_off_lldd/drivers/ata/pata_hpt37x.c
--- 02_add_irq_off/drivers/ata/pata_hpt37x.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_hpt37x.c	2007-07-04 12:09:29.000000000 +0800
@@ -673,6 +673,7 @@ static struct ata_port_operations hpt370
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -712,6 +713,7 @@ static struct ata_port_operations hpt370
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -752,6 +754,7 @@ static struct ata_port_operations hpt372
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -792,6 +795,7 @@ static struct ata_port_operations hpt374
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_hpt3x2n.c 03_add_irq_off_lldd/drivers/ata/pata_hpt3x2n.c
--- 02_add_irq_off/drivers/ata/pata_hpt3x2n.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_hpt3x2n.c	2007-07-04 12:09:29.000000000 +0800
@@ -390,6 +390,7 @@ static struct ata_port_operations hpt3x2
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_hpt3x3.c 03_add_irq_off_lldd/drivers/ata/pata_hpt3x3.c
--- 02_add_irq_off/drivers/ata/pata_hpt3x3.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_hpt3x3.c	2007-07-04 12:09:29.000000000 +0800
@@ -133,6 +133,7 @@ static struct ata_port_operations hpt3x3
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_icside.c 03_add_irq_off_lldd/drivers/ata/pata_icside.c
--- 02_add_irq_off/drivers/ata/pata_icside.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_icside.c	2007-07-04 12:09:29.000000000 +0800
@@ -402,6 +402,7 @@ static struct ata_port_operations pata_i
 
 	.irq_clear		= ata_dummy_noret,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= pata_icside_irq_ack,
 
 	.port_start		= pata_icside_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_isapnp.c 03_add_irq_off_lldd/drivers/ata/pata_isapnp.c
--- 02_add_irq_off/drivers/ata/pata_isapnp.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_isapnp.c	2007-07-04 12:09:29.000000000 +0800
@@ -58,6 +58,7 @@ static struct ata_port_operations isapnp
 
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_it8213.c 03_add_irq_off_lldd/drivers/ata/pata_it8213.c
--- 02_add_irq_off/drivers/ata/pata_it8213.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_it8213.c	2007-07-04 12:09:29.000000000 +0800
@@ -288,6 +288,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_it821x.c 03_add_irq_off_lldd/drivers/ata/pata_it821x.c
--- 02_add_irq_off/drivers/ata/pata_it821x.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_it821x.c	2007-07-04 12:09:29.000000000 +0800
@@ -648,6 +648,7 @@ static struct ata_port_operations it821x
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= it821x_port_start,
@@ -685,6 +686,7 @@ static struct ata_port_operations it821x
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_handler	= ata_interrupt,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= it821x_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_ixp4xx_cf.c 03_add_irq_off_lldd/drivers/ata/pata_ixp4xx_cf.c
--- 02_add_irq_off/drivers/ata/pata_ixp4xx_cf.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_ixp4xx_cf.c	2007-07-04 12:09:29.000000000 +0800
@@ -133,6 +133,7 @@ static struct ata_port_operations ixp4xx
 
 	.irq_clear	= ixp4xx_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_jmicron.c 03_add_irq_off_lldd/drivers/ata/pata_jmicron.c
--- 02_add_irq_off/drivers/ata/pata_jmicron.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_jmicron.c	2007-07-04 12:09:29.000000000 +0800
@@ -168,6 +168,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	/* Generic PATA PCI ATA helpers */
diff -Nrup 02_add_irq_off/drivers/ata/pata_legacy.c 03_add_irq_off_lldd/drivers/ata/pata_legacy.c
--- 02_add_irq_off/drivers/ata/pata_legacy.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_legacy.c	2007-07-04 12:09:29.000000000 +0800
@@ -172,6 +172,7 @@ static struct ata_port_operations simple
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -201,6 +202,7 @@ static struct ata_port_operations legacy
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -317,6 +319,7 @@ static struct ata_port_operations pdc202
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -373,6 +376,7 @@ static struct ata_port_operations ht6560
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -440,6 +444,7 @@ static struct ata_port_operations ht6560
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -562,6 +567,7 @@ static struct ata_port_operations opti82
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -696,6 +702,7 @@ static struct ata_port_operations opti82
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_marvell.c 03_add_irq_off_lldd/drivers/ata/pata_marvell.c
--- 02_add_irq_off/drivers/ata/pata_marvell.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_marvell.c	2007-07-04 12:09:29.000000000 +0800
@@ -138,6 +138,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	/* Generic PATA PCI ATA helpers */
diff -Nrup 02_add_irq_off/drivers/ata/pata_mpc52xx.c 03_add_irq_off_lldd/drivers/ata/pata_mpc52xx.c
--- 02_add_irq_off/drivers/ata/pata_mpc52xx.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_mpc52xx.c	2007-07-04 12:09:29.000000000 +0800
@@ -299,6 +299,7 @@ static struct ata_port_operations mpc52x
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.port_start		= ata_port_start,
 };
diff -Nrup 02_add_irq_off/drivers/ata/pata_mpiix.c 03_add_irq_off_lldd/drivers/ata/pata_mpiix.c
--- 02_add_irq_off/drivers/ata/pata_mpiix.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_mpiix.c	2007-07-04 12:09:29.000000000 +0800
@@ -189,6 +189,7 @@ static struct ata_port_operations mpiix_
 
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_netcell.c 03_add_irq_off_lldd/drivers/ata/pata_netcell.c
--- 02_add_irq_off/drivers/ata/pata_netcell.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_netcell.c	2007-07-04 12:09:29.000000000 +0800
@@ -68,6 +68,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	/* Generic PATA PCI ATA helpers */
diff -Nrup 02_add_irq_off/drivers/ata/pata_ns87410.c 03_add_irq_off_lldd/drivers/ata/pata_ns87410.c
--- 02_add_irq_off/drivers/ata/pata_ns87410.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_ns87410.c	2007-07-04 12:09:29.000000000 +0800
@@ -184,6 +184,7 @@ static struct ata_port_operations ns8741
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_oldpiix.c 03_add_irq_off_lldd/drivers/ata/pata_oldpiix.c
--- 02_add_irq_off/drivers/ata/pata_oldpiix.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_oldpiix.c	2007-07-04 12:09:29.000000000 +0800
@@ -265,6 +265,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_opti.c 03_add_irq_off_lldd/drivers/ata/pata_opti.c
--- 02_add_irq_off/drivers/ata/pata_opti.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_opti.c	2007-07-04 12:09:29.000000000 +0800
@@ -209,6 +209,7 @@ static struct ata_port_operations opti_p
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_optidma.c 03_add_irq_off_lldd/drivers/ata/pata_optidma.c
--- 02_add_irq_off/drivers/ata/pata_optidma.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_optidma.c	2007-07-04 12:09:29.000000000 +0800
@@ -396,6 +396,7 @@ static struct ata_port_operations optidm
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -432,6 +433,7 @@ static struct ata_port_operations optipl
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_pcmcia.c 03_add_irq_off_lldd/drivers/ata/pata_pcmcia.c
--- 02_add_irq_off/drivers/ata/pata_pcmcia.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_pcmcia.c	2007-07-04 12:09:29.000000000 +0800
@@ -127,6 +127,7 @@ static struct ata_port_operations pcmcia
 
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_pdc2027x.c 03_add_irq_off_lldd/drivers/ata/pata_pdc2027x.c
--- 02_add_irq_off/drivers/ata/pata_pdc2027x.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_pdc2027x.c	2007-07-04 12:09:29.000000000 +0800
@@ -173,6 +173,7 @@ static struct ata_port_operations pdc202
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -208,6 +209,7 @@ static struct ata_port_operations pdc202
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_pdc202xx_old.c 03_add_irq_off_lldd/drivers/ata/pata_pdc202xx_old.c
--- 02_add_irq_off/drivers/ata/pata_pdc202xx_old.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_pdc202xx_old.c	2007-07-04 12:09:29.000000000 +0800
@@ -275,6 +275,7 @@ static struct ata_port_operations pdc202
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -310,6 +311,7 @@ static struct ata_port_operations pdc202
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_platform.c 03_add_irq_off_lldd/drivers/ata/pata_platform.c
--- 02_add_irq_off/drivers/ata/pata_platform.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_platform.c	2007-07-04 12:09:29.000000000 +0800
@@ -91,6 +91,7 @@ static struct ata_port_operations pata_p
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_dummy_ret0,
diff -Nrup 02_add_irq_off/drivers/ata/pata_qdi.c 03_add_irq_off_lldd/drivers/ata/pata_qdi.c
--- 02_add_irq_off/drivers/ata/pata_qdi.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_qdi.c	2007-07-04 12:09:29.000000000 +0800
@@ -192,6 +192,7 @@ static struct ata_port_operations qdi650
 
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -220,6 +221,7 @@ static struct ata_port_operations qdi658
 
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_radisys.c 03_add_irq_off_lldd/drivers/ata/pata_radisys.c
--- 02_add_irq_off/drivers/ata/pata_radisys.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_radisys.c	2007-07-04 12:09:29.000000000 +0800
@@ -231,6 +231,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_rz1000.c 03_add_irq_off_lldd/drivers/ata/pata_rz1000.c
--- 02_add_irq_off/drivers/ata/pata_rz1000.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_rz1000.c	2007-07-04 12:09:29.000000000 +0800
@@ -100,6 +100,7 @@ static struct ata_port_operations rz1000
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_sc1200.c 03_add_irq_off_lldd/drivers/ata/pata_sc1200.c
--- 02_add_irq_off/drivers/ata/pata_sc1200.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_sc1200.c	2007-07-04 12:09:29.000000000 +0800
@@ -227,6 +227,7 @@ static struct ata_port_operations sc1200
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_scc.c 03_add_irq_off_lldd/drivers/ata/pata_scc.c
--- 02_add_irq_off/drivers/ata/pata_scc.c	2007-07-04 11:43:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_scc.c	2007-07-04 12:09:29.000000000 +0800
@@ -812,6 +812,29 @@ static u8 scc_irq_on (struct ata_port *a
 }
 
 /**
+ *	scc_irq_off - Disable interrupts on a port.
+ *	@ap: Port on which interrupts are disabled.
+ *
+ *	Note: Original code is ata_irq_off().
+ */
+
+static u8 scc_irq_off (struct ata_port *ap)
+{
+	struct ata_ioports *ioaddr = &ap->ioaddr;
+	u8 tmp;
+
+	ap->ctl |= ATA_NIEN;
+	ap->last_ctl = ap->ctl;
+
+	out_be32(ioaddr->ctl_addr, ap->ctl);
+	tmp = ata_wait_idle(ap);
+
+	ap->ops->irq_clear(ap);
+
+	return tmp;
+}
+
+/**
  *	scc_irq_ack - Acknowledge a device interrupt.
  *	@ap: Port on which interrupts are enabled.
  *
@@ -1020,6 +1043,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= scc_bmdma_irq_clear,
 	.irq_on			= scc_irq_on,
+	.irq_off		= scc_irq_off,
 	.irq_ack		= scc_irq_ack,
 
 	.port_start		= scc_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_serverworks.c 03_add_irq_off_lldd/drivers/ata/pata_serverworks.c
--- 02_add_irq_off/drivers/ata/pata_serverworks.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_serverworks.c	2007-07-04 12:09:29.000000000 +0800
@@ -348,6 +348,7 @@ static struct ata_port_operations server
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -384,6 +385,7 @@ static struct ata_port_operations server
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_sil680.c 03_add_irq_off_lldd/drivers/ata/pata_sil680.c
--- 02_add_irq_off/drivers/ata/pata_sil680.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_sil680.c	2007-07-04 12:09:29.000000000 +0800
@@ -264,6 +264,7 @@ static struct ata_port_operations sil680
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_sis.c 03_add_irq_off_lldd/drivers/ata/pata_sis.c
--- 02_add_irq_off/drivers/ata/pata_sis.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_sis.c	2007-07-04 12:57:09.000000000 +0800
@@ -555,6 +555,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -589,6 +590,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -623,6 +625,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -657,6 +660,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -691,6 +695,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -725,6 +730,7 @@ static const struct ata_port_operations 
 	.irq_handler		= ata_interrupt,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_sl82c105.c 03_add_irq_off_lldd/drivers/ata/pata_sl82c105.c
--- 02_add_irq_off/drivers/ata/pata_sl82c105.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_sl82c105.c	2007-07-04 12:09:29.000000000 +0800
@@ -253,6 +253,7 @@ static struct ata_port_operations sl82c1
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_triflex.c 03_add_irq_off_lldd/drivers/ata/pata_triflex.c
--- 02_add_irq_off/drivers/ata/pata_triflex.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_triflex.c	2007-07-04 12:09:29.000000000 +0800
@@ -226,6 +226,7 @@ static struct ata_port_operations trifle
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_via.c 03_add_irq_off_lldd/drivers/ata/pata_via.c
--- 02_add_irq_off/drivers/ata/pata_via.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_via.c	2007-07-04 12:09:29.000000000 +0800
@@ -363,6 +363,7 @@ static struct ata_port_operations via_po
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
@@ -399,6 +400,7 @@ static struct ata_port_operations via_po
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pata_winbond.c 03_add_irq_off_lldd/drivers/ata/pata_winbond.c
--- 02_add_irq_off/drivers/ata/pata_winbond.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pata_winbond.c	2007-07-04 12:09:29.000000000 +0800
@@ -160,6 +160,7 @@ static struct ata_port_operations winbon
 
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
+	.irq_off	= ata_irq_off,
 	.irq_ack	= ata_irq_ack,
 
 	.port_start	= ata_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/pdc_adma.c 03_add_irq_off_lldd/drivers/ata/pdc_adma.c
--- 02_add_irq_off/drivers/ata/pdc_adma.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/pdc_adma.c	2007-07-04 12:09:29.000000000 +0800
@@ -173,6 +173,7 @@ static const struct ata_port_operations 
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= adma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.port_start		= adma_port_start,
 	.port_stop		= adma_port_stop,
diff -Nrup 02_add_irq_off/drivers/ata/sata_inic162x.c 03_add_irq_off_lldd/drivers/ata/sata_inic162x.c
--- 02_add_irq_off/drivers/ata/sata_inic162x.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_inic162x.c	2007-07-04 12:09:29.000000000 +0800
@@ -567,6 +567,7 @@ static struct ata_port_operations inic_p
 
 	.irq_clear		= inic_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.qc_prep	 	= ata_qc_prep,
diff -Nrup 02_add_irq_off/drivers/ata/sata_mv.c 03_add_irq_off_lldd/drivers/ata/sata_mv.c
--- 02_add_irq_off/drivers/ata/sata_mv.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_mv.c	2007-07-04 12:09:29.000000000 +0800
@@ -455,6 +455,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= mv5_scr_read,
@@ -484,6 +485,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= mv_scr_read,
@@ -513,6 +515,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= mv_scr_read,
diff -Nrup 02_add_irq_off/drivers/ata/sata_nv.c 03_add_irq_off_lldd/drivers/ata/sata_nv.c
--- 02_add_irq_off/drivers/ata/sata_nv.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_nv.c	2007-07-04 12:09:29.000000000 +0800
@@ -359,6 +359,7 @@ static const struct ata_port_operations 
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
@@ -385,6 +386,7 @@ static const struct ata_port_operations 
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
@@ -411,6 +413,7 @@ static const struct ata_port_operations 
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
@@ -439,6 +442,7 @@ static const struct ata_port_operations 
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= nv_adma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
diff -Nrup 02_add_irq_off/drivers/ata/sata_promise.c 03_add_irq_off_lldd/drivers/ata/sata_promise.c
--- 02_add_irq_off/drivers/ata/sata_promise.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_promise.c	2007-07-04 12:09:29.000000000 +0800
@@ -187,6 +187,7 @@ static const struct ata_port_operations 
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= pdc_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= pdc_sata_scr_read,
@@ -214,6 +215,7 @@ static const struct ata_port_operations 
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= pdc_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= pdc_sata_scr_read,
@@ -240,6 +242,7 @@ static const struct ata_port_operations 
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= pdc_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= pdc_common_port_start,
diff -Nrup 02_add_irq_off/drivers/ata/sata_qstor.c 03_add_irq_off_lldd/drivers/ata/sata_qstor.c
--- 02_add_irq_off/drivers/ata/sata_qstor.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_qstor.c	2007-07-04 12:09:29.000000000 +0800
@@ -159,6 +159,7 @@ static const struct ata_port_operations 
 	.eng_timeout		= qs_eng_timeout,
 	.irq_clear		= qs_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= qs_scr_read,
 	.scr_write		= qs_scr_write,
diff -Nrup 02_add_irq_off/drivers/ata/sata_sil.c 03_add_irq_off_lldd/drivers/ata/sata_sil.c
--- 02_add_irq_off/drivers/ata/sata_sil.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_sil.c	2007-07-04 12:09:29.000000000 +0800
@@ -206,6 +206,7 @@ static const struct ata_port_operations 
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= sil_scr_read,
 	.scr_write		= sil_scr_write,
diff -Nrup 02_add_irq_off/drivers/ata/sata_sil24.c 03_add_irq_off_lldd/drivers/ata/sata_sil24.c
--- 02_add_irq_off/drivers/ata/sata_sil24.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_sil24.c	2007-07-04 12:09:29.000000000 +0800
@@ -399,6 +399,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= sil24_irq_clear,
 	.irq_on			= ata_dummy_irq_on,
+	.irq_off		= ata_dummy_irq_off,
 	.irq_ack		= ata_dummy_irq_ack,
 
 	.scr_read		= sil24_scr_read,
diff -Nrup 02_add_irq_off/drivers/ata/sata_sis.c 03_add_irq_off_lldd/drivers/ata/sata_sis.c
--- 02_add_irq_off/drivers/ata/sata_sis.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_sis.c	2007-07-04 12:09:29.000000000 +0800
@@ -123,6 +123,7 @@ static const struct ata_port_operations 
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= sis_scr_read,
 	.scr_write		= sis_scr_write,
diff -Nrup 02_add_irq_off/drivers/ata/sata_svw.c 03_add_irq_off_lldd/drivers/ata/sata_svw.c
--- 02_add_irq_off/drivers/ata/sata_svw.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_svw.c	2007-07-04 12:09:29.000000000 +0800
@@ -347,6 +347,7 @@ static const struct ata_port_operations 
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= k2_sata_scr_read,
 	.scr_write		= k2_sata_scr_write,
diff -Nrup 02_add_irq_off/drivers/ata/sata_sx4.c 03_add_irq_off_lldd/drivers/ata/sata_sx4.c
--- 02_add_irq_off/drivers/ata/sata_sx4.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_sx4.c	2007-07-04 12:09:29.000000000 +0800
@@ -205,6 +205,7 @@ static const struct ata_port_operations 
 	.eng_timeout		= pdc_eng_timeout,
 	.irq_clear		= pdc20621_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.port_start		= pdc_port_start,
 };
diff -Nrup 02_add_irq_off/drivers/ata/sata_uli.c 03_add_irq_off_lldd/drivers/ata/sata_uli.c
--- 02_add_irq_off/drivers/ata/sata_uli.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_uli.c	2007-07-04 12:09:29.000000000 +0800
@@ -117,6 +117,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= uli_scr_read,
diff -Nrup 02_add_irq_off/drivers/ata/sata_via.c 03_add_irq_off_lldd/drivers/ata/sata_via.c
--- 02_add_irq_off/drivers/ata/sata_via.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_via.c	2007-07-04 12:09:29.000000000 +0800
@@ -146,6 +146,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -180,6 +181,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -211,6 +213,7 @@ static const struct ata_port_operations 
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= svia_scr_read,
diff -Nrup 02_add_irq_off/drivers/ata/sata_vsc.c 03_add_irq_off_lldd/drivers/ata/sata_vsc.c
--- 02_add_irq_off/drivers/ata/sata_vsc.c	2007-07-04 11:26:30.000000000 +0800
+++ 03_add_irq_off_lldd/drivers/ata/sata_vsc.c	2007-07-04 12:09:29.000000000 +0800
@@ -335,6 +335,7 @@ static const struct ata_port_operations 
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
+	.irq_off		= ata_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= vsc_sata_scr_read,
 	.scr_write		= vsc_sata_scr_write,



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

* [PATCH 4/10] libata: call irq_off from bmdma_freeze()
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
                   ` (2 preceding siblings ...)
  2007-07-04  8:49 ` [PATCH 3/10] libata: implement ->irq_off in LLDDs Albert Lee
@ 2007-07-04  8:52 ` Albert Lee
  2007-07-04  8:57 ` [PATCH 5/10] libata: use freeze/thaw for polling Albert Lee
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  8:52 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Patch 4/10:
  Call irq_off() from bmdma_freeze() and remove duplicated code.

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


diff -Nrup 03_add_irq_off_lldd/drivers/ata/libata-sff.c 04_convert_freeze/drivers/ata/libata-sff.c
--- 03_add_irq_off_lldd/drivers/ata/libata-sff.c	2007-07-04 11:57:33.000000000 +0800
+++ 04_convert_freeze/drivers/ata/libata-sff.c	2007-07-04 13:12:38.000000000 +0800
@@ -413,20 +413,7 @@ void ata_bmdma_stop(struct ata_queued_cm
  */
 void ata_bmdma_freeze(struct ata_port *ap)
 {
-	struct ata_ioports *ioaddr = &ap->ioaddr;
-
-	ap->ctl |= ATA_NIEN;
-	ap->last_ctl = ap->ctl;
-
-	iowrite8(ap->ctl, ioaddr->ctl_addr);
-
-	/* Under certain circumstances, some controllers raise IRQ on
-	 * ATA_NIEN manipulation.  Also, many controllers fail to mask
-	 * previously pending IRQ on ATA_NIEN assertion.  Clear it.
-	 */
-	ata_chk_status(ap);
-
-	ap->ops->irq_clear(ap);
+	ap->ops->irq_off(ap);
 }
 
 /**
diff -Nrup 03_add_irq_off_lldd/drivers/ata/pata_scc.c 04_convert_freeze/drivers/ata/pata_scc.c
--- 03_add_irq_off_lldd/drivers/ata/pata_scc.c	2007-07-04 12:09:29.000000000 +0800
+++ 04_convert_freeze/drivers/ata/pata_scc.c	2007-07-04 13:12:38.000000000 +0800
@@ -875,20 +875,7 @@ static u8 scc_irq_ack (struct ata_port *
 
 static void scc_bmdma_freeze (struct ata_port *ap)
 {
-	struct ata_ioports *ioaddr = &ap->ioaddr;
-
-	ap->ctl |= ATA_NIEN;
-	ap->last_ctl = ap->ctl;
-
-	out_be32(ioaddr->ctl_addr, ap->ctl);
-
-	/* Under certain circumstances, some controllers raise IRQ on
-	 * ATA_NIEN manipulation.  Also, many controllers fail to mask
-	 * previously pending IRQ on ATA_NIEN assertion.  Clear it.
-	 */
-	ata_chk_status(ap);
-
-	ap->ops->irq_clear(ap);
+	scc_irq_off(ap);
 }
 
 /**



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

* [PATCH 5/10] libata: use freeze/thaw for polling
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
                   ` (3 preceding siblings ...)
  2007-07-04  8:52 ` [PATCH 4/10] libata: call irq_off from bmdma_freeze() Albert Lee
@ 2007-07-04  8:57 ` Albert Lee
  2007-07-04  8:59 ` [PATCH 6/10] libata: add freeze/thaw to old EH LLDDs Albert Lee
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  8:57 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Patch 5/10:

  This patch changes polling codes to use freeze()/thaw() for irq off/on.
The reason is: some ATAPI devices raises INTRQ even of nIEN = 1.
Using the host adapter irq mask mechanism, if available, is more reliable than the device nIEN bit.

ata_qc_set_polling() is also removed since now unused.

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

Considerations:
   HSM, the new user of freeze()/thaw(), will call freeze()/thaw() in higher frequency than EH.
Can current implemention of freeze()/thaw() handle it?

diff -Nrup 04_convert_freeze/drivers/ata/libata-core.c 05_convert_hsm_to_freeze/drivers/ata/libata-core.c
--- 04_convert_freeze/drivers/ata/libata-core.c	2007-07-04 11:57:33.000000000 +0800
+++ 05_convert_hsm_to_freeze/drivers/ata/libata-core.c	2007-07-04 13:13:56.000000000 +0800
@@ -4753,7 +4753,7 @@ static void ata_hsm_qc_complete(struct a
 			qc = ata_qc_from_tag(ap, qc->tag);
 			if (qc) {
 				if (likely(!(qc->err_mask & AC_ERR_HSM))) {
-					ap->ops->irq_on(ap);
+					ap->ops->thaw(ap);
 					ata_qc_complete(qc);
 				} else
 					ata_port_freeze(ap);
@@ -4769,7 +4769,7 @@ static void ata_hsm_qc_complete(struct a
 	} else {
 		if (in_wq) {
 			spin_lock_irqsave(ap->lock, flags);
-			ap->ops->irq_on(ap);
+			ap->ops->thaw(ap);
 			ata_qc_complete(qc);
 			spin_unlock_irqrestore(ap->lock, flags);
 		} else
@@ -5411,7 +5411,7 @@ unsigned int ata_qc_issue_prot(struct at
 	switch (qc->tf.protocol) {
 	case ATA_PROT_NODATA:
 		if (qc->tf.flags & ATA_TFLAG_POLLING)
-			ata_qc_set_polling(qc);
+			ap->ops->freeze(ap);
 
 		ata_tf_to_host(ap, &qc->tf);
 		ap->hsm_task_state = HSM_ST_LAST;
@@ -5432,7 +5432,7 @@ unsigned int ata_qc_issue_prot(struct at
 
 	case ATA_PROT_PIO:
 		if (qc->tf.flags & ATA_TFLAG_POLLING)
-			ata_qc_set_polling(qc);
+			ap->ops->freeze(ap);
 
 		ata_tf_to_host(ap, &qc->tf);
 
@@ -5461,7 +5461,7 @@ unsigned int ata_qc_issue_prot(struct at
 	case ATA_PROT_ATAPI:
 	case ATA_PROT_ATAPI_NODATA:
 		if (qc->tf.flags & ATA_TFLAG_POLLING)
-			ata_qc_set_polling(qc);
+			ap->ops->freeze(ap);
 
 		ata_tf_to_host(ap, &qc->tf);
 
diff -Nrup 04_convert_freeze/include/linux/libata.h 05_convert_hsm_to_freeze/include/linux/libata.h
--- 04_convert_freeze/include/linux/libata.h	2007-07-04 11:57:33.000000000 +0800
+++ 05_convert_hsm_to_freeze/include/linux/libata.h	2007-07-04 13:13:56.000000000 +0800
@@ -1097,11 +1097,6 @@ static inline u8 ata_wait_idle(struct at
 	return status;
 }
 
-static inline void ata_qc_set_polling(struct ata_queued_cmd *qc)
-{
-	qc->tf.ctl |= ATA_NIEN;
-}
-
 static inline struct ata_queued_cmd *__ata_qc_from_tag(struct ata_port *ap,
 						       unsigned int tag)
 {



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

* [PATCH 6/10] libata: add freeze/thaw to old EH LLDDs
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
                   ` (4 preceding siblings ...)
  2007-07-04  8:57 ` [PATCH 5/10] libata: use freeze/thaw for polling Albert Lee
@ 2007-07-04  8:59 ` Albert Lee
  2007-07-04  9:01 ` [PATCH 7/10] libata: pdc_freeze() semantic change Albert Lee
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  8:59 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Patch 6/10:
Now that HSM polling code path uses freeze()/thaw() regardless of old EH or new EH.
Add freeze()/thaw() to old EH LLDDs for the HSM polling code.

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


diff -Nrup 05_convert_hsm_to_freeze/drivers/ata/pata_ixp4xx_cf.c 06_add_freeze_thaw_to_lldd/drivers/ata/pata_ixp4xx_cf.c
--- 05_convert_hsm_to_freeze/drivers/ata/pata_ixp4xx_cf.c	2007-07-04 12:09:29.000000000 +0800
+++ 06_add_freeze_thaw_to_lldd/drivers/ata/pata_ixp4xx_cf.c	2007-07-04 13:17:13.000000000 +0800
@@ -131,6 +131,9 @@ static struct ata_port_operations ixp4xx
 	.data_xfer	= ixp4xx_mmio_data_xfer,
 	.cable_detect	= ata_cable_40wire,
 
+	.freeze		= ata_bmdma_freeze,
+	.thaw		= ata_bmdma_thaw,
+
 	.irq_clear	= ixp4xx_irq_clear,
 	.irq_on		= ata_irq_on,
 	.irq_off	= ata_irq_off,
diff -Nrup 05_convert_hsm_to_freeze/drivers/ata/pata_scc.c 06_add_freeze_thaw_to_lldd/drivers/ata/pata_scc.c
--- 05_convert_hsm_to_freeze/drivers/ata/pata_scc.c	2007-07-04 13:12:38.000000000 +0800
+++ 06_add_freeze_thaw_to_lldd/drivers/ata/pata_scc.c	2007-07-04 13:17:13.000000000 +0800
@@ -879,6 +879,18 @@ static void scc_bmdma_freeze (struct ata
 }
 
 /**
+ *	scc_bmdma_thaw - Thaw BMDMA controller port
+ *	@ap: port to thaw
+ *
+ *	Note: Original code is ata_bmdma_thaw().
+ */
+
+static void scc_bmdma_thaw (struct ata_port *ap)
+{
+	scc_irq_on(ap);
+}
+
+/**
  *	scc_pata_prereset - prepare for reset
  *	@ap: ATA port to be reset
  *	@deadline: deadline jiffies for the operation
@@ -1025,6 +1037,7 @@ static const struct ata_port_operations 
 	.qc_issue		= ata_qc_issue_prot,
 
 	.freeze			= scc_bmdma_freeze,
+	.thaw			= scc_bmdma_thaw,
 	.error_handler		= scc_error_handler,
 	.post_internal_cmd	= scc_bmdma_stop,
 
diff -Nrup 05_convert_hsm_to_freeze/drivers/ata/pdc_adma.c 06_add_freeze_thaw_to_lldd/drivers/ata/pdc_adma.c
--- 05_convert_hsm_to_freeze/drivers/ata/pdc_adma.c	2007-07-04 12:09:29.000000000 +0800
+++ 06_add_freeze_thaw_to_lldd/drivers/ata/pdc_adma.c	2007-07-04 13:17:13.000000000 +0800
@@ -171,6 +171,8 @@ static const struct ata_port_operations 
 	.qc_issue		= adma_qc_issue,
 	.eng_timeout		= adma_eng_timeout,
 	.data_xfer		= ata_data_xfer,
+	.freeze			= ata_bmdma_freeze,
+	.thaw			= ata_bmdma_thaw,
 	.irq_clear		= adma_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
diff -Nrup 05_convert_hsm_to_freeze/drivers/ata/sata_mv.c 06_add_freeze_thaw_to_lldd/drivers/ata/sata_mv.c
--- 05_convert_hsm_to_freeze/drivers/ata/sata_mv.c	2007-07-04 12:09:29.000000000 +0800
+++ 06_add_freeze_thaw_to_lldd/drivers/ata/sata_mv.c	2007-07-04 13:17:13.000000000 +0800
@@ -453,6 +453,9 @@ static const struct ata_port_operations 
 
 	.eng_timeout		= mv_eng_timeout,
 
+	.freeze			= ata_bmdma_freeze,
+	.thaw			= ata_bmdma_thaw,
+
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
@@ -483,6 +486,9 @@ static const struct ata_port_operations 
 
 	.eng_timeout		= mv_eng_timeout,
 
+	.freeze			= ata_bmdma_freeze,
+	.thaw			= ata_bmdma_thaw,
+
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
@@ -513,6 +519,9 @@ static const struct ata_port_operations 
 
 	.eng_timeout		= mv_eng_timeout,
 
+	.freeze			= ata_bmdma_freeze,
+	.thaw			= ata_bmdma_thaw,
+
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
diff -Nrup 05_convert_hsm_to_freeze/drivers/ata/sata_qstor.c 06_add_freeze_thaw_to_lldd/drivers/ata/sata_qstor.c
--- 05_convert_hsm_to_freeze/drivers/ata/sata_qstor.c	2007-07-04 12:09:29.000000000 +0800
+++ 06_add_freeze_thaw_to_lldd/drivers/ata/sata_qstor.c	2007-07-04 13:17:13.000000000 +0800
@@ -157,6 +157,8 @@ static const struct ata_port_operations 
 	.qc_issue		= qs_qc_issue,
 	.data_xfer		= ata_data_xfer,
 	.eng_timeout		= qs_eng_timeout,
+	.freeze			= ata_bmdma_freeze,
+	.thaw			= ata_bmdma_thaw,
 	.irq_clear		= qs_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
diff -Nrup 05_convert_hsm_to_freeze/drivers/ata/sata_sx4.c 06_add_freeze_thaw_to_lldd/drivers/ata/sata_sx4.c
--- 05_convert_hsm_to_freeze/drivers/ata/sata_sx4.c	2007-07-04 12:09:29.000000000 +0800
+++ 06_add_freeze_thaw_to_lldd/drivers/ata/sata_sx4.c	2007-07-04 13:17:13.000000000 +0800
@@ -203,6 +203,8 @@ static const struct ata_port_operations 
 	.qc_issue		= pdc20621_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 	.eng_timeout		= pdc_eng_timeout,
+	.freeze			= ata_bmdma_freeze,
+	.thaw			= ata_bmdma_thaw,
 	.irq_clear		= pdc20621_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,



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

* [PATCH 7/10] libata: pdc_freeze() semantic change
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
                   ` (5 preceding siblings ...)
  2007-07-04  8:59 ` [PATCH 6/10] libata: add freeze/thaw to old EH LLDDs Albert Lee
@ 2007-07-04  9:01 ` Albert Lee
  2007-07-04  9:03 ` [PATCH 8/10] libata: remove writing of tf->ctl from ata_tf_load() Albert Lee
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  9:01 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey, Mikael Pettersson

Patch 7/10:

 After checking the current implementations of freeze()/thaw(), it seems only pdc_freeze()
do more than simple irq masking. Remove the DMA stop code from pdc_freeze().

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

diff -Nrup 06_add_freeze_thaw_to_lldd/drivers/ata/sata_promise.c 07_sata_promise_freeze/drivers/ata/sata_promise.c
--- 06_add_freeze_thaw_to_lldd/drivers/ata/sata_promise.c	2007-07-04 12:09:29.000000000 +0800
+++ 07_sata_promise_freeze/drivers/ata/sata_promise.c	2007-07-04 13:17:59.000000000 +0800
@@ -581,7 +581,6 @@ static void pdc_freeze(struct ata_port *
 
 	tmp = readl(mmio + PDC_CTLSTAT);
 	tmp |= PDC_IRQ_DISABLE;
-	tmp &= ~PDC_DMA_ENABLE;
 	writel(tmp, mmio + PDC_CTLSTAT);
 	readl(mmio + PDC_CTLSTAT); /* flush */
 }



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

* [PATCH 8/10] libata: remove writing of tf->ctl from ata_tf_load()
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
                   ` (6 preceding siblings ...)
  2007-07-04  9:01 ` [PATCH 7/10] libata: pdc_freeze() semantic change Albert Lee
@ 2007-07-04  9:03 ` Albert Lee
  2007-07-04 19:09   ` Mark Lord
  2007-07-04  9:16 ` [PATCH 9/10] libata: Integrate freeze/thaw with irq_on/off Albert Lee
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Albert Lee @ 2007-07-04  9:03 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Patch 8/10:
 
The relevant bits in the ctl register are HOB, SRST and nIEN.
 - HOB is only used by ata_tf_read().
 - For SRST, soft reset is not the duty of tf_load.
 - For nIEN, explicit irq_on()/irq_off and freeze()/thaw() are provided.

  Since EH/HSM now call explicit freeze()/thaw() for irq off/on.
Remove the implicit nIEN handling from ata_tf_load().


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

diff -Nrup 07_sata_promise_freeze/drivers/ata/libata-sff.c 08_tfload_cleanup/drivers/ata/libata-sff.c
--- 07_sata_promise_freeze/drivers/ata/libata-sff.c	2007-07-04 13:12:38.000000000 +0800
+++ 08_tfload_cleanup/drivers/ata/libata-sff.c	2007-07-04 13:20:30.000000000 +0800
@@ -153,11 +153,13 @@ void ata_tf_load(struct ata_port *ap, co
 	struct ata_ioports *ioaddr = &ap->ioaddr;
 	unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
 
-	if (tf->ctl != ap->last_ctl) {
-		iowrite8(tf->ctl, ioaddr->ctl_addr);
-		ap->last_ctl = tf->ctl;
-		ata_wait_idle(ap);
-	}
+	/*
+	 * The relevant bits in the ctl register are HOB, SRST and nIEN.
+	 * HOB is only used by ata_tf_read().
+	 * For SRST, soft reset is not the duty of tf_load.
+	 * For nIEN, explicit ->irq_on() and ->irq_off are provided.
+	 * That's why tf->ctl is ignored here.
+	 */
 
 	if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
 		iowrite8(tf->hob_feature, ioaddr->feature_addr);
diff -Nrup 07_sata_promise_freeze/drivers/ata/pata_scc.c 08_tfload_cleanup/drivers/ata/pata_scc.c
--- 07_sata_promise_freeze/drivers/ata/pata_scc.c	2007-07-04 13:17:13.000000000 +0800
+++ 08_tfload_cleanup/drivers/ata/pata_scc.c	2007-07-04 13:20:30.000000000 +0800
@@ -271,12 +271,6 @@ static void scc_tf_load (struct ata_port
 	struct ata_ioports *ioaddr = &ap->ioaddr;
 	unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
 
-	if (tf->ctl != ap->last_ctl) {
-		out_be32(ioaddr->ctl_addr, tf->ctl);
-		ap->last_ctl = tf->ctl;
-		ata_wait_idle(ap);
-	}
-
 	if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
 		out_be32(ioaddr->feature_addr, tf->hob_feature);
 		out_be32(ioaddr->nsect_addr, tf->hob_nsect);
diff -Nrup 07_sata_promise_freeze/drivers/ata/sata_svw.c 08_tfload_cleanup/drivers/ata/sata_svw.c
--- 07_sata_promise_freeze/drivers/ata/sata_svw.c	2007-07-04 12:09:29.000000000 +0800
+++ 08_tfload_cleanup/drivers/ata/sata_svw.c	2007-07-04 13:20:30.000000000 +0800
@@ -125,11 +125,6 @@ static void k2_sata_tf_load(struct ata_p
 	struct ata_ioports *ioaddr = &ap->ioaddr;
 	unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
 
-	if (tf->ctl != ap->last_ctl) {
-		writeb(tf->ctl, ioaddr->ctl_addr);
-		ap->last_ctl = tf->ctl;
-		ata_wait_idle(ap);
-	}
 	if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
 		writew(tf->feature | (((u16)tf->hob_feature) << 8),
 		       ioaddr->feature_addr);
diff -Nrup 07_sata_promise_freeze/drivers/ata/sata_vsc.c 08_tfload_cleanup/drivers/ata/sata_vsc.c
--- 07_sata_promise_freeze/drivers/ata/sata_vsc.c	2007-07-04 12:09:29.000000000 +0800
+++ 08_tfload_cleanup/drivers/ata/sata_vsc.c	2007-07-04 13:20:30.000000000 +0800
@@ -137,36 +137,11 @@ static void vsc_thaw(struct ata_port *ap
 }
 
 
-static void vsc_intr_mask_update(struct ata_port *ap, u8 ctl)
-{
-	void __iomem *mask_addr;
-	u8 mask;
-
-	mask_addr = ap->host->iomap[VSC_MMIO_BAR] +
-		VSC_SATA_INT_MASK_OFFSET + ap->port_no;
-	mask = readb(mask_addr);
-	if (ctl & ATA_NIEN)
-		mask |= 0x80;
-	else
-		mask &= 0x7F;
-	writeb(mask, mask_addr);
-}
-
-
 static void vsc_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
 {
 	struct ata_ioports *ioaddr = &ap->ioaddr;
 	unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
 
-	/*
-	 * The only thing the ctl register is used for is SRST.
-	 * That is not enabled or disabled via tf_load.
-	 * However, if ATA_NIEN is changed, then we need to change the interrupt register.
-	 */
-	if ((tf->ctl & ATA_NIEN) != (ap->last_ctl & ATA_NIEN)) {
-		ap->last_ctl = tf->ctl;
-		vsc_intr_mask_update(ap, tf->ctl & ATA_NIEN);
-	}
 	if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
 		writew(tf->feature | (((u16)tf->hob_feature) << 8),
 		       ioaddr->feature_addr);



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

* [PATCH 9/10] libata: Integrate freeze/thaw with irq_on/off
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
                   ` (7 preceding siblings ...)
  2007-07-04  9:03 ` [PATCH 8/10] libata: remove writing of tf->ctl from ata_tf_load() Albert Lee
@ 2007-07-04  9:16 ` Albert Lee
  2007-07-04  9:29 ` [PATCH 10/10] libata: Integrate freeze/thaw with irq_on/off in LLDDs Albert Lee
  2007-07-05 10:48 ` [PATCH 0/10] libata: irq_on/off restructuring Tejun Heo
  10 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  9:16 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Patch 9/10:

  irq_on/irq_off are now only wrapped by freeze/thaw (and unused otherwise).
We can integrate freeze/thaw with irq_on/irq_off.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
---
This is for libata-core. The LLDDs will be fixed in the next patch.

diff -Nrup 08_tfload_cleanup/drivers/ata/libata-core.c 09_integrate_irq_on_off/drivers/ata/libata-core.c
--- 08_tfload_cleanup/drivers/ata/libata-core.c	2007-07-04 13:13:56.000000000 +0800
+++ 09_integrate_irq_on_off/drivers/ata/libata-core.c	2007-07-04 13:35:05.000000000 +0800
@@ -4753,7 +4753,7 @@ static void ata_hsm_qc_complete(struct a
 			qc = ata_qc_from_tag(ap, qc->tag);
 			if (qc) {
 				if (likely(!(qc->err_mask & AC_ERR_HSM))) {
-					ap->ops->thaw(ap);
+					ap->ops->irq_on(ap);
 					ata_qc_complete(qc);
 				} else
 					ata_port_freeze(ap);
@@ -4769,7 +4769,7 @@ static void ata_hsm_qc_complete(struct a
 	} else {
 		if (in_wq) {
 			spin_lock_irqsave(ap->lock, flags);
-			ap->ops->thaw(ap);
+			ap->ops->irq_on(ap);
 			ata_qc_complete(qc);
 			spin_unlock_irqrestore(ap->lock, flags);
 		} else
@@ -5411,7 +5411,7 @@ unsigned int ata_qc_issue_prot(struct at
 	switch (qc->tf.protocol) {
 	case ATA_PROT_NODATA:
 		if (qc->tf.flags & ATA_TFLAG_POLLING)
-			ap->ops->freeze(ap);
+			ap->ops->irq_off(ap);
 
 		ata_tf_to_host(ap, &qc->tf);
 		ap->hsm_task_state = HSM_ST_LAST;
@@ -5432,7 +5432,7 @@ unsigned int ata_qc_issue_prot(struct at
 
 	case ATA_PROT_PIO:
 		if (qc->tf.flags & ATA_TFLAG_POLLING)
-			ap->ops->freeze(ap);
+			ap->ops->irq_off(ap);
 
 		ata_tf_to_host(ap, &qc->tf);
 
@@ -5461,7 +5461,7 @@ unsigned int ata_qc_issue_prot(struct at
 	case ATA_PROT_ATAPI:
 	case ATA_PROT_ATAPI_NODATA:
 		if (qc->tf.flags & ATA_TFLAG_POLLING)
-			ap->ops->freeze(ap);
+			ap->ops->irq_off(ap);
 
 		ata_tf_to_host(ap, &qc->tf);
 
@@ -6758,8 +6758,6 @@ const struct ata_port_operations ata_dum
 	.dev_select		= ata_noop_dev_select,
 	.qc_prep		= ata_noop_qc_prep,
 	.qc_issue		= ata_dummy_qc_issue,
-	.freeze			= ata_dummy_noret,
-	.thaw			= ata_dummy_noret,
 	.error_handler		= ata_dummy_noret,
 	.post_internal_cmd	= ata_dummy_qc_noret,
 	.irq_clear		= ata_dummy_noret,
@@ -6821,8 +6819,6 @@ EXPORT_SYMBOL_GPL(ata_bmdma_start);
 EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear);
 EXPORT_SYMBOL_GPL(ata_bmdma_status);
 EXPORT_SYMBOL_GPL(ata_bmdma_stop);
-EXPORT_SYMBOL_GPL(ata_bmdma_freeze);
-EXPORT_SYMBOL_GPL(ata_bmdma_thaw);
 EXPORT_SYMBOL_GPL(ata_bmdma_drive_eh);
 EXPORT_SYMBOL_GPL(ata_bmdma_error_handler);
 EXPORT_SYMBOL_GPL(ata_bmdma_post_internal_cmd);
diff -Nrup 08_tfload_cleanup/drivers/ata/libata-eh.c 09_integrate_irq_on_off/drivers/ata/libata-eh.c
--- 08_tfload_cleanup/drivers/ata/libata-eh.c	2007-07-04 11:26:30.000000000 +0800
+++ 09_integrate_irq_on_off/drivers/ata/libata-eh.c	2007-07-04 13:36:27.000000000 +0800
@@ -617,8 +617,7 @@ static void __ata_port_freeze(struct ata
 {
 	WARN_ON(!ap->ops->error_handler);
 
-	if (ap->ops->freeze)
-		ap->ops->freeze(ap);
+	ap->ops->irq_off(ap);
 
 	ap->pflags |= ATA_PFLAG_FROZEN;
 
@@ -690,8 +689,7 @@ void ata_eh_thaw_port(struct ata_port *a
 
 	ap->pflags &= ~ATA_PFLAG_FROZEN;
 
-	if (ap->ops->thaw)
-		ap->ops->thaw(ap);
+	ap->ops->irq_on(ap);
 
 	spin_unlock_irqrestore(ap->lock, flags);
 
diff -Nrup 08_tfload_cleanup/drivers/ata/libata-sff.c 09_integrate_irq_on_off/drivers/ata/libata-sff.c
--- 08_tfload_cleanup/drivers/ata/libata-sff.c	2007-07-04 13:20:30.000000000 +0800
+++ 09_integrate_irq_on_off/drivers/ata/libata-sff.c	2007-07-04 13:57:21.000000000 +0800
@@ -48,23 +48,20 @@
  *	LOCKING:
  *	Inherited from caller.
  */
-u8 ata_irq_on(struct ata_port *ap)
+void ata_irq_on(struct ata_port *ap)
 {
 	struct ata_ioports *ioaddr = &ap->ioaddr;
-	u8 tmp;
 
 	ap->ctl &= ~ATA_NIEN;
 	ap->last_ctl = ap->ctl;
 
 	iowrite8(ap->ctl, ioaddr->ctl_addr);
-	tmp = ata_wait_idle(ap);
+	ata_wait_idle(ap);
 
 	ap->ops->irq_clear(ap);
-
-	return tmp;
 }
 
-u8 ata_dummy_irq_on (struct ata_port *ap) 	{ return 0; }
+void ata_dummy_irq_on (struct ata_port *ap) 	{ }
 
 /**
  *	ata_irq_off - Disable interrupts on a port.
@@ -76,10 +73,9 @@ u8 ata_dummy_irq_on (struct ata_port *ap
  *	LOCKING:
  *	Inherited from caller.
  */
-u8 ata_irq_off(struct ata_port *ap)
+void ata_irq_off(struct ata_port *ap)
 {
 	struct ata_ioports *ioaddr = &ap->ioaddr;
-	u8 tmp;
 
 	ap->ctl |= ATA_NIEN;
 	ap->last_ctl = ap->ctl;
@@ -90,14 +86,12 @@ u8 ata_irq_off(struct ata_port *ap)
 	 * ATA_NIEN manipulation.  Also, many controllers fail to mask
 	 * previously pending IRQ on ATA_NIEN assertion.  Clear it.
 	 */
-	tmp = ata_wait_idle(ap);
+	ata_wait_idle(ap);
 
 	ap->ops->irq_clear(ap);
-
-	return tmp;
 }
 
-u8 ata_dummy_irq_off (struct ata_port *ap) 	{ return 0; }
+void ata_dummy_irq_off (struct ata_port *ap) 	{ }
 
 /**
  *	ata_irq_ack - Acknowledge a device interrupt.
@@ -405,37 +399,6 @@ void ata_bmdma_stop(struct ata_queued_cm
 }
 
 /**
- *	ata_bmdma_freeze - Freeze BMDMA controller port
- *	@ap: port to freeze
- *
- *	Freeze BMDMA controller port.
- *
- *	LOCKING:
- *	Inherited from caller.
- */
-void ata_bmdma_freeze(struct ata_port *ap)
-{
-	ap->ops->irq_off(ap);
-}
-
-/**
- *	ata_bmdma_thaw - Thaw BMDMA controller port
- *	@ap: port to thaw
- *
- *	Thaw BMDMA controller port.
- *
- *	LOCKING:
- *	Inherited from caller.
- */
-void ata_bmdma_thaw(struct ata_port *ap)
-{
-	/* clear & re-enable interrupts */
-	ata_chk_status(ap);
-	ap->ops->irq_clear(ap);
-	ap->ops->irq_on(ap);
-}
-
-/**
  *	ata_bmdma_drive_eh - Perform EH with given methods for BMDMA controller
  *	@ap: port to handle error for
  *	@prereset: prereset method (can be NULL)
diff -Nrup 08_tfload_cleanup/include/linux/libata.h 09_integrate_irq_on_off/include/linux/libata.h
--- 08_tfload_cleanup/include/linux/libata.h	2007-07-04 13:13:56.000000000 +0800
+++ 09_integrate_irq_on_off/include/linux/libata.h	2007-07-04 13:52:06.000000000 +0800
@@ -589,15 +589,13 @@ struct ata_port_operations {
 	 */
 	void (*eng_timeout) (struct ata_port *ap); /* obsolete */
 
-	void (*freeze) (struct ata_port *ap);
-	void (*thaw) (struct ata_port *ap);
 	void (*error_handler) (struct ata_port *ap);
 	void (*post_internal_cmd) (struct ata_queued_cmd *qc);
 
 	irq_handler_t irq_handler;
 	void (*irq_clear) (struct ata_port *);
-	u8 (*irq_on) (struct ata_port *);
-	u8 (*irq_off) (struct ata_port *);
+	void (*irq_on) (struct ata_port *);
+	void (*irq_off) (struct ata_port *);
 	u8 (*irq_ack) (struct ata_port *ap, unsigned int chk_drq);
 
 	u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg);
@@ -779,8 +777,6 @@ extern void ata_bmdma_start (struct ata_
 extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
 extern u8   ata_bmdma_status(struct ata_port *ap);
 extern void ata_bmdma_irq_clear(struct ata_port *ap);
-extern void ata_bmdma_freeze(struct ata_port *ap);
-extern void ata_bmdma_thaw(struct ata_port *ap);
 extern void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
 			       ata_reset_fn_t softreset,
 			       ata_reset_fn_t hardreset,
@@ -803,10 +799,10 @@ extern int ata_scsi_change_queue_depth(s
 				       int queue_depth);
 extern struct ata_device *ata_dev_pair(struct ata_device *adev);
 extern int ata_do_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
-extern u8 ata_irq_on(struct ata_port *ap);
-extern u8 ata_dummy_irq_on(struct ata_port *ap);
-extern u8 ata_irq_off(struct ata_port *ap);
-extern u8 ata_dummy_irq_off(struct ata_port *ap);
+extern void ata_irq_on(struct ata_port *ap);
+extern void ata_dummy_irq_on(struct ata_port *ap);
+extern void ata_irq_off(struct ata_port *ap);
+extern void ata_dummy_irq_off(struct ata_port *ap);
 extern u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq);
 extern u8 ata_dummy_irq_ack(struct ata_port *ap, unsigned int chk_drq);
 



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

* [PATCH 10/10] libata: Integrate freeze/thaw with irq_on/off in LLDDs
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
                   ` (8 preceding siblings ...)
  2007-07-04  9:16 ` [PATCH 9/10] libata: Integrate freeze/thaw with irq_on/off Albert Lee
@ 2007-07-04  9:29 ` Albert Lee
  2007-07-05 10:48 ` [PATCH 0/10] libata: irq_on/off restructuring Tejun Heo
  10 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-04  9:29 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Patch 10/10:

Integrate freeze/thaw with irq_on/off in LLDDs.

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

The strange thing here is sata_via. It implements
svia_noop_freeze() that doesn't actually disable the irq.
This is related to the following bug:
http://bugzilla.kernel.org/show_bug.cgi?id=7415

Sine a lot has been changed since 2.6.19, maybe we
can remove such quirk at this momemt and ask the bug submitter
to test his VIA 8420 with the new code again.

diff -Nrup 09_integrate_irq_on_off/drivers/ata/ahci.c 10_integrate_irq_on_off_lldd/drivers/ata/ahci.c
--- 09_integrate_irq_on_off/drivers/ata/ahci.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/ahci.c	2007-07-04 14:30:27.000000000 +0800
@@ -223,8 +223,8 @@ static void ahci_port_stop(struct ata_po
 static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
 static void ahci_qc_prep(struct ata_queued_cmd *qc);
 static u8 ahci_check_status(struct ata_port *ap);
-static void ahci_freeze(struct ata_port *ap);
-static void ahci_thaw(struct ata_port *ap);
+static void ahci_irq_on(struct ata_port *ap);
+static void ahci_irq_off(struct ata_port *ap);
 static void ahci_error_handler(struct ata_port *ap);
 static void ahci_vt8251_error_handler(struct ata_port *ap);
 static void ahci_post_internal_cmd(struct ata_queued_cmd *qc);
@@ -267,16 +267,13 @@ static const struct ata_port_operations 
 	.qc_issue		= ahci_qc_issue,
 
 	.irq_clear		= ahci_irq_clear,
-	.irq_on			= ata_dummy_irq_on,
-	.irq_off		= ata_dummy_irq_off,
+	.irq_on			= ahci_irq_on,
+	.irq_off		= ahci_irq_off,
 	.irq_ack		= ata_dummy_irq_ack,
 
 	.scr_read		= ahci_scr_read,
 	.scr_write		= ahci_scr_write,
 
-	.freeze			= ahci_freeze,
-	.thaw			= ahci_thaw,
-
 	.error_handler		= ahci_error_handler,
 	.post_internal_cmd	= ahci_post_internal_cmd,
 
@@ -302,16 +299,13 @@ static const struct ata_port_operations 
 	.qc_issue		= ahci_qc_issue,
 
 	.irq_clear		= ahci_irq_clear,
-	.irq_on			= ata_dummy_irq_on,
-	.irq_off		= ata_dummy_irq_off,
+	.irq_on			= ahci_irq_on,
+	.irq_off		= ahci_irq_off,
 	.irq_ack		= ata_dummy_irq_ack,
 
 	.scr_read		= ahci_scr_read,
 	.scr_write		= ahci_scr_write,
 
-	.freeze			= ahci_freeze,
-	.thaw			= ahci_thaw,
-
 	.error_handler		= ahci_vt8251_error_handler,
 	.post_internal_cmd	= ahci_post_internal_cmd,
 
@@ -1397,7 +1391,7 @@ static unsigned int ahci_qc_issue(struct
 	return 0;
 }
 
-static void ahci_freeze(struct ata_port *ap)
+static void ahci_irq_off(struct ata_port *ap)
 {
 	void __iomem *port_mmio = ahci_port_base(ap);
 
@@ -1405,7 +1399,7 @@ static void ahci_freeze(struct ata_port 
 	writel(0, port_mmio + PORT_IRQ_MASK);
 }
 
-static void ahci_thaw(struct ata_port *ap)
+static void ahci_irq_on(struct ata_port *ap)
 {
 	void __iomem *mmio = ap->host->iomap[AHCI_PCI_BAR];
 	void __iomem *port_mmio = ahci_port_base(ap);
diff -Nrup 09_integrate_irq_on_off/drivers/ata/ata_generic.c 10_integrate_irq_on_off_lldd/drivers/ata/ata_generic.c
--- 09_integrate_irq_on_off/drivers/ata/ata_generic.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/ata_generic.c	2007-07-04 14:31:21.000000000 +0800
@@ -109,8 +109,6 @@ static struct ata_port_operations generi
 
 	.data_xfer	= ata_data_xfer,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_unknown,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/ata_piix.c 10_integrate_irq_on_off_lldd/drivers/ata/ata_piix.c
--- 09_integrate_irq_on_off/drivers/ata/ata_piix.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/ata_piix.c	2007-07-04 14:31:51.000000000 +0800
@@ -296,8 +296,6 @@ static const struct ata_port_operations 
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= piix_pata_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_40wire,
@@ -331,8 +329,6 @@ static const struct ata_port_operations 
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= piix_pata_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ich_pata_cable_detect,
@@ -363,8 +359,6 @@ static const struct ata_port_operations 
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_ali.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_ali.c
--- 09_integrate_irq_on_off/drivers/ata/pata_ali.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_ali.c	2007-07-04 14:32:30.000000000 +0800
@@ -306,8 +306,6 @@ static struct ata_port_operations ali_ea
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -344,8 +342,6 @@ static struct ata_port_operations ali_20
 	.dev_select 	= ata_std_dev_select,
 	.dev_config	= ali_lock_sectors,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -384,8 +380,6 @@ static struct ata_port_operations ali_c2
 	.dev_select 	= ata_std_dev_select,
 	.dev_config	= ali_lock_sectors,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ali_c2_cable_detect,
@@ -423,8 +417,6 @@ static struct ata_port_operations ali_c5
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ali_c2_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_amd.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_amd.c
--- 09_integrate_irq_on_off/drivers/ata/pata_amd.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_amd.c	2007-07-04 14:33:01.000000000 +0800
@@ -337,8 +337,6 @@ static struct ata_port_operations amd33_
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= amd_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -373,8 +371,6 @@ static struct ata_port_operations amd66_
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= amd_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_unknown,
@@ -409,8 +405,6 @@ static struct ata_port_operations amd100
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= amd_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_unknown,
@@ -445,8 +439,6 @@ static struct ata_port_operations amd133
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= amd_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= amd_cable_detect,
@@ -481,8 +473,6 @@ static struct ata_port_operations nv100_
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= nv_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= nv_cable_detect,
@@ -517,8 +507,6 @@ static struct ata_port_operations nv133_
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= nv_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= nv_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_artop.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_artop.c
--- 09_integrate_irq_on_off/drivers/ata/pata_artop.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_artop.c	2007-07-04 14:33:36.000000000 +0800
@@ -340,8 +340,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= artop6210_error_handler,
 	.post_internal_cmd 	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_40wire,
@@ -375,8 +373,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= artop6260_error_handler,
 	.post_internal_cmd 	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= artop6260_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_atiixp.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_atiixp.c
--- 09_integrate_irq_on_off/drivers/ata/pata_atiixp.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_atiixp.c	2007-07-04 14:33:48.000000000 +0800
@@ -242,8 +242,6 @@ static struct ata_port_operations atiixp
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= atiixp_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= atiixp_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_cmd640.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_cmd640.c
--- 09_integrate_irq_on_off/drivers/ata/pata_cmd640.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_cmd640.c	2007-07-04 14:34:02.000000000 +0800
@@ -193,8 +193,6 @@ static struct ata_port_operations cmd640
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_cmd64x.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_cmd64x.c
--- 09_integrate_irq_on_off/drivers/ata/pata_cmd64x.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_cmd64x.c	2007-07-04 14:34:21.000000000 +0800
@@ -279,8 +279,6 @@ static struct ata_port_operations cmd64x
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -315,8 +313,6 @@ static struct ata_port_operations cmd646
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -351,8 +347,6 @@ static struct ata_port_operations cmd648
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= cmd648_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_cs5520.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_cs5520.c
--- 09_integrate_irq_on_off/drivers/ata/pata_cs5520.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_cs5520.c	2007-07-04 14:34:36.000000000 +0800
@@ -168,8 +168,6 @@ static struct ata_port_operations cs5520
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_cs5530.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_cs5530.c
--- 09_integrate_irq_on_off/drivers/ata/pata_cs5530.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_cs5530.c	2007-07-04 14:34:53.000000000 +0800
@@ -195,8 +195,6 @@ static struct ata_port_operations cs5530
 	.bmdma_stop	= ata_bmdma_stop,
 	.bmdma_status 	= ata_bmdma_status,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_cs5535.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_cs5535.c
--- 09_integrate_irq_on_off/drivers/ata/pata_cs5535.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_cs5535.c	2007-07-04 14:35:40.000000000 +0800
@@ -187,8 +187,6 @@ static struct ata_port_operations cs5535
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= cs5535_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_cypress.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_cypress.c
--- 09_integrate_irq_on_off/drivers/ata/pata_cypress.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_cypress.c	2007-07-04 14:35:58.000000000 +0800
@@ -139,8 +139,6 @@ static struct ata_port_operations cy82c6
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_efar.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_efar.c
--- 09_integrate_irq_on_off/drivers/ata/pata_efar.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_efar.c	2007-07-04 14:36:10.000000000 +0800
@@ -261,8 +261,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= efar_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= efar_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_hpt366.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_hpt366.c
--- 09_integrate_irq_on_off/drivers/ata/pata_hpt366.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_hpt366.c	2007-07-04 14:36:23.000000000 +0800
@@ -323,8 +323,6 @@ static struct ata_port_operations hpt366
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= hpt36x_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_hpt37x.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_hpt37x.c
--- 09_integrate_irq_on_off/drivers/ata/pata_hpt37x.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_hpt37x.c	2007-07-04 14:36:54.000000000 +0800
@@ -655,8 +655,6 @@ static struct ata_port_operations hpt370
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= hpt37x_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 
@@ -695,8 +693,6 @@ static struct ata_port_operations hpt370
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= hpt37x_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 
@@ -736,8 +732,6 @@ static struct ata_port_operations hpt372
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= hpt37x_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 
@@ -777,8 +771,6 @@ static struct ata_port_operations hpt374
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= hpt374_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_hpt3x2n.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_hpt3x2n.c
--- 09_integrate_irq_on_off/drivers/ata/pata_hpt3x2n.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_hpt3x2n.c	2007-07-04 14:37:10.000000000 +0800
@@ -371,8 +371,6 @@ static struct ata_port_operations hpt3x2
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= hpt3x2n_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= hpt3x2n_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_hpt3x3.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_hpt3x3.c
--- 09_integrate_irq_on_off/drivers/ata/pata_hpt3x3.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_hpt3x3.c	2007-07-04 14:37:24.000000000 +0800
@@ -114,8 +114,6 @@ static struct ata_port_operations hpt3x3
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_icside.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_icside.c
--- 09_integrate_irq_on_off/drivers/ata/pata_icside.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_icside.c	2007-07-04 14:37:35.000000000 +0800
@@ -395,8 +395,6 @@ static struct ata_port_operations pata_i
 	.qc_prep		= ata_noop_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= pata_icside_bmdma_stop,
 
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_isapnp.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_isapnp.c
--- 09_integrate_irq_on_off/drivers/ata/pata_isapnp.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_isapnp.c	2007-07-04 14:37:51.000000000 +0800
@@ -45,8 +45,6 @@ static struct ata_port_operations isapnp
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_it8213.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_it8213.c
--- 09_integrate_irq_on_off/drivers/ata/pata_it8213.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_it8213.c	2007-07-04 14:38:05.000000000 +0800
@@ -271,8 +271,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= it8213_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= it8213_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_it821x.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_it821x.c
--- 09_integrate_irq_on_off/drivers/ata/pata_it821x.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_it821x.c	2007-07-04 14:38:21.000000000 +0800
@@ -629,8 +629,6 @@ static struct ata_port_operations it821x
 	.dev_select 	= ata_std_dev_select,
 	.dev_config	= it821x_dev_config,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_unknown,
@@ -667,8 +665,6 @@ static struct ata_port_operations it821x
 	.check_atapi_dma= it821x_check_atapi_dma,
 	.dev_select 	= it821x_passthru_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_unknown,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_ixp4xx_cf.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_ixp4xx_cf.c
--- 09_integrate_irq_on_off/drivers/ata/pata_ixp4xx_cf.c	2007-07-04 13:17:13.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_ixp4xx_cf.c	2007-07-04 14:38:33.000000000 +0800
@@ -131,9 +131,6 @@ static struct ata_port_operations ixp4xx
 	.data_xfer	= ixp4xx_mmio_data_xfer,
 	.cable_detect	= ata_cable_40wire,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
-
 	.irq_clear	= ixp4xx_irq_clear,
 	.irq_on		= ata_irq_on,
 	.irq_off	= ata_irq_off,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_jmicron.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_jmicron.c
--- 09_integrate_irq_on_off/drivers/ata/pata_jmicron.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_jmicron.c	2007-07-04 14:38:49.000000000 +0800
@@ -150,8 +150,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= jmicron_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_legacy.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_legacy.c
--- 09_integrate_irq_on_off/drivers/ata/pata_legacy.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_legacy.c	2007-07-04 14:39:19.000000000 +0800
@@ -158,8 +158,6 @@ static struct ata_port_operations simple
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -189,8 +187,6 @@ static struct ata_port_operations legacy
 	.dev_select 	= ata_std_dev_select,
 	.cable_detect	= ata_cable_40wire,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 
@@ -305,8 +301,6 @@ static struct ata_port_operations pdc202
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -362,8 +356,6 @@ static struct ata_port_operations ht6560
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -430,8 +422,6 @@ static struct ata_port_operations ht6560
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -553,8 +543,6 @@ static struct ata_port_operations opti82
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -688,8 +676,6 @@ static struct ata_port_operations opti82
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_marvell.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_marvell.c
--- 09_integrate_irq_on_off/drivers/ata/pata_marvell.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_marvell.c	2007-07-04 14:39:37.000000000 +0800
@@ -119,8 +119,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= marvell_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= marvell_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_mpc52xx.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_mpc52xx.c
--- 09_integrate_irq_on_off/drivers/ata/pata_mpc52xx.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_mpc52xx.c	2007-07-04 14:39:49.000000000 +0800
@@ -290,8 +290,6 @@ static struct ata_port_operations mpc52x
 	.tf_read		= ata_tf_read,
 	.check_status		= ata_check_status,
 	.exec_command		= ata_exec_command,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= mpc52xx_ata_error_handler,
 	.cable_detect		= ata_cable_40wire,
 	.qc_prep		= ata_qc_prep,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_mpiix.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_mpiix.c
--- 09_integrate_irq_on_off/drivers/ata/pata_mpiix.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_mpiix.c	2007-07-04 14:40:02.000000000 +0800
@@ -177,8 +177,6 @@ static struct ata_port_operations mpiix_
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= mpiix_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_netcell.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_netcell.c
--- 09_integrate_irq_on_off/drivers/ata/pata_netcell.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_netcell.c	2007-07-04 14:40:14.000000000 +0800
@@ -49,8 +49,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_80wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_ns87410.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_ns87410.c
--- 09_integrate_irq_on_off/drivers/ata/pata_ns87410.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_ns87410.c	2007-07-04 14:40:29.000000000 +0800
@@ -170,8 +170,6 @@ static struct ata_port_operations ns8741
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ns87410_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_oldpiix.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_oldpiix.c
--- 09_integrate_irq_on_off/drivers/ata/pata_oldpiix.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_oldpiix.c	2007-07-04 14:40:41.000000000 +0800
@@ -248,8 +248,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= oldpiix_pata_error_handler,
 	.post_internal_cmd 	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_opti.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_opti.c
--- 09_integrate_irq_on_off/drivers/ata/pata_opti.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_opti.c	2007-07-04 14:40:55.000000000 +0800
@@ -190,8 +190,6 @@ static struct ata_port_operations opti_p
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= opti_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_optidma.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_optidma.c
--- 09_integrate_irq_on_off/drivers/ata/pata_optidma.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_optidma.c	2007-07-04 14:41:15.000000000 +0800
@@ -376,8 +376,6 @@ static struct ata_port_operations optidm
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.error_handler	= optidma_error_handler,
 	.set_mode	= optidma_set_mode,
@@ -413,8 +411,6 @@ static struct ata_port_operations optipl
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.error_handler	= optidma_error_handler,
 	.set_mode	= optidma_set_mode,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_pcmcia.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_pcmcia.c
--- 09_integrate_irq_on_off/drivers/ata/pata_pcmcia.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_pcmcia.c	2007-07-04 14:41:25.000000000 +0800
@@ -114,8 +114,6 @@ static struct ata_port_operations pcmcia
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_pdc2027x.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_pdc2027x.c
--- 09_integrate_irq_on_off/drivers/ata/pata_pdc2027x.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_pdc2027x.c	2007-07-04 14:41:39.000000000 +0800
@@ -165,8 +165,6 @@ static struct ata_port_operations pdc202
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= pdc2027x_error_handler,
 	.post_internal_cmd 	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= pdc2027x_cable_detect,
@@ -201,8 +199,6 @@ static struct ata_port_operations pdc202
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= pdc2027x_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= pdc2027x_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_pdc202xx_old.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_pdc202xx_old.c
--- 09_integrate_irq_on_off/drivers/ata/pata_pdc202xx_old.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_pdc202xx_old.c	2007-07-04 14:41:51.000000000 +0800
@@ -257,8 +257,6 @@ static struct ata_port_operations pdc202
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -293,8 +291,6 @@ static struct ata_port_operations pdc202
 	.dev_select 	= ata_std_dev_select,
 	.dev_config	= pdc2026x_dev_config,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= pdc2026x_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_platform.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_platform.c
--- 09_integrate_irq_on_off/drivers/ata/pata_platform.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_platform.c	2007-07-04 14:42:00.000000000 +0800
@@ -78,8 +78,6 @@ static struct ata_port_operations pata_p
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_unknown,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_qdi.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_qdi.c
--- 09_integrate_irq_on_off/drivers/ata/pata_qdi.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_qdi.c	2007-07-04 14:42:14.000000000 +0800
@@ -179,8 +179,6 @@ static struct ata_port_operations qdi650
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
@@ -208,8 +206,6 @@ static struct ata_port_operations qdi658
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_radisys.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_radisys.c
--- 09_integrate_irq_on_off/drivers/ata/pata_radisys.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_radisys.c	2007-07-04 14:42:26.000000000 +0800
@@ -214,8 +214,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_unknown,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_rz1000.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_rz1000.c
--- 09_integrate_irq_on_off/drivers/ata/pata_rz1000.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_rz1000.c	2007-07-04 14:42:37.000000000 +0800
@@ -91,8 +91,6 @@ static struct ata_port_operations rz1000
 
 	.data_xfer	= ata_data_xfer,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_sc1200.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_sc1200.c
--- 09_integrate_irq_on_off/drivers/ata/pata_sc1200.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_sc1200.c	2007-07-04 14:42:46.000000000 +0800
@@ -208,8 +208,6 @@ static struct ata_port_operations sc1200
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_scc.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_scc.c
--- 09_integrate_irq_on_off/drivers/ata/pata_scc.c	2007-07-04 13:20:30.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_scc.c	2007-07-04 14:43:51.000000000 +0800
@@ -789,20 +789,17 @@ static void scc_data_xfer (struct ata_de
  *	Note: Original code is ata_irq_on().
  */
 
-static u8 scc_irq_on (struct ata_port *ap)
+static void scc_irq_on (struct ata_port *ap)
 {
 	struct ata_ioports *ioaddr = &ap->ioaddr;
-	u8 tmp;
 
 	ap->ctl &= ~ATA_NIEN;
 	ap->last_ctl = ap->ctl;
 
 	out_be32(ioaddr->ctl_addr, ap->ctl);
-	tmp = ata_wait_idle(ap);
+	ata_wait_idle(ap);
 
 	ap->ops->irq_clear(ap);
-
-	return tmp;
 }
 
 /**
@@ -812,20 +809,17 @@ static u8 scc_irq_on (struct ata_port *a
  *	Note: Original code is ata_irq_off().
  */
 
-static u8 scc_irq_off (struct ata_port *ap)
+static void scc_irq_off (struct ata_port *ap)
 {
 	struct ata_ioports *ioaddr = &ap->ioaddr;
-	u8 tmp;
 
 	ap->ctl |= ATA_NIEN;
 	ap->last_ctl = ap->ctl;
 
 	out_be32(ioaddr->ctl_addr, ap->ctl);
-	tmp = ata_wait_idle(ap);
+	ata_wait_idle(ap);
 
 	ap->ops->irq_clear(ap);
-
-	return tmp;
 }
 
 /**
@@ -861,30 +855,6 @@ static u8 scc_irq_ack (struct ata_port *
 }
 
 /**
- *	scc_bmdma_freeze - Freeze BMDMA controller port
- *	@ap: port to freeze
- *
- *	Note: Original code is ata_bmdma_freeze().
- */
-
-static void scc_bmdma_freeze (struct ata_port *ap)
-{
-	scc_irq_off(ap);
-}
-
-/**
- *	scc_bmdma_thaw - Thaw BMDMA controller port
- *	@ap: port to thaw
- *
- *	Note: Original code is ata_bmdma_thaw().
- */
-
-static void scc_bmdma_thaw (struct ata_port *ap)
-{
-	scc_irq_on(ap);
-}
-
-/**
  *	scc_pata_prereset - prepare for reset
  *	@ap: ATA port to be reset
  *	@deadline: deadline jiffies for the operation
@@ -1030,8 +1000,6 @@ static const struct ata_port_operations 
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 
-	.freeze			= scc_bmdma_freeze,
-	.thaw			= scc_bmdma_thaw,
 	.error_handler		= scc_error_handler,
 	.post_internal_cmd	= scc_bmdma_stop,
 
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_serverworks.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_serverworks.c
--- 09_integrate_irq_on_off/drivers/ata/pata_serverworks.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_serverworks.c	2007-07-04 14:44:14.000000000 +0800
@@ -329,8 +329,6 @@ static struct ata_port_operations server
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= serverworks_cable_detect,
@@ -366,8 +364,6 @@ static struct ata_port_operations server
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= serverworks_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_sil680.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_sil680.c
--- 09_integrate_irq_on_off/drivers/ata/pata_sil680.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_sil680.c	2007-07-04 14:44:24.000000000 +0800
@@ -245,8 +245,6 @@ static struct ata_port_operations sil680
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= sil680_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= sil680_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_sis.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_sis.c
--- 09_integrate_irq_on_off/drivers/ata/pata_sis.c	2007-07-04 12:57:09.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_sis.c	2007-07-04 14:44:46.000000000 +0800
@@ -538,8 +538,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= sis_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= sis_133_cable_detect,
@@ -573,8 +571,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= sis_133_cable_detect,
@@ -608,8 +604,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= sis_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= sis_66_cable_detect,
@@ -643,8 +637,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= sis_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= sis_66_cable_detect,
@@ -679,8 +671,6 @@ static const struct ata_port_operations 
 	.dev_select		= ata_std_dev_select,
 	.cable_detect		= sis_66_cable_detect,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= sis_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 
@@ -713,8 +703,6 @@ static const struct ata_port_operations 
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= sis_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_sl82c105.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_sl82c105.c
--- 09_integrate_irq_on_off/drivers/ata/pata_sl82c105.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_sl82c105.c	2007-07-04 14:44:58.000000000 +0800
@@ -234,8 +234,6 @@ static struct ata_port_operations sl82c1
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= sl82c105_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_triflex.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_triflex.c
--- 09_integrate_irq_on_off/drivers/ata/pata_triflex.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_triflex.c	2007-07-04 14:45:15.000000000 +0800
@@ -207,8 +207,6 @@ static struct ata_port_operations trifle
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= triflex_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_via.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_via.c
--- 09_integrate_irq_on_off/drivers/ata/pata_via.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_via.c	2007-07-04 14:45:25.000000000 +0800
@@ -344,8 +344,6 @@ static struct ata_port_operations via_po
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= via_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= via_cable_detect,
@@ -381,8 +379,6 @@ static struct ata_port_operations via_po
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= via_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= via_cable_detect,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pata_winbond.c 10_integrate_irq_on_off_lldd/drivers/ata/pata_winbond.c
--- 09_integrate_irq_on_off/drivers/ata/pata_winbond.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pata_winbond.c	2007-07-04 14:45:34.000000000 +0800
@@ -147,8 +147,6 @@ static struct ata_port_operations winbon
 	.exec_command	= ata_exec_command,
 	.dev_select 	= ata_std_dev_select,
 
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
 	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= ata_cable_40wire,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/pdc_adma.c 10_integrate_irq_on_off_lldd/drivers/ata/pdc_adma.c
--- 09_integrate_irq_on_off/drivers/ata/pdc_adma.c	2007-07-04 13:17:13.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/pdc_adma.c	2007-07-04 14:45:51.000000000 +0800
@@ -171,8 +171,6 @@ static const struct ata_port_operations 
 	.qc_issue		= adma_qc_issue,
 	.eng_timeout		= adma_eng_timeout,
 	.data_xfer		= ata_data_xfer,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.irq_clear		= adma_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_inic162x.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_inic162x.c
--- 09_integrate_irq_on_off/drivers/ata/sata_inic162x.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_inic162x.c	2007-07-04 14:46:51.000000000 +0800
@@ -388,7 +388,7 @@ static unsigned int inic_qc_issue(struct
 	return ata_qc_issue_prot(qc);
 }
 
-static void inic_freeze(struct ata_port *ap)
+static void inic_irq_off(struct ata_port *ap)
 {
 	void __iomem *port_base = inic_port_base(ap);
 
@@ -400,7 +400,7 @@ static void inic_freeze(struct ata_port 
 	readb(port_base + PORT_IRQ_STAT); /* flush */
 }
 
-static void inic_thaw(struct ata_port *ap)
+static void inic_irq_on(struct ata_port *ap)
 {
 	void __iomem *port_base = inic_port_base(ap);
 
@@ -566,16 +566,14 @@ static struct ata_port_operations inic_p
 	.bmdma_status		= inic_bmdma_status,
 
 	.irq_clear		= inic_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= inic_irq_on,
+	.irq_off		= inic_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.qc_prep	 	= ata_qc_prep,
 	.qc_issue		= inic_qc_issue,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= inic_freeze,
-	.thaw			= inic_thaw,
 	.error_handler		= inic_error_handler,
 	.post_internal_cmd	= inic_post_internal_cmd,
 	.dev_config		= inic_dev_config,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_mv.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_mv.c
--- 09_integrate_irq_on_off/drivers/ata/sata_mv.c	2007-07-04 13:17:13.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_mv.c	2007-07-04 14:47:46.000000000 +0800
@@ -453,9 +453,6 @@ static const struct ata_port_operations 
 
 	.eng_timeout		= mv_eng_timeout,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
-
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
@@ -486,9 +483,6 @@ static const struct ata_port_operations 
 
 	.eng_timeout		= mv_eng_timeout,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
-
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
@@ -519,9 +513,6 @@ static const struct ata_port_operations 
 
 	.eng_timeout		= mv_eng_timeout,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
-
 	.irq_clear		= mv_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_nv.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_nv.c
--- 09_integrate_irq_on_off/drivers/ata/sata_nv.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_nv.c	2007-07-04 14:51:54.000000000 +0800
@@ -239,10 +239,10 @@ static irqreturn_t nv_ck804_interrupt(in
 static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg);
 static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
 
-static void nv_nf2_freeze(struct ata_port *ap);
-static void nv_nf2_thaw(struct ata_port *ap);
-static void nv_ck804_freeze(struct ata_port *ap);
-static void nv_ck804_thaw(struct ata_port *ap);
+static void nv_nf2_irq_on(struct ata_port *ap);
+static void nv_nf2_irq_off(struct ata_port *ap);
+static void nv_ck804_irq_on(struct ata_port *ap);
+static void nv_ck804_irq_off(struct ata_port *ap);
 static void nv_error_handler(struct ata_port *ap);
 static int nv_adma_slave_config(struct scsi_device *sdev);
 static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
@@ -256,8 +256,8 @@ static void nv_adma_port_stop(struct ata
 static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg);
 static int nv_adma_port_resume(struct ata_port *ap);
 #endif
-static void nv_adma_freeze(struct ata_port *ap);
-static void nv_adma_thaw(struct ata_port *ap);
+static void nv_adma_irq_on(struct ata_port *ap);
+static void nv_adma_irq_off(struct ata_port *ap);
 static void nv_adma_error_handler(struct ata_port *ap);
 static void nv_adma_host_stop(struct ata_host *host);
 static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc);
@@ -352,8 +352,6 @@ static const struct ata_port_operations 
 	.bmdma_status		= ata_bmdma_status,
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= nv_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.data_xfer		= ata_data_xfer,
@@ -379,14 +377,12 @@ static const struct ata_port_operations 
 	.bmdma_status		= ata_bmdma_status,
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
-	.freeze			= nv_nf2_freeze,
-	.thaw			= nv_nf2_thaw,
 	.error_handler		= nv_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= nv_nf2_irq_on,
+	.irq_off		= nv_nf2_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
@@ -406,14 +402,12 @@ static const struct ata_port_operations 
 	.bmdma_status		= ata_bmdma_status,
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
-	.freeze			= nv_ck804_freeze,
-	.thaw			= nv_ck804_thaw,
 	.error_handler		= nv_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= nv_ck804_irq_on,
+	.irq_off		= nv_ck804_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
@@ -435,14 +429,12 @@ static const struct ata_port_operations 
 	.bmdma_status		= ata_bmdma_status,
 	.qc_prep		= nv_adma_qc_prep,
 	.qc_issue		= nv_adma_qc_issue,
-	.freeze			= nv_adma_freeze,
-	.thaw			= nv_adma_thaw,
 	.error_handler		= nv_adma_error_handler,
 	.post_internal_cmd	= nv_adma_post_internal_cmd,
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= nv_adma_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= nv_adma_irq_on,
+	.irq_off		= nv_adma_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
@@ -911,13 +903,13 @@ static irqreturn_t nv_adma_interrupt(int
 	return IRQ_RETVAL(handled);
 }
 
-static void nv_adma_freeze(struct ata_port *ap)
+static void nv_adma_irq_off(struct ata_port *ap)
 {
 	struct nv_adma_port_priv *pp = ap->private_data;
 	void __iomem *mmio = pp->ctl_block;
 	u16 tmp;
 
-	nv_ck804_freeze(ap);
+	nv_ck804_irq_off(ap);
 
 	if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE)
 		return;
@@ -933,13 +925,13 @@ static void nv_adma_freeze(struct ata_po
 	readw( mmio + NV_ADMA_CTL );	/* flush posted write */
 }
 
-static void nv_adma_thaw(struct ata_port *ap)
+static void nv_adma_irq_on(struct ata_port *ap)
 {
 	struct nv_adma_port_priv *pp = ap->private_data;
 	void __iomem *mmio = pp->ctl_block;
 	u16 tmp;
 
-	nv_ck804_thaw(ap);
+	nv_ck804_irq_on(ap);
 
 	if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE)
 		return;
@@ -1411,7 +1403,7 @@ static void nv_scr_write (struct ata_por
 	iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4));
 }
 
-static void nv_nf2_freeze(struct ata_port *ap)
+static void nv_nf2_irq_off(struct ata_port *ap)
 {
 	void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr;
 	int shift = ap->port_no * NV_INT_PORT_SHIFT;
@@ -1422,7 +1414,7 @@ static void nv_nf2_freeze(struct ata_por
 	iowrite8(mask, scr_addr + NV_INT_ENABLE);
 }
 
-static void nv_nf2_thaw(struct ata_port *ap)
+static void nv_nf2_irq_on(struct ata_port *ap)
 {
 	void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr;
 	int shift = ap->port_no * NV_INT_PORT_SHIFT;
@@ -1435,7 +1427,7 @@ static void nv_nf2_thaw(struct ata_port 
 	iowrite8(mask, scr_addr + NV_INT_ENABLE);
 }
 
-static void nv_ck804_freeze(struct ata_port *ap)
+static void nv_ck804_irq_off(struct ata_port *ap)
 {
 	void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR];
 	int shift = ap->port_no * NV_INT_PORT_SHIFT;
@@ -1446,7 +1438,7 @@ static void nv_ck804_freeze(struct ata_p
 	writeb(mask, mmio_base + NV_INT_ENABLE_CK804);
 }
 
-static void nv_ck804_thaw(struct ata_port *ap)
+static void nv_ck804_irq_on(struct ata_port *ap)
 {
 	void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR];
 	int shift = ap->port_no * NV_INT_PORT_SHIFT;
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_promise.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_promise.c
--- 09_integrate_irq_on_off/drivers/ata/sata_promise.c	2007-07-04 13:17:59.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_promise.c	2007-07-04 14:53:38.000000000 +0800
@@ -142,8 +142,8 @@ static int pdc_check_atapi_dma(struct at
 static int pdc_old_sata_check_atapi_dma(struct ata_queued_cmd *qc);
 static void pdc_irq_clear(struct ata_port *ap);
 static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc);
-static void pdc_freeze(struct ata_port *ap);
-static void pdc_thaw(struct ata_port *ap);
+static void pdc_irq_on(struct ata_port *ap);
+static void pdc_irq_off(struct ata_port *ap);
 static void pdc_pata_error_handler(struct ata_port *ap);
 static void pdc_sata_error_handler(struct ata_port *ap);
 static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
@@ -179,15 +179,13 @@ static const struct ata_port_operations 
 
 	.qc_prep		= pdc_qc_prep,
 	.qc_issue		= pdc_qc_issue_prot,
-	.freeze			= pdc_freeze,
-	.thaw			= pdc_thaw,
 	.error_handler		= pdc_sata_error_handler,
 	.post_internal_cmd	= pdc_post_internal_cmd,
 	.cable_detect		= pdc_sata_cable_detect,
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= pdc_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= pdc_irq_on,
+	.irq_off		= pdc_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= pdc_sata_scr_read,
@@ -207,15 +205,13 @@ static const struct ata_port_operations 
 
 	.qc_prep		= pdc_qc_prep,
 	.qc_issue		= pdc_qc_issue_prot,
-	.freeze			= pdc_freeze,
-	.thaw			= pdc_thaw,
 	.error_handler		= pdc_sata_error_handler,
 	.post_internal_cmd	= pdc_post_internal_cmd,
 	.cable_detect		= pdc_sata_cable_detect,
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= pdc_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= pdc_irq_on,
+	.irq_off		= pdc_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.scr_read		= pdc_sata_scr_read,
@@ -234,15 +230,13 @@ static const struct ata_port_operations 
 
 	.qc_prep		= pdc_qc_prep,
 	.qc_issue		= pdc_qc_issue_prot,
-	.freeze			= pdc_freeze,
-	.thaw			= pdc_thaw,
 	.error_handler		= pdc_pata_error_handler,
 	.post_internal_cmd	= pdc_post_internal_cmd,
 	.cable_detect		= pdc_pata_cable_detect,
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= pdc_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= pdc_irq_on,
+	.irq_off		= pdc_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= pdc_common_port_start,
@@ -574,7 +568,7 @@ static void pdc_qc_prep(struct ata_queue
 	}
 }
 
-static void pdc_freeze(struct ata_port *ap)
+static void pdc_irq_off(struct ata_port *ap)
 {
 	void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr;
 	u32 tmp;
@@ -585,7 +579,7 @@ static void pdc_freeze(struct ata_port *
 	readl(mmio + PDC_CTLSTAT); /* flush */
 }
 
-static void pdc_thaw(struct ata_port *ap)
+static void pdc_irq_on(struct ata_port *ap)
 {
 	void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr;
 	u32 tmp;
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_qstor.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_qstor.c
--- 09_integrate_irq_on_off/drivers/ata/sata_qstor.c	2007-07-04 13:17:13.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_qstor.c	2007-07-04 14:53:52.000000000 +0800
@@ -157,8 +157,6 @@ static const struct ata_port_operations 
 	.qc_issue		= qs_qc_issue,
 	.data_xfer		= ata_data_xfer,
 	.eng_timeout		= qs_eng_timeout,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.irq_clear		= qs_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_sil.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_sil.c
--- 09_integrate_irq_on_off/drivers/ata/sata_sil.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_sil.c	2007-07-04 14:54:36.000000000 +0800
@@ -118,8 +118,8 @@ static void sil_dev_config(struct ata_de
 static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg);
 static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
 static int sil_set_mode (struct ata_port *ap, struct ata_device **r_failed);
-static void sil_freeze(struct ata_port *ap);
-static void sil_thaw(struct ata_port *ap);
+static void sil_irq_on(struct ata_port *ap);
+static void sil_irq_off(struct ata_port *ap);
 
 
 static const struct pci_device_id sil_pci_tbl[] = {
@@ -200,13 +200,11 @@ static const struct ata_port_operations 
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
-	.freeze			= sil_freeze,
-	.thaw			= sil_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= sil_irq_on,
+	.irq_off		= sil_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= sil_scr_read,
 	.scr_write		= sil_scr_write,
@@ -491,7 +489,7 @@ static irqreturn_t sil_interrupt(int irq
 	return IRQ_RETVAL(handled);
 }
 
-static void sil_freeze(struct ata_port *ap)
+static void sil_irq_off(struct ata_port *ap)
 {
 	void __iomem *mmio_base = ap->host->iomap[SIL_MMIO_BAR];
 	u32 tmp;
@@ -506,7 +504,7 @@ static void sil_freeze(struct ata_port *
 	readl(mmio_base + SIL_SYSCFG);	/* flush */
 }
 
-static void sil_thaw(struct ata_port *ap)
+static void sil_irq_on(struct ata_port *ap)
 {
 	void __iomem *mmio_base = ap->host->iomap[SIL_MMIO_BAR];
 	u32 tmp;
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_sil24.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_sil24.c
--- 09_integrate_irq_on_off/drivers/ata/sata_sil24.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_sil24.c	2007-07-04 14:55:32.000000000 +0800
@@ -332,8 +332,8 @@ static void sil24_tf_read(struct ata_por
 static void sil24_qc_prep(struct ata_queued_cmd *qc);
 static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc);
 static void sil24_irq_clear(struct ata_port *ap);
-static void sil24_freeze(struct ata_port *ap);
-static void sil24_thaw(struct ata_port *ap);
+static void sil24_irq_on(struct ata_port *ap);
+static void sil24_irq_off(struct ata_port *ap);
 static void sil24_error_handler(struct ata_port *ap);
 static void sil24_post_internal_cmd(struct ata_queued_cmd *qc);
 static int sil24_port_start(struct ata_port *ap);
@@ -398,15 +398,13 @@ static const struct ata_port_operations 
 	.qc_issue		= sil24_qc_issue,
 
 	.irq_clear		= sil24_irq_clear,
-	.irq_on			= ata_dummy_irq_on,
-	.irq_off		= ata_dummy_irq_off,
+	.irq_on			= sil24_irq_on,
+	.irq_off		= sil24_irq_off,
 	.irq_ack		= ata_dummy_irq_ack,
 
 	.scr_read		= sil24_scr_read,
 	.scr_write		= sil24_scr_write,
 
-	.freeze			= sil24_freeze,
-	.thaw			= sil24_thaw,
 	.error_handler		= sil24_error_handler,
 	.post_internal_cmd	= sil24_post_internal_cmd,
 
@@ -729,7 +727,7 @@ static void sil24_irq_clear(struct ata_p
 	/* unused */
 }
 
-static void sil24_freeze(struct ata_port *ap)
+static void sil24_irq_off(struct ata_port *ap)
 {
 	void __iomem *port = ap->ioaddr.cmd_addr;
 
@@ -739,7 +737,7 @@ static void sil24_freeze(struct ata_port
 	writel(0xffff, port + PORT_IRQ_ENABLE_CLR);
 }
 
-static void sil24_thaw(struct ata_port *ap)
+static void sil24_irq_on(struct ata_port *ap)
 {
 	void __iomem *port = ap->ioaddr.cmd_addr;
 	u32 tmp;
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_sis.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_sis.c
--- 09_integrate_irq_on_off/drivers/ata/sata_sis.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_sis.c	2007-07-04 14:55:46.000000000 +0800
@@ -117,8 +117,6 @@ static const struct ata_port_operations 
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.irq_clear		= ata_bmdma_irq_clear,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_svw.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_svw.c
--- 09_integrate_irq_on_off/drivers/ata/sata_svw.c	2007-07-04 13:20:30.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_svw.c	2007-07-04 14:55:59.000000000 +0800
@@ -336,8 +336,6 @@ static const struct ata_port_operations 
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.irq_clear		= ata_bmdma_irq_clear,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_sx4.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_sx4.c
--- 09_integrate_irq_on_off/drivers/ata/sata_sx4.c	2007-07-04 13:17:13.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_sx4.c	2007-07-04 14:56:15.000000000 +0800
@@ -203,8 +203,6 @@ static const struct ata_port_operations 
 	.qc_issue		= pdc20621_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 	.eng_timeout		= pdc_eng_timeout,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.irq_clear		= pdc20621_irq_clear,
 	.irq_on			= ata_irq_on,
 	.irq_off		= ata_irq_off,
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_uli.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_uli.c
--- 09_integrate_irq_on_off/drivers/ata/sata_uli.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_uli.c	2007-07-04 14:56:28.000000000 +0800
@@ -110,8 +110,6 @@ static const struct ata_port_operations 
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_via.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_via.c
--- 09_integrate_irq_on_off/drivers/ata/sata_via.c	2007-07-04 12:09:29.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_via.c	2007-07-04 15:49:44.000000000 +0800
@@ -74,7 +74,7 @@ enum {
 static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
 static u32 svia_scr_read (struct ata_port *ap, unsigned int sc_reg);
 static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
-static void svia_noop_freeze(struct ata_port *ap);
+static void svia_irq_off(struct ata_port *ap);
 static void vt6420_error_handler(struct ata_port *ap);
 static int vt6421_pata_cable_detect(struct ata_port *ap);
 static void vt6421_set_pio_mode(struct ata_port *ap, struct ata_device *adev);
@@ -139,14 +139,12 @@ static const struct ata_port_operations 
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= svia_noop_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= vt6420_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_off		= svia_irq_off,
 	.irq_ack		= ata_irq_ack,
 
 	.port_start		= ata_port_start,
@@ -173,8 +171,6 @@ static const struct ata_port_operations 
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= vt6421_pata_cable_detect,
@@ -205,8 +201,6 @@ static const struct ata_port_operations 
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= ata_cable_sata,
@@ -266,13 +260,17 @@ static void svia_scr_write (struct ata_p
 	iowrite32(val, ap->ioaddr.scr_addr + (4 * sc_reg));
 }
 
-static void svia_noop_freeze(struct ata_port *ap)
+static void svia_irq_off(struct ata_port *ap)
 {
-	/* Some VIA controllers choke if ATA_NIEN is manipulated in
-	 * certain way.  Leave it alone and just clear pending IRQ.
-	 */
-	ata_chk_status(ap);
-	ata_bmdma_irq_clear(ap);
+	if (0) {
+		/* Some VIA controllers choke if ATA_NIEN is manipulated in
+		 * certain way.  Leave it alone and just clear pending IRQ.
+		 */
+		/* FIXME: http://bugzilla.kernel.org/show_bug.cgi?id=7415 */
+		ata_chk_status(ap);
+		ata_bmdma_irq_clear(ap);
+	} else
+		ata_irq_off(ap);
 }
 
 /**
diff -Nrup 09_integrate_irq_on_off/drivers/ata/sata_vsc.c 10_integrate_irq_on_off_lldd/drivers/ata/sata_vsc.c
--- 09_integrate_irq_on_off/drivers/ata/sata_vsc.c	2007-07-04 13:20:30.000000000 +0800
+++ 10_integrate_irq_on_off_lldd/drivers/ata/sata_vsc.c	2007-07-04 15:12:33.000000000 +0800
@@ -115,7 +115,7 @@ static void vsc_sata_scr_write (struct a
 }
 
 
-static void vsc_freeze(struct ata_port *ap)
+static void vsc_irq_off(struct ata_port *ap)
 {
 	void __iomem *mask_addr;
 
@@ -126,7 +126,7 @@ static void vsc_freeze(struct ata_port *
 }
 
 
-static void vsc_thaw(struct ata_port *ap)
+static void vsc_irq_on(struct ata_port *ap)
 {
 	void __iomem *mask_addr;
 
@@ -304,13 +304,11 @@ static const struct ata_port_operations 
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
-	.freeze			= vsc_freeze,
-	.thaw			= vsc_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-	.irq_off		= ata_irq_off,
+	.irq_on			= vsc_irq_on,
+	.irq_off		= vsc_irq_off,
 	.irq_ack		= ata_irq_ack,
 	.scr_read		= vsc_sata_scr_read,
 	.scr_write		= vsc_sata_scr_write,




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

* Re: [PATCH 8/10] libata: remove writing of tf->ctl from ata_tf_load()
  2007-07-04  9:03 ` [PATCH 8/10] libata: remove writing of tf->ctl from ata_tf_load() Albert Lee
@ 2007-07-04 19:09   ` Mark Lord
  2007-07-05  2:43     ` Albert Lee
  0 siblings, 1 reply; 17+ messages in thread
From: Mark Lord @ 2007-07-04 19:09 UTC (permalink / raw)
  To: albertl; +Cc: Jeff Garzik, Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Albert Lee wrote:
> Patch 8/10:
>  
> The relevant bits in the ctl register are HOB, SRST and nIEN.
>  - HOB is only used by ata_tf_read().
>  - For SRST, soft reset is not the duty of tf_load.
>  - For nIEN, explicit irq_on()/irq_off and freeze()/thaw() are provided.
> 
>   Since EH/HSM now call explicit freeze()/thaw() for irq off/on.
> Remove the implicit nIEN handling from ata_tf_load().

At some point soon, I hope to piece together enough old hardware here
to reconnect my PCI-X sata_qstor card, and then fix the driver.

It needs to have control over the nIEN bit, and currently that bit
is not behaving as it did way back in 2.6.11(?) when the driver was
first added.

The qstor chip *requires* that nIEN be "1" during R/W commands.
Is there a nice way to accomplish that here?

Thanks

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

* Re: [PATCH 8/10] libata: remove writing of tf->ctl from ata_tf_load()
  2007-07-04 19:09   ` Mark Lord
@ 2007-07-05  2:43     ` Albert Lee
  2007-07-05 10:40       ` Tejun Heo
  0 siblings, 1 reply; 17+ messages in thread
From: Albert Lee @ 2007-07-05  2:43 UTC (permalink / raw)
  To: Mark Lord; +Cc: Jeff Garzik, Alan Cox, Tejun Heo, Linux IDE, Doug Maxey

Mark Lord wrote:
> Albert Lee wrote:
> 
>> Patch 8/10:
>>  
>> The relevant bits in the ctl register are HOB, SRST and nIEN.
>>  - HOB is only used by ata_tf_read().
>>  - For SRST, soft reset is not the duty of tf_load.
>>  - For nIEN, explicit irq_on()/irq_off and freeze()/thaw() are provided.
>>
>>   Since EH/HSM now call explicit freeze()/thaw() for irq off/on.
>> Remove the implicit nIEN handling from ata_tf_load().
> 
> 
> At some point soon, I hope to piece together enough old hardware here
> to reconnect my PCI-X sata_qstor card, and then fix the driver.
> 
> It needs to have control over the nIEN bit, and currently that bit
> is not behaving as it did way back in 2.6.11(?) when the driver was
> first added.
> 
> The qstor chip *requires* that nIEN be "1" during R/W commands.
> Is there a nice way to accomplish that here?
> 

Does it mean that during the execution of PIO R/W commands, no interrupt
will be generated? Currently the sata_qstor driver uses the
ATA_FLAG_PIO_POLLING flag, does such polling pio fulfill the need of
qstor? If not, maybe we could check what needs to be added and include
them into consideration.

Hmm, another consideration for qstor, irq_on/off do have their value for
nIEN manipulation. The patchset maybe too far in scope.  I will limit
the scope of the patchset and leave irq_on/off alone (rather than
integrate with thaw/freeze).

Thanks for the comments.
--
albert


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

* Re: [PATCH 1/10] libata: remove irq_on from ata_bus_reset() and ata_std_postreset()
  2007-07-04  8:43 ` [PATCH 1/10] libata: remove irq_on from ata_bus_reset() and ata_std_postreset() Albert Lee
@ 2007-07-05 10:18   ` Tejun Heo
  0 siblings, 0 replies; 17+ messages in thread
From: Tejun Heo @ 2007-07-05 10:18 UTC (permalink / raw)
  To: albertl; +Cc: Jeff Garzik, Alan Cox, Doug Maxey, Linux IDE

Albert Lee wrote:
> Patch 1/10:
>   After checking, it seems calling irq_on() in ata_bus_reset() and ata_std_postreset()
> are leftover of the EDD reset. Remove them.
> 
> Signed-off-by: Albert Lee <albertcc@tw.ibm.com>

Acked-by: Tejun Heo <htejun@gmail.com>

-- 
tejun

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

* Re: [PATCH 8/10] libata: remove writing of tf->ctl from ata_tf_load()
  2007-07-05  2:43     ` Albert Lee
@ 2007-07-05 10:40       ` Tejun Heo
  0 siblings, 0 replies; 17+ messages in thread
From: Tejun Heo @ 2007-07-05 10:40 UTC (permalink / raw)
  To: albertl; +Cc: Mark Lord, Jeff Garzik, Alan Cox, Linux IDE, Doug Maxey

Hello,

Albert Lee wrote:
>> At some point soon, I hope to piece together enough old hardware here
>> to reconnect my PCI-X sata_qstor card, and then fix the driver.
>>
>> It needs to have control over the nIEN bit, and currently that bit
>> is not behaving as it did way back in 2.6.11(?) when the driver was
>> first added.
>>
>> The qstor chip *requires* that nIEN be "1" during R/W commands.
>> Is there a nice way to accomplish that here?
> 
> Does it mean that during the execution of PIO R/W commands, no interrupt
> will be generated? Currently the sata_qstor driver uses the
> ATA_FLAG_PIO_POLLING flag, does such polling pio fulfill the need of
> qstor? If not, maybe we could check what needs to be added and include
> them into consideration.

I'm not too familiar with how the qstor works but that sounds like
something which would fit very well into private ->qc_issue, no?

> Hmm, another consideration for qstor, irq_on/off do have their value for
> nIEN manipulation. The patchset maybe too far in scope.  I will limit
> the scope of the patchset and leave irq_on/off alone (rather than
> integrate with thaw/freeze).

I like the idea of killing ->freeze/thaw.  As you've just shown, they
provide almost the identical functionality as ->irq_off/on but just have
more cryptic names and with wide spread use of SATA, the meaning of NIEN
itself is diminishing, so I don't really see a point in keeping it for
the sake of controlling NIEN.

One way or the other, all we need is for the controller to not raise IRQ
during polling or when things look odd.  If some controller and/or
device need specific handling of NIEN, it'll be actually easier to deal
with if we define ->irq_off as "whatever you do, just shut up".

So, I'm all for it.

-- 
tejun

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

* Re: [PATCH 0/10] libata: irq_on/off restructuring
  2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
                   ` (9 preceding siblings ...)
  2007-07-04  9:29 ` [PATCH 10/10] libata: Integrate freeze/thaw with irq_on/off in LLDDs Albert Lee
@ 2007-07-05 10:48 ` Tejun Heo
  2007-07-06  9:23   ` Albert Lee
  10 siblings, 1 reply; 17+ messages in thread
From: Tejun Heo @ 2007-07-05 10:48 UTC (permalink / raw)
  To: albertl; +Cc: Jeff Garzik, Alan Cox, Linux IDE, Mark Lord

Albert Lee wrote:
> For ATA, there are two levels of mechanism available to turn irq on/off.
> - device level: nIEN bit in the control register. This masks INTRQ from the device.
> - host adapter level: some controller can mask out per-port irq from the host adapter.
> 
> Currently various parts of libata deal with irq on/off.
>   ex. tf_load() can alter the nIEN bit.
>   ex. irq_on() also alters the device level nIEN bit.
>   ex. freeze()/thaw() deal with the host adapter irq mask.
> 
> It seems these irq on/off codes could be better structured.
> Patches against libata-dev tree for your review/advice, thanks.
> 
> 1/10: remove irq_on from ata_bus_reset() and ata_std_postreset()
> 2/10: add ->irq_off() for symmetry
> 3/10: implement ->irq_off() in LLDDs
> 4/10: use irq_off from bmdma_freeze()
> 5/10: use freeze()/thaw() for polling
> 6/10: add freeze()/thaw() to old EH LLDDs
> 7/10: pdc_freeze() semantic change
> 8/10: remove writing of tf->ctl from ata_tf_load()
> 9/10: integrate freeze()/thaw() with irq_on/off.
> 10/10: integrate freeze/thaw with irq_on/off in LLDDs

I like the whole series.  Just a few nits.

* 9 and 10 need to be oen patch.  As it currently stands, compile will
fail after 9.

* Please don't include "Patch n/10" in message body.

* Add freeze/thaw to all, merge, kill freeze/thaw from all sequence is a
bit odd.  It would be better if we can do things more directly but I
haven't thought about how that can be done too hard, so if it's too
difficult, it's probably not worth it.

Alan, Jeff, I think we'll need to do what IDE has been doing for IRQ
masking to get acceptable PIO behavior after all and that will also make
us more resistant against deadly IRQ storms on controllers which don't
have pending IRQ bits (most SFF ones), and this change will ease our way
toward that direction.  What do you guys think?

Thanks.

-- 
tejun

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

* Re: [PATCH 0/10] libata: irq_on/off restructuring
  2007-07-05 10:48 ` [PATCH 0/10] libata: irq_on/off restructuring Tejun Heo
@ 2007-07-06  9:23   ` Albert Lee
  0 siblings, 0 replies; 17+ messages in thread
From: Albert Lee @ 2007-07-06  9:23 UTC (permalink / raw)
  To: Tejun Heo; +Cc: albertl, Jeff Garzik, Alan Cox, Linux IDE, Mark Lord

Tejun Heo wrote:
 > 
> I like the whole series.  Just a few nits.
> 
> * 9 and 10 need to be oen patch.  As it currently stands, compile will
> fail after 9.
> 
> * Please don't include "Patch n/10" in message body.
> 
> * Add freeze/thaw to all, merge, kill freeze/thaw from all sequence is a
> bit odd.  It would be better if we can do things more directly but I
> haven't thought about how that can be done too hard, so if it's too
> difficult, it's probably not worth it.
> 
> Alan, Jeff, I think we'll need to do what IDE has been doing for IRQ
> masking to get acceptable PIO behavior after all and that will also make
> us more resistant against deadly IRQ storms on controllers which don't
> have pending IRQ bits (most SFF ones), and this change will ease our way
> toward that direction.  What do you guys think?
> 

Thanks for the review/advice. Revised patches to follow.
--
albert


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

end of thread, other threads:[~2007-07-06  9:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-04  8:38 [PATCH 0/10] libata: irq_on/off restructuring Albert Lee
2007-07-04  8:43 ` [PATCH 1/10] libata: remove irq_on from ata_bus_reset() and ata_std_postreset() Albert Lee
2007-07-05 10:18   ` Tejun Heo
2007-07-04  8:46 ` [PATCH 2/10] libata: add irq_off Albert Lee
2007-07-04  8:49 ` [PATCH 3/10] libata: implement ->irq_off in LLDDs Albert Lee
2007-07-04  8:52 ` [PATCH 4/10] libata: call irq_off from bmdma_freeze() Albert Lee
2007-07-04  8:57 ` [PATCH 5/10] libata: use freeze/thaw for polling Albert Lee
2007-07-04  8:59 ` [PATCH 6/10] libata: add freeze/thaw to old EH LLDDs Albert Lee
2007-07-04  9:01 ` [PATCH 7/10] libata: pdc_freeze() semantic change Albert Lee
2007-07-04  9:03 ` [PATCH 8/10] libata: remove writing of tf->ctl from ata_tf_load() Albert Lee
2007-07-04 19:09   ` Mark Lord
2007-07-05  2:43     ` Albert Lee
2007-07-05 10:40       ` Tejun Heo
2007-07-04  9:16 ` [PATCH 9/10] libata: Integrate freeze/thaw with irq_on/off Albert Lee
2007-07-04  9:29 ` [PATCH 10/10] libata: Integrate freeze/thaw with irq_on/off in LLDDs Albert Lee
2007-07-05 10:48 ` [PATCH 0/10] libata: irq_on/off restructuring Tejun Heo
2007-07-06  9:23   ` Albert Lee

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