linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations
@ 2008-01-30  9:28 Tejun Heo
  2008-01-30  9:28 ` [PATCH 1/9] libata: PCI device should be powered up before being accessed Tejun Heo
                   ` (12 more replies)
  0 siblings, 13 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:28 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo


Hello, all.

This is the first take of cleanup-sht-ops patchset.  As the name
suggests it reorganizes and cleans up scsi_host_template and
ata_port_operation tables used by libata core and low level drivers.

libata has always tried to allow a lot of flexibility to its low level
drivers and most parts of libata are overridable in some way.  LLDs
always submit full sht and ops tables to upper layers and they're free
to override any field they see fit.  This is all great but as time
goes by more and more fields have been added, more drivers got written
and individual drivers got extended to support more controllers.

This means that each driver should carry large amount of boilerplate
code and replicate them for each variant it supports.  This is not
only inconveinent but also highly error-prone when combined with our
multi-branched development model.

Low level drivers and core layers are being modified in different
branches all the time.  Core layer changes sometimes calls for update
in boilerplate code which is now a massive work due to the number of
low level drivers.  Later when core layer changes and low level driver
changes get merged, they can easily conflict and go unnoticed as
there's no automatic propagation of core changes to low level drivers
and the differences are often buried by all the bolierplating.

This patchset tries to solve the problem so that life is easier for
both core and lld developers.  The goals are...

* Reduce the amount of boilerplating.  It's way too much.  Unless a
  LLD wants to change the default behavior, LLD should be able to use
  provided helper and be done with it.

* Allow LLD to reuse ops tables easily.  Many drivers support similar
  but not quite identical chipsets, sometimes different generations of
  a single product or different products comforming to a standard.  In
  these cases, drivers usually only need to use a few different
  methods for each sub-type.  Currently, a LLD should replicate whole
  ops table for each variant.  By allowing LLD to override parts of
  its ops table, it can be made much easier and safer.

* Make core changes automagically propagate to low level drivers.
  libata now has a lot of low level drivers and it's getting
  increasingly difficult to update core and libata already has
  accumulated quite some amount of inconsistencies along the way.  By
  putting control of default behaviors in the core layer, things
  become easier for both core layer and LLDs.

* And all of above while not sacrificing flexibility.

This patchset adds initializer macros for shts and inheritance for ops
tables combined with base tables to inherit from.  The sht part is
straight forward, they're good old initializer macros which we
probably should have added long time ago.  They're named ATA_*_SHT()
and four variants exist.

BASE  : Common to all libata drivers.  The user must set sg_tablesize
	and dma_boundary.
PIO   : SFF ATA controllers w/ only PIO support.
BMDMA : SFF ATA controllers w/ BMDMA support.  sg_tablesize and
	dma_boundary are set to BMDMA limits.
NCQ   : SATA controllers supporting NCQ.  The user must set
	sg_tablesize, dma_boundary and can_queue.

LLDs can override or add specific fields by putting initializers below
the helpers.

The ops part is a tad bit trickier to make it easy for LLDs to reuse
their ops tables.  A new field ->inherits is added which points to the
ops table to inherit operations from.  The pointed table in turn can
inherit from another table as long as the inheritance doesn't form a
loop, so by inheriting an existing ops table, a LLD can avoid
specifying every needed op.  It just needs to specify what it has
implemented differently or additionally.

Also, as inheriting is done by simply initializing ->inherits field, a
LLD can inherit its own ops table to define a slightly different
version without defining initializer macros or copying the ops table
manually.  Please take a look at how ahci, ata_piix, pata_amd or
pata_sis take advantage of this.

The inheritance is hidden from LLDs and doesn't have any hot-path run
time overhead.  Inheritance is solved when the host is started.  It's
called finalization of the ops table.  The inheritance chain is
followed and each missing callback is filled from the nearest ancestor
which has the method implemented.  Once the host is started, there's
no difference from using direct full ops table and even the
finalization is done only once per ops table.

libata provides five base ops tables LLDs of different classes can
inherit from.  They are named [s]ata_*_port_ops.

base  : Common to all libata drivers.
sata  : SATA controllers w/ native interface (non-SFF).
pmp   : SATA controllers w/ PMP support.
sff   : SFF ATA controllers w/o BMDMA support.
bmdma : SFF ATA controllers w/ BMDMA support.

This patchset is consisted of 9 patches.  The first four fix bugs and
hunts down inconsistencies in preparation of the conversion.  The
fifth patch, sht-ops-conversion, implements and uses sht and ops
helpers.  The rest cleans up untidy port_info, sht, ops usages which
stemmed from or remain due to the cumbersome mechanism.

As the volume of conversion done in sht-ops-conversion makes it pretty
diffcult to verify.  It has been verified by dumping all the sht and
ops fields and comparing their values before and after.  For all
drivers which are compilable under x86(_64), the patch doesn't change
any field.  I'll write a reply to this head message containing the
patches and scripts used to verify it.

The following drivers need specific platform to build, so they need
verification.  If you work on one of the following drivers, please
verify that the driver builds and works fine.  It would be best if you
can verify that the sht and ops don't change by the fifth path using
the method I'll write in another message.

* pata_at32
* pata_bf54x
* pata_icside
* pata_ixp4xx_cf
* pata_mpc52xx
* pata_scc
* sata_fsl

All combined, this patchset sheds around 3700 lines of code from
libata and will make libata developers' lives (especially mine)
easier.

Basic functionality is tested on ahci, ata_piix, sata_sil, sata_sil24,
pata_jmicron, pata_hpt3x2n, sata_promise and pdc_adma.  The
sht-ops-conversion shouldn't cause any trouble but later clean up
patches definitely need some testing.  Fortunately, mistakes are
likely easy to spot during probing.

This patchset is on top of

  upstream (a984f58dd97f22f5113700322fed311a0ee29947)
+ prefer-hardreset patchset [1]
+ grace-failure-on-no-reset patch [2]
+ pci-allow-multiple-pcim_enable_device [3]

and comes with an impressive diffstat output.

 drivers/ata/ahci.c              |  158 ++++------------------
 drivers/ata/ata_generic.c       |   49 -------
 drivers/ata/ata_piix.c          |  185 ++------------------------
 drivers/ata/libata-core.c       |  131 +++++++++++++++++-
 drivers/ata/libata-eh.c         |   32 +++-
 drivers/ata/libata-pmp.c        |   47 +-----
 drivers/ata/libata-sff.c        |   53 ++-----
 drivers/ata/pata_acpi.c         |   71 +---------
 drivers/ata/pata_ali.c          |  161 +++--------------------
 drivers/ata/pata_amd.c          |  266 +++++++-------------------------------
 drivers/ata/pata_artop.c        |  121 ++---------------
 drivers/ata/pata_at32.c         |   44 ------
 drivers/ata/pata_atiixp.c       |   55 +------
 drivers/ata/pata_bf54x.c        |   37 -----
 drivers/ata/pata_cmd640.c       |   73 +++-------
 drivers/ata/pata_cmd64x.c       |  135 +++----------------
 drivers/ata/pata_cs5520.c       |   58 ++------
 drivers/ata/pata_cs5530.c       |   70 +++-------
 drivers/ata/pata_cs5535.c       |   50 -------
 drivers/ata/pata_cs5536.c       |   50 -------
 drivers/ata/pata_cypress.c      |   50 -------
 drivers/ata/pata_efar.c         |   64 ---------
 drivers/ata/pata_hpt366.c       |   81 ++++-------
 drivers/ata/pata_hpt37x.c       |  244 +++++++----------------------------
 drivers/ata/pata_hpt3x2n.c      |   81 ++---------
 drivers/ata/pata_hpt3x3.c       |   50 -------
 drivers/ata/pata_icside.c       |   59 +-------
 drivers/ata/pata_isapnp.c       |   37 -----
 drivers/ata/pata_it8213.c       |   65 +--------
 drivers/ata/pata_it821x.c       |   91 +++----------
 drivers/ata/pata_ixp4xx_cf.c    |   42 ------
 drivers/ata/pata_jmicron.c      |   65 ---------
 drivers/ata/pata_legacy.c       |  276 ++--------------------------------------
 drivers/ata/pata_marvell.c      |   67 ---------
 drivers/ata/pata_mpc52xx.c      |   42 ------
 drivers/ata/pata_mpiix.c        |   55 -------
 drivers/ata/pata_netcell.c      |   56 +-------
 drivers/ata/pata_ninja32.c      |   46 ------
 drivers/ata/pata_ns87410.c      |   60 --------
 drivers/ata/pata_ns87415.c      |   94 ++-----------
 drivers/ata/pata_oldpiix.c      |   66 +--------
 drivers/ata/pata_opti.c         |   64 ---------
 drivers/ata/pata_optidma.c      |  101 +-------------
 drivers/ata/pata_pcmcia.c       |   64 +--------
 drivers/ata/pata_pdc2027x.c     |   89 ------------
 drivers/ata/pata_pdc202xx_old.c |   92 ++-----------
 drivers/ata/pata_platform.c     |   44 ------
 drivers/ata/pata_qdi.c          |   63 ---------
 drivers/ata/pata_radisys.c      |   51 -------
 drivers/ata/pata_rz1000.c       |   49 -------
 drivers/ata/pata_sc1200.c       |   53 +------
 drivers/ata/pata_scc.c          |   36 -----
 drivers/ata/pata_serverworks.c  |  104 +++------------
 drivers/ata/pata_sil680.c       |   63 ++-------
 drivers/ata/pata_sis.c          |  244 +++++------------------------------
 drivers/ata/pata_sl82c105.c     |   63 +--------
 drivers/ata/pata_triflex.c      |   56 --------
 drivers/ata/pata_via.c          |  135 ++++---------------
 drivers/ata/pata_winbond.c      |   41 -----
 drivers/ata/pdc_adma.c          |   49 ++-----
 drivers/ata/sata_fsl.c          |   35 -----
 drivers/ata/sata_inic162x.c     |   44 +-----
 drivers/ata/sata_mv.c           |  119 ++---------------
 drivers/ata/sata_nv.c           |  196 ++++++----------------------
 drivers/ata/sata_promise.c      |   96 ++-----------
 drivers/ata/sata_qstor.c        |   46 ++----
 drivers/ata/sata_sil.c          |   36 -----
 drivers/ata/sata_sil24.c        |   58 +++-----
 drivers/ata/sata_sis.c          |   38 -----
 drivers/ata/sata_svw.c          |   33 ----
 drivers/ata/sata_sx4.c          |   17 --
 drivers/ata/sata_uli.c          |   43 ------
 drivers/ata/sata_via.c          |  112 +---------------
 drivers/ata/sata_vsc.c          |   34 ----
 drivers/pci/pci.c               |    3 
 drivers/scsi/ipr.c              |    3 
 include/linux/libata.h          |  222 +++++++++++++++++++++-----------
 77 files changed, 1204 insertions(+), 4929 deletions(-)

Thanks.

--
tejun

[1] http://thread.gmane.org/gmane.linux.ide/27447
[2] http://article.gmane.org/gmane.linux.ide/27781
[3] http://article.gmane.org/gmane.linux.ide/27782

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

* [PATCH 1/9] libata: PCI device should be powered up before being accessed
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
@ 2008-01-30  9:28 ` Tejun Heo
  2008-02-01 20:44   ` Jeff Garzik
  2008-02-11 19:24   ` Jeff Garzik
  2008-01-30  9:28 ` [PATCH 2/9] libata: reorganize ata_port_operations Tejun Heo
                   ` (11 subsequent siblings)
  12 siblings, 2 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:28 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

PCI device should be powered up or powered up before its PCI regsiters
are accessed.  Although PCI configuration register access is allowed
in D3hot, PCI device is free to reset its status when transiting from
D3hot to D0 causing configuration data to change.

Many libata SFF drivers which use ata_pci_init_one() read and update
configuration registers before calling ata_pci_init_one() which
enables the PCI device.  Also, in resume paths, some drivers access
registers without resuming the PCI device.

This patch adds a call to pcim_enable_device() in init path if
register is accessed before calling ata_pci_init_one() and make resume
paths first resume PCI devices, access PCI configuration regiters then
resume ATA host.

While at it...

* cmd640 was strange in that it set ->resume even when CONFIG_PM is
  not.  This is by-product of minimal build fix.  Updated.

* In cs5530, Don't BUG() on reinit failure.  Just whine and fail
  resume.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/pata_ali.c         |   14 +++++++++++++-
 drivers/ata/pata_amd.c         |   16 +++++++++++++++-
 drivers/ata/pata_artop.c       |    5 +++++
 drivers/ata/pata_cmd640.c      |   21 ++++++++++++++++-----
 drivers/ata/pata_cmd64x.c      |   15 ++++++++++++++-
 drivers/ata/pata_cs5520.c      |   15 ++++++++++++++-
 drivers/ata/pata_cs5530.c      |   18 ++++++++++++++++--
 drivers/ata/pata_hpt366.c      |   14 +++++++++++++-
 drivers/ata/pata_hpt37x.c      |    5 +++++
 drivers/ata/pata_hpt3x2n.c     |    5 +++++
 drivers/ata/pata_it821x.c      |   14 +++++++++++++-
 drivers/ata/pata_netcell.c     |    5 +++++
 drivers/ata/pata_ns87415.c     |    6 ++++++
 drivers/ata/pata_optidma.c     |    5 +++++
 drivers/ata/pata_serverworks.c |   19 ++++++++++++++++---
 drivers/ata/pata_sil680.c      |   13 +++++++++++--
 drivers/ata/pata_sis.c         |    6 +++++-
 drivers/ata/pata_sl82c105.c    |    5 +++++
 drivers/ata/pata_via.c         |   14 +++++++++++++-
 19 files changed, 195 insertions(+), 20 deletions(-)

diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 7e68edf..5ef6594 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -597,6 +597,11 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	const struct ata_port_info *ppi[] = { NULL, NULL };
 	u8 tmp;
 	struct pci_dev *isa_bridge;
+	int rc;
+
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
 
 	/*
 	 * The chipset revision selects the driver operations and
@@ -632,8 +637,15 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 #ifdef CONFIG_PM
 static int ali_reinit_one(struct pci_dev *pdev)
 {
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
 	ali_init_chipset(pdev);
-	return ata_pci_device_resume(pdev);
+	ata_host_resume(host);
+	return 0;
 }
 #endif
 
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 761a666..567fe6b 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -662,10 +662,15 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	static int printed_version;
 	int type = id->driver_data;
 	u8 fifo;
+	int rc;
 
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
 
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
+
 	pci_read_config_byte(pdev, 0x41, &fifo);
 
 	/* Check for AMD7409 without swdma errata and if found adjust type */
@@ -709,6 +714,13 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 #ifdef CONFIG_PM
 static int amd_reinit_one(struct pci_dev *pdev)
 {
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
+
 	if (pdev->vendor == PCI_VENDOR_ID_AMD) {
 		u8 fifo;
 		pci_read_config_byte(pdev, 0x41, &fifo);
@@ -721,7 +733,9 @@ static int amd_reinit_one(struct pci_dev *pdev)
 		    pdev->device == PCI_DEVICE_ID_AMD_COBRA_7401)
 		    	ata_pci_clear_simplex(pdev);
 	}
-	return ata_pci_device_resume(pdev);
+
+	ata_host_resume(host);
+	return 0;
 }
 #endif
 
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index d421831..2f81480 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -446,11 +446,16 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 		.port_ops	= &artop6260_ops,
 	};
 	const struct ata_port_info *ppi[] = { NULL, NULL };
+	int rc;
 
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &pdev->dev,
 			   "version " DRV_VERSION "\n");
 
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
+
 	if (id->driver_data == 0) {	/* 6210 variant */
 		ppi[0] = &info_6210;
 		ppi[1] = &ata_dummy_port_info;
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index 43d198f..0ef1d1d 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -254,20 +254,31 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		.port_ops = &cmd640_port_ops
 	};
 	const struct ata_port_info *ppi[] = { &info, NULL };
+	int rc;
+
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
 
 	cmd640_hardware_init(pdev);
+
 	return ata_pci_init_one(pdev, ppi);
 }
 
+#ifdef CONFIG_PM
 static int cmd640_reinit_one(struct pci_dev *pdev)
 {
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
 	cmd640_hardware_init(pdev);
-#ifdef CONFIG_PM
-	return ata_pci_device_resume(pdev);
-#else
+	ata_host_resume(host);
 	return 0;
-#endif
 }
+#endif
 
 static const struct pci_device_id cmd640[] = {
 	{ PCI_VDEVICE(CMD, 0x640), 0 },
@@ -281,8 +292,8 @@ static struct pci_driver cmd640_pci_driver = {
 	.remove		= ata_pci_remove_one,
 #ifdef CONFIG_PM
 	.suspend	= ata_pci_device_suspend,
-#endif
 	.resume		= cmd640_reinit_one,
+#endif
 };
 
 static int __init cmd640_init(void)
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 7acbbd9..1c9a8d9 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -435,6 +435,11 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	const struct ata_port_info *ppi[] = { &cmd_info[id->driver_data], NULL };
 	u8 mrdmode;
+	int rc;
+
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
 
 	pci_read_config_dword(pdev, PCI_CLASS_REVISION, &class_rev);
 	class_rev &= 0xFF;
@@ -470,7 +475,14 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 #ifdef CONFIG_PM
 static int cmd64x_reinit_one(struct pci_dev *pdev)
 {
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
 	u8 mrdmode;
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
+
 	pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 64);
 	pci_read_config_byte(pdev, MRDMODE, &mrdmode);
 	mrdmode &= ~ 0x30;	/* IRQ set up */
@@ -479,7 +491,8 @@ static int cmd64x_reinit_one(struct pci_dev *pdev)
 #ifdef CONFIG_PPC
 	pci_write_config_byte(pdev, UDIDETCR0, 0xF0);
 #endif
-	return ata_pci_device_resume(pdev);
+	ata_host_resume(host);
+	return 0;
 }
 #endif
 
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index d4590f5..972ed9f 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -203,6 +203,10 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
 	struct ata_ioports *ioaddr;
 	int i, rc;
 
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
+
 	/* IDE port enable bits */
 	pci_read_config_byte(pdev, 0x60, &pcicfg);
 
@@ -310,11 +314,20 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
 
 static int cs5520_reinit_one(struct pci_dev *pdev)
 {
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
 	u8 pcicfg;
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
+
 	pci_read_config_byte(pdev, 0x60, &pcicfg);
 	if ((pcicfg & 0x40) == 0)
 		pci_write_config_byte(pdev, 0x60, pcicfg | 0x40);
-	return ata_pci_device_resume(pdev);
+
+	ata_host_resume(host);
+	return 0;
 }
 
 /**
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index e1818fd..f876aed 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -349,6 +349,11 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		.port_ops = &cs5530_port_ops
 	};
 	const struct ata_port_info *ppi[] = { &info, NULL };
+	int rc;
+
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
 
 	/* Chip initialisation */
 	if (cs5530_init_chip())
@@ -364,10 +369,19 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 #ifdef CONFIG_PM
 static int cs5530_reinit_one(struct pci_dev *pdev)
 {
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
+
 	/* If we fail on resume we are doomed */
 	if (cs5530_init_chip())
-		BUG();
-	return ata_pci_device_resume(pdev);
+		return -EIO;
+
+	ata_host_resume(host);
+	return 0;
 }
 #endif /* CONFIG_PM */
 
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 0713872..6f63b73 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -402,6 +402,11 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 
 	u32 class_rev;
 	u32 reg1;
+	int rc;
+
+	rc = pcim_enable_device(dev);
+	if (rc)
+		return rc;
 
 	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
 	class_rev &= 0xFF;
@@ -435,8 +440,15 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 #ifdef CONFIG_PM
 static int hpt36x_reinit_one(struct pci_dev *dev)
 {
+	struct ata_host *host = dev_get_drvdata(&dev->dev);
+	int rc;
+
+	rc = ata_pci_device_do_resume(dev);
+	if (rc)
+		return rc;
 	hpt36x_init_chipset(dev);
-	return ata_pci_device_resume(dev);
+	ata_host_resume(host);
+	return 0;
 }
 #endif
 
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 68eb349..7a69f36 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -966,6 +966,11 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 
 	const struct hpt_chip *chip_table;
 	int clock_slot;
+	int rc;
+
+	rc = pcim_enable_device(dev);
+	if (rc)
+		return rc;
 
 	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
 	class_rev &= 0xFF;
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index 9f1c084..3a517cb 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -505,6 +505,11 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	unsigned int f_low, f_high;
 	int adjust;
 	unsigned long iobase = pci_resource_start(dev, 4);
+	int rc;
+
+	rc = pcim_enable_device(dev);
+	if (rc)
+		return rc;
 
 	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
 	class_rev &= 0xFF;
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index 109ddd4..3181e2c 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -759,6 +759,11 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	const struct ata_port_info *ppi[] = { NULL, NULL };
 	static char *mode[2] = { "pass through", "smart" };
+	int rc;
+
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
 
 	/* Force the card into bypass mode if so requested */
 	if (it8212_noraid) {
@@ -780,10 +785,17 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 #ifdef CONFIG_PM
 static int it821x_reinit_one(struct pci_dev *pdev)
 {
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
 	/* Resume - turn raid back off if need be */
 	if (it8212_noraid)
 		it821x_disable_raid(pdev);
-	return ata_pci_device_resume(pdev);
+	ata_host_resume(host);
+	return rc;
 }
 #endif
 
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c
index 25c922a..0e4a08e 100644
--- a/drivers/ata/pata_netcell.c
+++ b/drivers/ata/pata_netcell.c
@@ -100,11 +100,16 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 		.port_ops	= &netcell_ops,
 	};
 	const struct ata_port_info *port_info[] = { &info, NULL };
+	int rc;
 
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &pdev->dev,
 			   "version " DRV_VERSION "\n");
 
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
+
 	/* Any chip specific setup/optimisation/messages here */
 	ata_pci_clear_simplex(pdev);
 
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c
index d0e2e50..93eb958 100644
--- a/drivers/ata/pata_ns87415.c
+++ b/drivers/ata/pata_ns87415.c
@@ -410,6 +410,7 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 		.port_ops	= &ns87415_pata_ops,
 	};
 	const struct ata_port_info *ppi[] = { &info, NULL };
+	int rc;
 #if defined(CONFIG_SUPERIO)
 	static const struct ata_port_info info87560 = {
 		.sht		= &ns87415_sht,
@@ -425,6 +426,11 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &pdev->dev,
 			   "version " DRV_VERSION "\n");
+
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
+
 	/* Select 512 byte sectors */
 	pci_write_config_byte(pdev, 0x55, 0xEE);
 	/* Select PIO0 8bit clocking */
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index f9b485a..be8c421 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -497,10 +497,15 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	const struct ata_port_info *ppi[] = { &info_82c700, NULL };
 	static int printed_version;
+	int rc;
 
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n");
 
+	rc = pcim_enable_device(dev);
+	if (rc)
+		return rc;
+
 	/* Fixed location chipset magic */
 	inw(0x1F1);
 	inw(0x1F1);
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 9c523fb..0b1e882 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -498,6 +498,11 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
 		}
 	};
 	const struct ata_port_info *ppi[] = { &info[id->driver_data], NULL };
+	int rc;
+
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
 
 	/* Force master latency timer to 64 PCI clocks */
 	pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x40);
@@ -535,11 +540,17 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
 #ifdef CONFIG_PM
 static int serverworks_reinit_one(struct pci_dev *pdev)
 {
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
+
 	/* Force master latency timer to 64 PCI clocks */
 	pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x40);
 
-	switch (pdev->device)
-	{
+	switch (pdev->device) {
 		case PCI_DEVICE_ID_SERVERWORKS_OSB4IDE:
 			serverworks_fixup_osb4(pdev);
 			break;
@@ -554,7 +565,9 @@ static int serverworks_reinit_one(struct pci_dev *pdev)
 			serverworks_fixup_ht1000(pdev);
 			break;
 	}
-	return ata_pci_device_resume(pdev);
+
+	ata_host_resume(host);
+	return 0;
 }
 #endif
 
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index 503245a..ecdaebe 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -342,6 +342,10 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
 
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
+
 	switch (sil680_init_chip(pdev, &try_mmio)) {
 		case 0:
 			ppi[0] = &info_slow;
@@ -402,10 +406,15 @@ use_ioports:
 #ifdef CONFIG_PM
 static int sil680_reinit_one(struct pci_dev *pdev)
 {
-	int try_mmio;
+	struct ata_host *host = dev_get_drvdata(&pdev->dev);
+	int try_mmio, rc;
 
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
 	sil680_init_chip(pdev, &try_mmio);
-	return ata_pci_device_resume(pdev);
+	ata_host_resume(host);
+	return 0;
 }
 #endif
 
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 87546d9..ff98050 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -862,6 +862,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 	struct pci_dev *host = NULL;
 	struct sis_chipset *chipset = NULL;
 	struct sis_chipset *sets;
+	int rc;
 
 	static struct sis_chipset sis_chipsets[] = {
 
@@ -914,8 +915,11 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 		dev_printk(KERN_DEBUG, &pdev->dev,
 			   "version " DRV_VERSION "\n");
 
-	/* We have to find the bridge first */
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
 
+	/* We have to find the bridge first */
 	for (sets = &sis_chipsets[0]; sets->device; sets++) {
 		host = pci_get_device(PCI_VENDOR_ID_SI, sets->device, NULL);
 		if (host != NULL) {
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 1388cef..51831ac 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -315,6 +315,11 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
 					       &ata_dummy_port_info };
 	u32 val;
 	int rev;
+	int rc;
+
+	rc = pcim_enable_device(dev);
+	if (rc)
+		return rc;
 
 	rev = sl82c105_bridge_revision(dev);
 
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 39627ab..47ec47b 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -520,10 +520,15 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	static int printed_version;
 	u8 enable;
 	u32 timing;
+	int rc;
 
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
 
+	rc = pcim_enable_device(pdev);
+	if (rc)
+		return rc;
+
 	/* To find out how the IDE will behave and what features we
 	   actually have to look at the bridge not the IDE controller */
 	for (config = via_isa_bridges; config->id; config++)
@@ -611,6 +616,11 @@ static int via_reinit_one(struct pci_dev *pdev)
 	u32 timing;
 	struct ata_host *host = dev_get_drvdata(&pdev->dev);
 	const struct via_isa_bridge *config = host->private_data;
+	int rc;
+
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
 
 	via_config_fifo(pdev, config->flags);
 
@@ -626,7 +636,9 @@ static int via_reinit_one(struct pci_dev *pdev)
 		timing &= ~0x80008;
 		pci_write_config_dword(pdev, 0x50, timing);
 	}
-	return ata_pci_device_resume(pdev);
+
+	ata_host_resume(host);
+	return 0;
 }
 #endif
 
-- 
1.5.2.4


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

* [PATCH 2/9] libata: reorganize ata_port_operations
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
  2008-01-30  9:28 ` [PATCH 1/9] libata: PCI device should be powered up before being accessed Tejun Heo
@ 2008-01-30  9:28 ` Tejun Heo
  2008-01-30  9:28 ` [PATCH 3/9] libata: implement and use ata_noop_irq_clear() Tejun Heo
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:28 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

Over the time, ops in ata_port_operations has become a bit confusing.
Reorganize.  SFF/BMDMA ops are separated into separate a group as they
will be taken out of ata_port_operations later.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 include/linux/libata.h |  117 +++++++++++++++++++++++++-----------------------
 1 files changed, 61 insertions(+), 56 deletions(-)

diff --git a/include/linux/libata.h b/include/linux/libata.h
index e345e71..7af3da8 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -673,69 +673,74 @@ struct ata_port {
 };
 
 struct ata_port_operations {
-	void (*dev_config) (struct ata_device *);
+	/*
+	 * Command execution
+	 */
+	int  (*qc_defer)(struct ata_queued_cmd *qc);
+	int  (*check_atapi_dma)(struct ata_queued_cmd *qc);
+	void (*qc_prep)(struct ata_queued_cmd *qc);
+	unsigned int (*qc_issue)(struct ata_queued_cmd *qc);
 
-	void (*set_piomode) (struct ata_port *, struct ata_device *);
-	void (*set_dmamode) (struct ata_port *, struct ata_device *);
-	unsigned long (*mode_filter) (struct ata_device *, unsigned long);
+	/*
+	 * Configuration and exception handling
+	 */
+	int  (*cable_detect)(struct ata_port *ap);
+	unsigned long (*mode_filter)(struct ata_device *dev, unsigned long xfer_mask);
+	void (*set_piomode)(struct ata_port *ap, struct ata_device *dev);
+	void (*set_dmamode)(struct ata_port *ap, struct ata_device *dev);
+	int  (*set_mode)(struct ata_link *link, struct ata_device **r_failed_dev);
 
-	void (*tf_load) (struct ata_port *ap, const struct ata_taskfile *tf);
-	void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
+	void (*dev_config)(struct ata_device *dev);
 
-	void (*exec_command)(struct ata_port *ap, const struct ata_taskfile *tf);
+	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);
+
+	/*
+	 * Optional features
+	 */
+	int  (*scr_read)(struct ata_port *ap, unsigned int sc_reg, u32 *val);
+	int  (*scr_write)(struct ata_port *ap, unsigned int sc_reg, u32 val);
+	void (*pmp_attach)(struct ata_port *ap);
+	void (*pmp_detach)(struct ata_port *ap);
+	int  (*enable_pm)(struct ata_port *ap, enum link_pm policy);
+	void (*disable_pm)(struct ata_port *ap);
+
+	/*
+	 * Start, stop, suspend and resume
+	 */
+	int  (*port_suspend)(struct ata_port *ap, pm_message_t mesg);
+	int  (*port_resume)(struct ata_port *ap);
+	int  (*port_start)(struct ata_port *ap);
+	void (*port_stop)(struct ata_port *ap);
+	void (*host_stop)(struct ata_host *host);
+
+	/*
+	 * SFF / taskfile oriented ops
+	 */
+	void (*dev_select)(struct ata_port *ap, unsigned int device);
 	u8   (*check_status)(struct ata_port *ap);
 	u8   (*check_altstatus)(struct ata_port *ap);
-	void (*dev_select)(struct ata_port *ap, unsigned int device);
-
-	void (*phy_reset) (struct ata_port *ap); /* obsolete */
-	int  (*set_mode) (struct ata_link *link, struct ata_device **r_failed_dev);
-
-	int (*cable_detect) (struct ata_port *ap);
-
-	int  (*check_atapi_dma) (struct ata_queued_cmd *qc);
-
-	void (*bmdma_setup) (struct ata_queued_cmd *qc);
-	void (*bmdma_start) (struct ata_queued_cmd *qc);
-
-	unsigned int (*data_xfer) (struct ata_device *dev, unsigned char *buf,
-				   unsigned int buflen, int rw);
-
-	int (*qc_defer) (struct ata_queued_cmd *qc);
-	void (*qc_prep) (struct ata_queued_cmd *qc);
-	unsigned int (*qc_issue) (struct ata_queued_cmd *qc);
-
-	/* port multiplier */
-	void (*pmp_attach) (struct ata_port *ap);
-	void (*pmp_detach) (struct ata_port *ap);
-
-	/* Error handlers.  ->error_handler overrides ->eng_timeout and
-	 * indicates that new-style EH is in place.
+	void (*tf_load)(struct ata_port *ap, const struct ata_taskfile *tf);
+	void (*tf_read)(struct ata_port *ap, struct ata_taskfile *tf);
+	void (*exec_command)(struct ata_port *ap, const struct ata_taskfile *tf);
+	unsigned int (*data_xfer)(struct ata_device *dev, unsigned char *buf,
+				  unsigned int buflen, int rw);
+	u8   (*irq_on)(struct ata_port *);
+
+	void (*irq_clear)(struct ata_port *);
+	void (*bmdma_setup)(struct ata_queued_cmd *qc);
+	void (*bmdma_start)(struct ata_queued_cmd *qc);
+	void (*bmdma_stop)(struct ata_queued_cmd *qc);
+	u8   (*bmdma_status)(struct ata_port *ap);
+
+	/*
+	 * Obsolete
 	 */
-	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);
-
+	void (*phy_reset)(struct ata_port *ap);
+	void (*eng_timeout)(struct ata_port *ap);
 	irq_handler_t irq_handler;
-	void (*irq_clear) (struct ata_port *);
-	u8 (*irq_on) (struct ata_port *);
-
-	int (*scr_read) (struct ata_port *ap, unsigned int sc_reg, u32 *val);
-	int (*scr_write) (struct ata_port *ap, unsigned int sc_reg, u32 val);
-
-	int (*port_suspend) (struct ata_port *ap, pm_message_t mesg);
-	int (*port_resume) (struct ata_port *ap);
-	int (*enable_pm) (struct ata_port *ap, enum link_pm policy);
-	void (*disable_pm) (struct ata_port *ap);
-	int (*port_start) (struct ata_port *ap);
-	void (*port_stop) (struct ata_port *ap);
-
-	void (*host_stop) (struct ata_host *host);
-
-	void (*bmdma_stop) (struct ata_queued_cmd *qc);
-	u8   (*bmdma_status) (struct ata_port *ap);
 };
 
 struct ata_port_info {
-- 
1.5.2.4


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

* [PATCH 3/9] libata: implement and use ata_noop_irq_clear()
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
  2008-01-30  9:28 ` [PATCH 1/9] libata: PCI device should be powered up before being accessed Tejun Heo
  2008-01-30  9:28 ` [PATCH 2/9] libata: reorganize ata_port_operations Tejun Heo
@ 2008-01-30  9:28 ` Tejun Heo
  2008-02-01 20:45   ` Jeff Garzik
  2008-01-30  9:28 ` [PATCH 4/9] libata: normalize port_info, port_operations and sht tables Tejun Heo
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:28 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

->irq_clear() is used to clear IRQ bit of a SFF controller and isn't
useful for drivers which don't use libata SFF HSM implementation.
However, it's a required callback and many drivers implement their own
noop version as placeholder.  This patch implements ata_noop_irq_clear
and use it to replace those custom placeholders.

Also, SFF drivers which don't support BMDMA don't need to use
ata_bmdma_irq_clear().  It becomes noop if BMDMA address isn't
initialized.  Convert them to use ata_noop_irq_clear().

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/ahci.c           |   12 +++---------
 drivers/ata/libata-core.c    |    1 +
 drivers/ata/libata-sff.c     |    8 ++++++++
 drivers/ata/pata_ali.c       |    2 +-
 drivers/ata/pata_at32.c      |    7 +------
 drivers/ata/pata_icside.c    |    7 +------
 drivers/ata/pata_isapnp.c    |    2 +-
 drivers/ata/pata_ixp4xx_cf.c |    2 +-
 drivers/ata/pata_legacy.c    |   22 +++++++++++-----------
 drivers/ata/pata_mpc52xx.c   |    2 +-
 drivers/ata/pata_mpiix.c     |    2 +-
 drivers/ata/pata_ns87410.c   |    2 +-
 drivers/ata/pata_pcmcia.c    |    4 ++--
 drivers/ata/pata_platform.c  |    2 +-
 drivers/ata/pata_qdi.c       |    4 ++--
 drivers/ata/pata_winbond.c   |    2 +-
 drivers/ata/pdc_adma.c       |    8 +-------
 drivers/ata/sata_fsl.c       |    7 +------
 drivers/ata/sata_inic162x.c  |    7 +------
 drivers/ata/sata_mv.c        |   11 +++--------
 drivers/ata/sata_qstor.c     |    8 +-------
 drivers/ata/sata_sil24.c     |    8 +-------
 include/linux/libata.h       |    1 +
 23 files changed, 46 insertions(+), 85 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 70a0f07..07dcaf6 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -238,7 +238,6 @@ static int ahci_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val);
 static int ahci_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val);
 static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
 static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
-static void ahci_irq_clear(struct ata_port *ap);
 static int ahci_port_start(struct ata_port *ap);
 static void ahci_port_stop(struct ata_port *ap);
 static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
@@ -298,7 +297,7 @@ static const struct ata_port_operations ahci_ops = {
 	.qc_prep		= ahci_qc_prep,
 	.qc_issue		= ahci_qc_issue,
 
-	.irq_clear		= ahci_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 
 	.scr_read		= ahci_scr_read,
 	.scr_write		= ahci_scr_write,
@@ -334,7 +333,7 @@ static const struct ata_port_operations ahci_vt8251_ops = {
 	.qc_prep		= ahci_qc_prep,
 	.qc_issue		= ahci_qc_issue,
 
-	.irq_clear		= ahci_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 
 	.scr_read		= ahci_scr_read,
 	.scr_write		= ahci_scr_write,
@@ -368,7 +367,7 @@ static const struct ata_port_operations ahci_p5wdh_ops = {
 	.qc_prep		= ahci_qc_prep,
 	.qc_issue		= ahci_qc_issue,
 
-	.irq_clear		= ahci_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 
 	.scr_read		= ahci_scr_read,
 	.scr_write		= ahci_scr_write,
@@ -1712,11 +1711,6 @@ static void ahci_port_intr(struct ata_port *ap)
 	}
 }
 
-static void ahci_irq_clear(struct ata_port *ap)
-{
-	/* TODO */
-}
-
 static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
 {
 	struct ata_host *host = dev_instance;
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index e71276b..e61c5db 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -7558,6 +7558,7 @@ EXPORT_SYMBOL_GPL(ata_noop_qc_prep);
 EXPORT_SYMBOL_GPL(ata_bmdma_setup);
 EXPORT_SYMBOL_GPL(ata_bmdma_start);
 EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear);
+EXPORT_SYMBOL_GPL(ata_noop_irq_clear);
 EXPORT_SYMBOL_GPL(ata_bmdma_status);
 EXPORT_SYMBOL_GPL(ata_bmdma_stop);
 EXPORT_SYMBOL_GPL(ata_bmdma_freeze);
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 60cd4b1..34cdab0 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -297,6 +297,14 @@ void ata_bmdma_irq_clear(struct ata_port *ap)
 }
 
 /**
+ *	ata_noop_irq_clear - Noop placeholder for irq_clear
+ *	@ap: Port associated with this ATA transaction.
+ */
+void ata_noop_irq_clear(struct ata_port *ap)
+{
+}
+
+/**
  *	ata_bmdma_status - Read PCI IDE BMDMA status
  *	@ap: Port associated with this ATA transaction.
  *
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 5ef6594..8a9044c 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -342,7 +342,7 @@ static struct ata_port_operations ali_early_port_ops = {
 	.data_xfer	= ata_data_xfer,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
diff --git a/drivers/ata/pata_at32.c b/drivers/ata/pata_at32.c
index 67e574d..86a8ee9 100644
--- a/drivers/ata/pata_at32.c
+++ b/drivers/ata/pata_at32.c
@@ -166,11 +166,6 @@ static void pata_at32_set_piomode(struct ata_port *ap, struct ata_device *adev)
 	}
 }
 
-static void pata_at32_irq_clear(struct ata_port *ap)
-{
-	/* No DMA controller yet */
-}
-
 static struct scsi_host_template at32_sht = {
 	.module			= THIS_MODULE,
 	.name			= DRV_NAME,
@@ -208,7 +203,7 @@ static struct ata_port_operations at32_port_ops = {
 
 	.data_xfer		= ata_data_xfer,
 
-	.irq_clear		= pata_at32_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
 	.port_start		= ata_sff_port_start,
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index 5b8586d..121fe52 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -328,11 +328,6 @@ static struct scsi_host_template pata_icside_sht = {
 	.bios_param		= ata_std_bios_param,
 };
 
-/* wish this was exported from libata-core */
-static void ata_dummy_noret(struct ata_port *port)
-{
-}
-
 static void pata_icside_postreset(struct ata_link *link, unsigned int *classes)
 {
 	struct ata_port *ap = link->ap;
@@ -386,7 +381,7 @@ static struct ata_port_operations pata_icside_port_ops = {
 	.error_handler		= pata_icside_error_handler,
 	.post_internal_cmd	= pata_icside_bmdma_stop,
 
-	.irq_clear		= ata_dummy_noret,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
 	.port_start		= pata_icside_port_start,
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 4320e79..ef561de 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -55,7 +55,7 @@ static struct ata_port_operations isapnp_port_ops = {
 
 	.data_xfer	= ata_data_xfer,
 
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 030878f..83e38cc 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -126,7 +126,7 @@ static struct ata_port_operations ixp4xx_port_ops = {
 	.cable_detect		= ata_cable_40wire,
 
 	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
 	.port_start		= ata_port_start,
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 333dc15..7b2140e 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -252,7 +252,7 @@ static struct ata_port_operations simple_port_ops = {
 	.data_xfer	= ata_data_xfer_noirq,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -279,7 +279,7 @@ static struct ata_port_operations legacy_port_ops = {
 	.data_xfer	= ata_data_xfer_noirq,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -393,7 +393,7 @@ static struct ata_port_operations pdc20230_port_ops = {
 	.data_xfer	= pdc_data_xfer_vlb,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -447,7 +447,7 @@ static struct ata_port_operations ht6560a_port_ops = {
 	.data_xfer	= ata_data_xfer,	/* Check vlb/noirq */
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -512,7 +512,7 @@ static struct ata_port_operations ht6560b_port_ops = {
 	.data_xfer	= ata_data_xfer,    /* FIXME: Check 32bit and noirq */
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -633,7 +633,7 @@ static struct ata_port_operations opti82c611a_port_ops = {
 	.data_xfer	= ata_data_xfer,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -765,7 +765,7 @@ static struct ata_port_operations opti82c46x_port_ops = {
 	.data_xfer	= ata_data_xfer,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -950,7 +950,7 @@ static struct ata_port_operations qdi6500_port_ops = {
 	.data_xfer	= vlb32_data_xfer,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -977,7 +977,7 @@ static struct ata_port_operations qdi6580_port_ops = {
 	.data_xfer	= vlb32_data_xfer,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -1004,7 +1004,7 @@ static struct ata_port_operations qdi6580dp_port_ops = {
 	.data_xfer	= vlb32_data_xfer,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -1095,7 +1095,7 @@ static struct ata_port_operations winbond_port_ops = {
 
 	.data_xfer	= vlb32_data_xfer,
 
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index dc40162..bc5259e 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -296,7 +296,7 @@ static struct ata_port_operations mpc52xx_ata_port_ops = {
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
-	.irq_clear		= ata_bmdma_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 	.port_start		= ata_port_start,
 };
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c
index c0d9e0c..ced6372 100644
--- a/drivers/ata/pata_mpiix.c
+++ b/drivers/ata/pata_mpiix.c
@@ -187,7 +187,7 @@ static struct ata_port_operations mpiix_port_ops = {
 	.qc_issue	= mpiix_qc_issue_prot,
 	.data_xfer	= ata_data_xfer,
 
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
index 9fe66fd..d182bdf 100644
--- a/drivers/ata/pata_ns87410.c
+++ b/drivers/ata/pata_ns87410.c
@@ -182,7 +182,7 @@ static struct ata_port_operations ns87410_port_ops = {
 	.data_xfer	= ata_data_xfer,
 
 	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 3e7f6a9..9881a9e 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -164,7 +164,7 @@ static struct ata_port_operations pcmcia_port_ops = {
 
 	.data_xfer	= ata_data_xfer_noirq,
 
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -189,7 +189,7 @@ static struct ata_port_operations pcmcia_8bit_port_ops = {
 
 	.data_xfer	= ata_data_xfer_8bit,
 
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index ac03a90..07b024a 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -86,7 +86,7 @@ static struct ata_port_operations pata_platform_port_ops = {
 
 	.data_xfer		= ata_data_xfer_noirq,
 
-	.irq_clear		= ata_bmdma_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
 	.port_start		= ata_dummy_ret0,
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c
index 9f308ed..60238d5 100644
--- a/drivers/ata/pata_qdi.c
+++ b/drivers/ata/pata_qdi.c
@@ -191,7 +191,7 @@ static struct ata_port_operations qdi6500_port_ops = {
 
 	.data_xfer	= qdi_data_xfer,
 
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
@@ -217,7 +217,7 @@ static struct ata_port_operations qdi6580_port_ops = {
 
 	.data_xfer	= qdi_data_xfer,
 
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c
index 99c92ed..5318248 100644
--- a/drivers/ata/pata_winbond.c
+++ b/drivers/ata/pata_winbond.c
@@ -159,7 +159,7 @@ static struct ata_port_operations winbond_port_ops = {
 
 	.data_xfer	= winbond_data_xfer,
 
-	.irq_clear	= ata_bmdma_irq_clear,
+	.irq_clear	= ata_noop_irq_clear,
 	.irq_on		= ata_irq_on,
 
 	.port_start	= ata_sff_port_start,
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index 8e1b7e9..bc2d12a 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -138,7 +138,6 @@ static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
 static int adma_check_atapi_dma(struct ata_queued_cmd *qc);
 static void adma_bmdma_stop(struct ata_queued_cmd *qc);
 static u8 adma_bmdma_status(struct ata_port *ap);
-static void adma_irq_clear(struct ata_port *ap);
 static void adma_freeze(struct ata_port *ap);
 static void adma_thaw(struct ata_port *ap);
 static void adma_error_handler(struct ata_port *ap);
@@ -174,7 +173,7 @@ static const struct ata_port_operations adma_ata_ops = {
 	.freeze			= adma_freeze,
 	.thaw			= adma_thaw,
 	.error_handler		= adma_error_handler,
-	.irq_clear		= adma_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 	.port_start		= adma_port_start,
 	.port_stop		= adma_port_stop,
@@ -223,11 +222,6 @@ static u8 adma_bmdma_status(struct ata_port *ap)
 	return 0;
 }
 
-static void adma_irq_clear(struct ata_port *ap)
-{
-	/* nothing */
-}
-
 static void adma_reset_engine(struct ata_port *ap)
 {
 	void __iomem *chan = ADMA_PORT_REGS(ap);
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index b66a1f4..e798c4c 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -944,11 +944,6 @@ static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc)
 	}
 }
 
-static void sata_fsl_irq_clear(struct ata_port *ap)
-{
-	/* unused */
-}
-
 static void sata_fsl_error_intr(struct ata_port *ap)
 {
 	struct ata_link *link = &ap->link;
@@ -1234,7 +1229,7 @@ static const struct ata_port_operations sata_fsl_ops = {
 
 	.qc_prep = sata_fsl_qc_prep,
 	.qc_issue = sata_fsl_qc_issue,
-	.irq_clear = sata_fsl_irq_clear,
+	.irq_clear = ata_noop_irq_clear,
 
 	.scr_read = sata_fsl_scr_read,
 	.scr_write = sata_fsl_scr_write,
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 96e614a..ea7e2b1 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -277,11 +277,6 @@ static u8 inic_bmdma_status(struct ata_port *ap)
 	return ATA_DMA_INTR;
 }
 
-static void inic_irq_clear(struct ata_port *ap)
-{
-	/* noop */
-}
-
 static void inic_host_intr(struct ata_port *ap)
 {
 	void __iomem *port_base = inic_port_base(ap);
@@ -566,7 +561,7 @@ static struct ata_port_operations inic_port_ops = {
 	.bmdma_stop		= inic_bmdma_stop,
 	.bmdma_status		= inic_bmdma_status,
 
-	.irq_clear		= inic_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
 	.qc_prep	 	= ata_qc_prep,
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 0e54d9e..939bf1d 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -414,7 +414,6 @@ struct mv_hw_ops {
 	void (*reset_bus)(struct pci_dev *pdev, void __iomem *mmio);
 };
 
-static void mv_irq_clear(struct ata_port *ap);
 static int mv_scr_read(struct ata_port *ap, unsigned int sc_reg_in, u32 *val);
 static int mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val);
 static int mv5_scr_read(struct ata_port *ap, unsigned int sc_reg_in, u32 *val);
@@ -501,7 +500,7 @@ static const struct ata_port_operations mv5_ops = {
 	.qc_issue		= mv_qc_issue,
 	.data_xfer		= ata_data_xfer,
 
-	.irq_clear		= mv_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
 	.error_handler		= mv_error_handler,
@@ -529,7 +528,7 @@ static const struct ata_port_operations mv6_ops = {
 	.qc_issue		= mv_qc_issue,
 	.data_xfer		= ata_data_xfer,
 
-	.irq_clear		= mv_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
 	.error_handler		= mv_error_handler,
@@ -557,7 +556,7 @@ static const struct ata_port_operations mv_iie_ops = {
 	.qc_issue		= mv_qc_issue,
 	.data_xfer		= ata_data_xfer,
 
-	.irq_clear		= mv_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
 	.error_handler		= mv_error_handler,
@@ -760,10 +759,6 @@ static inline int mv_get_hc_count(unsigned long port_flags)
 	return ((port_flags & MV_FLAG_DUAL_HC) ? 2 : 1);
 }
 
-static void mv_irq_clear(struct ata_port *ap)
-{
-}
-
 static void mv_set_edma_ptrs(void __iomem *port_mmio,
 			     struct mv_host_priv *hpriv,
 			     struct mv_port_priv *pp)
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index 91cc12c..3c8e97f 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -121,7 +121,6 @@ static unsigned int qs_qc_issue(struct ata_queued_cmd *qc);
 static int qs_check_atapi_dma(struct ata_queued_cmd *qc);
 static void qs_bmdma_stop(struct ata_queued_cmd *qc);
 static u8 qs_bmdma_status(struct ata_port *ap);
-static void qs_irq_clear(struct ata_port *ap);
 static void qs_freeze(struct ata_port *ap);
 static void qs_thaw(struct ata_port *ap);
 static void qs_error_handler(struct ata_port *ap);
@@ -157,7 +156,7 @@ static const struct ata_port_operations qs_ata_ops = {
 	.freeze			= qs_freeze,
 	.thaw			= qs_thaw,
 	.error_handler		= qs_error_handler,
-	.irq_clear		= qs_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 	.scr_read		= qs_scr_read,
 	.scr_write		= qs_scr_write,
@@ -211,11 +210,6 @@ static u8 qs_bmdma_status(struct ata_port *ap)
 	return 0;
 }
 
-static void qs_irq_clear(struct ata_port *ap)
-{
-	/* nothing */
-}
-
 static inline void qs_enter_reg_mode(struct ata_port *ap)
 {
 	u8 __iomem *chan = qs_mmio_base(ap->host) + (ap->port_no * 0x4000);
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 64cdde5..5e57f78 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -348,7 +348,6 @@ static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
 static int sil24_qc_defer(struct ata_queued_cmd *qc);
 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_pmp_attach(struct ata_port *ap);
 static void sil24_pmp_detach(struct ata_port *ap);
 static void sil24_freeze(struct ata_port *ap);
@@ -416,7 +415,7 @@ static const struct ata_port_operations sil24_ops = {
 	.qc_prep		= sil24_qc_prep,
 	.qc_issue		= sil24_qc_issue,
 
-	.irq_clear		= sil24_irq_clear,
+	.irq_clear		= ata_noop_irq_clear,
 
 	.scr_read		= sil24_scr_read,
 	.scr_write		= sil24_scr_write,
@@ -921,11 +920,6 @@ static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc)
 	return 0;
 }
 
-static void sil24_irq_clear(struct ata_port *ap)
-{
-	/* unused */
-}
-
 static void sil24_pmp_attach(struct ata_port *ap)
 {
 	sil24_config_pmp(ap, 1);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 7af3da8..b6f06a2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -903,6 +903,7 @@ extern void ata_bmdma_start(struct ata_queued_cmd *qc);
 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_noop_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,
-- 
1.5.2.4


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

* [PATCH 4/9] libata: normalize port_info, port_operations and sht tables
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (2 preceding siblings ...)
  2008-01-30  9:28 ` [PATCH 3/9] libata: implement and use ata_noop_irq_clear() Tejun Heo
@ 2008-01-30  9:28 ` Tejun Heo
  2008-02-01 20:46   ` Jeff Garzik
  2008-02-04 14:24   ` Alan Cox
  2008-01-30  9:28 ` [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance Tejun Heo
                   ` (8 subsequent siblings)
  12 siblings, 2 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:28 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

Over the time, port info, ops and sht structures developed quite a bit
of inconsistencies.  This patch updates drivers.

* Enable/disable_pm callbacks added to all ahci ops tables.

* Every driver for SFF controllers now uses ata_sff_port_start()
  instead of ata_port_start() unless the driver has custom
  implementation.

* Every driver for SFF controllers now uses ata_pci_default_filter()
  unless the driver has custom implementation.

* Removed an odd port_info->sht initialization from ata_piix.c.
  Likely a merge byproduct.

* A port which has ATA_FLAG_SATA set doesn't need to set cable_detect
  to ata_cable_sata().  Remove it from vt6421_port_ops.

* Some drivers had unnecessary .max_sectors initialization which is
  ignored and was missing .slave_destroy callback.  Fixed.

* Removed unnecessary sht initializations port_info's.

* Removed onsolete scsi device suspend/resume callbacks from
  pata_bf54x.

* No reason to set ata_pci_default_filter() for PIO-only drivers.

* pata_platform sets port_start to ata_dummy_ret0.  port_start can
  just be set to NULL.

* sata_fsl supports NCQ but was missing qc_defer.  Fixed.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/ahci.c           |    4 ++++
 drivers/ata/ata_generic.c    |    1 +
 drivers/ata/ata_piix.c       |   13 +++++++------
 drivers/ata/pata_artop.c     |    1 +
 drivers/ata/pata_bf54x.c     |    5 -----
 drivers/ata/pata_cmd64x.c    |    6 +++---
 drivers/ata/pata_cs5520.c    |    1 +
 drivers/ata/pata_cs5536.c    |    2 +-
 drivers/ata/pata_hpt3x3.c    |    1 -
 drivers/ata/pata_it8213.c    |    2 +-
 drivers/ata/pata_ixp4xx_cf.c |    3 +--
 drivers/ata/pata_jmicron.c   |    3 ++-
 drivers/ata/pata_marvell.c   |    1 +
 drivers/ata/pata_mpc52xx.c   |    4 ++--
 drivers/ata/pata_netcell.c   |    1 +
 drivers/ata/pata_opti.c      |    1 +
 drivers/ata/pata_optidma.c   |    2 ++
 drivers/ata/pata_platform.c  |    4 ----
 drivers/ata/pata_rz1000.c    |    1 +
 drivers/ata/sata_fsl.c       |    1 +
 drivers/ata/sata_nv.c        |   11 ++++++++---
 drivers/ata/sata_sil.c       |    3 ++-
 drivers/ata/sata_sis.c       |    3 ++-
 drivers/ata/sata_svw.c       |    3 ++-
 drivers/ata/sata_uli.c       |    3 ++-
 drivers/ata/sata_via.c       |   12 ++++++++----
 drivers/ata/sata_vsc.c       |    3 ++-
 27 files changed, 57 insertions(+), 38 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 07dcaf6..08301ca 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -351,6 +351,8 @@ static const struct ata_port_operations ahci_vt8251_ops = {
 	.port_suspend		= ahci_port_suspend,
 	.port_resume		= ahci_port_resume,
 #endif
+	.enable_pm		= ahci_enable_alpm,
+	.disable_pm		= ahci_disable_alpm,
 
 	.port_start		= ahci_port_start,
 	.port_stop		= ahci_port_stop,
@@ -385,6 +387,8 @@ static const struct ata_port_operations ahci_p5wdh_ops = {
 	.port_suspend		= ahci_port_suspend,
 	.port_resume		= ahci_port_resume,
 #endif
+	.enable_pm		= ahci_enable_alpm,
+	.disable_pm		= ahci_disable_alpm,
 
 	.port_start		= ahci_port_start,
 	.port_stop		= ahci_port_stop,
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 2053420..db4c3cb 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -114,6 +114,7 @@ static struct scsi_host_template generic_sht = {
 
 static struct ata_port_operations generic_port_ops = {
 	.set_mode	= generic_set_mode,
+	.mode_filter	= ata_pci_default_filter,
 
 	.tf_load	= ata_tf_load,
 	.tf_read	= ata_tf_read,
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index a65c8ae..129d682 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -328,7 +328,7 @@ static const struct ata_port_operations piix_pata_ops = {
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_operations ich_pata_ops = {
@@ -359,7 +359,7 @@ static const struct ata_port_operations ich_pata_ops = {
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_operations piix_sata_ops = {
@@ -377,6 +377,7 @@ static const struct ata_port_operations piix_sata_ops = {
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
@@ -385,7 +386,7 @@ static const struct ata_port_operations piix_sata_ops = {
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_operations piix_vmw_ops = {
@@ -417,7 +418,7 @@ static const struct ata_port_operations piix_vmw_ops = {
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_operations piix_sidpr_sata_ops = {
@@ -438,6 +439,7 @@ static const struct ata_port_operations piix_sidpr_sata_ops = {
 	.scr_read		= piix_sidpr_scr_read,
 	.scr_write		= piix_sidpr_scr_write,
 
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= piix_sidpr_error_handler,
@@ -446,7 +448,7 @@ static const struct ata_port_operations piix_sidpr_sata_ops = {
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct piix_map_db ich5_map_db = {
@@ -675,7 +677,6 @@ static struct ata_port_info piix_port_info[] = {
 
 	[piix_pata_vmw] =
 	{
-		.sht		= &piix_sht,
 		.flags		= PIIX_PATA_FLAGS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 2f81480..a238c7b 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -367,6 +367,7 @@ static const struct ata_port_operations artop6210_ops = {
 static const struct ata_port_operations artop6260_ops = {
 	.set_piomode		= artop6260_set_piomode,
 	.set_dmamode		= artop6260_set_dmamode,
+	.mode_filter		= ata_pci_default_filter,
 
 	.tf_load		= ata_tf_load,
 	.tf_read		= ata_tf_read,
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index a32e3c4..0a6fa94 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1373,10 +1373,6 @@ static struct scsi_host_template bfin_sht = {
 	.slave_configure	= ata_scsi_slave_config,
 	.slave_destroy		= ata_scsi_slave_destroy,
 	.bios_param		= ata_std_bios_param,
-#ifdef CONFIG_PM
-	.resume			= ata_scsi_device_resume,
-	.suspend		= ata_scsi_device_suspend,
-#endif
 };
 
 static const struct ata_port_operations bfin_pata_ops = {
@@ -1414,7 +1410,6 @@ static const struct ata_port_operations bfin_pata_ops = {
 
 static struct ata_port_info bfin_port_info[] = {
 	{
-		.sht		= &bfin_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS
 				| ATA_FLAG_MMIO
 				| ATA_FLAG_NO_LEGACY,
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 1c9a8d9..e8c1262 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -313,7 +313,7 @@ static struct ata_port_operations cmd64x_port_ops = {
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
 
-	.port_start	= ata_port_start,
+	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations cmd646r1_port_ops = {
@@ -346,7 +346,7 @@ static struct ata_port_operations cmd646r1_port_ops = {
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
 
-	.port_start	= ata_port_start,
+	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations cmd648_port_ops = {
@@ -379,7 +379,7 @@ static struct ata_port_operations cmd648_port_ops = {
 	.irq_clear	= ata_bmdma_irq_clear,
 	.irq_on		= ata_irq_on,
 
-	.port_start	= ata_port_start,
+	.port_start	= ata_sff_port_start,
 };
 
 static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index 972ed9f..5614e76 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -160,6 +160,7 @@ static struct scsi_host_template cs5520_sht = {
 static struct ata_port_operations cs5520_port_ops = {
 	.set_piomode		= cs5520_set_piomode,
 	.set_dmamode		= cs5520_set_dmamode,
+	.mode_filter		= ata_pci_default_filter,
 
 	.tf_load		= ata_tf_load,
 	.tf_read		= ata_tf_read,
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index d753e56..c59c806 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -269,7 +269,7 @@ static struct ata_port_operations cs5536_port_ops = {
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c
index cb8bdb6..c09f95a 100644
--- a/drivers/ata/pata_hpt3x3.c
+++ b/drivers/ata/pata_hpt3x3.c
@@ -189,7 +189,6 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static int printed_version;
 	static const struct ata_port_info info = {
-		.sht = &hpt3x3_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 #if defined(CONFIG_PATA_HPT3X3_DMA)
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index 1eda821..60c30dc 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -250,13 +250,13 @@ static struct scsi_host_template it8213_sht = {
 	.can_queue		= ATA_DEF_QUEUE,
 	.this_id		= ATA_SHT_THIS_ID,
 	.sg_tablesize		= LIBATA_MAX_PRD,
-	.max_sectors		= ATA_MAX_SECTORS,
 	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
 	.emulated		= ATA_SHT_EMULATED,
 	.use_clustering		= ATA_SHT_USE_CLUSTERING,
 	.proc_name		= DRV_NAME,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
 	.slave_configure	= ata_scsi_slave_config,
+	.slave_destroy		= ata_scsi_slave_destroy,
 	.bios_param		= ata_std_bios_param,
 };
 
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 83e38cc..6eb8cc9 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -107,7 +107,6 @@ static struct scsi_host_template ixp4xx_sht = {
 
 static struct ata_port_operations ixp4xx_port_ops = {
 	.set_mode		= ixp4xx_set_mode,
-	.mode_filter		= ata_pci_default_filter,
 
 	.tf_load		= ata_tf_load,
 	.tf_read		= ata_tf_read,
@@ -129,7 +128,7 @@ static struct ata_port_operations ixp4xx_port_ops = {
 	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static void ixp4xx_setup_port(struct ata_port *ap,
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 5b8174d..4d25c45 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -147,6 +147,7 @@ static const struct ata_port_operations jmicron_ops = {
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= jmicron_error_handler,
@@ -167,7 +168,7 @@ static const struct ata_port_operations jmicron_ops = {
 	.irq_on			= ata_irq_on,
 
 	/* Generic PATA PCI ATA helpers */
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 9afc8a3..113be4f 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -118,6 +118,7 @@ static const struct ata_port_operations marvell_ops = {
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= marvell_error_handler,
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index bc5259e..9383efb 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -272,13 +272,13 @@ static struct scsi_host_template mpc52xx_ata_sht = {
 	.can_queue		= ATA_DEF_QUEUE,
 	.this_id		= ATA_SHT_THIS_ID,
 	.sg_tablesize		= LIBATA_MAX_PRD,
-	.max_sectors		= ATA_MAX_SECTORS,
 	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
 	.emulated		= ATA_SHT_EMULATED,
 	.use_clustering		= ATA_SHT_USE_CLUSTERING,
 	.proc_name		= DRV_NAME,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
 	.slave_configure	= ata_scsi_slave_config,
+	.slave_destroy		= ata_scsi_slave_destroy,
 	.bios_param		= ata_std_bios_param,
 };
 
@@ -298,7 +298,7 @@ static struct ata_port_operations mpc52xx_ata_port_ops = {
 	.data_xfer		= ata_data_xfer,
 	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static int __devinit
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c
index 0e4a08e..9fd1a84 100644
--- a/drivers/ata/pata_netcell.c
+++ b/drivers/ata/pata_netcell.c
@@ -47,6 +47,7 @@ static const struct ata_port_operations netcell_ops = {
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
index 8f79447..ebb9dc1 100644
--- a/drivers/ata/pata_opti.c
+++ b/drivers/ata/pata_opti.c
@@ -184,6 +184,7 @@ static struct scsi_host_template opti_sht = {
 
 static struct ata_port_operations opti_port_ops = {
 	.set_piomode	= opti_set_piomode,
+	.mode_filter	= ata_pci_default_filter,
 	.tf_load	= ata_tf_load,
 	.tf_read	= ata_tf_read,
 	.check_status 	= ata_check_status,
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index be8c421..3f9d035 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -370,6 +370,7 @@ static struct scsi_host_template optidma_sht = {
 static struct ata_port_operations optidma_port_ops = {
 	.set_piomode	= optidma_set_pio_mode,
 	.set_dmamode	= optidma_set_dma_mode,
+	.mode_filter	= ata_pci_default_filter,
 
 	.tf_load	= ata_tf_load,
 	.tf_read	= ata_tf_read,
@@ -404,6 +405,7 @@ static struct ata_port_operations optidma_port_ops = {
 static struct ata_port_operations optiplus_port_ops = {
 	.set_piomode	= optiplus_set_pio_mode,
 	.set_dmamode	= optiplus_set_dma_mode,
+	.mode_filter	= ata_pci_default_filter,
 
 	.tf_load	= ata_tf_load,
 	.tf_read	= ata_tf_read,
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index 07b024a..d2edcbf 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -46,8 +46,6 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unu
 	return 0;
 }
 
-static int ata_dummy_ret0(struct ata_port *ap)	{ return 0; }
-
 static struct scsi_host_template pata_platform_sht = {
 	.module			= THIS_MODULE,
 	.name			= DRV_NAME,
@@ -88,8 +86,6 @@ static struct ata_port_operations pata_platform_port_ops = {
 
 	.irq_clear		= ata_noop_irq_clear,
 	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_dummy_ret0,
 };
 
 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
index ba8a31c..d922698 100644
--- a/drivers/ata/pata_rz1000.c
+++ b/drivers/ata/pata_rz1000.c
@@ -72,6 +72,7 @@ static struct scsi_host_template rz1000_sht = {
 
 static struct ata_port_operations rz1000_port_ops = {
 	.set_mode	= rz1000_set_mode,
+	.mode_filter	= ata_pci_default_filter,
 
 	.tf_load	= ata_tf_load,
 	.tf_read	= ata_tf_read,
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index e798c4c..7778fd3 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1227,6 +1227,7 @@ static const struct ata_port_operations sata_fsl_ops = {
 
 	.tf_read = sata_fsl_tf_read,
 
+	.qc_defer = ata_std_qc_defer,
 	.qc_prep = sata_fsl_qc_prep,
 	.qc_issue = sata_fsl_qc_issue,
 	.irq_clear = ata_noop_irq_clear,
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index e1d05a2..8eb588e 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -451,6 +451,7 @@ static const struct ata_port_operations nv_generic_ops = {
 	.bmdma_status		= ata_bmdma_status,
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= nv_error_handler,
@@ -460,7 +461,7 @@ static const struct ata_port_operations nv_generic_ops = {
 	.irq_on			= ata_irq_on,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_operations nv_nf2_ops = {
@@ -475,6 +476,7 @@ static const struct ata_port_operations nv_nf2_ops = {
 	.bmdma_status		= ata_bmdma_status,
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= nv_nf2_freeze,
 	.thaw			= nv_nf2_thaw,
 	.error_handler		= nv_error_handler,
@@ -484,7 +486,7 @@ static const struct ata_port_operations nv_nf2_ops = {
 	.irq_on			= ata_irq_on,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_operations nv_ck804_ops = {
@@ -499,6 +501,7 @@ static const struct ata_port_operations nv_ck804_ops = {
 	.bmdma_status		= ata_bmdma_status,
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= nv_ck804_freeze,
 	.thaw			= nv_ck804_thaw,
 	.error_handler		= nv_error_handler,
@@ -508,7 +511,7 @@ static const struct ata_port_operations nv_ck804_ops = {
 	.irq_on			= ata_irq_on,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 	.host_stop		= nv_ck804_host_stop,
 };
 
@@ -526,6 +529,7 @@ static const struct ata_port_operations nv_adma_ops = {
 	.qc_defer		= ata_std_qc_defer,
 	.qc_prep		= nv_adma_qc_prep,
 	.qc_issue		= nv_adma_qc_issue,
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= nv_adma_freeze,
 	.thaw			= nv_adma_thaw,
 	.error_handler		= nv_adma_error_handler,
@@ -557,6 +561,7 @@ static const struct ata_port_operations nv_swncq_ops = {
 	.qc_defer		= ata_std_qc_defer,
 	.qc_prep		= nv_swncq_qc_prep,
 	.qc_issue		= nv_swncq_qc_issue,
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= nv_mcp55_freeze,
 	.thaw			= nv_mcp55_thaw,
 	.error_handler		= nv_swncq_error_handler,
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 7052915..53f0bae 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -192,6 +192,7 @@ static const struct ata_port_operations sil_ops = {
 	.exec_command		= ata_exec_command,
 	.dev_select		= ata_std_dev_select,
 	.set_mode		= sil_set_mode,
+	.mode_filter		= ata_pci_default_filter,
 	.bmdma_setup            = ata_bmdma_setup,
 	.bmdma_start            = ata_bmdma_start,
 	.bmdma_stop		= ata_bmdma_stop,
@@ -207,7 +208,7 @@ static const struct ata_port_operations sil_ops = {
 	.irq_on			= ata_irq_on,
 	.scr_read		= sil_scr_read,
 	.scr_write		= sil_scr_write,
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info sil_port_info[] = {
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index a01260a..a8adef9 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -116,6 +116,7 @@ static const struct ata_port_operations sis_ops = {
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
@@ -124,7 +125,7 @@ static const struct ata_port_operations sis_ops = {
 	.irq_on			= ata_irq_on,
 	.scr_read		= sis_scr_read,
 	.scr_write		= sis_scr_write,
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info sis_port_info = {
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 69f651e..302854c 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -342,6 +342,7 @@ static const struct ata_port_operations k2_sata_ops = {
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
@@ -350,7 +351,7 @@ static const struct ata_port_operations k2_sata_ops = {
 	.irq_on			= ata_irq_on,
 	.scr_read		= k2_sata_scr_read,
 	.scr_write		= k2_sata_scr_write,
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info k2_port_info[] = {
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c
index e710e71..f7fc045 100644
--- a/drivers/ata/sata_uli.c
+++ b/drivers/ata/sata_uli.c
@@ -108,6 +108,7 @@ static const struct ata_port_operations uli_ops = {
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
 
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
@@ -119,7 +120,7 @@ static const struct ata_port_operations uli_ops = {
 	.scr_read		= uli_scr_read,
 	.scr_write		= uli_scr_write,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info uli_port_info = {
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index f16f8f7..8d64a3d 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -120,6 +120,8 @@ static struct scsi_host_template svia_sht = {
 };
 
 static const struct ata_port_operations vt6420_sata_ops = {
+	.mode_filter		= ata_pci_default_filter,
+
 	.tf_load		= ata_tf_load,
 	.tf_read		= ata_tf_read,
 	.check_status		= ata_check_status,
@@ -143,12 +145,13 @@ static const struct ata_port_operations vt6420_sata_ops = {
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_operations vt6421_pata_ops = {
 	.set_piomode		= vt6421_set_pio_mode,
 	.set_dmamode		= vt6421_set_dma_mode,
+	.mode_filter		= ata_pci_default_filter,
 
 	.tf_load		= ata_tf_load,
 	.tf_read		= ata_tf_read,
@@ -174,10 +177,12 @@ static const struct ata_port_operations vt6421_pata_ops = {
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_operations vt6421_sata_ops = {
+	.mode_filter		= ata_pci_default_filter,
+
 	.tf_load		= ata_tf_load,
 	.tf_read		= ata_tf_read,
 	.check_status		= ata_check_status,
@@ -197,7 +202,6 @@ static const struct ata_port_operations vt6421_sata_ops = {
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
-	.cable_detect		= ata_cable_sata,
 
 	.irq_clear		= ata_bmdma_irq_clear,
 	.irq_on			= ata_irq_on,
@@ -205,7 +209,7 @@ static const struct ata_port_operations vt6421_sata_ops = {
 	.scr_read		= svia_scr_read,
 	.scr_write		= svia_scr_write,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info vt6420_port_info = {
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index 95ae3ed..099a2ba 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -331,6 +331,7 @@ static const struct ata_port_operations vsc_sata_ops = {
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
 	.data_xfer		= ata_data_xfer,
+	.mode_filter		= ata_pci_default_filter,
 	.freeze			= vsc_freeze,
 	.thaw			= vsc_thaw,
 	.error_handler		= ata_bmdma_error_handler,
@@ -339,7 +340,7 @@ static const struct ata_port_operations vsc_sata_ops = {
 	.irq_on			= ata_irq_on,
 	.scr_read		= vsc_sata_scr_read,
 	.scr_write		= vsc_sata_scr_write,
-	.port_start		= ata_port_start,
+	.port_start		= ata_sff_port_start,
 };
 
 static void __devinit vsc_sata_setup_port(struct ata_ioports *port,
-- 
1.5.2.4


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

* [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (3 preceding siblings ...)
  2008-01-30  9:28 ` [PATCH 4/9] libata: normalize port_info, port_operations and sht tables Tejun Heo
@ 2008-01-30  9:28 ` Tejun Heo
  2008-01-30 17:09   ` Mark Lord
  2008-02-01 20:49   ` Jeff Garzik
  2008-01-30  9:29 ` [PATCH 6/9] make ata_pci_init_one() not use ops->irq_handler and pi->sht Tejun Heo
                   ` (7 subsequent siblings)
  12 siblings, 2 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:28 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

libata lets low level drivers build scsi_host_template and
ata_port_operations tables and register them with upper layers.  This
allows low level drivers high level of flexibility but also burdens
them with lots of boilerplate entries in thoes data structures.

This becomes worse for drivers which support related similar
controllers which differ slightly.  They share most of the operations
except for a few.  However, the driver still needs to list all
operations for each variant.  This results in large number of
duplicate entries, which is not only inefficient but also error-prone
as it becomes very difficult to tell what the actual differences are.

This duplicate boilerplates all over the low level drivers also make
updating the core layer exteremely difficult and error-prone.  When
compounded with multi-branched development model, it ends up
accumulating inconsistencies over time.  Some of those inconsistencies
cause immediate problems and fixed.  Others just remain there dormant
making maintenance increasingly difficult.

To rectify the problem, this patch implements SHT initializers and
ata_port_operations inheritance.  SHT initializers can be used to
initialize all the boilerplate entries in a sht.  Three variants of
them exist - BASE, BMDMA and NCQ - for different types of drivers.
Note that entries can be overriden by putting individual initializers
after the helper macro.

Ops handling is a bit more involved to allow LLDs to easily re-use
their own ops tables overriding only specific methods.  This is
basically poor man's class inheritance.  An ops table has ->inherits
field which can be set to any ops table as long as it doesn't create a
loop.  When the host is started, the inheritance chain is followed and
any operation which isn't specified is taken from the nearest ancestor
which has it specified.  This operation is called finalization and
done only once per an ops table and the LLD doesn't have to do
anything special about it other than making the ops table non-const
such that libata can update it.

libata provides four base ops tables lower drivers can inherit from -
base, sata, pmp, sff and bmdma.  To avoid overriding these ops
accidentaly, these ops are declared const and LLDs should always
inherit these instead of using them directly.

After finalization, all the sht and ops table are identical before and
after the patch except for setting .irq_handler to ata_interrupt in
drivers which didn't use to.  The .irq_handler doesn't have any actual
effect and the field will soon be removed by later patch.

* sata_sx4 is still using old style EH and currently doesn't take
  advantage of ops inheritance.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/ahci.c              |  105 ++-------------
 drivers/ata/ata_generic.c       |   47 +------
 drivers/ata/ata_piix.c          |  165 ++---------------------
 drivers/ata/libata-core.c       |  114 ++++++++++++++++-
 drivers/ata/pata_acpi.c         |   52 +-------
 drivers/ata/pata_ali.c          |  138 ++------------------
 drivers/ata/pata_amd.c          |  209 ++++--------------------------
 drivers/ata/pata_artop.c        |   77 +----------
 drivers/ata/pata_at32.c         |   39 +-----
 drivers/ata/pata_atiixp.c       |   47 +------
 drivers/ata/pata_bf54x.c        |   18 +--
 drivers/ata/pata_cmd640.c       |   49 +------
 drivers/ata/pata_cmd64x.c       |  112 ++--------------
 drivers/ata/pata_cs5520.c       |   44 +------
 drivers/ata/pata_cs5530.c       |   48 +------
 drivers/ata/pata_cs5535.c       |   47 +------
 drivers/ata/pata_cs5536.c       |   47 +------
 drivers/ata/pata_cypress.c      |   47 +------
 drivers/ata/pata_efar.c         |   46 +------
 drivers/ata/pata_hpt366.c       |   48 +------
 drivers/ata/pata_hpt37x.c       |  138 ++------------------
 drivers/ata/pata_hpt3x2n.c      |   48 +------
 drivers/ata/pata_hpt3x3.c       |   49 +-------
 drivers/ata/pata_icside.c       |   46 ++-----
 drivers/ata/pata_isapnp.c       |   37 +-----
 drivers/ata/pata_it8213.c       |   47 +------
 drivers/ata/pata_it821x.c       |   73 ++---------
 drivers/ata/pata_ixp4xx_cf.c    |   39 +-----
 drivers/ata/pata_jmicron.c      |   48 +-------
 drivers/ata/pata_legacy.c       |  276 +++------------------------------------
 drivers/ata/pata_marvell.c      |   50 +-------
 drivers/ata/pata_mpc52xx.c      |   34 +----
 drivers/ata/pata_mpiix.c        |   39 +-----
 drivers/ata/pata_netcell.c      |   49 +-------
 drivers/ata/pata_ninja32.c      |   46 +------
 drivers/ata/pata_ns87410.c      |   41 +-----
 drivers/ata/pata_ns87415.c      |   84 ++----------
 drivers/ata/pata_oldpiix.c      |   47 +------
 drivers/ata/pata_opti.c         |   45 +------
 drivers/ata/pata_optidma.c      |   79 +-----------
 drivers/ata/pata_pcmcia.c       |   64 +--------
 drivers/ata/pata_pdc2027x.c     |   72 +----------
 drivers/ata/pata_pdc202xx_old.c |   91 +++-----------
 drivers/ata/pata_platform.c     |   40 +-----
 drivers/ata/pata_qdi.c          |   63 +--------
 drivers/ata/pata_radisys.c      |   48 +------
 drivers/ata/pata_rz1000.c       |   47 +------
 drivers/ata/pata_sc1200.c       |   50 +------
 drivers/ata/pata_scc.c          |   21 +---
 drivers/ata/pata_serverworks.c  |   79 +-----------
 drivers/ata/pata_sil680.c       |   46 +------
 drivers/ata/pata_sis.c          |  193 +++-------------------------
 drivers/ata/pata_sl82c105.c     |   48 +------
 drivers/ata/pata_triflex.c      |   48 +------
 drivers/ata/pata_via.c          |   77 +----------
 drivers/ata/pata_winbond.c      |   41 +-----
 drivers/ata/pdc_adma.c          |   33 ++---
 drivers/ata/sata_fsl.c          |   19 +---
 drivers/ata/sata_inic162x.c     |   34 +----
 drivers/ata/sata_mv.c           |  100 ++-------------
 drivers/ata/sata_nv.c           |  155 +++-------------------
 drivers/ata/sata_promise.c      |   78 +++---------
 drivers/ata/sata_qstor.c        |   34 ++----
 drivers/ata/sata_sil.c          |   37 +-----
 drivers/ata/sata_sil24.c        |   34 +----
 drivers/ata/sata_sis.c          |   39 +-----
 drivers/ata/sata_svw.c          |   34 +-----
 drivers/ata/sata_sx4.c          |   17 +--
 drivers/ata/sata_uli.c          |   44 +------
 drivers/ata/sata_via.c          |  104 +--------------
 drivers/ata/sata_vsc.c          |   35 +-----
 include/linux/libata.h          |   80 +++++++++++-
 72 files changed, 651 insertions(+), 4068 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 08301ca..2361910 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -58,7 +58,6 @@ enum {
 	AHCI_MAX_PORTS		= 32,
 	AHCI_MAX_SG		= 168, /* hardware max is 64K */
 	AHCI_DMA_BOUNDARY	= 0xffffffff,
-	AHCI_USE_CLUSTERING	= 1,
 	AHCI_MAX_CMDS		= 32,
 	AHCI_CMD_SZ		= 32,
 	AHCI_CMD_SLOT_SZ	= AHCI_MAX_CMDS * AHCI_CMD_SZ,
@@ -267,131 +266,51 @@ static struct class_device_attribute *ahci_shost_attrs[] = {
 };
 
 static struct scsi_host_template ahci_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.change_queue_depth	= ata_scsi_change_queue_depth,
+	ATA_NCQ_SHT(DRV_NAME),
 	.can_queue		= AHCI_MAX_CMDS - 1,
-	.this_id		= ATA_SHT_THIS_ID,
 	.sg_tablesize		= AHCI_MAX_SG,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= AHCI_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= AHCI_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 	.shost_attrs		= ahci_shost_attrs,
 };
 
-static const struct ata_port_operations ahci_ops = {
+static struct ata_port_operations ahci_ops = {
+	.inherits		= &sata_pmp_port_ops,
+
 	.check_status		= ahci_check_status,
 	.check_altstatus	= ahci_check_status,
-	.dev_select		= ata_noop_dev_select,
-
 	.tf_read		= ahci_tf_read,
-
 	.qc_defer		= sata_pmp_qc_defer_cmd_switch,
 	.qc_prep		= ahci_qc_prep,
 	.qc_issue		= ahci_qc_issue,
 
-	.irq_clear		= ata_noop_irq_clear,
-
-	.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,
 
-	.pmp_attach		= ahci_pmp_attach,
-	.pmp_detach		= ahci_pmp_detach,
-
-#ifdef CONFIG_PM
-	.port_suspend		= ahci_port_suspend,
-	.port_resume		= ahci_port_resume,
-#endif
-	.enable_pm		= ahci_enable_alpm,
-	.disable_pm		= ahci_disable_alpm,
-
-	.port_start		= ahci_port_start,
-	.port_stop		= ahci_port_stop,
-};
-
-static const struct ata_port_operations ahci_vt8251_ops = {
-	.check_status		= ahci_check_status,
-	.check_altstatus	= ahci_check_status,
-	.dev_select		= ata_noop_dev_select,
-
-	.tf_read		= ahci_tf_read,
-
-	.qc_defer		= sata_pmp_qc_defer_cmd_switch,
-	.qc_prep		= ahci_qc_prep,
-	.qc_issue		= ahci_qc_issue,
-
-	.irq_clear		= ata_noop_irq_clear,
-
 	.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,
-
 	.pmp_attach		= ahci_pmp_attach,
 	.pmp_detach		= ahci_pmp_detach,
+	.enable_pm		= ahci_enable_alpm,
+	.disable_pm		= ahci_disable_alpm,
 
 #ifdef CONFIG_PM
 	.port_suspend		= ahci_port_suspend,
 	.port_resume		= ahci_port_resume,
 #endif
-	.enable_pm		= ahci_enable_alpm,
-	.disable_pm		= ahci_disable_alpm,
-
 	.port_start		= ahci_port_start,
 	.port_stop		= ahci_port_stop,
 };
 
-static const struct ata_port_operations ahci_p5wdh_ops = {
-	.check_status		= ahci_check_status,
-	.check_altstatus	= ahci_check_status,
-	.dev_select		= ata_noop_dev_select,
-
-	.tf_read		= ahci_tf_read,
-
-	.qc_defer		= sata_pmp_qc_defer_cmd_switch,
-	.qc_prep		= ahci_qc_prep,
-	.qc_issue		= ahci_qc_issue,
-
-	.irq_clear		= ata_noop_irq_clear,
-
-	.scr_read		= ahci_scr_read,
-	.scr_write		= ahci_scr_write,
-
-	.freeze			= ahci_freeze,
-	.thaw			= ahci_thaw,
+static struct ata_port_operations ahci_vt8251_ops = {
+	.inherits		= &ahci_ops,
+	.error_handler		= ahci_vt8251_error_handler,
+};
 
+static struct ata_port_operations ahci_p5wdh_ops = {
+	.inherits		= &ahci_ops,
 	.error_handler		= ahci_p5wdh_error_handler,
-	.post_internal_cmd	= ahci_post_internal_cmd,
-
-	.pmp_attach		= ahci_pmp_attach,
-	.pmp_detach		= ahci_pmp_detach,
-
-#ifdef CONFIG_PM
-	.port_suspend		= ahci_port_suspend,
-	.port_resume		= ahci_port_resume,
-#endif
-	.enable_pm		= ahci_enable_alpm,
-	.disable_pm		= ahci_disable_alpm,
-
-	.port_start		= ahci_port_start,
-	.port_stop		= ahci_port_stop,
 };
 
 #define AHCI_HFLAGS(flags)	.private_data	= (void *)(flags)
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index db4c3cb..0b5b515 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -95,54 +95,13 @@ static int generic_set_mode(struct ata_link *link, struct ata_device **unused)
 }
 
 static struct scsi_host_template generic_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations generic_port_ops = {
-	.set_mode	= generic_set_mode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
-	.dev_select 	= ata_std_dev_select,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.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,
+	.inherits	= &ata_bmdma_port_ops,
 	.cable_detect	= ata_cable_unknown,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.set_mode	= generic_set_mode,
 };
 
 static int all_generic_ide;		/* Set to claim all devices */
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 129d682..7cb48af 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -283,172 +283,37 @@ static struct pci_driver piix_pci_driver = {
 };
 
 static struct scsi_host_template piix_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations piix_pata_ops = {
+static struct ata_port_operations piix_pata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.cable_detect		= ata_cable_40wire,
 	.set_piomode		= piix_set_piomode,
 	.set_dmamode		= piix_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.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		= piix_pata_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
-	.cable_detect		= ata_cable_40wire,
-
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations ich_pata_ops = {
-	.set_piomode		= piix_set_piomode,
-	.set_dmamode		= ich_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.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		= piix_pata_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
-	.cable_detect		= ich_pata_cable_detect,
-
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
+static struct ata_port_operations piix_vmw_ops = {
+	.inherits		= &piix_pata_ops,
+	.bmdma_status		= piix_vmw_bmdma_status,
 };
 
-static const struct ata_port_operations piix_sata_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.mode_filter		= ata_pci_default_filter,
-	.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,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
+static struct ata_port_operations ich_pata_ops = {
+	.inherits		= &piix_pata_ops,
+	.cable_detect		= ich_pata_cable_detect,
+	.set_dmamode		= ich_set_dmamode,
 };
 
-static const struct ata_port_operations piix_vmw_ops = {
-	.set_piomode		= piix_set_piomode,
-	.set_dmamode		= piix_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= piix_vmw_bmdma_status,
-	.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		= piix_pata_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
-	.cable_detect		= ata_cable_40wire,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
+static struct ata_port_operations piix_sata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 };
 
-static const struct ata_port_operations piix_sidpr_sata_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
+static struct ata_port_operations piix_sidpr_sata_ops = {
+	.inherits		= &piix_sata_ops,
 	.scr_read		= piix_sidpr_scr_read,
 	.scr_write		= piix_sidpr_scr_write,
-
-	.mode_filter		= ata_pci_default_filter,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= piix_sidpr_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
-
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 static const struct piix_map_db ich5_map_db = {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index e61c5db..0a55405 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -74,6 +74,56 @@ const unsigned long sata_deb_timing_normal[]		= {   5,  100, 2000 };
 const unsigned long sata_deb_timing_hotplug[]		= {  25,  500, 2000 };
 const unsigned long sata_deb_timing_long[]		= { 100, 2000, 5000 };
 
+const struct ata_port_operations ata_base_port_ops = {
+	.irq_clear		= ata_noop_irq_clear,
+};
+
+const struct ata_port_operations sata_port_ops = {
+	.inherits		= &ata_base_port_ops,
+
+	.qc_defer		= ata_std_qc_defer,
+	.dev_select		= ata_noop_dev_select,
+};
+
+const struct ata_port_operations sata_pmp_port_ops = {
+	.inherits		= &sata_port_ops,
+};
+
+const struct ata_port_operations ata_sff_port_ops = {
+	.inherits		= &ata_base_port_ops,
+
+	.qc_prep		= ata_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	= ata_bmdma_post_internal_cmd,
+
+	.dev_select		= ata_std_dev_select,
+	.check_status		= ata_check_status,
+	.tf_load		= ata_tf_load,
+	.tf_read		= ata_tf_read,
+	.exec_command		= ata_exec_command,
+	.data_xfer		= ata_data_xfer,
+	.irq_on			= ata_irq_on,
+
+	.port_start		= ata_sff_port_start,
+	.irq_handler		= ata_interrupt,
+};
+
+const struct ata_port_operations ata_bmdma_port_ops = {
+	.inherits		= &ata_sff_port_ops,
+
+	.mode_filter		= ata_pci_default_filter,
+
+	.bmdma_setup		= ata_bmdma_setup,
+	.bmdma_start		= ata_bmdma_start,
+	.bmdma_stop		= ata_bmdma_stop,
+	.bmdma_status		= ata_bmdma_status,
+	.irq_clear		= ata_bmdma_irq_clear,
+};
+
 static unsigned int ata_dev_init_params(struct ata_device *dev,
 					u16 heads, u16 sectors);
 static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
@@ -6884,6 +6934,56 @@ static void ata_host_stop(struct device *gendev, void *res)
 }
 
 /**
+ *	ata_finalize_port_ops - finalize ata_port_operations
+ *	@ops: ata_port_operations to finalize
+ *
+ *	An ata_port_operations can inherit from another ops and that
+ *	ops can again inherit from another.  This can go on as many
+ *	times as necessary as long as there is no loop in the
+ *	inheritance chain.
+ *
+ *	Ops tables are finalized when the host is started.  NULL or
+ *	unspecified entries are inherited from the closet ancestor
+ *	which has the method and the entry is populated with it.
+ *	After finalization, the ops table directly points to all the
+ *	methods and ->inherits is no longer necessary and cleared.
+ *
+ *	Using ATA_OP_NULL, inheriting ops can force a method to NULL.
+ *
+ *	LOCKING:
+ *	None.
+ */
+static void ata_finalize_port_ops(struct ata_port_operations *ops)
+{
+	static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+	const struct ata_port_operations *cur;
+	void **begin = (void **)ops;
+	void **end = (void **)&ops->inherits;
+	void **pp;
+
+	if (!ops || !ops->inherits)
+		return;
+
+	spin_lock(&lock);
+
+	for (cur = ops->inherits; cur; cur = cur->inherits) {
+		void **inherit = (void **)cur;
+
+		for (pp = begin; pp < end; pp++, inherit++)
+			if (!*pp)
+				*pp = *inherit;
+	}
+
+	for (pp = begin; pp < end; pp++)
+		if (IS_ERR(*pp))
+			*pp = NULL;
+
+	ops->inherits = NULL;
+
+	spin_unlock(&lock);
+}
+
+/**
  *	ata_host_start - start and freeze ports of an ATA host
  *	@host: ATA host to start ports for
  *
@@ -6908,9 +7008,13 @@ int ata_host_start(struct ata_host *host)
 	if (host->flags & ATA_HOST_STARTED)
 		return 0;
 
+	ata_finalize_port_ops(host->ops);
+
 	for (i = 0; i < host->n_ports; i++) {
 		struct ata_port *ap = host->ports[i];
 
+		ata_finalize_port_ops(ap->ops);
+
 		if (!host->ops && !ata_port_is_dummy(ap))
 			host->ops = ap->ops;
 
@@ -6972,7 +7076,7 @@ int ata_host_start(struct ata_host *host)
  */
 /* KILLME - the only user left is ipr */
 void ata_host_init(struct ata_host *host, struct device *dev,
-		   unsigned long flags, const struct ata_port_operations *ops)
+		   unsigned long flags, struct ata_port_operations *ops)
 {
 	spin_lock_init(&host->lock);
 	host->dev = dev;
@@ -7373,7 +7477,6 @@ int ata_pci_device_resume(struct pci_dev *pdev)
 
 #endif /* CONFIG_PCI */
 
-
 static int __init ata_init(void)
 {
 	ata_probe_timeout *= HZ;
@@ -7484,7 +7587,7 @@ static unsigned int ata_dummy_qc_issue(struct ata_queued_cmd *qc)
 	return AC_ERR_SYSTEM;
 }
 
-const struct ata_port_operations ata_dummy_port_ops = {
+struct ata_port_operations ata_dummy_port_ops = {
 	.check_status		= ata_dummy_check_status,
 	.check_altstatus	= ata_dummy_check_status,
 	.dev_select		= ata_noop_dev_select,
@@ -7512,6 +7615,11 @@ const struct ata_port_info ata_dummy_port_info = {
 EXPORT_SYMBOL_GPL(sata_deb_timing_normal);
 EXPORT_SYMBOL_GPL(sata_deb_timing_hotplug);
 EXPORT_SYMBOL_GPL(sata_deb_timing_long);
+EXPORT_SYMBOL_GPL(ata_base_port_ops);
+EXPORT_SYMBOL_GPL(sata_port_ops);
+EXPORT_SYMBOL_GPL(sata_pmp_port_ops);
+EXPORT_SYMBOL_GPL(ata_sff_port_ops);
+EXPORT_SYMBOL_GPL(ata_bmdma_port_ops);
 EXPORT_SYMBOL_GPL(ata_dummy_port_ops);
 EXPORT_SYMBOL_GPL(ata_dummy_port_info);
 EXPORT_SYMBOL_GPL(ata_std_bios_param);
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index 244098a..2810488 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -232,57 +232,17 @@ static int pacpi_port_start(struct ata_port *ap)
 }
 
 static struct scsi_host_template pacpi_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	/* Use standard CHS mapping rules */
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations pacpi_ops = {
+static struct ata_port_operations pacpi_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.qc_issue		= pacpi_qc_issue_prot,
+	.cable_detect		= pacpi_cable_detect,
+	.mode_filter		= pacpi_mode_filter,
 	.set_piomode		= pacpi_set_piomode,
 	.set_dmamode		= pacpi_set_dmamode,
-	.mode_filter		= pacpi_mode_filter,
-
-	/* Task file is PCI ATA format, use helpers */
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
 	.error_handler		= pacpi_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
-	.cable_detect		= pacpi_cable_detect,
-
-	/* BMDMA handling is PCI ATA format, use helpers */
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= pacpi_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	/* Timeout handling */
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	/* Generic PATA PCI ATA helpers */
 	.port_start		= pacpi_port_start,
 };
 
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 8a9044c..ad9dce9 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -301,21 +301,7 @@ static int ali_check_atapi_dma(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template ali_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 /*
@@ -323,29 +309,15 @@ static struct scsi_host_template ali_sht = {
  */
 
 static struct ata_port_operations ali_early_port_ops = {
-	.set_piomode	= ali_set_piomode,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
+	.inherits	= &ata_sff_port_ops,
 	.cable_detect	= ata_cable_40wire,
+	.set_piomode	= ali_set_piomode,
+};
 
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+static const struct ata_port_operations ali_dma_base_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.set_piomode	= ali_set_piomode,
+	.set_dmamode	= ali_set_dmamode,
 };
 
 /*
@@ -353,113 +325,29 @@ static struct ata_port_operations ali_early_port_ops = {
  *	detect
  */
 static struct ata_port_operations ali_20_port_ops = {
-	.set_piomode	= ali_set_piomode,
-	.set_dmamode	= ali_set_dmamode,
+	.inherits	= &ali_dma_base_ops,
+	.cable_detect	= ata_cable_40wire,
 	.mode_filter	= ali_20_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /*
  *	Port operations for DMA capable ALi with cable detect
  */
 static struct ata_port_operations ali_c2_port_ops = {
-	.set_piomode	= ali_set_piomode,
-	.set_dmamode	= ali_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
+	.inherits	= &ali_dma_base_ops,
 	.check_atapi_dma = ali_check_atapi_dma,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.dev_config	= ali_lock_sectors,
 };
 
 /*
  *	Port operations for DMA capable ALi with cable detect and LBA48
  */
 static struct ata_port_operations ali_c5_port_ops = {
-	.set_piomode	= ali_set_piomode,
-	.set_dmamode	= ali_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
+	.inherits	= &ali_dma_base_ops,
 	.check_atapi_dma = ali_check_atapi_dma,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 567fe6b..0f317e0 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -354,223 +354,60 @@ static void nv_host_stop(struct ata_host *host)
 }
 
 static struct scsi_host_template amd_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
+};
+
+static const struct ata_port_operations amd_base_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.error_handler	= amd_error_handler,
 };
 
 static struct ata_port_operations amd33_port_ops = {
+	.inherits	= &amd_base_port_ops,
+	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= amd33_set_piomode,
 	.set_dmamode	= amd33_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations amd66_port_ops = {
+	.inherits	= &amd_base_port_ops,
+	.cable_detect	= ata_cable_unknown,
 	.set_piomode	= amd66_set_piomode,
 	.set_dmamode	= amd66_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations amd100_port_ops = {
+	.inherits	= &amd_base_port_ops,
+	.cable_detect	= ata_cable_unknown,
 	.set_piomode	= amd100_set_piomode,
 	.set_dmamode	= amd100_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations amd133_port_ops = {
+	.inherits	= &amd_base_port_ops,
+	.cable_detect	= amd_cable_detect,
 	.set_piomode	= amd133_set_piomode,
 	.set_dmamode	= amd133_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
+};
 
-	.port_start	= ata_sff_port_start,
+static const struct ata_port_operations nv_base_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= ata_cable_ignore,
+	.mode_filter	= nv_mode_filter,
+	.error_handler	= nv_error_handler,
+	.host_stop	= nv_host_stop,
 };
 
 static struct ata_port_operations nv100_port_ops = {
+	.inherits	= &nv_base_port_ops,
 	.set_piomode	= nv100_set_piomode,
 	.set_dmamode	= nv100_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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	= ata_cable_ignore,
-	.mode_filter	= nv_mode_filter,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
-	.host_stop	= nv_host_stop,
 };
 
 static struct ata_port_operations nv133_port_ops = {
+	.inherits	= &nv_base_port_ops,
 	.set_piomode	= nv133_set_piomode,
 	.set_dmamode	= nv133_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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	= ata_cable_ignore,
-	.mode_filter	= nv_mode_filter,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
-	.host_stop	= nv_host_stop,
 };
 
 static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index a238c7b..0101e5a 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -314,86 +314,23 @@ static void artop6260_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template artop_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations artop6210_ops = {
+static struct ata_port_operations artop6210_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.cable_detect		= ata_cable_40wire,
 	.set_piomode		= artop6210_set_piomode,
 	.set_dmamode		= artop6210_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations artop6260_ops = {
+static struct ata_port_operations artop6260_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.cable_detect		= artop6260_cable_detect,
 	.set_piomode		= artop6260_set_piomode,
 	.set_dmamode		= artop6260_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_at32.c b/drivers/ata/pata_at32.c
index 86a8ee9..d495c79 100644
--- a/drivers/ata/pata_at32.c
+++ b/drivers/ata/pata_at32.c
@@ -167,46 +167,13 @@ static void pata_at32_set_piomode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template at32_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations at32_port_ops = {
-	.set_piomode		= pata_at32_set_piomode,
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.exec_command		= ata_exec_command,
-	.check_status		= ata_check_status,
-	.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,
+	.inherits		= &ata_sff_port_ops,
 	.cable_detect		= ata_cable_40wire,
-
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-
-	.data_xfer		= ata_data_xfer,
-
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
+	.set_piomode		= pata_at32_set_piomode,
 };
 
 static int __init pata_at32_init_one(struct device *dev,
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 9623f52..5bc2040 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -221,54 +221,19 @@ static void atiixp_bmdma_stop(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template atiixp_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations atiixp_port_ops = {
-	.set_piomode	= atiixp_set_piomode,
-	.set_dmamode	= atiixp_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
+	.inherits	= &ata_bmdma_port_ops,
 
-	.bmdma_setup 	= ata_bmdma_setup,
 	.bmdma_start 	= atiixp_bmdma_start,
 	.bmdma_stop	= atiixp_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
 
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= atiixp_cable_detect,
+	.set_piomode	= atiixp_set_piomode,
+	.set_dmamode	= atiixp_set_dmamode,
+	.error_handler	= atiixp_error_handler,
 };
 
 static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 0a6fa94..16f8fa5 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1358,24 +1358,14 @@ static int bfin_port_start(struct ata_port *ap)
 }
 
 static struct scsi_host_template bfin_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= SG_NONE,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
 static const struct ata_port_operations bfin_pata_ops = {
+	.inherits		= &ata_sff_port_ops,
+
 	.set_piomode		= bfin_set_piomode,
 	.set_dmamode		= bfin_set_dmamode,
 
@@ -1393,14 +1383,12 @@ static const struct ata_port_operations bfin_pata_ops = {
 	.data_xfer		= bfin_data_xfer,
 
 	.qc_prep		= ata_noop_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
 
 	.freeze			= bfin_bmdma_freeze,
 	.thaw			= bfin_bmdma_thaw,
 	.error_handler		= bfin_error_handler,
 	.post_internal_cmd	= bfin_bmdma_stop,
 
-	.irq_handler		= ata_interrupt,
 	.irq_clear		= bfin_irq_clear,
 	.irq_on			= bfin_irq_on,
 
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index 0ef1d1d..061c891 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -166,53 +166,16 @@ static int cmd640_port_start(struct ata_port *ap)
 }
 
 static struct scsi_host_template cmd640_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations cmd640_port_ops = {
-	.set_piomode	= cmd640_set_piomode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= cmd640_qc_issue_prot,
-
-	/* In theory this is not needed once we kill the prefetcher */
+	.inherits	= &ata_bmdma_port_ops,
+	/* In theory xfer_noirq is not needed once we kill the prefetcher */
 	.data_xfer	= ata_data_xfer_noirq,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
+	.qc_issue	= cmd640_qc_issue_prot,
+	.cable_detect	= ata_cable_40wire,
+	.set_piomode	= cmd640_set_piomode,
 	.port_start	= cmd640_port_start,
 };
 
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index e8c1262..1ac8ecf 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -266,120 +266,30 @@ static void cmd646r1_bmdma_stop(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template cmd64x_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static struct ata_port_operations cmd64x_port_ops = {
+static const struct ata_port_operations cmd64x_base_ops = {
+	.inherits	= &ata_bmdma_port_ops,
 	.set_piomode	= cmd64x_set_piomode,
 	.set_dmamode	= cmd64x_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
-static struct ata_port_operations cmd646r1_port_ops = {
-	.set_piomode	= cmd64x_set_piomode,
-	.set_dmamode	= cmd64x_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
+static struct ata_port_operations cmd64x_port_ops = {
+	.inherits	= &cmd64x_base_ops,
 	.cable_detect	= ata_cable_40wire,
+};
 
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
+static struct ata_port_operations cmd646r1_port_ops = {
+	.inherits	= &cmd64x_base_ops,
 	.bmdma_stop	= cmd646r1_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
 };
 
 static struct ata_port_operations cmd648_port_ops = {
-	.set_piomode	= cmd64x_set_piomode,
-	.set_dmamode	= cmd64x_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
+	.inherits	= &cmd64x_base_ops,
 	.bmdma_stop	= cmd648_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= cmd648_cable_detect,
 };
 
 static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index 5614e76..69a1077 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -140,52 +140,16 @@ static void cs5520_set_piomode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template cs5520_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BMDMA_SHT(DRV_NAME),
 	.sg_tablesize		= LIBATA_DUMB_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
 static struct ata_port_operations cs5520_port_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.qc_prep		= ata_dumb_qc_prep,
+	.cable_detect		= ata_cable_40wire,
 	.set_piomode		= cs5520_set_piomode,
 	.set_dmamode		= cs5520_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_dumb_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index f876aed..e4a16a5 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -161,55 +161,19 @@ static unsigned int cs5530_qc_issue_prot(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template cs5530_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_DUMB_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
+	.sg_tablesize	= LIBATA_DUMB_MAX_PRD,
 };
 
 static struct ata_port_operations cs5530_port_ops = {
-	.set_piomode	= cs5530_set_piomode,
-	.set_dmamode	= cs5530_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
-	.dev_select 	= ata_std_dev_select,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.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,
+	.inherits	= &ata_bmdma_port_ops,
 
 	.qc_prep 	= ata_dumb_qc_prep,
 	.qc_issue	= cs5530_qc_issue_prot,
 
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
+	.set_piomode	= cs5530_set_piomode,
+	.set_dmamode	= cs5530_set_dmamode,
 };
 
 static const struct dmi_system_id palmax_dmi_table[] = {
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c
index 0132453..f910a8a 100644
--- a/drivers/ata/pata_cs5535.c
+++ b/drivers/ata/pata_cs5535.c
@@ -158,55 +158,14 @@ static void cs5535_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template cs5535_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations cs5535_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= cs5535_cable_detect,
 	.set_piomode	= cs5535_set_piomode,
 	.set_dmamode	= cs5535_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index c59c806..69d63aa 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -221,55 +221,14 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template cs5536_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations cs5536_port_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.cable_detect		= cs5536_cable_detect,
 	.set_piomode		= cs5536_set_piomode,
 	.set_dmamode		= cs5536_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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		= cs5536_cable_detect,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c
index fc5f9c4..c459553 100644
--- a/drivers/ata/pata_cypress.c
+++ b/drivers/ata/pata_cypress.c
@@ -110,55 +110,14 @@ static void cy82c693_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template cy82c693_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations cy82c693_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= cy82c693_set_piomode,
 	.set_dmamode	= cy82c693_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index 043dcd3..a6129bd 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -233,53 +233,15 @@ static void efar_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template efar_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations efar_ops = {
+static struct ata_port_operations efar_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.cable_detect		= efar_cable_detect,
 	.set_piomode		= efar_set_piomode,
 	.set_dmamode		= efar_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 6f63b73..9fa47d4 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -290,21 +290,7 @@ static void hpt366_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template hpt36x_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 /*
@@ -312,37 +298,11 @@ static struct scsi_host_template hpt36x_sht = {
  */
 
 static struct ata_port_operations hpt366_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= hpt36x_cable_detect,
+	.mode_filter	= hpt366_filter,
 	.set_piomode	= hpt366_set_piomode,
 	.set_dmamode	= hpt366_set_dmamode,
-	.mode_filter	= hpt366_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 7a69f36..a9d10c6 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -619,21 +619,7 @@ static void hpt37x_bmdma_stop(struct ata_queued_cmd *qc)
 
 
 static struct scsi_host_template hpt37x_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 /*
@@ -641,36 +627,15 @@ static struct scsi_host_template hpt37x_sht = {
  */
 
 static struct ata_port_operations hpt370_port_ops = {
-	.set_piomode	= hpt370_set_piomode,
-	.set_dmamode	= hpt370_set_dmamode,
-	.mode_filter	= hpt370_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
+	.inherits	= &ata_bmdma_port_ops,
 
-	.bmdma_setup 	= ata_bmdma_setup,
 	.bmdma_start 	= hpt370_bmdma_start,
 	.bmdma_stop	= hpt370_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
 
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.mode_filter	= hpt370_filter,
+	.set_piomode	= hpt370_set_piomode,
+	.set_dmamode	= hpt370_set_dmamode,
+	.error_handler	= hpt37x_error_handler,
 };
 
 /*
@@ -678,36 +643,8 @@ static struct ata_port_operations hpt370_port_ops = {
  */
 
 static struct ata_port_operations hpt370a_port_ops = {
-	.set_piomode	= hpt370_set_piomode,
-	.set_dmamode	= hpt370_set_dmamode,
+	.inherits	= &hpt370_port_ops,
 	.mode_filter	= hpt370a_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= hpt370_bmdma_start,
-	.bmdma_stop	= hpt370_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /*
@@ -716,36 +653,13 @@ static struct ata_port_operations hpt370a_port_ops = {
  */
 
 static struct ata_port_operations hpt372_port_ops = {
-	.set_piomode	= hpt372_set_piomode,
-	.set_dmamode	= hpt372_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
+	.inherits	= &ata_bmdma_port_ops,
 
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
 	.bmdma_stop	= hpt37x_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
 
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.set_piomode	= hpt372_set_piomode,
+	.set_dmamode	= hpt372_set_dmamode,
+	.error_handler	= hpt37x_error_handler,
 };
 
 /*
@@ -754,36 +668,8 @@ static struct ata_port_operations hpt372_port_ops = {
  */
 
 static struct ata_port_operations hpt374_port_ops = {
-	.set_piomode	= hpt372_set_piomode,
-	.set_dmamode	= hpt372_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
-	.dev_select 	= ata_std_dev_select,
-
-	.freeze		= ata_bmdma_freeze,
-	.thaw		= ata_bmdma_thaw,
+	.inherits	= &hpt372_port_ops,
 	.error_handler	= hpt374_error_handler,
-	.post_internal_cmd = ata_bmdma_post_internal_cmd,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= hpt37x_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index 3a517cb..b77b127 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -339,21 +339,7 @@ static unsigned int hpt3x2n_qc_issue_prot(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template hpt3x2n_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 /*
@@ -361,37 +347,15 @@ static struct scsi_host_template hpt3x2n_sht = {
  */
 
 static struct ata_port_operations hpt3x2n_port_ops = {
-	.set_piomode	= hpt3x2n_set_piomode,
-	.set_dmamode	= hpt3x2n_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
+	.inherits	= &ata_bmdma_port_ops,
 
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
 	.bmdma_stop	= hpt3x2n_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
 	.qc_issue	= hpt3x2n_qc_issue_prot,
 
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= hpt3x2n_cable_detect,
+	.set_piomode	= hpt3x2n_set_piomode,
+	.set_dmamode	= hpt3x2n_set_dmamode,
+	.error_handler	= hpt3x2n_error_handler,
 };
 
 /**
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c
index c09f95a..8857d02 100644
--- a/drivers/ata/pata_hpt3x3.c
+++ b/drivers/ata/pata_hpt3x3.c
@@ -102,58 +102,17 @@ static int hpt3x3_atapi_dma(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template hpt3x3_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations hpt3x3_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.check_atapi_dma= hpt3x3_atapi_dma,
+	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= hpt3x3_set_piomode,
 #if defined(CONFIG_PATA_HPT3X3_DMA)
 	.set_dmamode	= hpt3x3_set_dmamode,
 #endif
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-	.check_atapi_dma= hpt3x3_atapi_dma,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index 121fe52..f0ec997 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -311,21 +311,9 @@ static int pata_icside_port_start(struct ata_port *ap)
 }
 
 static struct scsi_host_template pata_icside_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= PATA_ICSIDE_MAX_SG,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= ~0, /* no dma boundaries */
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
 static void pata_icside_postreset(struct ata_link *link, unsigned int *classes)
@@ -357,37 +345,21 @@ static void pata_icside_error_handler(struct ata_port *ap)
 }
 
 static struct ata_port_operations pata_icside_port_ops = {
-	.set_dmamode		= pata_icside_set_dmamode,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.exec_command		= ata_exec_command,
-	.check_status		= ata_check_status,
-	.dev_select		= ata_std_dev_select,
-
-	.cable_detect		= ata_cable_40wire,
-
-	.bmdma_setup		= pata_icside_bmdma_setup,
-	.bmdma_start		= pata_icside_bmdma_start,
-
-	.data_xfer		= ata_data_xfer_noirq,
-
+	.inherits		= &ata_sff_port_ops,
 	/* no need to build any PRD tables for DMA */
 	.qc_prep		= ata_noop_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
+	.data_xfer		= ata_data_xfer_noirq,
+	.bmdma_setup		= pata_icside_bmdma_setup,
+	.bmdma_start		= pata_icside_bmdma_start,
+	.bmdma_stop		= pata_icside_bmdma_stop,
+	.bmdma_status		= pata_icside_bmdma_status,
 
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
+	.cable_detect		= ata_cable_40wire,
+	.set_dmamode		= pata_icside_set_dmamode,
 	.error_handler		= pata_icside_error_handler,
 	.post_internal_cmd	= pata_icside_bmdma_stop,
 
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
-
 	.port_start		= pata_icside_port_start,
-
-	.bmdma_stop		= pata_icside_bmdma_stop,
-	.bmdma_status		= pata_icside_bmdma_status,
 };
 
 static void __devinit
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index ef561de..085913e 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -20,45 +20,12 @@
 #define DRV_VERSION "0.2.2"
 
 static struct scsi_host_template isapnp_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations isapnp_port_ops = {
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
+	.inherits	= &ata_sff_port_ops,
 	.cable_detect	= ata_cable_40wire,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index 60c30dc..50977b7 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -243,53 +243,16 @@ static void it8213_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template it8213_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations it8213_ops = {
+
+static struct ata_port_operations it8213_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.cable_detect		= it8213_cable_detect,
 	.set_piomode		= it8213_set_piomode,
 	.set_dmamode		= it8213_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index 3181e2c..f7ac52e 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -632,89 +632,34 @@ static int it821x_port_start(struct ata_port *ap)
 }
 
 static struct scsi_host_template it821x_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations it821x_smart_port_ops = {
-	.set_mode	= it821x_smart_set_mode,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.mode_filter	= ata_pci_default_filter,
+	.inherits	= &ata_bmdma_port_ops,
 
-	.check_status 	= ata_check_status,
 	.check_atapi_dma= it821x_check_atapi_dma,
-	.exec_command	= ata_exec_command,
-	.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	= it821x_ident_hack,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
 	.qc_issue	= it821x_smart_qc_issue_prot,
 
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
+	.cable_detect	= it821x_ident_hack,
+	.set_mode	= it821x_smart_set_mode,
+	.dev_config	= it821x_dev_config,
 
 	.port_start	= it821x_port_start,
 };
 
 static struct ata_port_operations it821x_passthru_port_ops = {
-	.set_piomode	= it821x_passthru_set_piomode,
-	.set_dmamode	= it821x_passthru_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
+	.inherits	= &ata_bmdma_port_ops,
 
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
 	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
 	.bmdma_start 	= it821x_passthru_bmdma_start,
 	.bmdma_stop	= it821x_passthru_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
 	.qc_issue	= it821x_passthru_qc_issue_prot,
 
-	.data_xfer	= ata_data_xfer,
-
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_handler	= ata_interrupt,
-	.irq_on		= ata_irq_on,
+	.cable_detect	= ata_cable_unknown,
+	.set_piomode	= it821x_passthru_set_piomode,
+	.set_dmamode	= it821x_passthru_set_dmamode,
 
 	.port_start	= it821x_port_start,
 };
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 6eb8cc9..d02629a 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -88,47 +88,14 @@ static unsigned int ixp4xx_mmio_data_xfer(struct ata_device *dev,
 }
 
 static struct scsi_host_template ixp4xx_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations ixp4xx_port_ops = {
-	.set_mode		= ixp4xx_set_mode,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.exec_command		= ata_exec_command,
-	.check_status 		= ata_check_status,
-	.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,
-
-	.qc_prep 		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
+	.inherits		= &ata_sff_port_ops,
 	.data_xfer		= ixp4xx_mmio_data_xfer,
 	.cable_detect		= ata_cable_40wire,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
+	.set_mode		= ixp4xx_set_mode,
 };
 
 static void ixp4xx_setup_port(struct ata_port *ap,
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 4d25c45..dbfb368 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -121,54 +121,12 @@ static void jmicron_error_handler(struct ata_port *ap)
 /* No PIO or DMA methods needed for this device */
 
 static struct scsi_host_template jmicron_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	/* Use standard CHS mapping rules */
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations jmicron_ops = {
-	/* Task file is PCI ATA format, use helpers */
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.mode_filter		= ata_pci_default_filter,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
+static struct ata_port_operations jmicron_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.error_handler		= jmicron_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
-
-	/* BMDMA handling is PCI ATA format, use helpers */
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	/* IRQ-related hooks */
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	/* Generic PATA PCI ATA helpers */
-	.port_start		= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 7b2140e..fadb301 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -208,21 +208,12 @@ static int legacy_set_mode(struct ata_link *link, struct ata_device **unused)
 }
 
 static struct scsi_host_template legacy_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
+};
+
+static const struct ata_port_operations legacy_base_port_ops = {
+	.inherits	= &ata_sff_port_ops,
+	.cable_detect	= ata_cable_40wire,
 };
 
 /*
@@ -234,55 +225,14 @@ static struct scsi_host_template legacy_sht = {
  */
 
 static struct ata_port_operations simple_port_ops = {
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
+	.inherits	= &legacy_base_port_ops,
 	.data_xfer	= ata_data_xfer_noirq,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations legacy_port_ops = {
-	.set_mode	= legacy_set_mode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
+	.inherits	= &legacy_base_port_ops,
 	.data_xfer	= ata_data_xfer_noirq,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.set_mode	= legacy_set_mode,
 };
 
 /*
@@ -373,30 +323,9 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
 }
 
 static struct ata_port_operations pdc20230_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= pdc20230_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
 	.data_xfer	= pdc_data_xfer_vlb,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /*
@@ -427,30 +356,8 @@ static void ht6560a_set_piomode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct ata_port_operations ht6560a_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= ht6560a_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,	/* Check vlb/noirq */
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /*
@@ -492,30 +399,8 @@ static void ht6560b_set_piomode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct ata_port_operations ht6560b_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= ht6560b_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,    /* FIXME: Check 32bit and noirq */
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /*
@@ -613,30 +498,8 @@ static void opti82c611a_set_piomode(struct ata_port *ap,
 
 
 static struct ata_port_operations opti82c611a_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= opti82c611a_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /*
@@ -745,30 +608,9 @@ static unsigned int opti82c46x_qc_issue_prot(struct ata_queued_cmd *qc)
 }
 
 static struct ata_port_operations opti82c46x_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= opti82c46x_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
 	.qc_issue	= opti82c46x_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static void qdi6500_set_piomode(struct ata_port *ap, struct ata_device *adev)
@@ -930,84 +772,22 @@ static int qdi_port(struct platform_device *dev,
 }
 
 static struct ata_port_operations qdi6500_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= qdi6500_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
 	.qc_issue	= qdi_qc_issue_prot,
-
 	.data_xfer	= vlb32_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations qdi6580_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= qdi6580_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
 	.data_xfer	= vlb32_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations qdi6580dp_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= qdi6580dp_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= qdi_qc_issue_prot,
-
 	.data_xfer	= vlb32_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static DEFINE_SPINLOCK(winbond_lock);
@@ -1076,29 +856,9 @@ static int winbond_port(struct platform_device *dev,
 }
 
 static struct ata_port_operations winbond_port_ops = {
+	.inherits	= &legacy_base_port_ops,
 	.set_piomode	= winbond_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
 	.data_xfer	= vlb32_data_xfer,
-
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct legacy_controller controllers[] = {
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 113be4f..bbc9985 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -92,55 +92,13 @@ static void marvell_error_handler(struct ata_port *ap)
 /* No PIO or DMA methods needed for this device */
 
 static struct scsi_host_template marvell_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	/* Use standard CHS mapping rules */
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations marvell_ops = {
-	/* Task file is PCI ATA format, use helpers */
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.mode_filter		= ata_pci_default_filter,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
-	.error_handler		= marvell_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
+static struct ata_port_operations marvell_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.cable_detect		= marvell_cable_detect,
-
-	/* BMDMA handling is PCI ATA format, use helpers */
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	/* Timeout handling */
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	/* Generic PATA PCI ATA helpers */
-	.port_start		= ata_sff_port_start,
+	.error_handler		= marvell_error_handler,
 };
 
 
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 9383efb..6495c31 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -265,40 +265,16 @@ mpc52xx_ata_error_handler(struct ata_port *ap)
 
 
 static struct scsi_host_template mpc52xx_ata_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations mpc52xx_ata_port_ops = {
-	.set_piomode		= mpc52xx_ata_set_piomode,
+	.inherits		= &ata_sff_port_ops,
 	.dev_select		= mpc52xx_ata_dev_select,
-	.tf_load		= ata_tf_load,
-	.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,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
-	.port_start		= ata_sff_port_start,
+	.set_piomode		= mpc52xx_ata_set_piomode,
+	.error_handler		= mpc52xx_ata_error_handler,
+	.post_internal_cmd	= ATA_OP_NULL,
 };
 
 static int __devinit
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c
index ced6372..dab54f8 100644
--- a/drivers/ata/pata_mpiix.c
+++ b/drivers/ata/pata_mpiix.c
@@ -151,46 +151,15 @@ static unsigned int mpiix_qc_issue_prot(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template mpiix_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations mpiix_port_ops = {
+	.inherits	= &ata_sff_port_ops,
+	.qc_issue	= mpiix_qc_issue_prot,
+	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= mpiix_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= mpiix_qc_issue_prot,
-	.data_xfer	= ata_data_xfer,
-
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static int mpiix_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c
index 9fd1a84..65389d1 100644
--- a/drivers/ata/pata_netcell.c
+++ b/drivers/ata/pata_netcell.c
@@ -21,55 +21,12 @@
 /* No PIO or DMA methods needed for this device */
 
 static struct scsi_host_template netcell_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	/* Use standard CHS mapping rules */
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations netcell_ops = {
-	/* Task file is PCI ATA format, use helpers */
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.mode_filter		= ata_pci_default_filter,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
-	.error_handler		= ata_bmdma_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
+static struct ata_port_operations netcell_ops = {
+	.inherits	= &ata_bmdma_port_ops,
 	.cable_detect		= ata_cable_80wire,
-
-	/* BMDMA handling is PCI ATA format, use helpers */
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	/* IRQ-related hooks */
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	/* Generic PATA PCI ATA helpers */
-	.port_start		= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
index 1c1b835..c37b951 100644
--- a/drivers/ata/pata_ninja32.c
+++ b/drivers/ata/pata_ninja32.c
@@ -78,54 +78,14 @@ static void ninja32_dev_select(struct ata_port *ap, unsigned int device)
 }
 
 static struct scsi_host_template ninja32_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations ninja32_port_ops = {
-	.set_piomode	= ninja32_set_piomode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
+	.inherits	= &ata_bmdma_port_ops,
 	.dev_select 	= ninja32_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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.set_piomode	= ninja32_set_piomode,
 };
 
 static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
index d182bdf..5b1982f 100644
--- a/drivers/ata/pata_ns87410.c
+++ b/drivers/ata/pata_ns87410.c
@@ -144,48 +144,15 @@ static unsigned int ns87410_qc_issue_prot(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template ns87410_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations ns87410_port_ops = {
+	.inherits	= &ata_sff_port_ops,
+	.qc_issue	= ns87410_qc_issue_prot,
+	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= ns87410_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ns87410_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c
index 93eb958..38d86a2 100644
--- a/drivers/ata/pata_ns87415.c
+++ b/drivers/ata/pata_ns87415.c
@@ -297,90 +297,32 @@ static u8 ns87560_bmdma_status(struct ata_port *ap)
 {
 	return ns87560_read_buggy(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
 }
+#endif		/* 87560 SuperIO Support */
 
-static const struct ata_port_operations ns87560_pata_ops = {
-	.set_piomode		= ns87415_set_piomode,
-	.mode_filter		= ata_pci_default_filter,
+static struct ata_port_operations ns87415_pata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 
-	.tf_load		= ata_tf_load,
-	.tf_read		= ns87560_tf_read,
-	.check_status		= ns87560_check_status,
 	.check_atapi_dma	= ns87415_check_atapi_dma,
-	.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,
-
 	.bmdma_setup		= ns87415_bmdma_setup,
 	.bmdma_start		= ns87415_bmdma_start,
 	.bmdma_stop		= ns87415_bmdma_stop,
-	.bmdma_status		= ns87560_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
 	.irq_clear		= ns87415_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
-};
-
-#endif		/* 87560 SuperIO Support */
-
-
-static const struct ata_port_operations ns87415_pata_ops = {
-	.set_piomode		= ns87415_set_piomode,
-	.mode_filter		= ata_pci_default_filter,
 
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.check_atapi_dma	= ns87415_check_atapi_dma,
-	.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,
+	.set_piomode		= ns87415_set_piomode,
+};
 
-	.bmdma_setup		= ns87415_bmdma_setup,
-	.bmdma_start		= ns87415_bmdma_start,
-	.bmdma_stop		= ns87415_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ns87415_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
+#if defined(CONFIG_SUPERIO)
+static struct ata_port_operations ns87560_pata_ops = {
+	.inherits		= &ns87415_pata_ops,
+	.tf_read		= ns87560_tf_read,
+	.check_status		= ns87560_check_status,
+	.bmdma_status		= ns87560_bmdma_status,
 };
+#endif
 
 static struct scsi_host_template ns87415_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
index 44da09a..f6062b3 100644
--- a/drivers/ata/pata_oldpiix.c
+++ b/drivers/ata/pata_oldpiix.c
@@ -220,53 +220,16 @@ static unsigned int oldpiix_qc_issue_prot(struct ata_queued_cmd *qc)
 
 
 static struct scsi_host_template oldpiix_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations oldpiix_pata_ops = {
+static struct ata_port_operations oldpiix_pata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.qc_issue		= oldpiix_qc_issue_prot,
+	.cable_detect		= ata_cable_40wire,
 	.set_piomode		= oldpiix_set_piomode,
 	.set_dmamode		= oldpiix_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= oldpiix_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
index ebb9dc1..3787d39 100644
--- a/drivers/ata/pata_opti.c
+++ b/drivers/ata/pata_opti.c
@@ -165,53 +165,14 @@ static void opti_set_piomode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template opti_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations opti_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= opti_set_piomode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index 3f9d035..eb4b081 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -350,91 +350,22 @@ static int optidma_set_mode(struct ata_link *link, struct ata_device **r_failed)
 }
 
 static struct scsi_host_template optidma_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations optidma_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= optidma_set_pio_mode,
 	.set_dmamode	= optidma_set_dma_mode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-	.cable_detect	= ata_cable_40wire,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.error_handler	= optidma_error_handler,
 };
 
 static struct ata_port_operations optiplus_port_ops = {
+	.inherits	= &optidma_port_ops,
 	.set_piomode	= optiplus_set_pio_mode,
 	.set_dmamode	= optiplus_set_dma_mode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-	.cable_detect	= ata_cable_40wire,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 9881a9e..57efbf0 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -128,71 +128,21 @@ static unsigned int ata_data_xfer_8bit(struct ata_device *dev,
 
 
 static struct scsi_host_template pcmcia_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations pcmcia_port_ops = {
-	.set_mode	= pcmcia_set_mode,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
+	.inherits	= &ata_sff_port_ops,
 	.data_xfer	= ata_data_xfer_noirq,
-
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
+	.set_mode	= pcmcia_set_mode,
 };
 
 static struct ata_port_operations pcmcia_8bit_port_ops = {
-	.set_mode	= pcmcia_set_mode_8bit,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
+	.inherits	= &ata_sff_port_ops,
 	.data_xfer	= ata_data_xfer_8bit,
-
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
+	.set_mode	= pcmcia_set_mode_8bit,
 };
 
 #define CS_CHECK(fn, ret) \
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index 028af5d..baa9fa7 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -129,84 +129,22 @@ static struct pci_driver pdc2027x_pci_driver = {
 };
 
 static struct scsi_host_template pdc2027x_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations pdc2027x_pata100_ops = {
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
+	.inherits		= &ata_bmdma_port_ops,
 	.check_atapi_dma	= pdc2027x_check_atapi_dma,
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.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		= pdc2027x_error_handler,
-	.post_internal_cmd 	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= pdc2027x_cable_detect,
-
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
+	.error_handler		= pdc2027x_error_handler,
 };
 
 static struct ata_port_operations pdc2027x_pata133_ops = {
+	.inherits		= &pdc2027x_pata100_ops,
+	.mode_filter		= pdc2027x_mode_filter,
 	.set_piomode		= pdc2027x_set_piomode,
 	.set_dmamode		= pdc2027x_set_dmamode,
 	.set_mode		= pdc2027x_set_mode,
-	.mode_filter		= pdc2027x_mode_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.check_atapi_dma	= pdc2027x_check_atapi_dma,
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.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		= pdc2027x_error_handler,
-	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
-	.cable_detect		= pdc2027x_cable_detect,
-
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 static struct ata_port_info pdc2027x_port_info[] = {
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 3ed8667..4daac20 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -262,87 +262,28 @@ static int pdc2026x_check_atapi_dma(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template pdc202xx_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations pdc2024x_port_ops = {
-	.set_piomode	= pdc202xx_set_piomode,
-	.set_dmamode	= pdc202xx_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.inherits		= &ata_bmdma_port_ops,
+
+	.cable_detect		= ata_cable_40wire,
+	.set_piomode		= pdc202xx_set_piomode,
+	.set_dmamode		= pdc202xx_set_dmamode,
 };
 
 static struct ata_port_operations pdc2026x_port_ops = {
-	.set_piomode	= pdc202xx_set_piomode,
-	.set_dmamode	= pdc202xx_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
-	.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,
-
-	.check_atapi_dma= pdc2026x_check_atapi_dma,
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= pdc2026x_bmdma_start,
-	.bmdma_stop	= pdc2026x_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= pdc2026x_port_start,
+	.inherits		= &pdc2024x_port_ops,
+
+	.check_atapi_dma	= pdc2026x_check_atapi_dma,
+	.bmdma_start		= pdc2026x_bmdma_start,
+	.bmdma_stop		= pdc2026x_bmdma_stop,
+
+	.cable_detect		= pdc2026x_cable_detect,
+	.dev_config		= pdc2026x_dev_config,
+
+	.port_start		= pdc2026x_port_start,
 };
 
 static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index d2edcbf..0f86ca3 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -47,45 +47,15 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unu
 }
 
 static struct scsi_host_template pata_platform_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations pata_platform_port_ops = {
-	.set_mode		= pata_platform_set_mode,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-
+	.inherits		= &ata_sff_port_ops,
 	.data_xfer		= ata_data_xfer_noirq,
-
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
+	.cable_detect		= ata_cable_unknown,
+	.set_mode		= pata_platform_set_mode,
+	.port_start		= ATA_OP_NULL,
 };
 
 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c
index 60238d5..d16b343 100644
--- a/drivers/ata/pata_qdi.c
+++ b/drivers/ata/pata_qdi.c
@@ -154,73 +154,20 @@ static unsigned int qdi_data_xfer(struct ata_device *dev, unsigned char *buf,
 }
 
 static struct scsi_host_template qdi_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations qdi6500_port_ops = {
-	.set_piomode	= qdi6500_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
+	.inherits	= &ata_sff_port_ops,
 	.qc_issue	= qdi_qc_issue_prot,
-
 	.data_xfer	= qdi_data_xfer,
-
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
+	.set_piomode	= qdi6500_set_piomode,
 };
 
 static struct ata_port_operations qdi6580_port_ops = {
+	.inherits	= &qdi6500_port_ops,
 	.set_piomode	= qdi6580_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= qdi_qc_issue_prot,
-
-	.data_xfer	= qdi_data_xfer,
-
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c
index 8109b08..94e60b3 100644
--- a/drivers/ata/pata_radisys.c
+++ b/drivers/ata/pata_radisys.c
@@ -185,53 +185,15 @@ static unsigned int radisys_qc_issue_prot(struct ata_queued_cmd *qc)
 
 
 static struct scsi_host_template radisys_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations radisys_pata_ops = {
+static struct ata_port_operations radisys_pata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.qc_issue		= radisys_qc_issue_prot,
+	.cable_detect		= ata_cable_unknown,
 	.set_piomode		= radisys_set_piomode,
 	.set_dmamode		= radisys_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= radisys_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
index d922698..f9d40be 100644
--- a/drivers/ata/pata_rz1000.c
+++ b/drivers/ata/pata_rz1000.c
@@ -53,54 +53,13 @@ static int rz1000_set_mode(struct ata_link *link, struct ata_device **unused)
 
 
 static struct scsi_host_template rz1000_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations rz1000_port_ops = {
-	.set_mode	= rz1000_set_mode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.exec_command	= ata_exec_command,
-	.dev_select 	= ata_std_dev_select,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.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,
+	.inherits	= &ata_bmdma_port_ops,
 	.cable_detect	= ata_cable_40wire,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.set_mode	= rz1000_set_mode,
 };
 
 static int rz1000_fifo_disable(struct pci_dev *pdev)
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
index 725a858..362b7f8 100644
--- a/drivers/ata/pata_sc1200.c
+++ b/drivers/ata/pata_sc1200.c
@@ -179,55 +179,17 @@ static unsigned int sc1200_qc_issue_prot(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template sc1200_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_DUMB_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
+	.sg_tablesize	= LIBATA_DUMB_MAX_PRD,
 };
 
 static struct ata_port_operations sc1200_port_ops = {
-	.set_piomode	= sc1200_set_piomode,
-	.set_dmamode	= sc1200_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
+	.inherits	= &ata_bmdma_port_ops,
 	.qc_prep 	= ata_dumb_qc_prep,
 	.qc_issue	= sc1200_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
+	.set_piomode	= sc1200_set_piomode,
+	.set_dmamode	= sc1200_set_dmamode,
 };
 
 /**
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index 55055b2..033d1f3 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -968,24 +968,12 @@ static void scc_port_stop (struct ata_port *ap)
 }
 
 static struct scsi_host_template scc_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static const struct ata_port_operations scc_pata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+
 	.set_piomode		= scc_set_piomode,
 	.set_dmamode		= scc_set_dmamode,
 	.mode_filter		= scc_mode_filter,
@@ -1003,9 +991,6 @@ static const struct ata_port_operations scc_pata_ops = {
 	.bmdma_status		= scc_bmdma_status,
 	.data_xfer		= scc_data_xfer,
 
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-
 	.freeze			= scc_bmdma_freeze,
 	.error_handler		= scc_error_handler,
 	.post_internal_cmd	= scc_bmdma_stop,
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 0b1e882..a5ce863 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -298,89 +298,20 @@ static void serverworks_set_dmamode(struct ata_port *ap, struct ata_device *adev
 }
 
 static struct scsi_host_template serverworks_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations serverworks_osb4_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= serverworks_cable_detect,
+	.mode_filter	= serverworks_osb4_filter,
 	.set_piomode	= serverworks_set_piomode,
 	.set_dmamode	= serverworks_set_dmamode,
-	.mode_filter	= serverworks_osb4_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations serverworks_csb_port_ops = {
-	.set_piomode	= serverworks_set_piomode,
-	.set_dmamode	= serverworks_set_dmamode,
+	.inherits	= &serverworks_osb4_port_ops,
 	.mode_filter	= serverworks_csb_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static int serverworks_fixup_osb4(struct pci_dev *pdev)
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index ecdaebe..bc3253d 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -192,54 +192,14 @@ static void sil680_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template sil680_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations sil680_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= sil680_cable_detect,
 	.set_piomode	= sil680_set_piomode,
 	.set_dmamode	= sil680_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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	= sil680_cable_detect,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index ff98050..f155a55 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -514,213 +514,54 @@ static void sis_133_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template sis_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations sis_133_ops = {
+static struct ata_port_operations sis_133_for_sata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.set_piomode		= sis_133_set_piomode,
 	.set_dmamode		= sis_133_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
+};
 
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
+static struct ata_port_operations sis_base_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.error_handler		= sis_error_handler,
 };
 
-static const struct ata_port_operations sis_133_for_sata_ops = {
+static struct ata_port_operations sis_133_ops = {
+	.inherits		= &sis_base_ops,
 	.set_piomode		= sis_133_set_piomode,
 	.set_dmamode		= sis_133_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations sis_133_early_ops = {
+static struct ata_port_operations sis_133_early_ops = {
+	.inherits		= &sis_base_ops,
 	.set_piomode		= sis_100_set_piomode,
 	.set_dmamode		= sis_133_early_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations sis_100_ops = {
+static struct ata_port_operations sis_100_ops = {
+	.inherits		= &sis_base_ops,
 	.set_piomode		= sis_100_set_piomode,
 	.set_dmamode		= sis_100_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations sis_66_ops = {
+static struct ata_port_operations sis_66_ops = {
+	.inherits		= &sis_base_ops,
 	.set_piomode		= sis_old_set_piomode,
 	.set_dmamode		= sis_66_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations sis_old_ops = {
+static struct ata_port_operations sis_old_ops = {
+	.inherits		= &sis_base_ops,
 	.set_piomode		= sis_old_set_piomode,
 	.set_dmamode		= sis_old_set_dmamode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.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,
-
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_handler		= ata_interrupt,
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info sis_info = {
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 51831ac..04fd30b 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -207,54 +207,16 @@ static void sl82c105_bmdma_stop(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template sl82c105_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations sl82c105_port_ops = {
-	.set_piomode	= sl82c105_set_piomode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
+	.inherits	= &ata_bmdma_port_ops,
 	.bmdma_start 	= sl82c105_bmdma_start,
 	.bmdma_stop	= sl82c105_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
+	.set_piomode	= sl82c105_set_piomode,
+	.error_handler	= sl82c105_error_handler,
 };
 
 /**
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
index 403eafc..bc4956e 100644
--- a/drivers/ata/pata_triflex.c
+++ b/drivers/ata/pata_triflex.c
@@ -180,54 +180,16 @@ static void triflex_bmdma_stop(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template triflex_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations triflex_port_ops = {
-	.set_piomode	= triflex_set_piomode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
+	.inherits	= &ata_bmdma_port_ops,
 	.bmdma_start 	= triflex_bmdma_start,
 	.bmdma_stop	= triflex_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
+	.set_piomode	= triflex_set_piomode,
+	.error_handler	= triflex_error_handler,
 };
 
 static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 47ec47b..c941d5a 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -331,89 +331,20 @@ static void via_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template via_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations via_port_ops = {
+	.inherits	= &ata_bmdma_port_ops,
+	.cable_detect	= via_cable_detect,
 	.set_piomode	= via_set_piomode,
 	.set_dmamode	= via_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
-	.data_xfer	= ata_data_xfer,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 static struct ata_port_operations via_port_ops_noirq = {
-	.set_piomode	= via_set_piomode,
-	.set_dmamode	= via_set_dmamode,
-	.mode_filter	= ata_pci_default_filter,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.bmdma_setup 	= ata_bmdma_setup,
-	.bmdma_start 	= ata_bmdma_start,
-	.bmdma_stop	= ata_bmdma_stop,
-	.bmdma_status 	= ata_bmdma_status,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
+	.inherits	= &via_port_ops,
 	.data_xfer	= ata_data_xfer_noirq,
-
-	.irq_handler	= ata_interrupt,
-	.irq_clear	= ata_bmdma_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
 };
 
 /**
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c
index 5318248..f235bb0 100644
--- a/drivers/ata/pata_winbond.c
+++ b/drivers/ata/pata_winbond.c
@@ -122,47 +122,14 @@ static unsigned int winbond_data_xfer(struct ata_device *dev,
 }
 
 static struct scsi_host_template winbond_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations winbond_port_ops = {
-	.set_piomode	= winbond_set_piomode,
-
-	.tf_load	= ata_tf_load,
-	.tf_read	= ata_tf_read,
-	.check_status 	= ata_check_status,
-	.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,
-
-	.qc_prep 	= ata_qc_prep,
-	.qc_issue	= ata_qc_issue_prot,
-
+	.inherits	= &ata_sff_port_ops,
 	.data_xfer	= winbond_data_xfer,
-
-	.irq_clear	= ata_noop_irq_clear,
-	.irq_on		= ata_irq_on,
-
-	.port_start	= ata_sff_port_start,
+	.cable_detect	= ata_cable_40wire,
+	.set_piomode	= winbond_set_piomode,
 };
 
 /**
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index bc2d12a..a570614 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -143,43 +143,34 @@ static void adma_thaw(struct ata_port *ap);
 static void adma_error_handler(struct ata_port *ap);
 
 static struct scsi_host_template adma_ata_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
-	.proc_name		= DRV_NAME,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= LIBATA_MAX_PRD,
 	.dma_boundary		= ADMA_DMA_BOUNDARY,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.use_clustering		= ENABLE_CLUSTERING,
-	.emulated		= ATA_SHT_EMULATED,
 };
 
-static const struct ata_port_operations adma_ata_ops = {
+static struct ata_port_operations adma_ata_ops = {
+	.inherits		= &ata_base_port_ops,
+
+	.dev_select		= ata_std_dev_select,
 	.tf_load		= ata_tf_load,
 	.tf_read		= ata_tf_read,
-	.exec_command		= ata_exec_command,
 	.check_status		= ata_check_status,
-	.dev_select		= ata_std_dev_select,
-	.check_atapi_dma	= adma_check_atapi_dma,
+	.exec_command		= ata_exec_command,
 	.data_xfer		= ata_data_xfer,
+	.check_atapi_dma	= adma_check_atapi_dma,
+	.bmdma_stop		= adma_bmdma_stop,
+	.bmdma_status		= adma_bmdma_status,
 	.qc_prep		= adma_qc_prep,
 	.qc_issue		= adma_qc_issue,
+	.irq_on			= ata_irq_on,
+
 	.freeze			= adma_freeze,
 	.thaw			= adma_thaw,
 	.error_handler		= adma_error_handler,
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
+
 	.port_start		= adma_port_start,
 	.port_stop		= adma_port_stop,
 	.host_stop		= adma_host_stop,
-	.bmdma_stop		= adma_bmdma_stop,
-	.bmdma_status		= adma_bmdma_status,
 };
 
 static struct ata_port_info adma_port_info[] = {
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 7778fd3..e90a4d6 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1202,35 +1202,22 @@ static int sata_fsl_init_controller(struct ata_host *host)
  * scsi mid-layer and libata interface structures
  */
 static struct scsi_host_template sata_fsl_sht = {
-	.module = THIS_MODULE,
-	.name = "sata_fsl",
-	.ioctl = ata_scsi_ioctl,
-	.queuecommand = ata_scsi_queuecmd,
-	.change_queue_depth = ata_scsi_change_queue_depth,
+	ATA_NCQ_SHT("sata_fsl"),
 	.can_queue = SATA_FSL_QUEUE_DEPTH,
-	.this_id = ATA_SHT_THIS_ID,
 	.sg_tablesize = SATA_FSL_MAX_PRD_USABLE,
-	.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
-	.emulated = ATA_SHT_EMULATED,
-	.use_clustering = ATA_SHT_USE_CLUSTERING,
-	.proc_name = "sata_fsl",
 	.dma_boundary = ATA_DMA_BOUNDARY,
-	.slave_configure = ata_scsi_slave_config,
-	.slave_destroy = ata_scsi_slave_destroy,
-	.bios_param = ata_std_bios_param,
 };
 
 static const struct ata_port_operations sata_fsl_ops = {
+	.inherits = &sata_port_ops,
+
 	.check_status = sata_fsl_check_status,
 	.check_altstatus = sata_fsl_check_status,
-	.dev_select = ata_noop_dev_select,
 
 	.tf_read = sata_fsl_tf_read,
 
-	.qc_defer = ata_std_qc_defer,
 	.qc_prep = sata_fsl_qc_prep,
 	.qc_issue = sata_fsl_qc_issue,
-	.irq_clear = ata_noop_irq_clear,
 
 	.scr_read = sata_fsl_scr_read,
 	.scr_write = sata_fsl_scr_write,
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index ea7e2b1..f94181d 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -120,21 +120,8 @@ static int inic_slave_config(struct scsi_device *sdev)
 }
 
 static struct scsi_host_template inic_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
+	ATA_BMDMA_SHT(DRV_NAME),
 	.slave_configure	= inic_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
 static const int scr_map[] = {
@@ -547,26 +534,13 @@ static int inic_port_start(struct ata_port *ap)
 }
 
 static struct ata_port_operations inic_port_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.scr_read		= inic_scr_read,
-	.scr_write		= inic_scr_write,
+	.inherits		= &ata_sff_port_ops,
 
 	.bmdma_setup		= inic_bmdma_setup,
 	.bmdma_start		= inic_bmdma_start,
 	.bmdma_stop		= inic_bmdma_stop,
 	.bmdma_status		= inic_bmdma_status,
-
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.qc_prep	 	= ata_qc_prep,
 	.qc_issue		= inic_qc_issue,
-	.data_xfer		= ata_data_xfer,
 
 	.freeze			= inic_freeze,
 	.thaw			= inic_thaw,
@@ -574,8 +548,10 @@ static struct ata_port_operations inic_port_ops = {
 	.post_internal_cmd	= inic_post_internal_cmd,
 	.dev_config		= inic_dev_config,
 
-	.port_resume		= inic_port_resume,
+	.scr_read		= inic_scr_read,
+	.scr_write		= inic_scr_write,
 
+	.port_resume		= inic_port_resume,
 	.port_start		= inic_port_start,
 };
 
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 939bf1d..c365650 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -452,61 +452,28 @@ static void mv_channel_reset(struct mv_host_priv *hpriv, void __iomem *mmio,
 			     unsigned int port_no);
 
 static struct scsi_host_template mv5_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= MV_MAX_SG_CT / 2,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= 1,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= MV_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
 static struct scsi_host_template mv6_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= MV_MAX_SG_CT / 2,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= 1,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= MV_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
-static const struct ata_port_operations mv5_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.cable_detect		= ata_cable_sata,
+static struct ata_port_operations mv5_ops = {
+	.inherits		= &ata_sff_port_ops,
 
 	.qc_prep		= mv_qc_prep,
 	.qc_issue		= mv_qc_issue,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
 
-	.error_handler		= mv_error_handler,
-	.post_internal_cmd	= mv_post_int_cmd,
+	.cable_detect		= ata_cable_sata,
 	.freeze			= mv_eh_freeze,
 	.thaw			= mv_eh_thaw,
+	.error_handler		= mv_error_handler,
+	.post_internal_cmd	= mv_post_int_cmd,
 
 	.scr_read		= mv5_scr_read,
 	.scr_write		= mv5_scr_write,
@@ -515,60 +482,15 @@ static const struct ata_port_operations mv5_ops = {
 	.port_stop		= mv_port_stop,
 };
 
-static const struct ata_port_operations mv6_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.cable_detect		= ata_cable_sata,
-
-	.qc_prep		= mv_qc_prep,
-	.qc_issue		= mv_qc_issue,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.error_handler		= mv_error_handler,
-	.post_internal_cmd	= mv_post_int_cmd,
-	.freeze			= mv_eh_freeze,
-	.thaw			= mv_eh_thaw,
-
+static struct ata_port_operations mv6_ops = {
+	.inherits		= &mv5_ops,
 	.scr_read		= mv_scr_read,
 	.scr_write		= mv_scr_write,
-
-	.port_start		= mv_port_start,
-	.port_stop		= mv_port_stop,
 };
 
-static const struct ata_port_operations mv_iie_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.cable_detect		= ata_cable_sata,
-
+static struct ata_port_operations mv_iie_ops = {
+	.inherits		= &mv6_ops,
 	.qc_prep		= mv_qc_prep_iie,
-	.qc_issue		= mv_qc_issue,
-	.data_xfer		= ata_data_xfer,
-
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.error_handler		= mv_error_handler,
-	.post_internal_cmd	= mv_post_int_cmd,
-	.freeze			= mv_eh_freeze,
-	.thaw			= mv_eh_thaw,
-
-	.scr_read		= mv_scr_read,
-	.scr_write		= mv_scr_write,
-
-	.port_start		= mv_port_start,
-	.port_stop		= mv_port_stop,
 };
 
 static const struct ata_port_info mv_port_info[] = {
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 8eb588e..434aee5 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -384,161 +384,60 @@ static struct pci_driver nv_pci_driver = {
 };
 
 static struct scsi_host_template nv_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 static struct scsi_host_template nv_adma_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.change_queue_depth	= ata_scsi_change_queue_depth,
+	ATA_NCQ_SHT(DRV_NAME),
 	.can_queue		= NV_ADMA_MAX_CPBS,
-	.this_id		= ATA_SHT_THIS_ID,
 	.sg_tablesize		= NV_ADMA_SGTBL_TOTAL_LEN,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= NV_ADMA_DMA_BOUNDARY,
 	.slave_configure	= nv_adma_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
 static struct scsi_host_template nv_swncq_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.change_queue_depth	= ata_scsi_change_queue_depth,
+	ATA_NCQ_SHT(DRV_NAME),
 	.can_queue		= ATA_MAX_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
 	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
 	.slave_configure	= nv_swncq_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
-static const struct ata_port_operations nv_generic_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.exec_command		= ata_exec_command,
-	.check_status		= ata_check_status,
-	.dev_select		= ata_std_dev_select,
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.mode_filter		= ata_pci_default_filter,
-	.freeze			= ata_bmdma_freeze,
-	.thaw			= ata_bmdma_thaw,
+static struct ata_port_operations nv_generic_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.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,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations nv_nf2_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.exec_command		= ata_exec_command,
-	.check_status		= ata_check_status,
-	.dev_select		= ata_std_dev_select,
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.mode_filter		= ata_pci_default_filter,
+static struct ata_port_operations nv_nf2_ops = {
+	.inherits		= &nv_generic_ops,
 	.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,
-	.scr_read		= nv_scr_read,
-	.scr_write		= nv_scr_write,
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations nv_ck804_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.exec_command		= ata_exec_command,
-	.check_status		= ata_check_status,
-	.dev_select		= ata_std_dev_select,
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.mode_filter		= ata_pci_default_filter,
+static struct ata_port_operations nv_ck804_ops = {
+	.inherits		= &nv_generic_ops,
 	.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,
-	.scr_read		= nv_scr_read,
-	.scr_write		= nv_scr_write,
-	.port_start		= ata_sff_port_start,
 	.host_stop		= nv_ck804_host_stop,
 };
 
-static const struct ata_port_operations nv_adma_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= nv_adma_tf_read,
+static struct ata_port_operations nv_adma_ops = {
+	.inherits		= &nv_generic_ops,
+
 	.check_atapi_dma	= nv_adma_check_atapi_dma,
-	.exec_command		= ata_exec_command,
-	.check_status		= ata_check_status,
-	.dev_select		= ata_std_dev_select,
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
+	.tf_read		= nv_adma_tf_read,
 	.qc_defer		= ata_std_qc_defer,
 	.qc_prep		= nv_adma_qc_prep,
 	.qc_issue		= nv_adma_qc_issue,
-	.mode_filter		= ata_pci_default_filter,
+	.irq_clear		= nv_adma_irq_clear,
+
 	.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,
-	.scr_read		= nv_scr_read,
-	.scr_write		= nv_scr_write,
+
 	.port_start		= nv_adma_port_start,
 	.port_stop		= nv_adma_port_stop,
 #ifdef CONFIG_PM
@@ -548,29 +447,17 @@ static const struct ata_port_operations nv_adma_ops = {
 	.host_stop		= nv_adma_host_stop,
 };
 
-static const struct ata_port_operations nv_swncq_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.exec_command		= ata_exec_command,
-	.check_status		= ata_check_status,
-	.dev_select		= ata_std_dev_select,
-	.bmdma_setup		= ata_bmdma_setup,
-	.bmdma_start		= ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
+static struct ata_port_operations nv_swncq_ops = {
+	.inherits		= &nv_generic_ops,
+
 	.qc_defer		= ata_std_qc_defer,
 	.qc_prep		= nv_swncq_qc_prep,
 	.qc_issue		= nv_swncq_qc_issue,
-	.mode_filter		= ata_pci_default_filter,
+
 	.freeze			= nv_mcp55_freeze,
 	.thaw			= nv_mcp55_thaw,
 	.error_handler		= nv_swncq_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,
-	.scr_read		= nv_scr_read,
-	.scr_write		= nv_scr_write,
+
 #ifdef CONFIG_PM
 	.port_suspend		= nv_swncq_port_suspend,
 	.port_resume		= nv_swncq_port_resume,
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index a07d319..71fddef 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -153,91 +153,45 @@ static int pdc_pata_cable_detect(struct ata_port *ap);
 static int pdc_sata_cable_detect(struct ata_port *ap);
 
 static struct scsi_host_template pdc_ata_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= PDC_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
-static const struct ata_port_operations pdc_sata_ops = {
+static const struct ata_port_operations pdc_common_ops = {
+	.inherits		= &ata_sff_port_ops,
+
 	.tf_load		= pdc_tf_load_mmio,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
 	.exec_command		= pdc_exec_command_mmio,
-	.dev_select		= ata_std_dev_select,
 	.check_atapi_dma	= pdc_check_atapi_dma,
-
 	.qc_prep		= pdc_qc_prep,
 	.qc_issue		= pdc_qc_issue_prot,
+	.irq_clear		= pdc_irq_clear,
+
 	.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,
+};
 
+static struct ata_port_operations pdc_sata_ops = {
+	.inherits		= &pdc_common_ops,
+	.cable_detect		= pdc_sata_cable_detect,
+	.error_handler		= pdc_sata_error_handler,
 	.scr_read		= pdc_sata_scr_read,
 	.scr_write		= pdc_sata_scr_write,
 	.port_start		= pdc_sata_port_start,
 };
 
 /* First-generation chips need a more restrictive ->check_atapi_dma op */
-static const struct ata_port_operations pdc_old_sata_ops = {
-	.tf_load		= pdc_tf_load_mmio,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= pdc_exec_command_mmio,
-	.dev_select		= ata_std_dev_select,
+static struct ata_port_operations pdc_old_sata_ops = {
+	.inherits		= &pdc_sata_ops,
 	.check_atapi_dma	= pdc_old_sata_check_atapi_dma,
-
-	.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,
-
-	.scr_read		= pdc_sata_scr_read,
-	.scr_write		= pdc_sata_scr_write,
-	.port_start		= pdc_sata_port_start,
 };
 
-static const struct ata_port_operations pdc_pata_ops = {
-	.tf_load		= pdc_tf_load_mmio,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= pdc_exec_command_mmio,
-	.dev_select		= ata_std_dev_select,
-	.check_atapi_dma	= pdc_check_atapi_dma,
-
-	.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,
+static struct ata_port_operations pdc_pata_ops = {
+	.inherits		= &pdc_common_ops,
 	.cable_detect		= pdc_pata_cable_detect,
-	.data_xfer		= ata_data_xfer,
-	.irq_clear		= pdc_irq_clear,
-	.irq_on			= ata_irq_on,
-
+	.error_handler		= pdc_pata_error_handler,
 	.port_start		= pdc_common_port_start,
 };
 
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index 3c8e97f..107ef09 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -126,44 +126,30 @@ static void qs_thaw(struct ata_port *ap);
 static void qs_error_handler(struct ata_port *ap);
 
 static struct scsi_host_template qs_ata_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= QS_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ENABLE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= QS_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
-static const struct ata_port_operations qs_ata_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
+static struct ata_port_operations qs_ata_ops = {
+	.inherits		= &ata_sff_port_ops,
+
 	.check_atapi_dma	= qs_check_atapi_dma,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
+	.bmdma_stop		= qs_bmdma_stop,
+	.bmdma_status		= qs_bmdma_status,
 	.qc_prep		= qs_qc_prep,
 	.qc_issue		= qs_qc_issue,
-	.data_xfer		= ata_data_xfer,
+
 	.freeze			= qs_freeze,
 	.thaw			= qs_thaw,
 	.error_handler		= qs_error_handler,
-	.irq_clear		= ata_noop_irq_clear,
-	.irq_on			= ata_irq_on,
+	.post_internal_cmd	= ATA_OP_NULL,
+
 	.scr_read		= qs_scr_read,
 	.scr_write		= qs_scr_write,
+
 	.port_start		= qs_port_start,
 	.host_stop		= qs_host_stop,
-	.bmdma_stop		= qs_bmdma_stop,
-	.bmdma_status		= qs_bmdma_status,
 };
 
 static const struct ata_port_info qs_port_info[] = {
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 53f0bae..eac7ca7 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -167,48 +167,17 @@ static struct pci_driver sil_pci_driver = {
 };
 
 static struct scsi_host_template sil_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations sil_ops = {
+static struct ata_port_operations sil_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.dev_config		= sil_dev_config,
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
 	.set_mode		= sil_set_mode,
-	.mode_filter		= ata_pci_default_filter,
-	.bmdma_setup            = ata_bmdma_setup,
-	.bmdma_start            = ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.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,
 	.scr_read		= sil_scr_read,
 	.scr_write		= sil_scr_write,
-	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info sil_port_info[] = {
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 5e57f78..d90d328 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -384,52 +384,34 @@ static struct pci_driver sil24_pci_driver = {
 };
 
 static struct scsi_host_template sil24_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.change_queue_depth	= ata_scsi_change_queue_depth,
+	ATA_NCQ_SHT(DRV_NAME),
 	.can_queue		= SIL24_MAX_CMDS,
-	.this_id		= ATA_SHT_THIS_ID,
 	.sg_tablesize		= SIL24_MAX_SGE,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
-static const struct ata_port_operations sil24_ops = {
-	.dev_config		= sil24_dev_config,
+static struct ata_port_operations sil24_ops = {
+	.inherits		= &sata_pmp_port_ops,
 
 	.check_status		= sil24_check_status,
 	.check_altstatus	= sil24_check_status,
-	.dev_select		= ata_noop_dev_select,
-
 	.tf_read		= sil24_tf_read,
-
 	.qc_defer		= sil24_qc_defer,
 	.qc_prep		= sil24_qc_prep,
 	.qc_issue		= sil24_qc_issue,
 
-	.irq_clear		= ata_noop_irq_clear,
+	.freeze			= sil24_freeze,
+	.thaw			= sil24_thaw,
+	.error_handler		= sil24_error_handler,
+	.post_internal_cmd	= sil24_post_internal_cmd,
+	.dev_config		= sil24_dev_config,
 
 	.scr_read		= sil24_scr_read,
 	.scr_write		= sil24_scr_write,
-
 	.pmp_attach		= sil24_pmp_attach,
 	.pmp_detach		= sil24_pmp_detach,
 
-	.freeze			= sil24_freeze,
-	.thaw			= sil24_thaw,
-	.error_handler		= sil24_error_handler,
-	.post_internal_cmd	= sil24_post_internal_cmd,
-
 	.port_start		= sil24_port_start,
-
 #ifdef CONFIG_PM
 	.port_resume		= sil24_port_resume,
 #endif
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index a8adef9..9089c7a 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -86,46 +86,13 @@ static struct pci_driver sis_pci_driver = {
 };
 
 static struct scsi_host_template sis_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations sis_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-	.bmdma_setup            = ata_bmdma_setup,
-	.bmdma_start            = ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-	.mode_filter		= ata_pci_default_filter,
-	.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,
-	.irq_on			= ata_irq_on,
+static struct ata_port_operations sis_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.scr_read		= sis_scr_read,
 	.scr_write		= sis_scr_write,
-	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info sis_port_info = {
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 302854c..26e624a 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -307,51 +307,23 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
 
 
 static struct scsi_host_template k2_sata_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
+	ATA_BMDMA_SHT(DRV_NAME),
 #ifdef CONFIG_PPC_OF
 	.proc_info		= k2_sata_proc_info,
 #endif
-	.bios_param		= ata_std_bios_param,
 };
 
 
-static const struct ata_port_operations k2_sata_ops = {
+static struct ata_port_operations k2_sata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.tf_load		= k2_sata_tf_load,
 	.tf_read		= k2_sata_tf_read,
 	.check_status		= k2_stat_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
 	.check_atapi_dma	= k2_sata_check_atapi_dma,
 	.bmdma_setup		= k2_bmdma_setup_mmio,
 	.bmdma_start		= k2_bmdma_start_mmio,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-	.mode_filter		= ata_pci_default_filter,
-	.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,
-	.irq_on			= ata_irq_on,
 	.scr_read		= k2_sata_scr_read,
 	.scr_write		= k2_sata_scr_write,
-	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info k2_port_info[] = {
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
index e3d56bc..8138cda 100644
--- a/drivers/ata/sata_sx4.c
+++ b/drivers/ata/sata_sx4.c
@@ -236,24 +236,13 @@ static unsigned int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc);
 
 
 static struct scsi_host_template pdc_sata_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
 };
 
-static const struct ata_port_operations pdc_20621_ops = {
+/* TODO: inherit from base port_ops after converting to new EH */
+static struct ata_port_operations pdc_20621_ops = {
 	.tf_load		= pdc_tf_load_mmio,
 	.tf_read		= ata_tf_read,
 	.check_status		= ata_check_status,
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c
index f7fc045..6ecd13f 100644
--- a/drivers/ata/sata_uli.c
+++ b/drivers/ata/sata_uli.c
@@ -76,51 +76,13 @@ static struct pci_driver uli_pci_driver = {
 };
 
 static struct scsi_host_template uli_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations uli_ops = {
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup            = ata_bmdma_setup,
-	.bmdma_start            = ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
-	.mode_filter		= ata_pci_default_filter,
-	.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,
-	.irq_on			= ata_irq_on,
-
+static struct ata_port_operations uli_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.scr_read		= uli_scr_read,
 	.scr_write		= uli_scr_write,
-
-	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info uli_port_info = {
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 8d64a3d..8b7d78b 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -102,114 +102,26 @@ static struct pci_driver svia_pci_driver = {
 };
 
 static struct scsi_host_template svia_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
-static const struct ata_port_operations vt6420_sata_ops = {
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup            = ata_bmdma_setup,
-	.bmdma_start            = ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-
+static struct ata_port_operations vt6420_sata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.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,
-
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations vt6421_pata_ops = {
+static struct ata_port_operations vt6421_pata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
+	.cable_detect		= vt6421_pata_cable_detect,
 	.set_piomode		= vt6421_set_pio_mode,
 	.set_dmamode		= vt6421_set_dma_mode,
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup            = ata_bmdma_setup,
-	.bmdma_start            = ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-
-	.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,
-	.cable_detect		= vt6421_pata_cable_detect,
-
-	.irq_clear		= ata_bmdma_irq_clear,
-	.irq_on			= ata_irq_on,
-
-	.port_start		= ata_sff_port_start,
 };
 
-static const struct ata_port_operations vt6421_sata_ops = {
-	.mode_filter		= ata_pci_default_filter,
-
-	.tf_load		= ata_tf_load,
-	.tf_read		= ata_tf_read,
-	.check_status		= ata_check_status,
-	.exec_command		= ata_exec_command,
-	.dev_select		= ata_std_dev_select,
-
-	.bmdma_setup            = ata_bmdma_setup,
-	.bmdma_start            = ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-
-	.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,
-	.irq_on			= ata_irq_on,
-
+static struct ata_port_operations vt6421_sata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.scr_read		= svia_scr_read,
 	.scr_write		= svia_scr_write,
-
-	.port_start		= ata_sff_port_start,
 };
 
 static const struct ata_port_info vt6420_port_info = {
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index 099a2ba..8045a72 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -300,47 +300,18 @@ out:
 
 
 static struct scsi_host_template vsc_sata_sht = {
-	.module			= THIS_MODULE,
-	.name			= DRV_NAME,
-	.ioctl			= ata_scsi_ioctl,
-	.queuecommand		= ata_scsi_queuecmd,
-	.can_queue		= ATA_DEF_QUEUE,
-	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= LIBATA_MAX_PRD,
-	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
-	.emulated		= ATA_SHT_EMULATED,
-	.use_clustering		= ATA_SHT_USE_CLUSTERING,
-	.proc_name		= DRV_NAME,
-	.dma_boundary		= ATA_DMA_BOUNDARY,
-	.slave_configure	= ata_scsi_slave_config,
-	.slave_destroy		= ata_scsi_slave_destroy,
-	.bios_param		= ata_std_bios_param,
+	ATA_BMDMA_SHT(DRV_NAME),
 };
 
 
-static const struct ata_port_operations vsc_sata_ops = {
+static struct ata_port_operations vsc_sata_ops = {
+	.inherits		= &ata_bmdma_port_ops,
 	.tf_load		= vsc_sata_tf_load,
 	.tf_read		= vsc_sata_tf_read,
-	.exec_command		= ata_exec_command,
-	.check_status		= ata_check_status,
-	.dev_select		= ata_std_dev_select,
-	.bmdma_setup            = ata_bmdma_setup,
-	.bmdma_start            = ata_bmdma_start,
-	.bmdma_stop		= ata_bmdma_stop,
-	.bmdma_status		= ata_bmdma_status,
-	.qc_prep		= ata_qc_prep,
-	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_data_xfer,
-	.mode_filter		= ata_pci_default_filter,
 	.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,
 	.scr_read		= vsc_sata_scr_read,
 	.scr_write		= vsc_sata_scr_write,
-	.port_start		= ata_sff_port_start,
 };
 
 static void __devinit vsc_sata_setup_port(struct ata_ioports *port,
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b6f06a2..27ceed7 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -432,7 +432,7 @@ struct ata_host {
 	void __iomem * const	*iomap;
 	unsigned int		n_ports;
 	void			*private_data;
-	const struct ata_port_operations *ops;
+	struct ata_port_operations *ops;
 	unsigned long		flags;
 #ifdef CONFIG_ATA_ACPI
 	acpi_handle		acpi_handle;
@@ -607,7 +607,7 @@ struct ata_link {
 
 struct ata_port {
 	struct Scsi_Host	*scsi_host; /* our co-allocated scsi host */
-	const struct ata_port_operations *ops;
+	struct ata_port_operations *ops;
 	spinlock_t		*lock;
 	unsigned long		flags;	/* ATA_FLAG_xxx */
 	unsigned int		pflags; /* ATA_PFLAG_xxx */
@@ -672,6 +672,13 @@ struct ata_port {
 	u8			sector_buf[ATA_SECT_SIZE]; /* owned by EH */
 };
 
+/* The following initializer overrides a method to NULL whether one of
+ * its parent has the method defined or not.  This is equivalent to
+ * ERR_PTR(-ENOENT).  Unfortunately, ERR_PTR doesn't render a constant
+ * expression and thus can't be used as an initializer.
+ */
+#define ATA_OP_NULL		(void *)(unsigned long)(-ENOENT)
+
 struct ata_port_operations {
 	/*
 	 * Command execution
@@ -741,6 +748,12 @@ struct ata_port_operations {
 	void (*phy_reset)(struct ata_port *ap);
 	void (*eng_timeout)(struct ata_port *ap);
 	irq_handler_t irq_handler;
+
+	/*
+	 * ->inherits must be the last field and all the preceding
+	 * fields must be pointers.
+	 */
+	const struct ata_port_operations	*inherits;
 };
 
 struct ata_port_info {
@@ -750,7 +763,7 @@ struct ata_port_info {
 	unsigned long		pio_mask;
 	unsigned long		mwdma_mask;
 	unsigned long		udma_mask;
-	const struct ata_port_operations *port_ops;
+	struct ata_port_operations *port_ops;
 	irq_handler_t		irq_handler;
 	void 			*private_data;
 };
@@ -773,7 +786,7 @@ extern const unsigned long sata_deb_timing_normal[];
 extern const unsigned long sata_deb_timing_hotplug[];
 extern const unsigned long sata_deb_timing_long[];
 
-extern const struct ata_port_operations ata_dummy_port_ops;
+extern struct ata_port_operations ata_dummy_port_ops;
 extern const struct ata_port_info ata_dummy_port_info;
 
 static inline const unsigned long *
@@ -820,7 +833,7 @@ extern int ata_host_activate(struct ata_host *host, int irq,
 			     struct scsi_host_template *sht);
 extern void ata_host_detach(struct ata_host *host);
 extern void ata_host_init(struct ata_host *, struct device *,
-			  unsigned long, const struct ata_port_operations *);
+			  unsigned long, struct ata_port_operations *);
 extern int ata_scsi_detect(struct scsi_host_template *sht);
 extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
 extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
@@ -1078,6 +1091,63 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
 		      ata_postreset_fn_t postreset);
 
 /*
+ * Base operations to inherit from and initializers for sht
+ *
+ * Operations
+ *
+ * base  : Common to all libata drivers.
+ * sata  : SATA controllers w/ native interface.
+ * pmp   : SATA controllers w/ PMP support.
+ * sff   : SFF ATA controllers w/o BMDMA support.
+ * bmdma : SFF ATA controllers w/ BMDMA support.
+ *
+ * sht initializers
+ *
+ * BASE  : Common to all libata drivers.  The user must set
+ *	   sg_tablesize and dma_boundary.
+ * PIO   : SFF ATA controllers w/ only PIO support.
+ * BMDMA : SFF ATA controllers w/ BMDMA support.  sg_tablesize and
+ *	   dma_boundary are set to BMDMA limits.
+ * NCQ   : SATA controllers supporting NCQ.  The user must set
+ *	   sg_tablesize, dma_boundary and can_queue.
+ */
+extern const struct ata_port_operations ata_base_port_ops;
+extern const struct ata_port_operations sata_port_ops;
+extern const struct ata_port_operations sata_pmp_port_ops;
+extern const struct ata_port_operations ata_sff_port_ops;
+extern const struct ata_port_operations ata_bmdma_port_ops;
+
+#define ATA_BASE_SHT(drv_name)					\
+	.module			= THIS_MODULE,			\
+	.name			= drv_name,			\
+	.ioctl			= ata_scsi_ioctl,		\
+	.queuecommand		= ata_scsi_queuecmd,		\
+	.can_queue		= ATA_DEF_QUEUE,		\
+	.this_id		= ATA_SHT_THIS_ID,		\
+	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,		\
+	.emulated		= ATA_SHT_EMULATED,		\
+	.use_clustering		= ATA_SHT_USE_CLUSTERING,	\
+	.proc_name		= drv_name,			\
+	.slave_configure	= ata_scsi_slave_config,	\
+	.slave_destroy		= ata_scsi_slave_destroy,	\
+	.bios_param		= ata_std_bios_param
+
+/* PIO only, sg_tablesize and dma_boundary limits can be removed */
+#define ATA_PIO_SHT(drv_name)					\
+	ATA_BASE_SHT(drv_name),					\
+	.sg_tablesize		= LIBATA_MAX_PRD,		\
+	.dma_boundary		= ATA_DMA_BOUNDARY
+
+#define ATA_BMDMA_SHT(drv_name)					\
+	ATA_BASE_SHT(drv_name),					\
+	.sg_tablesize		= LIBATA_MAX_PRD,		\
+	.dma_boundary		= ATA_DMA_BOUNDARY
+
+#define ATA_NCQ_SHT(drv_name)					\
+	ATA_BASE_SHT(drv_name),					\
+	.change_queue_depth	= ata_scsi_change_queue_depth
+
+/*
  * printk helpers
  */
 #define ata_port_printk(ap, lv, fmt, args...) \
-- 
1.5.2.4


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

* [PATCH 6/9] make ata_pci_init_one() not use ops->irq_handler and pi->sht
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (4 preceding siblings ...)
  2008-01-30  9:28 ` [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance Tejun Heo
@ 2008-01-30  9:29 ` Tejun Heo
  2008-01-30  9:29 ` [PATCH 7/9] libata: stop overloading port_info->private_data Tejun Heo
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:29 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

ata_pci_init_one() is the only function which uses ops->irq_handler
and pi->sht.  Other initialization functions take the same information
as arguments.  This causes confusion and duplicate unused entries in
structures.

Make ata_pci_init_one() take sht as an argument and use ata_interrupt
implicitly.  All current users use ata_interrupt and if different irq
handler is necessary open coding ata_pci_init_one() using
ata_prepare_sff_host() and ata_activate_sff_host can be done under ten
lines including error handling and driver which requires custom
interrupt handler is likely to require custom initialization anyway.

As ata_pci_init_one() was the last user of ops->irq_handler, this
patch also kills the field.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/ata_generic.c       |    3 +--
 drivers/ata/libata-core.c       |    1 -
 drivers/ata/libata-sff.c        |    7 ++++---
 drivers/ata/pata_acpi.c         |    3 +--
 drivers/ata/pata_ali.c          |    9 +--------
 drivers/ata/pata_amd.c          |   12 +-----------
 drivers/ata/pata_artop.c        |    6 +-----
 drivers/ata/pata_atiixp.c       |    3 +--
 drivers/ata/pata_cmd640.c       |    3 +--
 drivers/ata/pata_cmd64x.c       |    8 +-------
 drivers/ata/pata_cs5530.c       |    4 +---
 drivers/ata/pata_cs5535.c       |    3 +--
 drivers/ata/pata_cs5536.c       |    3 +--
 drivers/ata/pata_cypress.c      |    3 +--
 drivers/ata/pata_efar.c         |    3 +--
 drivers/ata/pata_hpt366.c       |    3 +--
 drivers/ata/pata_hpt37x.c       |    8 +-------
 drivers/ata/pata_hpt3x2n.c      |    3 +--
 drivers/ata/pata_it8213.c       |    3 +--
 drivers/ata/pata_it821x.c       |    4 +---
 drivers/ata/pata_jmicron.c      |    3 +--
 drivers/ata/pata_marvell.c      |    4 +---
 drivers/ata/pata_netcell.c      |    3 +--
 drivers/ata/pata_ns87410.c      |    3 +--
 drivers/ata/pata_ns87415.c      |    4 +---
 drivers/ata/pata_oldpiix.c      |    3 +--
 drivers/ata/pata_opti.c         |    3 +--
 drivers/ata/pata_optidma.c      |    4 +---
 drivers/ata/pata_pdc202xx_old.c |    5 +----
 drivers/ata/pata_radisys.c      |    3 +--
 drivers/ata/pata_rz1000.c       |    3 +--
 drivers/ata/pata_sc1200.c       |    3 +--
 drivers/ata/pata_serverworks.c  |    6 +-----
 drivers/ata/pata_sil680.c       |    4 +---
 drivers/ata/pata_sis.c          |   10 +---------
 drivers/ata/pata_sl82c105.c     |    4 +---
 drivers/ata/pata_triflex.c      |    3 +--
 drivers/ata/pata_via.c          |    8 +-------
 include/linux/libata.h          |    4 ++--
 39 files changed, 42 insertions(+), 130 deletions(-)

diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 0b5b515..a912ee0 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -120,7 +120,6 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
 {
 	u16 command;
 	static const struct ata_port_info info = {
-		.sht = &generic_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -153,7 +152,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
 	if (dev->vendor == PCI_VENDOR_ID_AL)
 	    	ata_pci_clear_simplex(dev);
 
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &generic_sht);
 }
 
 static struct pci_device_id ata_generic[] = {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 0a55405..65d082c 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -109,7 +109,6 @@ const struct ata_port_operations ata_sff_port_ops = {
 	.irq_on			= ata_irq_on,
 
 	.port_start		= ata_sff_port_start,
-	.irq_handler		= ata_interrupt,
 };
 
 const struct ata_port_operations ata_bmdma_port_ops = {
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 34cdab0..24f6dc5 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -818,6 +818,7 @@ int ata_pci_activate_sff_host(struct ata_host *host,
  *	ata_pci_init_one - Initialize/register PCI IDE host controller
  *	@pdev: Controller to be initialized
  *	@ppi: array of port_info, must be enough for two ports
+ *	@sht: scsi_host_template to use when registering the host
  *
  *	This is a helper function which can be called from a driver's
  *	xxx_init_one() probe function if the hardware uses traditional
@@ -838,7 +839,8 @@ int ata_pci_activate_sff_host(struct ata_host *host,
  *	Zero on success, negative on errno-based value on error.
  */
 int ata_pci_init_one(struct pci_dev *pdev,
-		     const struct ata_port_info * const * ppi)
+		     const struct ata_port_info * const * ppi,
+		     struct scsi_host_template *sht)
 {
 	struct device *dev = &pdev->dev;
 	const struct ata_port_info *pi = NULL;
@@ -874,8 +876,7 @@ int ata_pci_init_one(struct pci_dev *pdev,
 		goto out;
 
 	pci_set_master(pdev);
-	rc = ata_pci_activate_sff_host(host, pi->port_ops->irq_handler,
-				       pi->sht);
+	rc = ata_pci_activate_sff_host(host, ata_interrupt, sht);
  out:
 	if (rc == 0)
 		devres_remove_group(&pdev->dev, NULL);
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index 2810488..d55778a 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -264,7 +264,6 @@ static struct ata_port_operations pacpi_ops = {
 static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht		= &pacpi_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
 
 		.pio_mask	= 0x1f,
@@ -274,7 +273,7 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 		.port_ops	= &pacpi_ops,
 	};
 	const struct ata_port_info *ppi[] = { &info, NULL };
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &pacpi_sht);
 }
 
 static const struct pci_device_id pacpi_pci_tbl[] = {
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index ad9dce9..d29578b 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -423,14 +423,12 @@ static void ali_init_chipset(struct pci_dev *pdev)
 static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info_early = {
-		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.port_ops = &ali_early_port_ops
 	};
 	/* Revision 0x20 added DMA */
 	static const struct ata_port_info info_20 = {
-		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -438,7 +436,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* Revision 0x20 with support logic added UDMA */
 	static const struct ata_port_info info_20_udma = {
-		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -447,7 +444,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* Revision 0xC2 adds UDMA66 */
 	static const struct ata_port_info info_c2 = {
-		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -456,7 +452,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* Revision 0xC3 is UDMA66 for now */
 	static const struct ata_port_info info_c3 = {
-		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -465,7 +460,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* Revision 0xC4 is UDMA100 */
 	static const struct ata_port_info info_c4 = {
-		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -474,7 +468,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* Revision 0xC5 is UDMA133 with LBA48 DMA */
 	static const struct ata_port_info info_c5 = {
-		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -519,7 +512,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	        	ppi[0] = &info_20_udma;
 		pci_dev_put(isa_bridge);
 	}
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &ali_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 0f317e0..9ce6cd9 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -414,7 +414,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info[10] = {
 		{	/* 0: AMD 7401 */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,	/* No SWDMA */
@@ -422,7 +421,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &amd33_port_ops
 		},
 		{	/* 1: Early AMD7409 - no swdma */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -430,7 +428,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &amd66_port_ops
 		},
 		{	/* 2: AMD 7409, no swdma errata */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -438,7 +435,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &amd66_port_ops
 		},
 		{	/* 3: AMD 7411 */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -446,7 +442,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &amd100_port_ops
 		},
 		{	/* 4: AMD 7441 */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -454,7 +449,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &amd100_port_ops
 		},
 		{	/* 5: AMD 8111*/
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -462,7 +456,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &amd133_port_ops
 		},
 		{	/* 6: AMD 8111 UDMA 100 (Serenade) */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -470,7 +463,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &amd133_port_ops
 		},
 		{	/* 7: Nvidia Nforce */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -478,7 +470,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &nv100_port_ops
 		},
 		{	/* 8: Nvidia Nforce2 and later */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -486,7 +477,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &nv133_port_ops
 		},
 		{	/* 9: AMD CS5536 (Geode companion) */
-			.sht = &amd_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -545,7 +535,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	}
 
 	/* And fire it up */
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &amd_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 0101e5a..698a53c 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -352,7 +352,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static int printed_version;
 	static const struct ata_port_info info_6210 = {
-		.sht		= &artop_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
@@ -360,7 +359,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 		.port_ops	= &artop6210_ops,
 	};
 	static const struct ata_port_info info_626x = {
-		.sht		= &artop_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
@@ -368,7 +366,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 		.port_ops	= &artop6260_ops,
 	};
 	static const struct ata_port_info info_628x = {
-		.sht		= &artop_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
@@ -376,7 +373,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 		.port_ops	= &artop6260_ops,
 	};
 	static const struct ata_port_info info_628x_fast = {
-		.sht		= &artop_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
@@ -434,7 +430,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 
 	BUG_ON(ppi[0] == NULL);
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &artop_sht);
 }
 
 static const struct pci_device_id artop_pci_tbl[] = {
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 5bc2040..a098f69 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -239,7 +239,6 @@ static struct ata_port_operations atiixp_port_ops = {
 static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &atiixp_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x06,	/* No MWDMA0 support */
@@ -247,7 +246,7 @@ static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		.port_ops = &atiixp_port_ops
 	};
 	const struct ata_port_info *ppi[] = { &info, NULL };
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &atiixp_sht);
 }
 
 static const struct pci_device_id atiixp[] = {
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index 061c891..efd2bb5 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -211,7 +211,6 @@ static void cmd640_hardware_init(struct pci_dev *pdev)
 static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &cmd640_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.port_ops = &cmd640_port_ops
@@ -225,7 +224,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	cmd640_hardware_init(pdev);
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &cmd640_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 1ac8ecf..bfd72ef 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -298,21 +298,18 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	static const struct ata_port_info cmd_info[6] = {
 		{	/* CMD 643 - no UDMA */
-			.sht = &cmd64x_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
 			.port_ops = &cmd64x_port_ops
 		},
 		{	/* CMD 646 with broken UDMA */
-			.sht = &cmd64x_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
 			.port_ops = &cmd64x_port_ops
 		},
 		{	/* CMD 646 with working UDMA */
-			.sht = &cmd64x_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -320,14 +317,12 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &cmd64x_port_ops
 		},
 		{	/* CMD 646 rev 1  */
-			.sht = &cmd64x_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
 			.port_ops = &cmd646r1_port_ops
 		},
 		{	/* CMD 648 */
-			.sht = &cmd64x_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -335,7 +330,6 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &cmd648_port_ops
 		},
 		{	/* CMD 649 */
-			.sht = &cmd64x_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -379,7 +373,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	pci_write_config_byte(pdev, UDIDETCR0, 0xF0);
 #endif
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &cmd64x_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index e4a16a5..c632ce4 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -298,7 +298,6 @@ fail_put:
 static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &cs5530_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -307,7 +306,6 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* The docking connector doesn't do UDMA, and it seems not MWDMA */
 	static const struct ata_port_info info_palmax_secondary = {
-		.sht = &cs5530_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.port_ops = &cs5530_port_ops
@@ -327,7 +325,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		ppi[1] = &info_palmax_secondary;
 
 	/* Now kick off ATA set up */
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &cs5530_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c
index f910a8a..d78cf95 100644
--- a/drivers/ata/pata_cs5535.c
+++ b/drivers/ata/pata_cs5535.c
@@ -181,7 +181,6 @@ static struct ata_port_operations cs5535_port_ops = {
 static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &cs5535_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -200,7 +199,7 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	rdmsr(ATAC_CH0D1_PIO, timings, dummy);
 	if (CS5535_BAD_PIO(timings))
 		wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0);
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &cs5535_sht);
 }
 
 static const struct pci_device_id cs5535[] = {
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 69d63aa..12a1f68 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -241,7 +241,6 @@ static struct ata_port_operations cs5536_port_ops = {
 static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &cs5536_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -262,7 +261,7 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		return -ENODEV;
 	}
 
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &cs5536_sht);
 }
 
 static const struct pci_device_id cs5536[] = {
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c
index c459553..cbd6670 100644
--- a/drivers/ata/pata_cypress.c
+++ b/drivers/ata/pata_cypress.c
@@ -123,7 +123,6 @@ static struct ata_port_operations cy82c693_port_ops = {
 static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &cy82c693_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -137,7 +136,7 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i
 	if (PCI_FUNC(pdev->devfn) != 1)
 		return -ENODEV;
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &cy82c693_sht);
 }
 
 static const struct pci_device_id cy82c693[] = {
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index a6129bd..029d57a 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -263,7 +263,6 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	static int printed_version;
 	static const struct ata_port_info info = {
-		.sht		= &efar_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma1-2 */
@@ -276,7 +275,7 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 		dev_printk(KERN_DEBUG, &pdev->dev,
 			   "version " DRV_VERSION "\n");
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &efar_sht);
 }
 
 static const struct pci_device_id efar_pci_tbl[] = {
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 9fa47d4..512cba5 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -350,7 +350,6 @@ static void hpt36x_init_chipset(struct pci_dev *dev)
 static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info_hpt366 = {
-		.sht = &hpt36x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -394,7 +393,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 			break;
 	}
 	/* Now kick off ATA set up */
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &hpt36x_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index a9d10c6..97fc5dc 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -783,7 +783,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	/* HPT370 - UDMA100 */
 	static const struct ata_port_info info_hpt370 = {
-		.sht = &hpt37x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -792,7 +791,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	/* HPT370A - UDMA100 */
 	static const struct ata_port_info info_hpt370a = {
-		.sht = &hpt37x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -801,7 +799,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	/* HPT370 - UDMA100 */
 	static const struct ata_port_info info_hpt370_33 = {
-		.sht = &hpt37x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -810,7 +807,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	/* HPT370A - UDMA100 */
 	static const struct ata_port_info info_hpt370a_33 = {
-		.sht = &hpt37x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -819,7 +815,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	/* HPT371, 372 and friends - UDMA133 */
 	static const struct ata_port_info info_hpt372 = {
-		.sht = &hpt37x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -828,7 +823,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	/* HPT374 - UDMA100 */
 	static const struct ata_port_info info_hpt374 = {
-		.sht = &hpt37x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -1051,7 +1045,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	port_info = *port;
 	port_info.private_data = private_data;
 
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &hpt37x_sht);
 }
 
 static const struct pci_device_id hpt37x[] = {
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index b77b127..2c178c3 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -452,7 +452,6 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	/* HPT372N and friends - UDMA133 */
 	static const struct ata_port_info info = {
-		.sht = &hpt3x2n_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -568,7 +567,7 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	}
 
 	/* Now kick off ATA set up */
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &hpt3x2n_sht);
 }
 
 static const struct pci_device_id hpt3x2n[] = {
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index 50977b7..42e1b5a 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -274,7 +274,6 @@ static int it8213_init_one (struct pci_dev *pdev, const struct pci_device_id *en
 {
 	static int printed_version;
 	static const struct ata_port_info info = {
-		.sht		= &it8213_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
@@ -288,7 +287,7 @@ static int it8213_init_one (struct pci_dev *pdev, const struct pci_device_id *en
 		dev_printk(KERN_DEBUG, &pdev->dev,
 			   "version " DRV_VERSION "\n");
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &it8213_sht);
 }
 
 static const struct pci_device_id it8213_pci_tbl[] = {
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index f7ac52e..1a8bec8 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -687,14 +687,12 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	u8 conf;
 
 	static const struct ata_port_info info_smart = {
-		.sht = &it821x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
 		.port_ops = &it821x_smart_port_ops
 	};
 	static const struct ata_port_info info_passthru = {
-		.sht = &it821x_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -724,7 +722,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	else
 		ppi[0] = &info_smart;
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &it821x_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index dbfb368..d76620e 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -147,7 +147,6 @@ static struct ata_port_operations jmicron_ops = {
 static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht		= &jmicron_sht,
 		.flags	= ATA_FLAG_SLAVE_POSS,
 
 		.pio_mask	= 0x1f,
@@ -158,7 +157,7 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
 	};
 	const struct ata_port_info *ppi[] = { &info, NULL };
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &jmicron_sht);
 }
 
 static const struct pci_device_id jmicron_pci_tbl[] = {
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index bbc9985..4f3b4dc 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -119,7 +119,6 @@ static struct ata_port_operations marvell_ops = {
 static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht		= &marvell_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 
 		.pio_mask	= 0x1f,
@@ -129,7 +128,6 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
 		.port_ops	= &marvell_ops,
 	};
 	static const struct ata_port_info info_sata = {
-		.sht		= &marvell_sht,
 		/* Slave possible as its magically mapped not real */
 		.flags		= ATA_FLAG_SLAVE_POSS,
 
@@ -144,7 +142,7 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
 	if (pdev->device == 0x6101)
 		ppi[1] = &ata_dummy_port_info;
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &marvell_sht);
 }
 
 static const struct pci_device_id marvell_pci_tbl[] = {
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c
index 65389d1..ae50a5e 100644
--- a/drivers/ata/pata_netcell.c
+++ b/drivers/ata/pata_netcell.c
@@ -48,7 +48,6 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 {
 	static int printed_version;
 	static const struct ata_port_info info = {
-		.sht		= &netcell_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		/* Actually we don't really care about these as the
 		   firmware deals with it */
@@ -72,7 +71,7 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 	ata_pci_clear_simplex(pdev);
 
 	/* And let the library code do the work */
-	return ata_pci_init_one(pdev, port_info);
+	return ata_pci_init_one(pdev, port_info, &netcell_sht);
 }
 
 static const struct pci_device_id netcell_pci_tbl[] = {
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
index 5b1982f..1bdca8f 100644
--- a/drivers/ata/pata_ns87410.c
+++ b/drivers/ata/pata_ns87410.c
@@ -158,13 +158,12 @@ static struct ata_port_operations ns87410_port_ops = {
 static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &ns87410_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x0F,
 		.port_ops = &ns87410_port_ops
 	};
 	const struct ata_port_info *ppi[] = { &info, NULL };
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &ns87410_sht);
 }
 
 static const struct pci_device_id ns87410[] = {
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c
index 38d86a2..4250894 100644
--- a/drivers/ata/pata_ns87415.c
+++ b/drivers/ata/pata_ns87415.c
@@ -345,7 +345,6 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 {
 	static int printed_version;
 	static const struct ata_port_info info = {
-		.sht		= &ns87415_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
@@ -355,7 +354,6 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 	int rc;
 #if defined(CONFIG_SUPERIO)
 	static const struct ata_port_info info87560 = {
-		.sht		= &ns87415_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
@@ -377,7 +375,7 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 	pci_write_config_byte(pdev, 0x55, 0xEE);
 	/* Select PIO0 8bit clocking */
 	pci_write_config_byte(pdev, 0x54, 0xB7);
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &ns87415_sht);
 }
 
 static const struct pci_device_id ns87415_pci_tbl[] = {
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
index f6062b3..9e3afad 100644
--- a/drivers/ata/pata_oldpiix.c
+++ b/drivers/ata/pata_oldpiix.c
@@ -252,7 +252,6 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 {
 	static int printed_version;
 	static const struct ata_port_info info = {
-		.sht		= &oldpiix_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma1-2 */
@@ -264,7 +263,7 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 		dev_printk(KERN_DEBUG, &pdev->dev,
 			   "version " DRV_VERSION "\n");
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &oldpiix_sht);
 }
 
 static const struct pci_device_id oldpiix_pci_tbl[] = {
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
index 3787d39..3286783 100644
--- a/drivers/ata/pata_opti.c
+++ b/drivers/ata/pata_opti.c
@@ -178,7 +178,6 @@ static struct ata_port_operations opti_port_ops = {
 static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &opti_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.port_ops = &opti_port_ops
@@ -189,7 +188,7 @@ static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n");
 
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &opti_sht);
 }
 
 static const struct pci_device_id opti[] = {
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index eb4b081..c376f9e 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -414,14 +414,12 @@ done_nomsg:		/* Wrong chip revision */
 static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info_82c700 = {
-		.sht = &optidma_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
 		.port_ops = &optidma_port_ops
 	};
 	static const struct ata_port_info info_82c700_udma = {
-		.sht = &optidma_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -447,7 +445,7 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	if (optiplus_with_udma(dev))
 		ppi[0] = &info_82c700_udma;
 
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &optidma_sht);
 }
 
 static const struct pci_device_id optidma[] = {
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 4daac20..5545fba 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -290,7 +290,6 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
 {
 	static const struct ata_port_info info[3] = {
 		{
-			.sht = &pdc202xx_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -298,7 +297,6 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
 			.port_ops = &pdc2024x_port_ops
 		},
 		{
-			.sht = &pdc202xx_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -306,7 +304,6 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
 			.port_ops = &pdc2026x_port_ops
 		},
 		{
-			.sht = &pdc202xx_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -327,7 +324,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
 				return -ENODEV;
 		}
 	}
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &pdc202xx_sht);
 }
 
 static const struct pci_device_id pdc202xx[] = {
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c
index 94e60b3..145d5ba 100644
--- a/drivers/ata/pata_radisys.c
+++ b/drivers/ata/pata_radisys.c
@@ -216,7 +216,6 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 {
 	static int printed_version;
 	static const struct ata_port_info info = {
-		.sht		= &radisys_sht,
 		.flags		= ATA_FLAG_SLAVE_POSS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma1-2 */
@@ -229,7 +228,7 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *e
 		dev_printk(KERN_DEBUG, &pdev->dev,
 			   "version " DRV_VERSION "\n");
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &radisys_sht);
 }
 
 static const struct pci_device_id radisys_pci_tbl[] = {
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
index f9d40be..cf7764d 100644
--- a/drivers/ata/pata_rz1000.c
+++ b/drivers/ata/pata_rz1000.c
@@ -89,7 +89,6 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
 {
 	static int printed_version;
 	static const struct ata_port_info info = {
-		.sht = &rz1000_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.port_ops = &rz1000_port_ops
@@ -100,7 +99,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
 		printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
 
 	if (rz1000_fifo_disable(pdev) == 0)
-		return ata_pci_init_one(pdev, ppi);
+		return ata_pci_init_one(pdev, ppi, &rz1000_sht);
 
 	printk(KERN_ERR DRV_NAME ": failed to disable read-ahead on chipset..\n");
 	/* Not safe to use so skip */
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
index 362b7f8..38c7fb0 100644
--- a/drivers/ata/pata_sc1200.c
+++ b/drivers/ata/pata_sc1200.c
@@ -204,7 +204,6 @@ static struct ata_port_operations sc1200_port_ops = {
 static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &sc1200_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -214,7 +213,7 @@ static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	/* Can't enable port 2 yet, see top comments */
 	const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info };
 
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &sc1200_sht);
 }
 
 static const struct pci_device_id sc1200[] = {
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index a5ce863..78b1a46 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -399,28 +399,24 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
 {
 	static const struct ata_port_info info[4] = {
 		{ /* OSB4 */
-			.sht = &serverworks_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
 			.udma_mask = 0x07,
 			.port_ops = &serverworks_osb4_port_ops
 		}, { /* OSB4 no UDMA */
-			.sht = &serverworks_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
 			.udma_mask = 0x00,
 			.port_ops = &serverworks_osb4_port_ops
 		}, { /* CSB5 */
-			.sht = &serverworks_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
 			.udma_mask = ATA_UDMA4,
 			.port_ops = &serverworks_csb_port_ops
 		}, { /* CSB5 - later revisions*/
-			.sht = &serverworks_sht,
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = 0x1f,
 			.mwdma_mask = 0x07,
@@ -465,7 +461,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
 	if (pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE)
 		ata_pci_clear_simplex(pdev);
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &serverworks_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index bc3253d..1b39646 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -278,7 +278,6 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
 				     const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &sil680_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -286,7 +285,6 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
 		.port_ops = &sil680_port_ops
 	};
 	static const struct ata_port_info info_slow = {
-		.sht = &sil680_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -360,7 +358,7 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
 				 &sil680_sht);
 
 use_ioports:
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &sil680_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index f155a55..1d8cf11 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -565,7 +565,6 @@ static struct ata_port_operations sis_old_ops = {
 };
 
 static const struct ata_port_info sis_info = {
-	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.mwdma_mask	= 0x07,
@@ -573,7 +572,6 @@ static const struct ata_port_info sis_info = {
 	.port_ops	= &sis_old_ops,
 };
 static const struct ata_port_info sis_info33 = {
-	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.mwdma_mask	= 0x07,
@@ -581,42 +579,36 @@ static const struct ata_port_info sis_info33 = {
 	.port_ops	= &sis_old_ops,
 };
 static const struct ata_port_info sis_info66 = {
-	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA4,	/* UDMA 66 */
 	.port_ops	= &sis_66_ops,
 };
 static const struct ata_port_info sis_info100 = {
-	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA5,
 	.port_ops	= &sis_100_ops,
 };
 static const struct ata_port_info sis_info100_early = {
-	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS,
 	.udma_mask	= ATA_UDMA5,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.port_ops	= &sis_66_ops,
 };
 static const struct ata_port_info sis_info133 = {
-	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA6,
 	.port_ops	= &sis_133_ops,
 };
 const struct ata_port_info sis_info133_for_sata = {
-	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA6,
 	.port_ops	= &sis_133_for_sata_ops,
 };
 static const struct ata_port_info sis_info133_early = {
-	.sht		= &sis_sht,
 	.flags		= ATA_FLAG_SLAVE_POSS,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA6,
@@ -844,7 +836,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	sis_fixup(pdev, chipset);
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &sis_sht);
 }
 
 static const struct pci_device_id sis_pci_tbl[] = {
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 04fd30b..9c1de56 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -260,14 +260,12 @@ static int sl82c105_bridge_revision(struct pci_dev *pdev)
 static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info_dma = {
-		.sht = &sl82c105_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
 		.port_ops = &sl82c105_port_ops
 	};
 	static const struct ata_port_info info_early = {
-		.sht = &sl82c105_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.port_ops = &sl82c105_port_ops
@@ -296,7 +294,7 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
 	val |= CTRL_P0EN | CTRL_P0F16 | CTRL_P1F16;
 	pci_write_config_dword(dev, 0x40, val);
 
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &sl82c105_sht);
 }
 
 static const struct pci_device_id sl82c105[] = {
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
index bc4956e..86dc66c 100644
--- a/drivers/ata/pata_triflex.c
+++ b/drivers/ata/pata_triflex.c
@@ -195,7 +195,6 @@ static struct ata_port_operations triflex_port_ops = {
 static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	static const struct ata_port_info info = {
-		.sht = &triflex_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -207,7 +206,7 @@ static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n");
 
-	return ata_pci_init_one(dev, ppi);
+	return ata_pci_init_one(dev, ppi, &triflex_sht);
 }
 
 static const struct pci_device_id triflex[] = {
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index c941d5a..affb665 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -394,7 +394,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	/* Early VIA without UDMA support */
 	static const struct ata_port_info via_mwdma_info = {
-		.sht = &via_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -402,7 +401,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* Ditto with IRQ masking required */
 	static const struct ata_port_info via_mwdma_info_borked = {
-		.sht = &via_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -410,7 +408,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* VIA UDMA 33 devices (and borked 66) */
 	static const struct ata_port_info via_udma33_info = {
-		.sht = &via_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -419,7 +416,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* VIA UDMA 66 devices */
 	static const struct ata_port_info via_udma66_info = {
-		.sht = &via_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -428,7 +424,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* VIA UDMA 100 devices */
 	static const struct ata_port_info via_udma100_info = {
-		.sht = &via_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -437,7 +432,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	/* UDMA133 with bad AST (All current 133) */
 	static const struct ata_port_info via_udma133_info = {
-		.sht = &via_sht,
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
@@ -528,7 +522,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	/* We have established the device type, now fire it up */
 	type.private_data = (void *)config;
 
-	return ata_pci_init_one(pdev, ppi);
+	return ata_pci_init_one(pdev, ppi, &via_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 27ceed7..42d31cd 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -747,7 +747,6 @@ struct ata_port_operations {
 	 */
 	void (*phy_reset)(struct ata_port *ap);
 	void (*eng_timeout)(struct ata_port *ap);
-	irq_handler_t irq_handler;
 
 	/*
 	 * ->inherits must be the last field and all the preceding
@@ -1027,7 +1026,8 @@ static inline int ata_acpi_cbl_80wire(struct ata_port *ap,
 struct pci_dev;
 
 extern int ata_pci_init_one(struct pci_dev *pdev,
-			     const struct ata_port_info * const * ppi);
+			    const struct ata_port_info * const * ppi,
+			    struct scsi_host_template *sht);
 extern void ata_pci_remove_one(struct pci_dev *pdev);
 #ifdef CONFIG_PM
 extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg);
-- 
1.5.2.4


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

* [PATCH 7/9] libata: stop overloading port_info->private_data
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (5 preceding siblings ...)
  2008-01-30  9:29 ` [PATCH 6/9] make ata_pci_init_one() not use ops->irq_handler and pi->sht Tejun Heo
@ 2008-01-30  9:29 ` Tejun Heo
  2008-02-04 14:26   ` Alan Cox
  2008-01-30  9:29 ` [PATCH 8/9] libata: kill port_info->sht and ->irq_handler Tejun Heo
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:29 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

port_info->private_data is currently used for two purposes - to record
private data about the port_info or to specify host->private_data to
use when allocating ata_host.

This overloading is confusing and counter-intuitive in that
port_info->private_data becomes host->private_data instead of
port->private_data.  In addition, port_info and host don't correspond
to each other 1-to-1.  Currently, the first non-NULL
port_info->private_data is used.

This patch makes port_info->private_data just be what it is -
private_data for the port_info where LLD can jot down extra info.
libata no longer sets host->private_data to the first non-NULL
port_info->private_data.  host->private_data now should be set
directly after allocating/prepping ata_host just as ap->private_data
is set.

This means that ata_pci_init_one() can't be used for drivers which
require host->private_data.  The conversion is cheap.  This patch
converts all six low level drivers which need such conversion and the
number of added lines is only around 20.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/libata-core.c  |    2 --
 drivers/ata/pata_amd.c     |   17 +++++++++++------
 drivers/ata/pata_hpt366.c  |   18 +++++++++++-------
 drivers/ata/pata_hpt37x.c  |   40 +++++++++++++++++++++-------------------
 drivers/ata/pata_hpt3x2n.c |   14 +++++++++-----
 drivers/ata/pata_sis.c     |   24 ++++++++++++++----------
 drivers/ata/pata_via.c     |   24 ++++++++++++++----------
 7 files changed, 80 insertions(+), 59 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 65d082c..a791525 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6907,8 +6907,6 @@ struct ata_host *ata_host_alloc_pinfo(struct device *dev,
 
 		if (!host->ops && (pi->port_ops != &ata_dummy_port_ops))
 			host->ops = pi->port_ops;
-		if (!host->private_data && pi->private_data)
-			host->private_data = pi->private_data;
 	}
 
 	return host;
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 9ce6cd9..461c8f6 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -484,10 +484,10 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.port_ops = &amd100_port_ops
 		}
 	};
-	struct ata_port_info pi;
-	const struct ata_port_info *ppi[] = { &pi, NULL };
+	const struct ata_port_info *ppi[] = { NULL, NULL };
 	static int printed_version;
 	int type = id->driver_data;
+	struct ata_host *host;
 	u8 fifo;
 	int rc;
 
@@ -510,9 +510,13 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = 6;	/* UDMA 100 only */
 
 	/*
-	 * Okay, type is determined now.  Apply type-specific workarounds.
+	 * Okay, type is determined now.  Prepare host and apply
+	 * type-specific workarounds.
 	 */
-	pi = info[type];
+	*ppi = &info[type];
+	rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
+	if (rc)
+		return rc;
 
 	if (type < 3)
 		ata_pci_clear_simplex(pdev);
@@ -531,11 +535,12 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		u32 udma;
 
 		pci_read_config_dword(pdev, 0x60, &udma);
-		pi.private_data = (void *)(unsigned long)udma;
+		host->private_data = (void *)(unsigned long)udma;
 	}
 
 	/* And fire it up */
-	return ata_pci_init_one(pdev, ppi, &amd_sht);
+	pci_set_master(pdev);
+	return ata_pci_activate_sff_host(host, ata_interrupt, &amd_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 512cba5..5534060 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -356,9 +356,8 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		.udma_mask = ATA_UDMA4,
 		.port_ops = &hpt366_port_ops
 	};
-	struct ata_port_info info = info_hpt366;
-	const struct ata_port_info *ppi[] = { &info, NULL };
-
+	const struct ata_port_info *ppi[] = { &info_hpt366, NULL };
+	struct ata_host *host;
 	u32 class_rev;
 	u32 reg1;
 	int rc;
@@ -367,6 +366,10 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	if (rc)
 		return rc;
 
+	rc = ata_pci_prepare_sff_host(dev, ppi, &host);
+	if (rc)
+		return rc;
+
 	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
 	class_rev &= 0xFF;
 
@@ -383,17 +386,18 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	/* info_hpt366 is safe against re-entry so we can scribble on it */
 	switch((reg1 & 0x700) >> 8) {
 		case 5:
-			info.private_data = &hpt366_40;
+			host->private_data = &hpt366_40;
 			break;
 		case 9:
-			info.private_data = &hpt366_25;
+			host->private_data = &hpt366_25;
 			break;
 		default:
-			info.private_data = &hpt366_33;
+			host->private_data = &hpt366_33;
 			break;
 	}
 	/* Now kick off ATA set up */
-	return ata_pci_init_one(dev, ppi, &hpt36x_sht);
+	pci_set_master(dev);
+	return ata_pci_activate_sff_host(host, ata_interrupt, &hpt36x_sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 97fc5dc..16ec8f4 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -831,10 +831,9 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 
 	static const int MHz[4] = { 33, 40, 50, 66 };
-	const struct ata_port_info *port;
+	const struct ata_port_info *ppi[] = { NULL, NULL };
 	void *private_data = NULL;
-	struct ata_port_info port_info;
-	const struct ata_port_info *ppi[] = { &port_info, NULL };
+	struct ata_host *host;
 
 	u8 irqmask;
 	u32 class_rev;
@@ -866,17 +865,17 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 
 		switch(class_rev) {
 			case 3:
-				port = &info_hpt370;
+				*ppi = &info_hpt370;
 				chip_table = &hpt370;
 				prefer_dpll = 0;
 				break;
 			case 4:
-				port = &info_hpt370a;
+				*ppi = &info_hpt370a;
 				chip_table = &hpt370a;
 				prefer_dpll = 0;
 				break;
 			case 5:
-				port = &info_hpt372;
+				*ppi = &info_hpt372;
 				chip_table = &hpt372;
 				break;
 			default:
@@ -889,21 +888,21 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 				/* 372N if rev >= 2*/
 				if (class_rev >= 2)
 					return -ENODEV;
-				port = &info_hpt372;
+				*ppi = &info_hpt372;
 				chip_table = &hpt372a;
 				break;
 			case PCI_DEVICE_ID_TTI_HPT302:
 				/* 302N if rev > 1 */
 				if (class_rev > 1)
 					return -ENODEV;
-				port = &info_hpt372;
+				*ppi = &info_hpt372;
 				/* Check this */
 				chip_table = &hpt302;
 				break;
 			case PCI_DEVICE_ID_TTI_HPT371:
 				if (class_rev > 1)
 					return -ENODEV;
-				port = &info_hpt372;
+				*ppi = &info_hpt372;
 				chip_table = &hpt371;
 				/* Single channel device, master is not present
 				   but the BIOS (or us for non x86) must mark it
@@ -914,7 +913,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 				break;
 			case PCI_DEVICE_ID_TTI_HPT374:
 				chip_table = &hpt374;
-				port = &info_hpt374;
+				*ppi = &info_hpt374;
 				break;
 			default:
 				printk(KERN_ERR "pata_hpt37x: PCI table is bogus please report (%d).\n", dev->device);
@@ -993,7 +992,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		int dpll, adjust;
 
 		/* Compute DPLL */
-		dpll = (port->udma_mask & 0xC0) ? 3 : 2;
+		dpll = ((*ppi)->udma_mask & 0xC0) ? 3 : 2;
 
 		f_low = (MHz[clock_slot] * 48) / MHz[dpll];
 		f_high = f_low + 2;
@@ -1033,19 +1032,22 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		 *	about lack of UDMA133 support on lower clocks
  		 */
 
-		if (clock_slot < 2 && port == &info_hpt370)
-			port = &info_hpt370_33;
-		if (clock_slot < 2 && port == &info_hpt370a)
-			port = &info_hpt370a_33;
+		if (clock_slot < 2 && *ppi == &info_hpt370)
+			*ppi = &info_hpt370_33;
+		if (clock_slot < 2 && *ppi == &info_hpt370a)
+			*ppi = &info_hpt370a_33;
 		printk(KERN_INFO "pata_hpt37x: %s using %dMHz bus clock.\n",
 		       chip_table->name, MHz[clock_slot]);
 	}
 
-	/* Now kick off ATA set up */
-	port_info = *port;
-	port_info.private_data = private_data;
+	/* prepare host and kick off */
+	rc = ata_pci_prepare_sff_host(dev, ppi, &host);
+	if (rc)
+		return rc;
+	host->private_data = private_data;
 
-	return ata_pci_init_one(dev, ppi, &hpt37x_sht);
+	pci_set_master(dev);
+	return ata_pci_activate_sff_host(host, ata_interrupt, &hpt37x_sht);
 }
 
 static const struct pci_device_id hpt37x[] = {
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index 2c178c3..616f7a5 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -458,8 +458,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		.udma_mask = ATA_UDMA6,
 		.port_ops = &hpt3x2n_port_ops
 	};
-	struct ata_port_info port = info;
-	const struct ata_port_info *ppi[] = { &port, NULL };
+	const struct ata_port_info *ppi[] = { &info, NULL };
+	struct ata_host *host;
 
 	u8 irqmask;
 	u32 class_rev;
@@ -474,6 +474,10 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	if (rc)
 		return rc;
 
+	rc = ata_pci_prepare_sff_host(dev, ppi, &host);
+	if (rc)
+		return rc;
+
 	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
 	class_rev &= 0xFF;
 
@@ -554,9 +558,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	       pci_mhz);
 	/* Set our private data up. We only need a few flags so we use
 	   it directly */
-	port.private_data = NULL;
 	if (pci_mhz > 60) {
-		port.private_data = (void *)PCI66;
+		host->private_data = (void *)PCI66;
 		/*
 		 * On  HPT371N, if ATA clock is 66 MHz we must set bit 2 in
 		 * the MISC. register to stretch the UltraDMA Tss timing.
@@ -567,7 +570,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	}
 
 	/* Now kick off ATA set up */
-	return ata_pci_init_one(dev, ppi, &hpt3x2n_sht);
+	pci_set_master(dev);
+	return ata_pci_activate_sff_host(host, ata_interrupt, &hpt3x2n_sht);
 }
 
 static const struct pci_device_id hpt3x2n[] = {
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 1d8cf11..45c689c 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -690,11 +690,11 @@ static void sis_fixup(struct pci_dev *pdev, struct sis_chipset *sis)
 static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	static int printed_version;
-	struct ata_port_info port;
-	const struct ata_port_info *ppi[] = { &port, NULL };
-	struct pci_dev *host = NULL;
+	const struct ata_port_info *ppi[] = { NULL, NULL };
+	struct pci_dev *bridge = NULL;
 	struct sis_chipset *chipset = NULL;
 	struct sis_chipset *sets;
+	struct ata_host *host;
 	int rc;
 
 	static struct sis_chipset sis_chipsets[] = {
@@ -754,11 +754,11 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	/* We have to find the bridge first */
 	for (sets = &sis_chipsets[0]; sets->device; sets++) {
-		host = pci_get_device(PCI_VENDOR_ID_SI, sets->device, NULL);
-		if (host != NULL) {
+		bridge = pci_get_device(PCI_VENDOR_ID_SI, sets->device, NULL);
+		if (bridge != NULL) {
 			chipset = sets;			/* Match found */
 			if (sets->device == 0x630) {	/* SIS630 */
-				if (host->revision >= 0x30)	/* 630 ET */
+				if (bridge->revision >= 0x30)	/* 630 ET */
 					chipset = &sis100_early;
 			}
 			break;
@@ -825,18 +825,22 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 			break;
 		}
 	}
-	pci_dev_put(host);
+	pci_dev_put(bridge);
 
 	/* No chipset info, no support */
 	if (chipset == NULL)
 		return -ENODEV;
 
-	port = *chipset->info;
-	port.private_data = chipset;
+	*ppi = chipset->info;
+	rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
+	if (rc)
+		return rc;
+	host->private_data = chipset;
 
 	sis_fixup(pdev, chipset);
 
-	return ata_pci_init_one(pdev, ppi, &sis_sht);
+	pci_set_master(pdev);
+	return ata_pci_activate_sff_host(host, ata_interrupt, &sis_sht);
 }
 
 static const struct pci_device_id sis_pci_tbl[] = {
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index affb665..3ccee4f 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -438,10 +438,10 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		.udma_mask = ATA_UDMA6,	/* FIXME: should check north bridge */
 		.port_ops = &via_port_ops
 	};
-	struct ata_port_info type;
-	const struct ata_port_info *ppi[] = { &type, NULL };
+	const struct ata_port_info *ppi[] = { NULL, NULL };
 	struct pci_dev *isa = NULL;
 	const struct via_isa_bridge *config;
+	struct ata_host *host;
 	static int printed_version;
 	u8 enable;
 	u32 timing;
@@ -487,25 +487,25 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	switch(config->flags & VIA_UDMA) {
 		case VIA_UDMA_NONE:
 			if (config->flags & VIA_NO_UNMASK)
-				type = via_mwdma_info_borked;
+				*ppi = &via_mwdma_info_borked;
 			else
-				type = via_mwdma_info;
+				*ppi = &via_mwdma_info;
 			break;
 		case VIA_UDMA_33:
-			type = via_udma33_info;
+			*ppi = &via_udma33_info;
 			break;
 		case VIA_UDMA_66:
-			type = via_udma66_info;
+			*ppi = &via_udma66_info;
 			/* The 66 MHz devices require we enable the clock */
 			pci_read_config_dword(pdev, 0x50, &timing);
 			timing |= 0x80008;
 			pci_write_config_dword(pdev, 0x50, timing);
 			break;
 		case VIA_UDMA_100:
-			type = via_udma100_info;
+			*ppi = &via_udma100_info;
 			break;
 		case VIA_UDMA_133:
-			type = via_udma133_info;
+			*ppi = &via_udma133_info;
 			break;
 		default:
 			WARN_ON(1);
@@ -520,9 +520,13 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	}
 
 	/* We have established the device type, now fire it up */
-	type.private_data = (void *)config;
+	rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
+	if (rc)
+		return rc;
+	host->private_data = (void *)config;
 
-	return ata_pci_init_one(pdev, ppi, &via_sht);
+	pci_set_master(pdev);
+	return ata_pci_activate_sff_host(host, ata_interrupt, &via_sht);
 }
 
 #ifdef CONFIG_PM
-- 
1.5.2.4


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

* [PATCH 8/9] libata: kill port_info->sht and ->irq_handler
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (6 preceding siblings ...)
  2008-01-30  9:29 ` [PATCH 7/9] libata: stop overloading port_info->private_data Tejun Heo
@ 2008-01-30  9:29 ` Tejun Heo
  2008-01-30  9:29 ` [PATCH 9/9] libata: make reset related methods proper port operations Tejun Heo
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:29 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

libata core layer doesn't care about sht or ->irq_handler.  Those are
only of interest to the LLD during initialization.  This is confusing
and has caused several drivers to have duplicate unused initializers
for these fields.

Currently only sata_nv uses these fields.  Make sata_nv use
->private_data, which is supposed to carry LLD-specific information,
instead and kill ->sht and ->irq_handler.  nv_pi_priv structure is
defined and struct literals are used to initialize private_data.
Notational overhead is negligible.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/sata_nv.c  |   29 +++++++++++++++++------------
 include/linux/libata.h |    2 --
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 434aee5..065b43f 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -465,58 +465,61 @@ static struct ata_port_operations nv_swncq_ops = {
 	.port_start		= nv_swncq_port_start,
 };
 
+struct nv_pi_priv {
+	irq_handler_t			irq_handler;
+	struct scsi_host_template	*sht;
+};
+
+#define NV_PI_PRIV(_irq_handler, _sht) \
+	&(struct nv_pi_priv){ .irq_handler = _irq_handler, .sht = _sht }
+
 static const struct ata_port_info nv_port_info[] = {
 	/* generic */
 	{
-		.sht		= &nv_sht,
 		.flags		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
 		.pio_mask	= NV_PIO_MASK,
 		.mwdma_mask	= NV_MWDMA_MASK,
 		.udma_mask	= NV_UDMA_MASK,
 		.port_ops	= &nv_generic_ops,
-		.irq_handler	= nv_generic_interrupt,
+		.private_data	= NV_PI_PRIV(nv_generic_interrupt, &nv_sht),
 	},
 	/* nforce2/3 */
 	{
-		.sht		= &nv_sht,
 		.flags		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
 		.pio_mask	= NV_PIO_MASK,
 		.mwdma_mask	= NV_MWDMA_MASK,
 		.udma_mask	= NV_UDMA_MASK,
 		.port_ops	= &nv_nf2_ops,
-		.irq_handler	= nv_nf2_interrupt,
+		.private_data	= NV_PI_PRIV(nv_nf2_interrupt, &nv_sht),
 	},
 	/* ck804 */
 	{
-		.sht		= &nv_sht,
 		.flags		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
 		.pio_mask	= NV_PIO_MASK,
 		.mwdma_mask	= NV_MWDMA_MASK,
 		.udma_mask	= NV_UDMA_MASK,
 		.port_ops	= &nv_ck804_ops,
-		.irq_handler	= nv_ck804_interrupt,
+		.private_data	= NV_PI_PRIV(nv_ck804_interrupt, &nv_sht),
 	},
 	/* ADMA */
 	{
-		.sht		= &nv_adma_sht,
 		.flags		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
 				  ATA_FLAG_MMIO | ATA_FLAG_NCQ,
 		.pio_mask	= NV_PIO_MASK,
 		.mwdma_mask	= NV_MWDMA_MASK,
 		.udma_mask	= NV_UDMA_MASK,
 		.port_ops	= &nv_adma_ops,
-		.irq_handler	= nv_adma_interrupt,
+		.private_data	= NV_PI_PRIV(nv_adma_interrupt, &nv_adma_sht),
 	},
 	/* SWNCQ */
 	{
-		.sht		= &nv_swncq_sht,
 		.flags	        = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
 				  ATA_FLAG_NCQ,
 		.pio_mask	= NV_PIO_MASK,
 		.mwdma_mask	= NV_MWDMA_MASK,
 		.udma_mask	= NV_UDMA_MASK,
 		.port_ops	= &nv_swncq_ops,
-		.irq_handler	= nv_swncq_interrupt,
+		.private_data	= NV_PI_PRIV(nv_swncq_interrupt, &nv_swncq_sht),
 	},
 };
 
@@ -2252,6 +2255,7 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	static int printed_version;
 	const struct ata_port_info *ppi[] = { NULL, NULL };
+	struct nv_pi_priv *ipriv;
 	struct ata_host *host;
 	struct nv_host_priv *hpriv;
 	int rc;
@@ -2288,6 +2292,7 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	}
 
 	ppi[0] = &nv_port_info[type];
+	ipriv = ppi[0]->private_data;
 	rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
 	if (rc)
 		return rc;
@@ -2332,8 +2337,8 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		nv_swncq_host_init(host);
 
 	pci_set_master(pdev);
-	return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler,
-				 IRQF_SHARED, ppi[0]->sht);
+	return ata_host_activate(host, pdev->irq, ipriv->irq_handler,
+				 IRQF_SHARED, ipriv->sht);
 }
 
 #ifdef CONFIG_PM
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 42d31cd..00991f2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -756,14 +756,12 @@ struct ata_port_operations {
 };
 
 struct ata_port_info {
-	struct scsi_host_template	*sht;
 	unsigned long		flags;
 	unsigned long		link_flags;
 	unsigned long		pio_mask;
 	unsigned long		mwdma_mask;
 	unsigned long		udma_mask;
 	struct ata_port_operations *port_ops;
-	irq_handler_t		irq_handler;
 	void 			*private_data;
 };
 
-- 
1.5.2.4


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

* [PATCH 9/9] libata: make reset related methods proper port operations
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (7 preceding siblings ...)
  2008-01-30  9:29 ` [PATCH 8/9] libata: kill port_info->sht and ->irq_handler Tejun Heo
@ 2008-01-30  9:29 ` Tejun Heo
  2008-02-01 20:52   ` Jeff Garzik
  2008-01-30  9:49 ` How to verify sht-ops-conversion patch doesn't change anything Tejun Heo
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:29 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo
  Cc: Tejun Heo

Currently reset methods are not specified directly in the
ata_port_operations table.  If a LLD wants to use custom reset
methods, it should construct and use a error_handler which uses those
reset methods.  It's done this way for two reasons.

First, the ops table already contained too many methods and adding
four more of them would noticeably increase the amount of necessary
boilerplate code all over low level drivers.

Second, as ->error_handler uses those reset methods, it can get
confusing.  ie. By overriding ->error_handler, those reset ops can be
made useless making layering a bit hazy.

Now that ops table uses inheritance, the first problem doesn't exist
anymore.  The second isn't completely solved but is relieved by
providing default values - most drivers can just override what it has
implemented and don't have to concern itself about higher level
callbacks.  In fact, there currently is no driver which actually
modifies error handling behavior.  Drivers which override
->error_handler just wraps the standard error handler only to prepare
the controller for EH.  I don't think making ops layering strict has
any noticeable benefit.

This patch makes ->prereset, ->softreset, ->hardreset, ->postreset and
their PMP counterparts propoer ops.  Default ops are provided in the
base ops tables and drivers are converted to override individual reset
methods instead of creating custom error_handler.

* ata_std_error_handler() doesn't use sata_std_hardreset() if SCRs
  aren't accessible.  sata_promise doesn't need to use separate
  error_handlers for PATA and SATA anymore.

* softreset is broken for sata_inic162x and sata_sx4.  As libata now
  always prefers hardreset, this doesn't really matter but the ops are
  forced to NULL using ATA_OP_NULL for documentation purpose.

* pata_hpt374 needs to use different prereset for the first and second
  PCI functions.  This used to be done by branching from
  hpt374_error_handler().  The proper way to do this is to use
  separate ops and port_info tables for each function.  Converted.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/ahci.c          |   53 ++++++++++++------------------------
 drivers/ata/ata_piix.c      |   21 +++-----------
 drivers/ata/libata-core.c   |   15 ++++++++--
 drivers/ata/libata-eh.c     |   25 ++++++++++-------
 drivers/ata/libata-pmp.c    |   47 ++++++++-------------------------
 drivers/ata/libata-sff.c    |   38 +++------------------------
 drivers/ata/pata_acpi.c     |   16 +----------
 drivers/ata/pata_amd.c      |   18 +-----------
 drivers/ata/pata_artop.c    |   34 +----------------------
 drivers/ata/pata_atiixp.c   |    7 +----
 drivers/ata/pata_bf54x.c    |   14 +--------
 drivers/ata/pata_efar.c     |   15 +----------
 drivers/ata/pata_hpt37x.c   |   61 ++++++++++++++-----------------------------
 drivers/ata/pata_hpt3x2n.c  |   16 +----------
 drivers/ata/pata_icside.c   |    8 +-----
 drivers/ata/pata_it8213.c   |   15 +----------
 drivers/ata/pata_jmicron.c  |   15 +----------
 drivers/ata/pata_marvell.c  |   16 +----------
 drivers/ata/pata_mpc52xx.c  |   10 -------
 drivers/ata/pata_mpiix.c    |   16 +----------
 drivers/ata/pata_ns87410.c  |   16 +----------
 drivers/ata/pata_oldpiix.c  |   16 +----------
 drivers/ata/pata_opti.c     |   17 +-----------
 drivers/ata/pata_optidma.c  |   17 +-----------
 drivers/ata/pata_pdc2027x.c |   19 +------------
 drivers/ata/pata_scc.c      |   15 ++--------
 drivers/ata/pata_sis.c      |   15 +----------
 drivers/ata/pata_sl82c105.c |    8 +-----
 drivers/ata/pata_triflex.c  |    7 +----
 drivers/ata/pata_via.c      |   14 +---------
 drivers/ata/pdc_adma.c      |   11 ++-----
 drivers/ata/sata_fsl.c      |   12 +--------
 drivers/ata/sata_inic162x.c |    5 ++-
 drivers/ata/sata_mv.c       |   16 +++++-----
 drivers/ata/sata_nv.c       |   17 +++--------
 drivers/ata/sata_promise.c  |   22 +++------------
 drivers/ata/sata_qstor.c    |    6 +++-
 drivers/ata/sata_sil24.c    |   18 +++++++++---
 drivers/ata/sata_via.c      |   10 +-----
 drivers/scsi/ipr.c          |    3 +-
 include/linux/libata.h      |   22 +++++++--------
 41 files changed, 169 insertions(+), 577 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 2361910..9532e57 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -246,9 +246,18 @@ static void ahci_freeze(struct ata_port *ap);
 static void ahci_thaw(struct ata_port *ap);
 static void ahci_pmp_attach(struct ata_port *ap);
 static void ahci_pmp_detach(struct ata_port *ap);
+static int ahci_softreset(struct ata_link *link, unsigned int *class,
+			  unsigned long deadline);
+static int ahci_hardreset(struct ata_link *link, unsigned int *class,
+			  unsigned long deadline);
+static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
+				 unsigned long deadline);
+static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
+				unsigned long deadline);
+static void ahci_postreset(struct ata_link *link, unsigned int *class);
+static int ahci_pmp_softreset(struct ata_link *link, unsigned int *class,
+			      unsigned long deadline);
 static void ahci_error_handler(struct ata_port *ap);
-static void ahci_vt8251_error_handler(struct ata_port *ap);
-static void ahci_p5wdh_error_handler(struct ata_port *ap);
 static void ahci_post_internal_cmd(struct ata_queued_cmd *qc);
 static int ahci_port_resume(struct ata_port *ap);
 static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl);
@@ -285,6 +294,10 @@ static struct ata_port_operations ahci_ops = {
 
 	.freeze			= ahci_freeze,
 	.thaw			= ahci_thaw,
+	.softreset		= ahci_softreset,
+	.hardreset		= ahci_hardreset,
+	.postreset		= ahci_postreset,
+	.pmp_softreset		= ahci_pmp_softreset,
 	.error_handler		= ahci_error_handler,
 	.post_internal_cmd	= ahci_post_internal_cmd,
 
@@ -305,12 +318,12 @@ static struct ata_port_operations ahci_ops = {
 
 static struct ata_port_operations ahci_vt8251_ops = {
 	.inherits		= &ahci_ops,
-	.error_handler		= ahci_vt8251_error_handler,
+	.hardreset		= ahci_vt8251_hardreset,
 };
 
 static struct ata_port_operations ahci_p5wdh_ops = {
 	.inherits		= &ahci_ops,
-	.error_handler		= ahci_p5wdh_error_handler,
+	.hardreset		= ahci_p5wdh_hardreset,
 };
 
 #define AHCI_HFLAGS(flags)	.private_data	= (void *)(flags)
@@ -1739,37 +1752,7 @@ static void ahci_error_handler(struct ata_port *ap)
 		ahci_start_engine(ap);
 	}
 
-	/* perform recovery */
-	sata_pmp_do_eh(ap, ata_std_prereset, ahci_softreset,
-		       ahci_hardreset, ahci_postreset,
-		       sata_pmp_std_prereset, ahci_pmp_softreset,
-		       sata_pmp_std_hardreset, sata_pmp_std_postreset);
-}
-
-static void ahci_vt8251_error_handler(struct ata_port *ap)
-{
-	if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
-		/* restart engine */
-		ahci_stop_engine(ap);
-		ahci_start_engine(ap);
-	}
-
-	/* perform recovery */
-	ata_do_eh(ap, ata_std_prereset, ahci_softreset, ahci_vt8251_hardreset,
-		  ahci_postreset);
-}
-
-static void ahci_p5wdh_error_handler(struct ata_port *ap)
-{
-	if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
-		/* restart engine */
-		ahci_stop_engine(ap);
-		ahci_start_engine(ap);
-	}
-
-	/* perform recovery */
-	ata_do_eh(ap, ata_std_prereset, ahci_softreset, ahci_p5wdh_hardreset,
-		  ahci_postreset);
+	sata_pmp_error_handler(ap);
 }
 
 static void ahci_post_internal_cmd(struct ata_queued_cmd *qc)
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 7cb48af..f392af7 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -162,15 +162,16 @@ struct piix_host_priv {
 
 static int piix_init_one(struct pci_dev *pdev,
 			 const struct pci_device_id *ent);
-static void piix_pata_error_handler(struct ata_port *ap);
+static int piix_pata_prereset(struct ata_link *link, unsigned long deadline);
 static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev);
 static void piix_set_dmamode(struct ata_port *ap, struct ata_device *adev);
 static void ich_set_dmamode(struct ata_port *ap, struct ata_device *adev);
 static int ich_pata_cable_detect(struct ata_port *ap);
 static u8 piix_vmw_bmdma_status(struct ata_port *ap);
+static int piix_sidpr_hardreset(struct ata_link *link, unsigned int *class,
+				unsigned long deadline);
 static int piix_sidpr_scr_read(struct ata_port *ap, unsigned int reg, u32 *val);
 static int piix_sidpr_scr_write(struct ata_port *ap, unsigned int reg, u32 val);
-static void piix_sidpr_error_handler(struct ata_port *ap);
 #ifdef CONFIG_PM
 static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
 static int piix_pci_device_resume(struct pci_dev *pdev);
@@ -291,7 +292,7 @@ static struct ata_port_operations piix_pata_ops = {
 	.cable_detect		= ata_cable_40wire,
 	.set_piomode		= piix_set_piomode,
 	.set_dmamode		= piix_set_dmamode,
-	.error_handler		= piix_pata_error_handler,
+	.prereset		= piix_pata_prereset,
 };
 
 static struct ata_port_operations piix_vmw_ops = {
@@ -311,9 +312,9 @@ static struct ata_port_operations piix_sata_ops = {
 
 static struct ata_port_operations piix_sidpr_sata_ops = {
 	.inherits		= &piix_sata_ops,
+	.hardreset		= piix_sidpr_hardreset,
 	.scr_read		= piix_sidpr_scr_read,
 	.scr_write		= piix_sidpr_scr_write,
-	.error_handler		= piix_sidpr_error_handler,
 };
 
 static const struct piix_map_db ich5_map_db = {
@@ -637,12 +638,6 @@ static int piix_pata_prereset(struct ata_link *link, unsigned long deadline)
 	return ata_std_prereset(link, deadline);
 }
 
-static void piix_pata_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, piix_pata_prereset, ata_std_softreset, NULL,
-			   ata_std_postreset);
-}
-
 /**
  *	piix_set_piomode - Initialize host controller PATA PIO timings
  *	@ap: Port whose timings we are configuring
@@ -1049,12 +1044,6 @@ static int piix_sidpr_hardreset(struct ata_link *link, unsigned int *class,
 	return -EAGAIN;
 }
 
-static void piix_sidpr_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset,
-			   piix_sidpr_hardreset, ata_std_postreset);
-}
-
 #ifdef CONFIG_PM
 static int piix_broken_suspend(void)
 {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index a791525..a1ab6af 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -76,6 +76,10 @@ const unsigned long sata_deb_timing_long[]		= { 100, 2000, 5000 };
 
 const struct ata_port_operations ata_base_port_ops = {
 	.irq_clear		= ata_noop_irq_clear,
+	.prereset		= ata_std_prereset,
+	.hardreset		= sata_std_hardreset,
+	.postreset		= ata_std_postreset,
+	.error_handler		= ata_std_error_handler,
 };
 
 const struct ata_port_operations sata_port_ops = {
@@ -83,6 +87,11 @@ const struct ata_port_operations sata_port_ops = {
 
 	.qc_defer		= ata_std_qc_defer,
 	.dev_select		= ata_noop_dev_select,
+
+	.pmp_prereset		= sata_pmp_std_prereset,
+	.pmp_hardreset		= sata_pmp_std_hardreset,
+	.pmp_postreset		= sata_pmp_std_postreset,
+	.error_handler		= sata_pmp_error_handler,
 };
 
 const struct ata_port_operations sata_pmp_port_ops = {
@@ -97,6 +106,7 @@ const struct ata_port_operations ata_sff_port_ops = {
 
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
+	.softreset		= ata_std_softreset,
 	.error_handler		= ata_bmdma_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 
@@ -7668,7 +7678,6 @@ 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);
 EXPORT_SYMBOL_GPL(ata_port_probe);
@@ -7738,7 +7747,7 @@ EXPORT_SYMBOL_GPL(sata_pmp_qc_defer_cmd_switch);
 EXPORT_SYMBOL_GPL(sata_pmp_std_prereset);
 EXPORT_SYMBOL_GPL(sata_pmp_std_hardreset);
 EXPORT_SYMBOL_GPL(sata_pmp_std_postreset);
-EXPORT_SYMBOL_GPL(sata_pmp_do_eh);
+EXPORT_SYMBOL_GPL(sata_pmp_error_handler);
 
 EXPORT_SYMBOL_GPL(__ata_ehi_push_desc);
 EXPORT_SYMBOL_GPL(ata_ehi_push_desc);
@@ -7756,7 +7765,7 @@ EXPORT_SYMBOL_GPL(ata_eh_freeze_port);
 EXPORT_SYMBOL_GPL(ata_eh_thaw_port);
 EXPORT_SYMBOL_GPL(ata_eh_qc_complete);
 EXPORT_SYMBOL_GPL(ata_eh_qc_retry);
-EXPORT_SYMBOL_GPL(ata_do_eh);
+EXPORT_SYMBOL_GPL(ata_std_error_handler);
 EXPORT_SYMBOL_GPL(ata_irq_on);
 EXPORT_SYMBOL_GPL(ata_dev_try_classify);
 
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 8d82b06..95e5513 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2805,30 +2805,35 @@ void ata_eh_finish(struct ata_port *ap)
 }
 
 /**
- *	ata_do_eh - do standard error handling
+ *	ata_std_error_handler - do standard error handling
  *	@ap: host port to handle error for
- *	@prereset: prereset method (can be NULL)
- *	@softreset: softreset method (can be NULL)
- *	@hardreset: hardreset method (can be NULL)
- *	@postreset: postreset method (can be NULL)
  *
  *	Perform standard error handling sequence.
  *
  *	LOCKING:
  *	Kernel thread context (may sleep).
  */
-void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
-	       ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
-	       ata_postreset_fn_t postreset)
+void ata_std_error_handler(struct ata_port *ap)
 {
+	struct ata_port_operations *ops = ap->ops;
+	ata_reset_fn_t hardreset = ops->hardreset;
 	struct ata_device *dev;
 	int rc;
 
+	/* sata_std_hardreset is inherited to all drivers from
+	 * ata_base_port_ops.  Ignore it if SCR access is not
+	 * available.  Returning -EAGAIN from hardreset when SCR
+	 * access is unavailable achieves about the same effect but
+	 * that causes the wrong message to be printed.
+	 */
+	if (hardreset == sata_std_hardreset && !sata_scr_valid(&ap->link))
+		hardreset = NULL;
+
 	ata_eh_autopsy(ap);
 	ata_eh_report(ap);
 
-	rc = ata_eh_recover(ap, prereset, softreset, hardreset, postreset,
-			    NULL);
+	rc = ata_eh_recover(ap, ops->prereset, ops->softreset, hardreset,
+			    ops->postreset, NULL);
 	if (rc) {
 		ata_link_for_each_dev(dev, &ap->link)
 			ata_dev_disable(dev);
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 2e9eea8..19e57a7 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -962,14 +962,6 @@ static int sata_pmp_handle_link_fail(struct ata_link *link, int *link_tries)
 /**
  *	sata_pmp_eh_recover - recover PMP-enabled port
  *	@ap: ATA port to recover
- *	@prereset: prereset method (can be NULL)
- *	@softreset: softreset method
- *	@hardreset: hardreset method
- *	@postreset: postreset method (can be NULL)
- *	@pmp_prereset: PMP prereset method (can be NULL)
- *	@pmp_softreset: PMP softreset method (can be NULL)
- *	@pmp_hardreset: PMP hardreset method (can be NULL)
- *	@pmp_postreset: PMP postreset method (can be NULL)
  *
  *	Drive EH recovery operation for PMP enabled port @ap.  This
  *	function recovers host and PMP ports with proper retrials and
@@ -982,12 +974,9 @@ static int sata_pmp_handle_link_fail(struct ata_link *link, int *link_tries)
  *	RETURNS:
  *	0 on success, -errno on failure.
  */
-static int sata_pmp_eh_recover(struct ata_port *ap,
-		ata_prereset_fn_t prereset, ata_reset_fn_t softreset,
-		ata_reset_fn_t hardreset, ata_postreset_fn_t postreset,
-		ata_prereset_fn_t pmp_prereset, ata_reset_fn_t pmp_softreset,
-		ata_reset_fn_t pmp_hardreset, ata_postreset_fn_t pmp_postreset)
+static int sata_pmp_eh_recover(struct ata_port *ap)
 {
+	struct ata_port_operations *ops = ap->ops;
 	int pmp_tries, link_tries[SATA_PMP_MAX_PORTS];
 	struct ata_link *pmp_link = &ap->link;
 	struct ata_device *pmp_dev = pmp_link->device;
@@ -1005,8 +994,8 @@ static int sata_pmp_eh_recover(struct ata_port *ap,
  retry:
 	/* PMP attached? */
 	if (!ap->nr_pmp_links) {
-		rc = ata_eh_recover(ap, prereset, softreset, hardreset,
-				    postreset, NULL);
+		rc = ata_eh_recover(ap, ops->prereset, ops->softreset,
+				    ops->hardreset, ops->postreset, NULL);
 		if (rc) {
 			ata_link_for_each_dev(dev, &ap->link)
 				ata_dev_disable(dev);
@@ -1024,8 +1013,8 @@ static int sata_pmp_eh_recover(struct ata_port *ap,
 	}
 
 	/* recover pmp */
-	rc = sata_pmp_eh_recover_pmp(ap, prereset, softreset, hardreset,
-				     postreset);
+	rc = sata_pmp_eh_recover_pmp(ap, ops->prereset, ops->softreset,
+				     ops->hardreset, ops->postreset);
 	if (rc)
 		goto pmp_fail;
 
@@ -1035,8 +1024,8 @@ static int sata_pmp_eh_recover(struct ata_port *ap,
 		goto pmp_fail;
 
 	/* recover links */
-	rc = ata_eh_recover(ap, pmp_prereset, pmp_softreset, pmp_hardreset,
-			    pmp_postreset, &link);
+	rc = ata_eh_recover(ap, ops->pmp_prereset, ops->pmp_softreset,
+			    ops->pmp_hardreset, ops->pmp_postreset, &link);
 	if (rc)
 		goto link_fail;
 
@@ -1132,16 +1121,8 @@ static int sata_pmp_eh_recover(struct ata_port *ap,
 }
 
 /**
- *	sata_pmp_do_eh - do standard error handling for PMP-enabled host
+ *	sata_pmp_error_handler - do standard error handling for PMP-enabled host
  *	@ap: host port to handle error for
- *	@prereset: prereset method (can be NULL)
- *	@softreset: softreset method
- *	@hardreset: hardreset method
- *	@postreset: postreset method (can be NULL)
- *	@pmp_prereset: PMP prereset method (can be NULL)
- *	@pmp_softreset: PMP softreset method (can be NULL)
- *	@pmp_hardreset: PMP hardreset method (can be NULL)
- *	@pmp_postreset: PMP postreset method (can be NULL)
  *
  *	Perform standard error handling sequence for PMP-enabled host
  *	@ap.
@@ -1149,16 +1130,10 @@ static int sata_pmp_eh_recover(struct ata_port *ap,
  *	LOCKING:
  *	Kernel thread context (may sleep).
  */
-void sata_pmp_do_eh(struct ata_port *ap,
-		ata_prereset_fn_t prereset, ata_reset_fn_t softreset,
-		ata_reset_fn_t hardreset, ata_postreset_fn_t postreset,
-		ata_prereset_fn_t pmp_prereset, ata_reset_fn_t pmp_softreset,
-		ata_reset_fn_t pmp_hardreset, ata_postreset_fn_t pmp_postreset)
+void sata_pmp_error_handler(struct ata_port *ap)
 {
 	ata_eh_autopsy(ap);
 	ata_eh_report(ap);
-	sata_pmp_eh_recover(ap, prereset, softreset, hardreset, postreset,
-			    pmp_prereset, pmp_softreset, pmp_hardreset,
-			    pmp_postreset);
+	sata_pmp_eh_recover(ap);
 	ata_eh_finish(ap);
 }
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 24f6dc5..2b14b63 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -389,27 +389,18 @@ void ata_bmdma_thaw(struct ata_port *ap)
 }
 
 /**
- *	ata_bmdma_drive_eh - Perform EH with given methods for BMDMA controller
+ *	ata_bmdma_error_handler - Stock error handler for BMDMA controller
  *	@ap: port to handle error for
- *	@prereset: prereset method (can be NULL)
- *	@softreset: softreset method (can be NULL)
- *	@hardreset: hardreset method (can be NULL)
- *	@postreset: postreset method (can be NULL)
  *
- *	Handle error for ATA BMDMA controller.  It can handle both
+ *	Stock error handler for BMDMA controller.  It can handle both
  *	PATA and SATA controllers.  Many controllers should be able to
  *	use this EH as-is or with some added handling before and
  *	after.
  *
- *	This function is intended to be used for constructing
- *	->error_handler callback by low level drivers.
- *
  *	LOCKING:
  *	Kernel thread context (may sleep)
  */
-void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
-			ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
-			ata_postreset_fn_t postreset)
+void ata_bmdma_error_handler(struct ata_port *ap)
 {
 	struct ata_queued_cmd *qc;
 	unsigned long flags;
@@ -453,28 +444,7 @@ void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
 		ata_eh_thaw_port(ap);
 
 	/* PIO and DMA engines have been stopped, perform recovery */
-	ata_do_eh(ap, prereset, softreset, hardreset, postreset);
-}
-
-/**
- *	ata_bmdma_error_handler - Stock error handler for BMDMA controller
- *	@ap: port to handle error for
- *
- *	Stock error handler for BMDMA controller.
- *
- *	LOCKING:
- *	Kernel thread context (may sleep)
- */
-void ata_bmdma_error_handler(struct ata_port *ap)
-{
-	ata_reset_fn_t hardreset;
-
-	hardreset = NULL;
-	if (sata_scr_valid(&ap->link))
-		hardreset = sata_std_hardreset;
-
-	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, hardreset,
-			   ata_std_postreset);
+	ata_std_error_handler(ap);
 }
 
 /**
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index d55778a..14419ce 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -68,20 +68,6 @@ static int pacpi_cable_detect(struct ata_port *ap)
 }
 
 /**
- *	pacpi_error_handler - Setup and error handler
- *	@ap: Port to handle
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void pacpi_error_handler(struct ata_port *ap)
-{
-	return ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset,
-				  NULL, ata_std_postreset);
-}
-
-/**
  *	pacpi_discover_modes	-	filter non ACPI modes
  *	@adev: ATA device
  *	@mask: proposed modes
@@ -242,7 +228,7 @@ static struct ata_port_operations pacpi_ops = {
 	.mode_filter		= pacpi_mode_filter,
 	.set_piomode		= pacpi_set_piomode,
 	.set_dmamode		= pacpi_set_dmamode,
-	.error_handler		= pacpi_error_handler,
+	.prereset		= pacpi_pre_reset,
 	.port_start		= pacpi_port_start,
 };
 
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 461c8f6..6be8318 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -144,13 +144,6 @@ static int amd_pre_reset(struct ata_link *link, unsigned long deadline)
 	return ata_std_prereset(link, deadline);
 }
 
-static void amd_error_handler(struct ata_port *ap)
-{
-	return ata_bmdma_drive_eh(ap, amd_pre_reset,
-				      ata_std_softreset, NULL,
-				      ata_std_postreset);
-}
-
 static int amd_cable_detect(struct ata_port *ap)
 {
 	static const u32 bitmask[2] = {0x03, 0x0C};
@@ -301,13 +294,6 @@ static int nv_pre_reset(struct ata_link *link, unsigned long deadline)
 	return ata_std_prereset(link, deadline);
 }
 
-static void nv_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, nv_pre_reset,
-			       ata_std_softreset, NULL,
-			       ata_std_postreset);
-}
-
 /**
  *	nv100_set_piomode	-	set initial PIO mode data
  *	@ap: ATA interface
@@ -359,7 +345,7 @@ static struct scsi_host_template amd_sht = {
 
 static const struct ata_port_operations amd_base_port_ops = {
 	.inherits	= &ata_bmdma_port_ops,
-	.error_handler	= amd_error_handler,
+	.prereset	= amd_pre_reset,
 };
 
 static struct ata_port_operations amd33_port_ops = {
@@ -394,7 +380,7 @@ static const struct ata_port_operations nv_base_port_ops = {
 	.inherits	= &ata_bmdma_port_ops,
 	.cable_detect	= ata_cable_ignore,
 	.mode_filter	= nv_mode_filter,
-	.error_handler	= nv_error_handler,
+	.prereset	= nv_pre_reset,
 	.host_stop	= nv_host_stop,
 };
 
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 698a53c..8c27071 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -56,21 +56,6 @@ static int artop6210_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	artop6210_error_handler - Probe specified port on PATA host controller
- *	@ap: Port to probe
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void artop6210_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, artop6210_pre_reset,
-				    ata_std_softreset, NULL,
-				    ata_std_postreset);
-}
-
-/**
  *	artop6260_pre_reset	-	check for 40/80 pin
  *	@link: link
  *	@deadline: deadline jiffies for the operation
@@ -114,21 +99,6 @@ static int artop6260_cable_detect(struct ata_port *ap)
 }
 
 /**
- *	artop6260_error_handler - Probe specified port on PATA host controller
- *	@ap: Port to probe
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void artop6260_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, artop6260_pre_reset,
-				    ata_std_softreset, NULL,
-				    ata_std_postreset);
-}
-
-/**
  *	artop6210_load_piomode - Load a set of PATA PIO timings
  *	@ap: Port whose timings we are configuring
  *	@adev: Device
@@ -322,7 +292,7 @@ static struct ata_port_operations artop6210_ops = {
 	.cable_detect		= ata_cable_40wire,
 	.set_piomode		= artop6210_set_piomode,
 	.set_dmamode		= artop6210_set_dmamode,
-	.error_handler		= artop6210_error_handler,
+	.prereset		= artop6210_pre_reset,
 };
 
 static struct ata_port_operations artop6260_ops = {
@@ -330,7 +300,7 @@ static struct ata_port_operations artop6260_ops = {
 	.cable_detect		= artop6260_cable_detect,
 	.set_piomode		= artop6260_set_piomode,
 	.set_dmamode		= artop6260_set_dmamode,
-	.error_handler		= artop6260_error_handler,
+	.prereset		= artop6260_pre_reset,
 };
 
 
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index a098f69..82b1a23 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -48,11 +48,6 @@ static int atiixp_pre_reset(struct ata_link *link, unsigned long deadline)
 	return ata_std_prereset(link, deadline);
 }
 
-static void atiixp_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, atiixp_pre_reset, ata_std_softreset, NULL,   ata_std_postreset);
-}
-
 static int atiixp_cable_detect(struct ata_port *ap)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
@@ -233,7 +228,7 @@ static struct ata_port_operations atiixp_port_ops = {
 	.cable_detect	= atiixp_cable_detect,
 	.set_piomode	= atiixp_set_piomode,
 	.set_dmamode	= atiixp_set_dmamode,
-	.error_handler	= atiixp_error_handler,
+	.prereset	= atiixp_pre_reset,
 };
 
 static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 16f8fa5..2627dd3 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1315,17 +1315,6 @@ static void bfin_std_postreset(struct ata_link *link, unsigned int *classes)
 	write_atapi_register(base, ATA_REG_CTRL, ap->ctl);
 }
 
-/**
- *	bfin_error_handler - Stock error handler for DMA controller
- *	@ap: port to handle error for
- */
-
-static void bfin_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, ata_std_prereset, bfin_std_softreset, NULL,
-			   bfin_std_postreset);
-}
-
 static void bfin_port_stop(struct ata_port *ap)
 {
 	pr_debug("in atapi port stop\n");
@@ -1386,7 +1375,8 @@ static const struct ata_port_operations bfin_pata_ops = {
 
 	.freeze			= bfin_bmdma_freeze,
 	.thaw			= bfin_bmdma_thaw,
-	.error_handler		= bfin_error_handler,
+	.softreset		= bfin_std_softreset,
+	.postreset		= bfin_std_postreset,
 	.post_internal_cmd	= bfin_bmdma_stop,
 
 	.irq_clear		= bfin_irq_clear,
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index 029d57a..962e243 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -49,19 +49,6 @@ static int efar_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	efar_probe_reset - Probe specified port on PATA host controller
- *	@ap: Port to probe
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void efar_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, efar_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	efar_cable_detect	-	check for 40/80 pin
  *	@ap: Port
  *
@@ -241,7 +228,7 @@ static struct ata_port_operations efar_ops = {
 	.cable_detect		= efar_cable_detect,
 	.set_piomode		= efar_set_piomode,
 	.set_dmamode		= efar_set_dmamode,
-	.error_handler		= efar_error_handler,
+	.prereset		= efar_pre_reset,
 };
 
 
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 16ec8f4..741d1d5 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -341,19 +341,7 @@ static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline)
 	return ata_std_prereset(link, deadline);
 }
 
-/**
- *	hpt37x_error_handler	-	reset the hpt374
- *	@ap: ATA port to reset
- *
- *	Perform probe for HPT37x, except for HPT374 channel 2
- */
-
-static void hpt37x_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, hpt37x_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-static int hpt374_pre_reset(struct ata_link *link, unsigned long deadline)
+static int hpt374_fn1_pre_reset(struct ata_link *link, unsigned long deadline)
 {
 	static const struct pci_bits hpt37x_enable_bits[] = {
 		{ 0x50, 1, 0x04, 0x04 },
@@ -390,25 +378,6 @@ static int hpt374_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	hpt374_error_handler	-	reset the hpt374
- *	@classes:
- *
- *	The 374 cable detect is a little different due to the extra
- *	channels. The function 0 channels work like usual but function 1
- *	is special
- */
-
-static void hpt374_error_handler(struct ata_port *ap)
-{
-	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
-
-	if (!(PCI_FUNC(pdev->devfn) & 1))
-		hpt37x_error_handler(ap);
-	else
-		ata_bmdma_drive_eh(ap, hpt374_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	hpt370_set_piomode		-	PIO setup
  *	@ap: ATA interface
  *	@adev: device on the interface
@@ -635,7 +604,7 @@ static struct ata_port_operations hpt370_port_ops = {
 	.mode_filter	= hpt370_filter,
 	.set_piomode	= hpt370_set_piomode,
 	.set_dmamode	= hpt370_set_dmamode,
-	.error_handler	= hpt37x_error_handler,
+	.prereset	= hpt37x_pre_reset,
 };
 
 /*
@@ -659,17 +628,17 @@ static struct ata_port_operations hpt372_port_ops = {
 
 	.set_piomode	= hpt372_set_piomode,
 	.set_dmamode	= hpt372_set_dmamode,
-	.error_handler	= hpt37x_error_handler,
+	.prereset	= hpt37x_pre_reset,
 };
 
 /*
  *	Configuration for HPT374. Mode setting works like 372 and friends
- *	but we have a different cable detection procedure.
+ *	but we have a different cable detection procedure for function 1.
  */
 
-static struct ata_port_operations hpt374_port_ops = {
+static struct ata_port_operations hpt374_fn1_port_ops = {
 	.inherits	= &hpt372_port_ops,
-	.error_handler	= hpt374_error_handler,
+	.prereset	= hpt374_fn1_pre_reset,
 };
 
 /**
@@ -821,13 +790,20 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		.udma_mask = ATA_UDMA6,
 		.port_ops = &hpt372_port_ops
 	};
-	/* HPT374 - UDMA100 */
-	static const struct ata_port_info info_hpt374 = {
+	/* HPT374 - UDMA100, function 1 uses different prereset method */
+	static const struct ata_port_info info_hpt374_fn0 = {
+		.flags = ATA_FLAG_SLAVE_POSS,
+		.pio_mask = 0x1f,
+		.mwdma_mask = 0x07,
+		.udma_mask = ATA_UDMA5,
+		.port_ops = &hpt372_port_ops
+	};
+	static const struct ata_port_info info_hpt374_fn1 = {
 		.flags = ATA_FLAG_SLAVE_POSS,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
 		.udma_mask = ATA_UDMA5,
-		.port_ops = &hpt374_port_ops
+		.port_ops = &hpt374_fn1_port_ops
 	};
 
 	static const int MHz[4] = { 33, 40, 50, 66 };
@@ -913,7 +889,10 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 				break;
 			case PCI_DEVICE_ID_TTI_HPT374:
 				chip_table = &hpt374;
-				*ppi = &info_hpt374;
+				if (!(PCI_FUNC(dev->devfn) & 1))
+					*ppi = &info_hpt374_fn0;
+				else
+					*ppi = &info_hpt374_fn1;
 				break;
 			default:
 				printk(KERN_ERR "pata_hpt37x: PCI table is bogus please report (%d).\n", dev->device);
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index 616f7a5..654bab5 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -148,7 +148,7 @@ static int hpt3x2n_cable_detect(struct ata_port *ap)
  *	Reset the hardware and state machine,
  */
 
-static int hpt3xn_pre_reset(struct ata_link *link, unsigned long deadline)
+static int hpt3x2n_pre_reset(struct ata_link *link, unsigned long deadline)
 {
 	struct ata_port *ap = link->ap;
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
@@ -160,18 +160,6 @@ static int hpt3xn_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	hpt3x2n_error_handler	-	probe the hpt3x2n bus
- *	@ap: ATA port to reset
- *
- *	Perform the probe reset handling for the 3x2N
- */
-
-static void hpt3x2n_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, hpt3xn_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	hpt3x2n_set_piomode		-	PIO setup
  *	@ap: ATA interface
  *	@adev: device on the interface
@@ -355,7 +343,7 @@ static struct ata_port_operations hpt3x2n_port_ops = {
 	.cable_detect	= hpt3x2n_cable_detect,
 	.set_piomode	= hpt3x2n_set_piomode,
 	.set_dmamode	= hpt3x2n_set_dmamode,
-	.error_handler	= hpt3x2n_error_handler,
+	.prereset	= hpt3x2n_pre_reset,
 };
 
 /**
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index f0ec997..340d86a 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -338,12 +338,6 @@ static void pata_icside_postreset(struct ata_link *link, unsigned int *classes)
 	}
 }
 
-static void pata_icside_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, NULL,
-			   pata_icside_postreset);
-}
-
 static struct ata_port_operations pata_icside_port_ops = {
 	.inherits		= &ata_sff_port_ops,
 	/* no need to build any PRD tables for DMA */
@@ -356,7 +350,7 @@ static struct ata_port_operations pata_icside_port_ops = {
 
 	.cable_detect		= ata_cable_40wire,
 	.set_dmamode		= pata_icside_set_dmamode,
-	.error_handler		= pata_icside_error_handler,
+	.postreset		= pata_icside_postreset,
 	.post_internal_cmd	= pata_icside_bmdma_stop,
 
 	.port_start		= pata_icside_port_start,
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index 42e1b5a..53dadb4 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -44,19 +44,6 @@ static int it8213_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	it8213_error_handler - Probe specified port on PATA host controller
- *	@ap: Port to probe
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void it8213_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, it8213_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	it8213_cable_detect	-	check for 40/80 pin
  *	@ap: Port
  *
@@ -252,7 +239,7 @@ static struct ata_port_operations it8213_ops = {
 	.cable_detect		= it8213_cable_detect,
 	.set_piomode		= it8213_set_piomode,
 	.set_dmamode		= it8213_set_dmamode,
-	.error_handler		= it8213_error_handler,
+	.prereset		= it8213_pre_reset,
 };
 
 
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index d76620e..08e5979 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -105,19 +105,6 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)
 	return ata_std_prereset(link, deadline);
 }
 
-/**
- *	jmicron_error_handler - Setup and error handler
- *	@ap: Port to handle
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void jmicron_error_handler(struct ata_port *ap)
-{
-	return ata_bmdma_drive_eh(ap, jmicron_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
 /* No PIO or DMA methods needed for this device */
 
 static struct scsi_host_template jmicron_sht = {
@@ -126,7 +113,7 @@ static struct scsi_host_template jmicron_sht = {
 
 static struct ata_port_operations jmicron_ops = {
 	.inherits		= &ata_bmdma_port_ops,
-	.error_handler		= jmicron_error_handler,
+	.prereset		= jmicron_pre_reset,
 };
 
 
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 4f3b4dc..28be18b 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -75,20 +75,6 @@ static int marvell_cable_detect(struct ata_port *ap)
 	return 0;	/* Our BUG macro needs the right markup */
 }
 
-/**
- *	marvell_error_handler - Setup and error handler
- *	@ap: Port to handle
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void marvell_error_handler(struct ata_port *ap)
-{
-	return ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset,
-				  NULL, ata_std_postreset);
-}
-
 /* No PIO or DMA methods needed for this device */
 
 static struct scsi_host_template marvell_sht = {
@@ -98,7 +84,7 @@ static struct scsi_host_template marvell_sht = {
 static struct ata_port_operations marvell_ops = {
 	.inherits		= &ata_bmdma_port_ops,
 	.cable_detect		= marvell_cable_detect,
-	.error_handler		= marvell_error_handler,
+	.prereset		= marvell_pre_reset,
 };
 
 
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 6495c31..0c3886c 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -255,15 +255,6 @@ mpc52xx_ata_dev_select(struct ata_port *ap, unsigned int device)
 	ata_std_dev_select(ap,device);
 }
 
-static void
-mpc52xx_ata_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, NULL,
-			ata_std_postreset);
-}
-
-
-
 static struct scsi_host_template mpc52xx_ata_sht = {
 	ATA_PIO_SHT(DRV_NAME),
 };
@@ -273,7 +264,6 @@ static struct ata_port_operations mpc52xx_ata_port_ops = {
 	.dev_select		= mpc52xx_ata_dev_select,
 	.cable_detect		= ata_cable_40wire,
 	.set_piomode		= mpc52xx_ata_set_piomode,
-	.error_handler		= mpc52xx_ata_error_handler,
 	.post_internal_cmd	= ATA_OP_NULL,
 };
 
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c
index dab54f8..1b9d0d4 100644
--- a/drivers/ata/pata_mpiix.c
+++ b/drivers/ata/pata_mpiix.c
@@ -59,20 +59,6 @@ static int mpiix_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	mpiix_error_handler		-	probe reset
- *	@ap: ATA port
- *
- *	Perform the ATA probe and bus reset sequence plus specific handling
- *	for this hardware. The MPIIX has the enable bits in a different place
- *	to PIIX4 and friends. As a pure PIO device it has no cable detect
- */
-
-static void mpiix_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, mpiix_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	mpiix_set_piomode	-	set initial PIO mode data
  *	@ap: ATA interface
  *	@adev: ATA device
@@ -159,7 +145,7 @@ static struct ata_port_operations mpiix_port_ops = {
 	.qc_issue	= mpiix_qc_issue_prot,
 	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= mpiix_set_piomode,
-	.error_handler	= mpiix_error_handler,
+	.prereset	= mpiix_pre_reset,
 };
 
 static int mpiix_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
index 1bdca8f..7645c81 100644
--- a/drivers/ata/pata_ns87410.c
+++ b/drivers/ata/pata_ns87410.c
@@ -54,20 +54,6 @@ static int ns87410_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	ns87410_error_handler		-	probe reset
- *	@ap: ATA port
- *
- *	Perform the ATA probe and bus reset sequence plus specific handling
- *	for this hardware. The MPIIX has the enable bits in a different place
- *	to PIIX4 and friends. As a pure PIO device it has no cable detect
- */
-
-static void ns87410_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, ns87410_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	ns87410_set_piomode	-	set initial PIO mode data
  *	@ap: ATA interface
  *	@adev: ATA device
@@ -152,7 +138,7 @@ static struct ata_port_operations ns87410_port_ops = {
 	.qc_issue	= ns87410_qc_issue_prot,
 	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= ns87410_set_piomode,
-	.error_handler	= ns87410_error_handler,
+	.prereset	= ns87410_pre_reset,
 };
 
 static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
index 9e3afad..9848e05 100644
--- a/drivers/ata/pata_oldpiix.c
+++ b/drivers/ata/pata_oldpiix.c
@@ -51,20 +51,6 @@ static int oldpiix_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	oldpiix_pata_error_handler - Probe specified port on PATA host controller
- *	@ap: Port to probe
- *	@classes:
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void oldpiix_pata_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, oldpiix_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	oldpiix_set_piomode - Initialize host controller PATA PIO timings
  *	@ap: Port whose timings we are configuring
  *	@adev: Device whose timings we are configuring
@@ -229,7 +215,7 @@ static struct ata_port_operations oldpiix_pata_ops = {
 	.cable_detect		= ata_cable_40wire,
 	.set_piomode		= oldpiix_set_piomode,
 	.set_dmamode		= oldpiix_set_dmamode,
-	.error_handler		= oldpiix_pata_error_handler,
+	.prereset		= oldpiix_pre_reset,
 };
 
 
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
index 3286783..aee43db 100644
--- a/drivers/ata/pata_opti.c
+++ b/drivers/ata/pata_opti.c
@@ -68,21 +68,6 @@ static int opti_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	opti_probe_reset		-	probe reset
- *	@ap: ATA port
- *
- *	Perform the ATA probe and bus reset sequence plus specific handling
- *	for this hardware. The Opti needs little handling - we have no UDMA66
- *	capability that needs cable detection. All we must do is check the port
- *	is enabled.
- */
-
-static void opti_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, opti_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	opti_write_reg		-	control register setup
  *	@ap: ATA port
  *	@value: value
@@ -172,7 +157,7 @@ static struct ata_port_operations opti_port_ops = {
 	.inherits	= &ata_bmdma_port_ops,
 	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= opti_set_piomode,
-	.error_handler	= opti_error_handler,
+	.prereset	= opti_pre_reset,
 };
 
 static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index c376f9e..68c9427 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -68,21 +68,6 @@ static int optidma_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	optidma_probe_reset		-	probe reset
- *	@ap: ATA port
- *
- *	Perform the ATA probe and bus reset sequence plus specific handling
- *	for this hardware. The Opti needs little handling - we have no UDMA66
- *	capability that needs cable detection. All we must do is check the port
- *	is enabled.
- */
-
-static void optidma_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, optidma_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	optidma_unlock		-	unlock control registers
  *	@ap: ATA port
  *
@@ -359,7 +344,7 @@ static struct ata_port_operations optidma_port_ops = {
 	.set_piomode	= optidma_set_pio_mode,
 	.set_dmamode	= optidma_set_dma_mode,
 	.set_mode	= optidma_set_mode,
-	.error_handler	= optidma_error_handler,
+	.prereset	= optidma_pre_reset,
 };
 
 static struct ata_port_operations optiplus_port_ops = {
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index baa9fa7..d591e21 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -63,7 +63,7 @@ enum {
 };
 
 static int pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
-static void pdc2027x_error_handler(struct ata_port *ap);
+static int pdc2027x_prereset(struct ata_link *link, unsigned long deadline);
 static void pdc2027x_set_piomode(struct ata_port *ap, struct ata_device *adev);
 static void pdc2027x_set_dmamode(struct ata_port *ap, struct ata_device *adev);
 static int pdc2027x_check_atapi_dma(struct ata_queued_cmd *qc);
@@ -136,7 +136,7 @@ static struct ata_port_operations pdc2027x_pata100_ops = {
 	.inherits		= &ata_bmdma_port_ops,
 	.check_atapi_dma	= pdc2027x_check_atapi_dma,
 	.cable_detect		= pdc2027x_cable_detect,
-	.error_handler		= pdc2027x_error_handler,
+	.prereset		= pdc2027x_prereset,
 };
 
 static struct ata_port_operations pdc2027x_pata133_ops = {
@@ -252,21 +252,6 @@ static int pdc2027x_prereset(struct ata_link *link, unsigned long deadline)
 }
 
 /**
- *	pdc2027x_error_handler - Perform reset on PATA port and classify
- *	@ap: Port to reset
- *
- *	Reset PATA phy and classify attached devices.
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void pdc2027x_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, pdc2027x_prereset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	pdc2720x_mode_filter	-	mode selection filter
  *	@adev: ATA device
  *	@mask: list of modes proposed
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index 033d1f3..07f2d7a 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -905,17 +905,6 @@ static void scc_std_postreset(struct ata_link *link, unsigned int *classes)
 }
 
 /**
- *	scc_error_handler - Stock error handler for BMDMA controller
- *	@ap: port to handle error for
- */
-
-static void scc_error_handler (struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, scc_pata_prereset, scc_std_softreset, NULL,
-			   scc_std_postreset);
-}
-
-/**
  *	scc_bmdma_irq_clear - Clear PCI IDE BMDMA interrupt.
  *	@ap: Port associated with this ATA transaction.
  *
@@ -992,7 +981,9 @@ static const struct ata_port_operations scc_pata_ops = {
 	.data_xfer		= scc_data_xfer,
 
 	.freeze			= scc_bmdma_freeze,
-	.error_handler		= scc_error_handler,
+	.prereset		= scc_pata_prereset,
+	.softreset		= scc_std_softreset,
+	.postreset		= scc_std_postreset,
 	.post_internal_cmd	= scc_bmdma_stop,
 
 	.irq_clear		= scc_bmdma_irq_clear,
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 45c689c..ca04194 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -161,19 +161,6 @@ static int sis_pre_reset(struct ata_link *link, unsigned long deadline)
 
 
 /**
- *	sis_error_handler - Probe specified port on PATA host controller
- *	@ap: Port to probe
- *
- *	LOCKING:
- *	None (inherited from caller).
- */
-
-static void sis_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, sis_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	sis_set_fifo	-	Set RWP fifo bits for this device
  *	@ap: Port
  *	@adev: Device
@@ -526,7 +513,7 @@ static struct ata_port_operations sis_133_for_sata_ops = {
 
 static struct ata_port_operations sis_base_ops = {
 	.inherits		= &ata_bmdma_port_ops,
-	.error_handler		= sis_error_handler,
+	.prereset		= sis_pre_reset,
 };
 
 static struct ata_port_operations sis_133_ops = {
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 9c1de56..f0da671 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -64,12 +64,6 @@ static int sl82c105_pre_reset(struct ata_link *link, unsigned long deadline)
 }
 
 
-static void sl82c105_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, sl82c105_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-
 /**
  *	sl82c105_configure_piomode	-	set chip PIO timing
  *	@ap: ATA interface
@@ -216,7 +210,7 @@ static struct ata_port_operations sl82c105_port_ops = {
 	.bmdma_stop	= sl82c105_bmdma_stop,
 	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= sl82c105_set_piomode,
-	.error_handler	= sl82c105_error_handler,
+	.prereset	= sl82c105_pre_reset,
 };
 
 /**
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
index 86dc66c..b40b972 100644
--- a/drivers/ata/pata_triflex.c
+++ b/drivers/ata/pata_triflex.c
@@ -71,11 +71,6 @@ static int triflex_prereset(struct ata_link *link, unsigned long deadline)
 
 
 
-static void triflex_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, triflex_prereset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
 /**
  *	triflex_load_timing		-	timing configuration
  *	@ap: ATA interface
@@ -189,7 +184,7 @@ static struct ata_port_operations triflex_port_ops = {
 	.bmdma_stop	= triflex_bmdma_stop,
 	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= triflex_set_piomode,
-	.error_handler	= triflex_error_handler,
+	.prereset	= triflex_prereset,
 };
 
 static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 3ccee4f..4cd5d6a 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -211,18 +211,6 @@ static int via_pre_reset(struct ata_link *link, unsigned long deadline)
 
 
 /**
- *	via_error_handler		-	reset for VIA chips
- *	@ap: ATA port
- *
- *	Handle the reset callback for the later chips with cable detect
- */
-
-static void via_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, via_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-/**
  *	via_do_set_mode	-	set initial PIO mode data
  *	@ap: ATA interface
  *	@adev: ATA device
@@ -339,7 +327,7 @@ static struct ata_port_operations via_port_ops = {
 	.cable_detect	= via_cable_detect,
 	.set_piomode	= via_set_piomode,
 	.set_dmamode	= via_set_dmamode,
-	.error_handler	= via_error_handler,
+	.prereset	= via_pre_reset,
 };
 
 static struct ata_port_operations via_port_ops_noirq = {
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index a570614..5ed065d 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -140,7 +140,7 @@ static void adma_bmdma_stop(struct ata_queued_cmd *qc);
 static u8 adma_bmdma_status(struct ata_port *ap);
 static void adma_freeze(struct ata_port *ap);
 static void adma_thaw(struct ata_port *ap);
-static void adma_error_handler(struct ata_port *ap);
+static int adma_prereset(struct ata_link *link, unsigned long deadline);
 
 static struct scsi_host_template adma_ata_sht = {
 	ATA_BASE_SHT(DRV_NAME),
@@ -166,7 +166,8 @@ static struct ata_port_operations adma_ata_ops = {
 
 	.freeze			= adma_freeze,
 	.thaw			= adma_thaw,
-	.error_handler		= adma_error_handler,
+	.prereset		= adma_prereset,
+	.softreset		= ata_std_softreset,
 
 	.port_start		= adma_port_start,
 	.port_stop		= adma_port_stop,
@@ -292,12 +293,6 @@ static int adma_prereset(struct ata_link *link, unsigned long deadline)
 	return ata_std_prereset(link, deadline);
 }
 
-static void adma_error_handler(struct ata_port *ap)
-{
-	ata_do_eh(ap, adma_prereset, ata_std_softreset, NULL,
-		  ata_std_postreset);
-}
-
 static int adma_fill_sg(struct ata_queued_cmd *qc)
 {
 	struct scatterlist *sg;
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index e90a4d6..743bb13 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -923,16 +923,6 @@ err:
 	return -EIO;
 }
 
-static void sata_fsl_error_handler(struct ata_port *ap)
-{
-
-	DPRINTK("in xx_error_handler\n");
-
-	/* perform recovery */
-	ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_std_hardreset,
-		  ata_std_postreset);
-}
-
 static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc)
 {
 	if (qc->flags & ATA_QCFLAG_FAILED)
@@ -1224,7 +1214,7 @@ static const struct ata_port_operations sata_fsl_ops = {
 
 	.freeze = sata_fsl_freeze,
 	.thaw = sata_fsl_thaw,
-	.error_handler = sata_fsl_error_handler,
+	.softreset = sata_fsl_softreset,
 	.post_internal_cmd = sata_fsl_post_internal_cmd,
 
 	.port_start = sata_fsl_port_start,
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index f94181d..75fb4de 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -464,8 +464,7 @@ static void inic_error_handler(struct ata_port *ap)
 	spin_unlock_irqrestore(ap->lock, flags);
 
 	/* PIO and DMA engines have been stopped, perform recovery */
-	ata_do_eh(ap, ata_std_prereset, NULL, inic_hardreset,
-		  ata_std_postreset);
+	ata_std_error_handler(ap);
 }
 
 static void inic_post_internal_cmd(struct ata_queued_cmd *qc)
@@ -544,6 +543,8 @@ static struct ata_port_operations inic_port_ops = {
 
 	.freeze			= inic_freeze,
 	.thaw			= inic_thaw,
+	.softreset		= ATA_OP_NULL,	/* softreset is broken */
+	.hardreset		= inic_hardreset,
 	.error_handler		= inic_error_handler,
 	.post_internal_cmd	= inic_post_internal_cmd,
 	.dev_config		= inic_dev_config,
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index c365650..f60322d 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -423,7 +423,10 @@ static void mv_port_stop(struct ata_port *ap);
 static void mv_qc_prep(struct ata_queued_cmd *qc);
 static void mv_qc_prep_iie(struct ata_queued_cmd *qc);
 static unsigned int mv_qc_issue(struct ata_queued_cmd *qc);
-static void mv_error_handler(struct ata_port *ap);
+static int mv_prereset(struct ata_link *link, unsigned long deadline);
+static int mv_hardreset(struct ata_link *link, unsigned int *class,
+			unsigned long deadline);
+static void mv_postreset(struct ata_link *link, unsigned int *classes);
 static void mv_post_int_cmd(struct ata_queued_cmd *qc);
 static void mv_eh_freeze(struct ata_port *ap);
 static void mv_eh_thaw(struct ata_port *ap);
@@ -472,7 +475,10 @@ static struct ata_port_operations mv5_ops = {
 	.cable_detect		= ata_cable_sata,
 	.freeze			= mv_eh_freeze,
 	.thaw			= mv_eh_thaw,
-	.error_handler		= mv_error_handler,
+	.prereset		= mv_prereset,
+	.hardreset		= mv_hardreset,
+	.postreset		= mv_postreset,
+	.error_handler		= ata_std_error_handler, /* avoid SFF EH */
 	.post_internal_cmd	= mv_post_int_cmd,
 
 	.scr_read		= mv5_scr_read,
@@ -2225,12 +2231,6 @@ static void mv_postreset(struct ata_link *link, unsigned int *classes)
 	iowrite8(ap->ctl, ap->ioaddr.ctl_addr);
 }
 
-static void mv_error_handler(struct ata_port *ap)
-{
-	ata_do_eh(ap, mv_prereset, ata_std_softreset,
-		  mv_hardreset, mv_postreset);
-}
-
 static void mv_post_int_cmd(struct ata_queued_cmd *qc)
 {
 	mv_stop_dma(qc->ap);
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 065b43f..e905389 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -308,7 +308,8 @@ 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_error_handler(struct ata_port *ap);
+static int nv_hardreset(struct ata_link *link, unsigned int *class,
+			unsigned long deadline);
 static int nv_adma_slave_config(struct scsi_device *sdev);
 static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
 static void nv_adma_qc_prep(struct ata_queued_cmd *qc);
@@ -405,7 +406,7 @@ static struct scsi_host_template nv_swncq_sht = {
 
 static struct ata_port_operations nv_generic_ops = {
 	.inherits		= &ata_bmdma_port_ops,
-	.error_handler		= nv_error_handler,
+	.hardreset		= nv_hardreset,
 	.scr_read		= nv_scr_read,
 	.scr_write		= nv_scr_write,
 };
@@ -1535,12 +1536,6 @@ static int nv_hardreset(struct ata_link *link, unsigned int *class,
 	return sata_std_hardreset(link, &dummy, deadline);
 }
 
-static void nv_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset,
-			   nv_hardreset, ata_std_postreset);
-}
-
 static void nv_adma_error_handler(struct ata_port *ap)
 {
 	struct nv_adma_port_priv *pp = ap->private_data;
@@ -1594,8 +1589,7 @@ static void nv_adma_error_handler(struct ata_port *ap)
 		readw(mmio + NV_ADMA_CTL);	/* flush posted write */
 	}
 
-	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset,
-			   nv_hardreset, ata_std_postreset);
+	ata_bmdma_error_handler(ap);
 }
 
 static void nv_swncq_qc_to_dq(struct ata_port *ap, struct ata_queued_cmd *qc)
@@ -1721,8 +1715,7 @@ static void nv_swncq_error_handler(struct ata_port *ap)
 		ehc->i.action |= ATA_EH_RESET;
 	}
 
-	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset,
-			   nv_hardreset, ata_std_postreset);
+	ata_bmdma_error_handler(ap);
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index 71fddef..4dec8a1 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -146,8 +146,7 @@ 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_pata_error_handler(struct ata_port *ap);
-static void pdc_sata_error_handler(struct ata_port *ap);
+static void pdc_error_handler(struct ata_port *ap);
 static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
 static int pdc_pata_cable_detect(struct ata_port *ap);
 static int pdc_sata_cable_detect(struct ata_port *ap);
@@ -171,12 +170,12 @@ static const struct ata_port_operations pdc_common_ops = {
 	.freeze			= pdc_freeze,
 	.thaw			= pdc_thaw,
 	.post_internal_cmd	= pdc_post_internal_cmd,
+	.error_handler		= pdc_error_handler,
 };
 
 static struct ata_port_operations pdc_sata_ops = {
 	.inherits		= &pdc_common_ops,
 	.cable_detect		= pdc_sata_cable_detect,
-	.error_handler		= pdc_sata_error_handler,
 	.scr_read		= pdc_sata_scr_read,
 	.scr_write		= pdc_sata_scr_write,
 	.port_start		= pdc_sata_port_start,
@@ -191,7 +190,6 @@ static struct ata_port_operations pdc_old_sata_ops = {
 static struct ata_port_operations pdc_pata_ops = {
 	.inherits		= &pdc_common_ops,
 	.cable_detect		= pdc_pata_cable_detect,
-	.error_handler		= pdc_pata_error_handler,
 	.port_start		= pdc_common_port_start,
 };
 
@@ -612,24 +610,12 @@ static void pdc_thaw(struct ata_port *ap)
 	readl(mmio + PDC_CTLSTAT); /* flush */
 }
 
-static void pdc_common_error_handler(struct ata_port *ap, ata_reset_fn_t hardreset)
+static void pdc_error_handler(struct ata_port *ap)
 {
 	if (!(ap->pflags & ATA_PFLAG_FROZEN))
 		pdc_reset_port(ap);
 
-	/* perform recovery */
-	ata_do_eh(ap, ata_std_prereset, ata_std_softreset, hardreset,
-		  ata_std_postreset);
-}
-
-static void pdc_pata_error_handler(struct ata_port *ap)
-{
-	pdc_common_error_handler(ap, NULL);
-}
-
-static void pdc_sata_error_handler(struct ata_port *ap)
-{
-	pdc_common_error_handler(ap, sata_std_hardreset);
+	ata_std_error_handler(ap);
 }
 
 static void pdc_post_internal_cmd(struct ata_queued_cmd *qc)
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index 107ef09..2ceb099 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -123,6 +123,7 @@ static void qs_bmdma_stop(struct ata_queued_cmd *qc);
 static u8 qs_bmdma_status(struct ata_port *ap);
 static void qs_freeze(struct ata_port *ap);
 static void qs_thaw(struct ata_port *ap);
+static int qs_prereset(struct ata_link *link, unsigned long deadline);
 static void qs_error_handler(struct ata_port *ap);
 
 static struct scsi_host_template qs_ata_sht = {
@@ -142,6 +143,8 @@ static struct ata_port_operations qs_ata_ops = {
 
 	.freeze			= qs_freeze,
 	.thaw			= qs_thaw,
+	.prereset		= qs_prereset,
+	.softreset		= ATA_OP_NULL,
 	.error_handler		= qs_error_handler,
 	.post_internal_cmd	= ATA_OP_NULL,
 
@@ -250,8 +253,7 @@ static int qs_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val)
 static void qs_error_handler(struct ata_port *ap)
 {
 	qs_enter_reg_mode(ap);
-	ata_do_eh(ap, qs_prereset, NULL, sata_std_hardreset,
-		  ata_std_postreset);
+	ata_std_error_handler(ap);
 }
 
 static int qs_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val)
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index d90d328..f0bdf06 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -352,6 +352,14 @@ static void sil24_pmp_attach(struct ata_port *ap);
 static void sil24_pmp_detach(struct ata_port *ap);
 static void sil24_freeze(struct ata_port *ap);
 static void sil24_thaw(struct ata_port *ap);
+static int sil24_softreset(struct ata_link *link, unsigned int *class,
+			   unsigned long deadline);
+static int sil24_hardreset(struct ata_link *link, unsigned int *class,
+			   unsigned long deadline);
+static int sil24_pmp_softreset(struct ata_link *link, unsigned int *class,
+			       unsigned long deadline);
+static int sil24_pmp_hardreset(struct ata_link *link, unsigned int *class,
+			       unsigned long deadline);
 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);
@@ -402,6 +410,10 @@ static struct ata_port_operations sil24_ops = {
 
 	.freeze			= sil24_freeze,
 	.thaw			= sil24_thaw,
+	.softreset		= sil24_softreset,
+	.hardreset		= sil24_hardreset,
+	.pmp_softreset		= sil24_pmp_softreset,
+	.pmp_hardreset		= sil24_pmp_hardreset,
 	.error_handler		= sil24_error_handler,
 	.post_internal_cmd	= sil24_post_internal_cmd,
 	.dev_config		= sil24_dev_config,
@@ -1181,11 +1193,7 @@ static void sil24_error_handler(struct ata_port *ap)
 	if (sil24_init_port(ap))
 		ata_eh_freeze_port(ap);
 
-	/* perform recovery */
-	sata_pmp_do_eh(ap, ata_std_prereset, sil24_softreset, sil24_hardreset,
-		       ata_std_postreset, sata_pmp_std_prereset,
-		       sil24_pmp_softreset, sil24_pmp_hardreset,
-		       sata_pmp_std_postreset);
+	sata_pmp_error_handler(ap);
 
 	pp->do_port_rst = 0;
 }
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 8b7d78b..c37799c 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -73,7 +73,7 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
 static int svia_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val);
 static int svia_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val);
 static void svia_noop_freeze(struct ata_port *ap);
-static void vt6420_error_handler(struct ata_port *ap);
+static int vt6420_prereset(struct ata_link *link, unsigned long deadline);
 static int vt6421_pata_cable_detect(struct ata_port *ap);
 static void vt6421_set_pio_mode(struct ata_port *ap, struct ata_device *adev);
 static void vt6421_set_dma_mode(struct ata_port *ap, struct ata_device *adev);
@@ -108,7 +108,7 @@ static struct scsi_host_template svia_sht = {
 static struct ata_port_operations vt6420_sata_ops = {
 	.inherits		= &ata_bmdma_port_ops,
 	.freeze			= svia_noop_freeze,
-	.error_handler		= vt6420_error_handler,
+	.prereset		= vt6420_prereset,
 };
 
 static struct ata_port_operations vt6421_pata_ops = {
@@ -249,12 +249,6 @@ static int vt6420_prereset(struct ata_link *link, unsigned long deadline)
 	return 0;
 }
 
-static void vt6420_error_handler(struct ata_port *ap)
-{
-	return ata_bmdma_drive_eh(ap, vt6420_prereset, ata_std_softreset,
-				  NULL, ata_std_postreset);
-}
-
 static int vt6421_pata_cable_detect(struct ata_port *ap)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index aa0df0a..6647a1f 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3937,7 +3937,7 @@ static int __ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd)
 	if (ipr_is_gata(res) && res->sata_port) {
 		ap = res->sata_port->ap;
 		spin_unlock_irq(scsi_cmd->device->host->host_lock);
-		ata_do_eh(ap, NULL, NULL, ipr_sata_reset, NULL);
+		ata_std_error_handler(ap);
 		spin_lock_irq(scsi_cmd->device->host->host_lock);
 
 		list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) {
@@ -5275,6 +5275,7 @@ static struct ata_port_operations ipr_sata_ops = {
 	.check_altstatus = ipr_ata_check_altstatus,
 	.dev_select = ata_noop_dev_select,
 	.phy_reset = ipr_ata_phy_reset,
+	.hardreset = ipr_sata_reset,
 	.post_internal_cmd = ipr_ata_post_internal,
 	.tf_read = ipr_tf_read,
 	.qc_prep = ata_noop_qc_prep,
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 00991f2..c74e150 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -701,6 +701,14 @@ struct ata_port_operations {
 
 	void (*freeze)(struct ata_port *ap);
 	void (*thaw)(struct ata_port *ap);
+	ata_prereset_fn_t	prereset;
+	ata_reset_fn_t		softreset;
+	ata_reset_fn_t		hardreset;
+	ata_postreset_fn_t	postreset;
+	ata_prereset_fn_t	pmp_prereset;
+	ata_reset_fn_t		pmp_softreset;
+	ata_reset_fn_t		pmp_hardreset;
+	ata_postreset_fn_t	pmp_postreset;
 	void (*error_handler)(struct ata_port *ap);
 	void (*post_internal_cmd)(struct ata_queued_cmd *qc);
 
@@ -916,10 +924,6 @@ extern void ata_bmdma_irq_clear(struct ata_port *ap);
 extern void ata_noop_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,
-			       ata_postreset_fn_t postreset);
 extern void ata_bmdma_error_handler(struct ata_port *ap);
 extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc);
 extern int ata_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
@@ -1063,11 +1067,7 @@ extern int sata_pmp_std_prereset(struct ata_link *link, unsigned long deadline);
 extern int sata_pmp_std_hardreset(struct ata_link *link, unsigned int *class,
 				  unsigned long deadline);
 extern void sata_pmp_std_postreset(struct ata_link *link, unsigned int *class);
-extern void sata_pmp_do_eh(struct ata_port *ap,
-		ata_prereset_fn_t prereset, ata_reset_fn_t softreset,
-		ata_reset_fn_t hardreset, ata_postreset_fn_t postreset,
-		ata_prereset_fn_t pmp_prereset, ata_reset_fn_t pmp_softreset,
-		ata_reset_fn_t pmp_hardreset, ata_postreset_fn_t pmp_postreset);
+extern void sata_pmp_error_handler(struct ata_port *ap);
 
 /*
  * EH
@@ -1084,9 +1084,7 @@ extern void ata_eh_thaw_port(struct ata_port *ap);
 extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
 extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
 
-extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
-		      ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
-		      ata_postreset_fn_t postreset);
+extern void ata_std_error_handler(struct ata_port *ap);
 
 /*
  * Base operations to inherit from and initializers for sht
-- 
1.5.2.4


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

* How to verify sht-ops-conversion patch doesn't change anything
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (8 preceding siblings ...)
  2008-01-30  9:29 ` [PATCH 9/9] libata: make reset related methods proper port operations Tejun Heo
@ 2008-01-30  9:49 ` Tejun Heo
  2008-01-30  9:51 ` GIT tree available Tejun Heo
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:49 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo

[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]

The fifth patch, sht-ops-conversion, can be verified not to change the
final sht and ops by printing out all entries and comparing the values
before and after.

1. Apply till the fourth patch and apply verify-before on top of it.
   Build a kernel with all libata modules enabled.  Boot, cd into
   drivers/ata and run the following command.

   # insmod libata.ko; for i in $(ls *.ko | sort | grep -v libata.ko); do insmod $i; done; dmesg -c | grep -E 'SHT|OPS' | sed -r 's/^\[[ \.0-9]*\] (.*)$/\1/' | sort > ~/out.before

   If you need some libata modules built-in for rootfs, it's okay too.
   It will give the same result.

2. Backout verify-before, apply the sht-ops-conversion patch and
   verify-after on top of it and run the following command.

   # insmod libata.ko; for i in $(ls *.ko | sort | grep -v libata.ko); do insmod $i; done; dmesg -c | grep -E 'SHT|OPS' | sed -r 's/^\[[ \.0-9]*\] (.*)$/\1/' | sort > ~/out.after

3. Use your favorite diff program to compare out.before and out.after.
   Graphical ones which show in-line differences will work best.

verify-{before|after} patches add two dump functions in libata-core.c
and makes all LLDs call them with their sht and ops tables on driver
load.  If the supplied patches are enough for some reason, You can add
those lines using the attached gen-verify.py script.

out.before and out.after are the output files from x86-64.

Thanks.

-- 
tejun

[-- Attachment #2: gen-verify.py --]
[-- Type: text/x-python, Size: 943 bytes --]

#!/usr/bin/env python

import sys
import re

files = sys.argv[1:]
sht_re = re.compile('.*struct\s*scsi_host_template\s*(\w+)\s*(=|$)', re.M);
ops_re = re.compile('.*struct\s*ata_port_operations\s*(\w+)\s*(=|$)', re.M);
init_re = re.compile('^\s*module_init\s*\(\s*(\w*)\s*\)\s*;', re.M);

for f in files:
    srcf = open(f, 'r+')
    src = srcf.read()
    code = '{\n'

    match = init_re.search(src)
    initfn_pattern = '^[^\n]*\s*%s\s*\(\s*void\s*\).*(return[^;]*;)\s*^}' \
                        % match.group(1);
    match = re.compile(initfn_pattern, re.M|re.DOTALL).search(src)
    pos = match.start(1)

    match = sht_re.findall(src)
    for m in match:
        code += '\t\tata_dump_sht(DRV_NAME, &%s);\n' % m[0]

    match = ops_re.findall(src)
    for m in match:
        code += '\t\tata_dump_ops(DRV_NAME, &%s);\n' % m[0]
    code += '\t}\n\t'

    srcf.seek(0)
    srcf.truncate()
    srcf.write(src[:pos] + code + src[pos:])

[-- Attachment #3: verify-before --]
[-- Type: text/plain, Size: 39275 bytes --]

---
 drivers/ata/ahci.c              |    6 ++++
 drivers/ata/ata_generic.c       |    4 +++
 drivers/ata/ata_piix.c          |    8 ++++++
 drivers/ata/libata-core.c       |   52 ++++++++++++++++++++++++++++++++++++++++
 drivers/ata/pata_acpi.c         |    4 +++
 drivers/ata/pata_ali.c          |    7 +++++
 drivers/ata/pata_amd.c          |    9 ++++++
 drivers/ata/pata_artop.c        |    5 +++
 drivers/ata/pata_at32.c         |    4 +++
 drivers/ata/pata_atiixp.c       |    4 +++
 drivers/ata/pata_bf54x.c        |    4 +++
 drivers/ata/pata_cmd640.c       |    4 +++
 drivers/ata/pata_cmd64x.c       |    6 ++++
 drivers/ata/pata_cs5520.c       |    4 +++
 drivers/ata/pata_cs5530.c       |    4 +++
 drivers/ata/pata_cs5535.c       |    4 +++
 drivers/ata/pata_cs5536.c       |    4 +++
 drivers/ata/pata_cypress.c      |    4 +++
 drivers/ata/pata_efar.c         |    4 +++
 drivers/ata/pata_hpt366.c       |    4 +++
 drivers/ata/pata_hpt37x.c       |    7 +++++
 drivers/ata/pata_hpt3x2n.c      |    4 +++
 drivers/ata/pata_hpt3x3.c       |    4 +++
 drivers/ata/pata_icside.c       |    4 +++
 drivers/ata/pata_isapnp.c       |    4 +++
 drivers/ata/pata_it8213.c       |    4 +++
 drivers/ata/pata_it821x.c       |    5 +++
 drivers/ata/pata_ixp4xx_cf.c    |    4 +++
 drivers/ata/pata_jmicron.c      |    4 +++
 drivers/ata/pata_legacy.c       |   14 ++++++++++
 drivers/ata/pata_marvell.c      |    4 +++
 drivers/ata/pata_mpc52xx.c      |    4 +++
 drivers/ata/pata_mpiix.c        |    4 +++
 drivers/ata/pata_netcell.c      |    4 +++
 drivers/ata/pata_ninja32.c      |    4 +++
 drivers/ata/pata_ns87410.c      |    4 +++
 drivers/ata/pata_ns87415.c      |    5 +++
 drivers/ata/pata_oldpiix.c      |    4 +++
 drivers/ata/pata_opti.c         |    4 +++
 drivers/ata/pata_optidma.c      |    5 +++
 drivers/ata/pata_pcmcia.c       |    5 +++
 drivers/ata/pata_pdc2027x.c     |    5 +++
 drivers/ata/pata_pdc202xx_old.c |    5 +++
 drivers/ata/pata_platform.c     |    4 +++
 drivers/ata/pata_qdi.c          |    5 +++
 drivers/ata/pata_radisys.c      |    4 +++
 drivers/ata/pata_rz1000.c       |    4 +++
 drivers/ata/pata_sc1200.c       |    4 +++
 drivers/ata/pata_scc.c          |    4 +++
 drivers/ata/pata_serverworks.c  |    5 +++
 drivers/ata/pata_sil680.c       |    4 +++
 drivers/ata/pata_sis.c          |    9 ++++++
 drivers/ata/pata_sl82c105.c     |    4 +++
 drivers/ata/pata_triflex.c      |    4 +++
 drivers/ata/pata_via.c          |    5 +++
 drivers/ata/pata_winbond.c      |    4 +++
 drivers/ata/pdc_adma.c          |    4 +++
 drivers/ata/sata_fsl.c          |    4 +++
 drivers/ata/sata_inic162x.c     |    4 +++
 drivers/ata/sata_mv.c           |    7 +++++
 drivers/ata/sata_nv.c           |   10 +++++++
 drivers/ata/sata_promise.c      |    6 ++++
 drivers/ata/sata_qstor.c        |    4 +++
 drivers/ata/sata_sil.c          |    4 +++
 drivers/ata/sata_sil24.c        |    4 +++
 drivers/ata/sata_sis.c          |    4 +++
 drivers/ata/sata_svw.c          |    4 +++
 drivers/ata/sata_sx4.c          |    4 +++
 drivers/ata/sata_uli.c          |    4 +++
 drivers/ata/sata_via.c          |    6 ++++
 drivers/ata/sata_vsc.c          |    4 +++
 include/linux/libata.h          |    3 ++
 kernel/kallsyms.c               |    1 
 73 files changed, 393 insertions(+)

Index: work/drivers/ata/ahci.c
===================================================================
--- work.orig/drivers/ata/ahci.c
+++ work/drivers/ata/ahci.c
@@ -2293,6 +2293,12 @@ static int ahci_init_one(struct pci_dev 
 
 static int __init ahci_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ahci_sht);
+		ata_dump_ops(DRV_NAME, &ahci_ops);
+		ata_dump_ops(DRV_NAME, &ahci_vt8251_ops);
+		ata_dump_ops(DRV_NAME, &ahci_p5wdh_ops);
+	}
 	return pci_register_driver(&ahci_pci_driver);
 }
 
Index: work/drivers/ata/ata_generic.c
===================================================================
--- work.orig/drivers/ata/ata_generic.c
+++ work/drivers/ata/ata_generic.c
@@ -228,6 +228,10 @@ static struct pci_driver ata_generic_pci
 
 static int __init ata_generic_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &generic_sht);
+		ata_dump_ops(DRV_NAME, &generic_port_ops);
+	}
 	return pci_register_driver(&ata_generic_pci_driver);
 }
 
Index: work/drivers/ata/ata_piix.c
===================================================================
--- work.orig/drivers/ata/ata_piix.c
+++ work/drivers/ata/ata_piix.c
@@ -1693,6 +1693,14 @@ static int __init piix_init(void)
 	in_module_init = 0;
 
 	DPRINTK("done\n");
+	{
+		ata_dump_sht(DRV_NAME, &piix_sht);
+		ata_dump_ops(DRV_NAME, &piix_pata_ops);
+		ata_dump_ops(DRV_NAME, &ich_pata_ops);
+		ata_dump_ops(DRV_NAME, &piix_sata_ops);
+		ata_dump_ops(DRV_NAME, &piix_vmw_ops);
+		ata_dump_ops(DRV_NAME, &piix_sidpr_sata_ops);
+	}
 	return 0;
 }
 
Index: work/drivers/ata/libata-core.c
===================================================================
--- work.orig/drivers/ata/libata-core.c
+++ work/drivers/ata/libata-core.c
@@ -7660,3 +7660,55 @@ EXPORT_SYMBOL_GPL(ata_cable_80wire);
 EXPORT_SYMBOL_GPL(ata_cable_unknown);
 EXPORT_SYMBOL_GPL(ata_cable_ignore);
 EXPORT_SYMBOL_GPL(ata_cable_sata);
+
+#include <linux/kallsyms.h>
+
+void ata_dump_sht(const char *drv_name, const struct scsi_host_template *sht)
+{
+	const int begin_off = offsetof(struct scsi_host_template, detect);
+	const int end_off = offsetof(struct scsi_host_template, eh_timed_out) + sizeof(void *);
+	char symname[KSYM_NAME_LEN];
+	void **pp;
+
+	if (lookup_symbol_name((unsigned long)sht, symname))
+		snprintf(symname, KSYM_NAME_LEN, "%p", sht);
+	printk("SHT %s %s: %s", drv_name, symname, sht->name);
+
+	for (pp = (void *)sht + begin_off; pp < (void **)((void *)sht + end_off); pp++) {
+		if (lookup_symbol_name((unsigned long)*pp, symname))
+			snprintf(symname, KSYM_NAME_LEN, "%p", *pp);
+		printk(" <%s>", symname);
+	}
+
+	printk(" %s %d %d %u %u %lu %d %u %u %u %u %u %u %u %u %u\n",
+	       sht->proc_name, sht->can_queue, sht->this_id,
+	       sht->sg_tablesize, sht->max_sectors, sht->dma_boundary,
+	       sht->cmd_per_lun, sht->present, sht->supported_mode,
+	       sht->unchecked_isa_dma, sht->use_clustering, sht->emulated,
+	       sht->skip_settle_delay, sht->ordered_tag, sht->use_sg_chaining,
+	       sht->max_host_blocked);
+}
+EXPORT_SYMBOL_GPL(ata_dump_sht);
+
+void ata_dump_ops(const char *drv_name, const struct ata_port_operations *ops)
+{
+	const int begin_off = 0;
+	const int end_off = offsetof(struct ata_port_operations, eng_timeout) + sizeof(void *);
+	struct ata_port_operations my_ops = *ops;
+	char symname[KSYM_NAME_LEN];
+	void **pp;
+
+	if (lookup_symbol_name((unsigned long)ops, symname))
+		snprintf(symname, KSYM_NAME_LEN, "%p", ops);
+	printk("OPS %s %s:", drv_name, symname);
+
+	//ata_finalize_port_ops(&my_ops);
+
+	for (pp = (void *)&my_ops + begin_off; pp < (void **)((void *)&my_ops + end_off); pp++) {
+		if (lookup_symbol_name((unsigned long)*pp, symname))
+			snprintf(symname, KSYM_NAME_LEN, "%p", *pp);
+		printk(" <%s>", symname);
+	}
+	printk("\n");
+}
+EXPORT_SYMBOL_GPL(ata_dump_ops);
Index: work/drivers/ata/pata_acpi.c
===================================================================
--- work.orig/drivers/ata/pata_acpi.c
+++ work/drivers/ata/pata_acpi.c
@@ -335,6 +335,10 @@ static struct pci_driver pacpi_pci_drive
 
 static int __init pacpi_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pacpi_sht);
+		ata_dump_ops(DRV_NAME, &pacpi_ops);
+	}
 	return pci_register_driver(&pacpi_pci_driver);
 }
 
Index: work/drivers/ata/pata_ali.c
===================================================================
--- work.orig/drivers/ata/pata_ali.c
+++ work/drivers/ata/pata_ali.c
@@ -669,6 +669,13 @@ static struct pci_driver ali_pci_driver 
 
 static int __init ali_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ali_sht);
+		ata_dump_ops(DRV_NAME, &ali_early_port_ops);
+		ata_dump_ops(DRV_NAME, &ali_20_port_ops);
+		ata_dump_ops(DRV_NAME, &ali_c2_port_ops);
+		ata_dump_ops(DRV_NAME, &ali_c5_port_ops);
+	}
 	return pci_register_driver(&ali_pci_driver);
 }
 
Index: work/drivers/ata/pata_amd.c
===================================================================
--- work.orig/drivers/ata/pata_amd.c
+++ work/drivers/ata/pata_amd.c
@@ -777,6 +777,15 @@ static struct pci_driver amd_pci_driver 
 
 static int __init amd_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &amd_sht);
+		ata_dump_ops(DRV_NAME, &amd33_port_ops);
+		ata_dump_ops(DRV_NAME, &amd66_port_ops);
+		ata_dump_ops(DRV_NAME, &amd100_port_ops);
+		ata_dump_ops(DRV_NAME, &amd133_port_ops);
+		ata_dump_ops(DRV_NAME, &nv100_port_ops);
+		ata_dump_ops(DRV_NAME, &nv133_port_ops);
+	}
 	return pci_register_driver(&amd_pci_driver);
 }
 
Index: work/drivers/ata/pata_artop.c
===================================================================
--- work.orig/drivers/ata/pata_artop.c
+++ work/drivers/ata/pata_artop.c
@@ -519,6 +519,11 @@ static struct pci_driver artop_pci_drive
 
 static int __init artop_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &artop_sht);
+		ata_dump_ops(DRV_NAME, &artop6210_ops);
+		ata_dump_ops(DRV_NAME, &artop6260_ops);
+	}
 	return pci_register_driver(&artop_pci_driver);
 }
 
Index: work/drivers/ata/pata_at32.c
===================================================================
--- work.orig/drivers/ata/pata_at32.c
+++ work/drivers/ata/pata_at32.c
@@ -424,6 +424,10 @@ static struct platform_driver pata_at32_
 
 static int __init pata_at32_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &at32_sht);
+		ata_dump_ops(DRV_NAME, &at32_port_ops);
+	}
 	return platform_driver_probe(&pata_at32_driver, pata_at32_probe);
 }
 
Index: work/drivers/ata/pata_atiixp.c
===================================================================
--- work.orig/drivers/ata/pata_atiixp.c
+++ work/drivers/ata/pata_atiixp.c
@@ -308,6 +308,10 @@ static struct pci_driver atiixp_pci_driv
 
 static int __init atiixp_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &atiixp_sht);
+		ata_dump_ops(DRV_NAME, &atiixp_port_ops);
+	}
 	return pci_register_driver(&atiixp_pci_driver);
 }
 
Index: work/drivers/ata/pata_bf54x.c
===================================================================
--- work.orig/drivers/ata/pata_bf54x.c
+++ work/drivers/ata/pata_bf54x.c
@@ -1608,6 +1608,10 @@ static int __init bfin_atapi_init(void)
 		bfin_port_info[0].udma_mask = ATA_UDMA5;
 	};
 
+	{
+		ata_dump_sht(DRV_NAME, &bfin_sht);
+		ata_dump_ops(DRV_NAME, &bfin_pata_ops);
+	}
 	return platform_driver_register(&bfin_atapi_driver);
 }
 
Index: work/drivers/ata/pata_cmd640.c
===================================================================
--- work.orig/drivers/ata/pata_cmd640.c
+++ work/drivers/ata/pata_cmd640.c
@@ -298,6 +298,10 @@ static struct pci_driver cmd640_pci_driv
 
 static int __init cmd640_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cmd640_sht);
+		ata_dump_ops(DRV_NAME, &cmd640_port_ops);
+	}
 	return pci_register_driver(&cmd640_pci_driver);
 }
 
Index: work/drivers/ata/pata_cmd64x.c
===================================================================
--- work.orig/drivers/ata/pata_cmd64x.c
+++ work/drivers/ata/pata_cmd64x.c
@@ -518,6 +518,12 @@ static struct pci_driver cmd64x_pci_driv
 
 static int __init cmd64x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cmd64x_sht);
+		ata_dump_ops(DRV_NAME, &cmd64x_port_ops);
+		ata_dump_ops(DRV_NAME, &cmd646r1_port_ops);
+		ata_dump_ops(DRV_NAME, &cmd648_port_ops);
+	}
 	return pci_register_driver(&cmd64x_pci_driver);
 }
 
Index: work/drivers/ata/pata_cs5520.c
===================================================================
--- work.orig/drivers/ata/pata_cs5520.c
+++ work/drivers/ata/pata_cs5520.c
@@ -378,6 +378,10 @@ static struct pci_driver cs5520_pci_driv
 
 static int __init cs5520_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cs5520_sht);
+		ata_dump_ops(DRV_NAME, &cs5520_port_ops);
+	}
 	return pci_register_driver(&cs5520_pci_driver);
 }
 
Index: work/drivers/ata/pata_cs5530.c
===================================================================
--- work.orig/drivers/ata/pata_cs5530.c
+++ work/drivers/ata/pata_cs5530.c
@@ -404,6 +404,10 @@ static struct pci_driver cs5530_pci_driv
 
 static int __init cs5530_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cs5530_sht);
+		ata_dump_ops(DRV_NAME, &cs5530_port_ops);
+	}
 	return pci_register_driver(&cs5530_pci_driver);
 }
 
Index: work/drivers/ata/pata_cs5535.c
===================================================================
--- work.orig/drivers/ata/pata_cs5535.c
+++ work/drivers/ata/pata_cs5535.c
@@ -263,6 +263,10 @@ static struct pci_driver cs5535_pci_driv
 
 static int __init cs5535_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cs5535_sht);
+		ata_dump_ops(DRV_NAME, &cs5535_port_ops);
+	}
 	return pci_register_driver(&cs5535_pci_driver);
 }
 
Index: work/drivers/ata/pata_cs5536.c
===================================================================
--- work.orig/drivers/ata/pata_cs5536.c
+++ work/drivers/ata/pata_cs5536.c
@@ -324,6 +324,10 @@ static struct pci_driver cs5536_pci_driv
 
 static int __init cs5536_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cs5536_sht);
+		ata_dump_ops(DRV_NAME, &cs5536_port_ops);
+	}
 	return pci_register_driver(&cs5536_pci_driver);
 }
 
Index: work/drivers/ata/pata_cypress.c
===================================================================
--- work.orig/drivers/ata/pata_cypress.c
+++ work/drivers/ata/pata_cypress.c
@@ -200,6 +200,10 @@ static struct pci_driver cy82c693_pci_dr
 
 static int __init cy82c693_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cy82c693_sht);
+		ata_dump_ops(DRV_NAME, &cy82c693_port_ops);
+	}
 	return pci_register_driver(&cy82c693_pci_driver);
 }
 
Index: work/drivers/ata/pata_efar.c
===================================================================
--- work.orig/drivers/ata/pata_efar.c
+++ work/drivers/ata/pata_efar.c
@@ -336,6 +336,10 @@ static struct pci_driver efar_pci_driver
 
 static int __init efar_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &efar_sht);
+		ata_dump_ops(DRV_NAME, &efar_ops);
+	}
 	return pci_register_driver(&efar_pci_driver);
 }
 
Index: work/drivers/ata/pata_hpt366.c
===================================================================
--- work.orig/drivers/ata/pata_hpt366.c
+++ work/drivers/ata/pata_hpt366.c
@@ -470,6 +470,10 @@ static struct pci_driver hpt36x_pci_driv
 
 static int __init hpt36x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &hpt36x_sht);
+		ata_dump_ops(DRV_NAME, &hpt366_port_ops);
+	}
 	return pci_register_driver(&hpt36x_pci_driver);
 }
 
Index: work/drivers/ata/pata_hpt37x.c
===================================================================
--- work.orig/drivers/ata/pata_hpt37x.c
+++ work/drivers/ata/pata_hpt37x.c
@@ -1187,6 +1187,13 @@ static struct pci_driver hpt37x_pci_driv
 
 static int __init hpt37x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &hpt37x_sht);
+		ata_dump_ops(DRV_NAME, &hpt370_port_ops);
+		ata_dump_ops(DRV_NAME, &hpt370a_port_ops);
+		ata_dump_ops(DRV_NAME, &hpt372_port_ops);
+		ata_dump_ops(DRV_NAME, &hpt374_port_ops);
+	}
 	return pci_register_driver(&hpt37x_pci_driver);
 }
 
Index: work/drivers/ata/pata_hpt3x2n.c
===================================================================
--- work.orig/drivers/ata/pata_hpt3x2n.c
+++ work/drivers/ata/pata_hpt3x2n.c
@@ -626,6 +626,10 @@ static struct pci_driver hpt3x2n_pci_dri
 
 static int __init hpt3x2n_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &hpt3x2n_sht);
+		ata_dump_ops(DRV_NAME, &hpt3x2n_port_ops);
+	}
 	return pci_register_driver(&hpt3x2n_pci_driver);
 }
 
Index: work/drivers/ata/pata_hpt3x3.c
===================================================================
--- work.orig/drivers/ata/pata_hpt3x3.c
+++ work/drivers/ata/pata_hpt3x3.c
@@ -281,6 +281,10 @@ static struct pci_driver hpt3x3_pci_driv
 
 static int __init hpt3x3_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &hpt3x3_sht);
+		ata_dump_ops(DRV_NAME, &hpt3x3_port_ops);
+	}
 	return pci_register_driver(&hpt3x3_pci_driver);
 }
 
Index: work/drivers/ata/pata_icside.c
===================================================================
--- work.orig/drivers/ata/pata_icside.c
+++ work/drivers/ata/pata_icside.c
@@ -665,6 +665,10 @@ static struct ecard_driver pata_icside_d
 
 static int __init pata_icside_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pata_icside_sht);
+		ata_dump_ops(DRV_NAME, &pata_icside_port_ops);
+	}
 	return ecard_register_driver(&pata_icside_driver);
 }
 
Index: work/drivers/ata/pata_isapnp.c
===================================================================
--- work.orig/drivers/ata/pata_isapnp.c
+++ work/drivers/ata/pata_isapnp.c
@@ -155,6 +155,10 @@ static struct pnp_driver isapnp_driver =
 
 static int __init isapnp_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &isapnp_sht);
+		ata_dump_ops(DRV_NAME, &isapnp_port_ops);
+	}
 	return pnp_register_driver(&isapnp_driver);
 }
 
Index: work/drivers/ata/pata_it8213.c
===================================================================
--- work.orig/drivers/ata/pata_it8213.c
+++ work/drivers/ata/pata_it8213.c
@@ -347,6 +347,10 @@ static struct pci_driver it8213_pci_driv
 
 static int __init it8213_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &it8213_sht);
+		ata_dump_ops(DRV_NAME, &it8213_ops);
+	}
 	return pci_register_driver(&it8213_pci_driver);
 }
 
Index: work/drivers/ata/pata_it821x.c
===================================================================
--- work.orig/drivers/ata/pata_it821x.c
+++ work/drivers/ata/pata_it821x.c
@@ -819,6 +819,11 @@ static struct pci_driver it821x_pci_driv
 
 static int __init it821x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &it821x_sht);
+		ata_dump_ops(DRV_NAME, &it821x_smart_port_ops);
+		ata_dump_ops(DRV_NAME, &it821x_passthru_port_ops);
+	}
 	return pci_register_driver(&it821x_pci_driver);
 }
 
Index: work/drivers/ata/pata_ixp4xx_cf.c
===================================================================
--- work.orig/drivers/ata/pata_ixp4xx_cf.c
+++ work/drivers/ata/pata_ixp4xx_cf.c
@@ -242,6 +242,10 @@ static struct platform_driver ixp4xx_pat
 
 static int __init ixp4xx_pata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ixp4xx_sht);
+		ata_dump_ops(DRV_NAME, &ixp4xx_port_ops);
+	}
 	return platform_driver_register(&ixp4xx_pata_platform_driver);
 }
 
Index: work/drivers/ata/pata_jmicron.c
===================================================================
--- work.orig/drivers/ata/pata_jmicron.c
+++ work/drivers/ata/pata_jmicron.c
@@ -222,6 +222,10 @@ static struct pci_driver jmicron_pci_dri
 
 static int __init jmicron_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &jmicron_sht);
+		ata_dump_ops(DRV_NAME, &jmicron_ops);
+	}
 	return pci_register_driver(&jmicron_pci_driver);
 }
 
Index: work/drivers/ata/pata_legacy.c
===================================================================
--- work.orig/drivers/ata/pata_legacy.c
+++ work/drivers/ata/pata_legacy.c
@@ -1507,6 +1507,20 @@ static __init int legacy_init(void)
 	}
 	if (ct != 0)
 		return 0;
+	{
+		ata_dump_sht(DRV_NAME, &legacy_sht);
+		ata_dump_ops(DRV_NAME, &simple_port_ops);
+		ata_dump_ops(DRV_NAME, &legacy_port_ops);
+		ata_dump_ops(DRV_NAME, &pdc20230_port_ops);
+		ata_dump_ops(DRV_NAME, &ht6560a_port_ops);
+		ata_dump_ops(DRV_NAME, &ht6560b_port_ops);
+		ata_dump_ops(DRV_NAME, &opti82c611a_port_ops);
+		ata_dump_ops(DRV_NAME, &opti82c46x_port_ops);
+		ata_dump_ops(DRV_NAME, &qdi6500_port_ops);
+		ata_dump_ops(DRV_NAME, &qdi6580_port_ops);
+		ata_dump_ops(DRV_NAME, &qdi6580dp_port_ops);
+		ata_dump_ops(DRV_NAME, &winbond_port_ops);
+	}
 	return -ENODEV;
 }
 
Index: work/drivers/ata/pata_marvell.c
===================================================================
--- work.orig/drivers/ata/pata_marvell.c
+++ work/drivers/ata/pata_marvell.c
@@ -210,6 +210,10 @@ static struct pci_driver marvell_pci_dri
 
 static int __init marvell_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &marvell_sht);
+		ata_dump_ops(DRV_NAME, &marvell_ops);
+	}
 	return pci_register_driver(&marvell_pci_driver);
 }
 
Index: work/drivers/ata/pata_mpc52xx.c
===================================================================
--- work.orig/drivers/ata/pata_mpc52xx.c
+++ work/drivers/ata/pata_mpc52xx.c
@@ -527,6 +527,10 @@ static int __init
 mpc52xx_ata_init(void)
 {
 	printk(KERN_INFO "ata: MPC52xx IDE/ATA libata driver\n");
+	{
+		ata_dump_sht(DRV_NAME, &mpc52xx_ata_sht);
+		ata_dump_ops(DRV_NAME, &mpc52xx_ata_port_ops);
+	}
 	return of_register_platform_driver(&mpc52xx_ata_of_platform_driver);
 }
 
Index: work/drivers/ata/pata_mpiix.c
===================================================================
--- work.orig/drivers/ata/pata_mpiix.c
+++ work/drivers/ata/pata_mpiix.c
@@ -278,6 +278,10 @@ static struct pci_driver mpiix_pci_drive
 
 static int __init mpiix_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &mpiix_sht);
+		ata_dump_ops(DRV_NAME, &mpiix_port_ops);
+	}
 	return pci_register_driver(&mpiix_pci_driver);
 }
 
Index: work/drivers/ata/pata_netcell.c
===================================================================
--- work.orig/drivers/ata/pata_netcell.c
+++ work/drivers/ata/pata_netcell.c
@@ -137,6 +137,10 @@ static struct pci_driver netcell_pci_dri
 
 static int __init netcell_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &netcell_sht);
+		ata_dump_ops(DRV_NAME, &netcell_ops);
+	}
 	return pci_register_driver(&netcell_pci_driver);
 }
 
Index: work/drivers/ata/pata_ninja32.c
===================================================================
--- work.orig/drivers/ata/pata_ninja32.c
+++ work/drivers/ata/pata_ninja32.c
@@ -196,6 +196,10 @@ static struct pci_driver ninja32_pci_dri
 
 static int __init ninja32_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ninja32_sht);
+		ata_dump_ops(DRV_NAME, &ninja32_port_ops);
+	}
 	return pci_register_driver(&ninja32_pci_driver);
 }
 
Index: work/drivers/ata/pata_ns87410.c
===================================================================
--- work.orig/drivers/ata/pata_ns87410.c
+++ work/drivers/ata/pata_ns87410.c
@@ -219,6 +219,10 @@ static struct pci_driver ns87410_pci_dri
 
 static int __init ns87410_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ns87410_sht);
+		ata_dump_ops(DRV_NAME, &ns87410_port_ops);
+	}
 	return pci_register_driver(&ns87410_pci_driver);
 }
 
Index: work/drivers/ata/pata_ns87415.c
===================================================================
--- work.orig/drivers/ata/pata_ns87415.c
+++ work/drivers/ata/pata_ns87415.c
@@ -457,6 +457,11 @@ static struct pci_driver ns87415_pci_dri
 
 static int __init ns87415_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ns87415_sht);
+		//ata_dump_ops(DRV_NAME, &ns87560_pata_ops);
+		ata_dump_ops(DRV_NAME, &ns87415_pata_ops);
+	}
 	return pci_register_driver(&ns87415_pci_driver);
 }
 
Index: work/drivers/ata/pata_oldpiix.c
===================================================================
--- work.orig/drivers/ata/pata_oldpiix.c
+++ work/drivers/ata/pata_oldpiix.c
@@ -323,6 +323,10 @@ static struct pci_driver oldpiix_pci_dri
 
 static int __init oldpiix_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &oldpiix_sht);
+		ata_dump_ops(DRV_NAME, &oldpiix_pata_ops);
+	}
 	return pci_register_driver(&oldpiix_pci_driver);
 }
 
Index: work/drivers/ata/pata_opti.c
===================================================================
--- work.orig/drivers/ata/pata_opti.c
+++ work/drivers/ata/pata_opti.c
@@ -251,6 +251,10 @@ static struct pci_driver opti_pci_driver
 
 static int __init opti_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &opti_sht);
+		ata_dump_ops(DRV_NAME, &opti_port_ops);
+	}
 	return pci_register_driver(&opti_pci_driver);
 }
 
Index: work/drivers/ata/pata_optidma.c
===================================================================
--- work.orig/drivers/ata/pata_optidma.c
+++ work/drivers/ata/pata_optidma.c
@@ -538,6 +538,11 @@ static struct pci_driver optidma_pci_dri
 
 static int __init optidma_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &optidma_sht);
+		ata_dump_ops(DRV_NAME, &optidma_port_ops);
+		ata_dump_ops(DRV_NAME, &optiplus_port_ops);
+	}
 	return pci_register_driver(&optidma_pci_driver);
 }
 
Index: work/drivers/ata/pata_pcmcia.c
===================================================================
--- work.orig/drivers/ata/pata_pcmcia.c
+++ work/drivers/ata/pata_pcmcia.c
@@ -499,6 +499,11 @@ static struct pcmcia_driver pcmcia_drive
 
 static int __init pcmcia_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pcmcia_sht);
+		ata_dump_ops(DRV_NAME, &pcmcia_port_ops);
+		ata_dump_ops(DRV_NAME, &pcmcia_8bit_port_ops);
+	}
 	return pcmcia_register_driver(&pcmcia_driver);
 }
 
Index: work/drivers/ata/pata_pdc2027x.c
===================================================================
--- work.orig/drivers/ata/pata_pdc2027x.c
+++ work/drivers/ata/pata_pdc2027x.c
@@ -845,6 +845,11 @@ static int __devinit pdc2027x_init_one(s
  */
 static int __init pdc2027x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pdc2027x_sht);
+		ata_dump_ops(DRV_NAME, &pdc2027x_pata100_ops);
+		ata_dump_ops(DRV_NAME, &pdc2027x_pata133_ops);
+	}
 	return pci_register_driver(&pdc2027x_pci_driver);
 }
 
Index: work/drivers/ata/pata_pdc202xx_old.c
===================================================================
--- work.orig/drivers/ata/pata_pdc202xx_old.c
+++ work/drivers/ata/pata_pdc202xx_old.c
@@ -412,6 +412,11 @@ static struct pci_driver pdc202xx_pci_dr
 
 static int __init pdc202xx_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pdc202xx_sht);
+		ata_dump_ops(DRV_NAME, &pdc2024x_port_ops);
+		ata_dump_ops(DRV_NAME, &pdc2026x_port_ops);
+	}
 	return pci_register_driver(&pdc202xx_pci_driver);
 }
 
Index: work/drivers/ata/pata_platform.c
===================================================================
--- work.orig/drivers/ata/pata_platform.c
+++ work/drivers/ata/pata_platform.c
@@ -263,6 +263,10 @@ static struct platform_driver pata_platf
 
 static int __init pata_platform_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pata_platform_sht);
+		ata_dump_ops(DRV_NAME, &pata_platform_port_ops);
+	}
 	return platform_driver_register(&pata_platform_driver);
 }
 
Index: work/drivers/ata/pata_qdi.c
===================================================================
--- work.orig/drivers/ata/pata_qdi.c
+++ work/drivers/ata/pata_qdi.c
@@ -390,6 +390,11 @@ static __init int qdi_init(void)
 	}
 	if (ct != 0)
 		return 0;
+	{
+		ata_dump_sht(DRV_NAME, &qdi_sht);
+		ata_dump_ops(DRV_NAME, &qdi6500_port_ops);
+		ata_dump_ops(DRV_NAME, &qdi6580_port_ops);
+	}
 	return -ENODEV;
 }
 
Index: work/drivers/ata/pata_radisys.c
===================================================================
--- work.orig/drivers/ata/pata_radisys.c
+++ work/drivers/ata/pata_radisys.c
@@ -289,6 +289,10 @@ static struct pci_driver radisys_pci_dri
 
 static int __init radisys_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &radisys_sht);
+		ata_dump_ops(DRV_NAME, &radisys_pata_ops);
+	}
 	return pci_register_driver(&radisys_pci_driver);
 }
 
Index: work/drivers/ata/pata_rz1000.c
===================================================================
--- work.orig/drivers/ata/pata_rz1000.c
+++ work/drivers/ata/pata_rz1000.c
@@ -179,6 +179,10 @@ static struct pci_driver rz1000_pci_driv
 
 static int __init rz1000_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &rz1000_sht);
+		ata_dump_ops(DRV_NAME, &rz1000_port_ops);
+	}
 	return pci_register_driver(&rz1000_pci_driver);
 }
 
Index: work/drivers/ata/pata_sc1200.c
===================================================================
--- work.orig/drivers/ata/pata_sc1200.c
+++ work/drivers/ata/pata_sc1200.c
@@ -274,6 +274,10 @@ static struct pci_driver sc1200_pci_driv
 
 static int __init sc1200_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sc1200_sht);
+		ata_dump_ops(DRV_NAME, &sc1200_port_ops);
+	}
 	return pci_register_driver(&sc1200_pci_driver);
 }
 
Index: work/drivers/ata/pata_scc.c
===================================================================
--- work.orig/drivers/ata/pata_scc.c
+++ work/drivers/ata/pata_scc.c
@@ -1189,6 +1189,10 @@ static int __init scc_init (void)
 		return rc;
 
 	DPRINTK("done\n");
+	{
+		ata_dump_sht(DRV_NAME, &scc_sht);
+		ata_dump_ops(DRV_NAME, &scc_pata_ops);
+	}
 	return 0;
 }
 
Index: work/drivers/ata/pata_serverworks.c
===================================================================
--- work.orig/drivers/ata/pata_serverworks.c
+++ work/drivers/ata/pata_serverworks.c
@@ -594,6 +594,11 @@ static struct pci_driver serverworks_pci
 
 static int __init serverworks_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &serverworks_sht);
+		ata_dump_ops(DRV_NAME, &serverworks_osb4_port_ops);
+		ata_dump_ops(DRV_NAME, &serverworks_csb_port_ops);
+	}
 	return pci_register_driver(&serverworks_pci_driver);
 }
 
Index: work/drivers/ata/pata_sil680.c
===================================================================
--- work.orig/drivers/ata/pata_sil680.c
+++ work/drivers/ata/pata_sil680.c
@@ -437,6 +437,10 @@ static struct pci_driver sil680_pci_driv
 
 static int __init sil680_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sil680_sht);
+		ata_dump_ops(DRV_NAME, &sil680_port_ops);
+	}
 	return pci_register_driver(&sil680_pci_driver);
 }
 
Index: work/drivers/ata/pata_sis.c
===================================================================
--- work.orig/drivers/ata/pata_sis.c
+++ work/drivers/ata/pata_sis.c
@@ -1027,6 +1027,15 @@ static struct pci_driver sis_pci_driver 
 
 static int __init sis_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sis_sht);
+		ata_dump_ops(DRV_NAME, &sis_133_ops);
+		ata_dump_ops(DRV_NAME, &sis_133_for_sata_ops);
+		ata_dump_ops(DRV_NAME, &sis_133_early_ops);
+		ata_dump_ops(DRV_NAME, &sis_100_ops);
+		ata_dump_ops(DRV_NAME, &sis_66_ops);
+		ata_dump_ops(DRV_NAME, &sis_old_ops);
+	}
 	return pci_register_driver(&sis_pci_driver);
 }
 
Index: work/drivers/ata/pata_sl82c105.c
===================================================================
--- work.orig/drivers/ata/pata_sl82c105.c
+++ work/drivers/ata/pata_sl82c105.c
@@ -352,6 +352,10 @@ static struct pci_driver sl82c105_pci_dr
 
 static int __init sl82c105_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sl82c105_sht);
+		ata_dump_ops(DRV_NAME, &sl82c105_port_ops);
+	}
 	return pci_register_driver(&sl82c105_pci_driver);
 }
 
Index: work/drivers/ata/pata_triflex.c
===================================================================
--- work.orig/drivers/ata/pata_triflex.c
+++ work/drivers/ata/pata_triflex.c
@@ -267,6 +267,10 @@ static struct pci_driver triflex_pci_dri
 
 static int __init triflex_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &triflex_sht);
+		ata_dump_ops(DRV_NAME, &triflex_port_ops);
+	}
 	return pci_register_driver(&triflex_pci_driver);
 }
 
Index: work/drivers/ata/pata_via.c
===================================================================
--- work.orig/drivers/ata/pata_via.c
+++ work/drivers/ata/pata_via.c
@@ -665,6 +665,11 @@ static struct pci_driver via_pci_driver 
 
 static int __init via_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &via_sht);
+		ata_dump_ops(DRV_NAME, &via_port_ops);
+		ata_dump_ops(DRV_NAME, &via_port_ops_noirq);
+	}
 	return pci_register_driver(&via_pci_driver);
 }
 
Index: work/drivers/ata/pata_winbond.c
===================================================================
--- work.orig/drivers/ata/pata_winbond.c
+++ work/drivers/ata/pata_winbond.c
@@ -289,6 +289,10 @@ static __init int winbond_init(void)
 	}
 	if (ct != 0)
 		return 0;
+	{
+		ata_dump_sht(DRV_NAME, &winbond_sht);
+		ata_dump_ops(DRV_NAME, &winbond_port_ops);
+	}
 	return -ENODEV;
 }
 
Index: work/drivers/ata/pdc_adma.c
===================================================================
--- work.orig/drivers/ata/pdc_adma.c
+++ work/drivers/ata/pdc_adma.c
@@ -723,6 +723,10 @@ static int adma_ata_init_one(struct pci_
 
 static int __init adma_ata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &adma_ata_sht);
+		ata_dump_ops(DRV_NAME, &adma_ata_ops);
+	}
 	return pci_register_driver(&adma_ata_pci_driver);
 }
 
Index: work/drivers/ata/sata_fsl.c
===================================================================
--- work.orig/drivers/ata/sata_fsl.c
+++ work/drivers/ata/sata_fsl.c
@@ -1373,6 +1373,10 @@ static struct of_platform_driver fsl_sat
 static int __init sata_fsl_init(void)
 {
 	of_register_platform_driver(&fsl_sata_driver);
+	{
+		ata_dump_sht(DRV_NAME, &sata_fsl_sht);
+		ata_dump_ops(DRV_NAME, &sata_fsl_ops);
+	}
 	return 0;
 }
 
Index: work/drivers/ata/sata_inic162x.c
===================================================================
--- work.orig/drivers/ata/sata_inic162x.c
+++ work/drivers/ata/sata_inic162x.c
@@ -755,6 +755,10 @@ static struct pci_driver inic_pci_driver
 
 static int __init inic_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &inic_sht);
+		ata_dump_ops(DRV_NAME, &inic_port_ops);
+	}
 	return pci_register_driver(&inic_pci_driver);
 }
 
Index: work/drivers/ata/sata_mv.c
===================================================================
--- work.orig/drivers/ata/sata_mv.c
+++ work/drivers/ata/sata_mv.c
@@ -2755,6 +2755,13 @@ static int mv_init_one(struct pci_dev *p
 
 static int __init mv_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &mv5_sht);
+		ata_dump_sht(DRV_NAME, &mv6_sht);
+		ata_dump_ops(DRV_NAME, &mv5_ops);
+		ata_dump_ops(DRV_NAME, &mv6_ops);
+		ata_dump_ops(DRV_NAME, &mv_iie_ops);
+	}
 	return pci_register_driver(&mv_pci_driver);
 }
 
Index: work/drivers/ata/sata_nv.c
===================================================================
--- work.orig/drivers/ata/sata_nv.c
+++ work/drivers/ata/sata_nv.c
@@ -2529,6 +2529,16 @@ static void nv_adma_host_stop(struct ata
 
 static int __init nv_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &nv_sht);
+		ata_dump_sht(DRV_NAME, &nv_adma_sht);
+		ata_dump_sht(DRV_NAME, &nv_swncq_sht);
+		ata_dump_ops(DRV_NAME, &nv_generic_ops);
+		ata_dump_ops(DRV_NAME, &nv_nf2_ops);
+		ata_dump_ops(DRV_NAME, &nv_ck804_ops);
+		ata_dump_ops(DRV_NAME, &nv_adma_ops);
+		ata_dump_ops(DRV_NAME, &nv_swncq_ops);
+	}
 	return pci_register_driver(&nv_pci_driver);
 }
 
Index: work/drivers/ata/sata_promise.c
===================================================================
--- work.orig/drivers/ata/sata_promise.c
+++ work/drivers/ata/sata_promise.c
@@ -1106,6 +1106,12 @@ static int pdc_ata_init_one(struct pci_d
 
 static int __init pdc_ata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pdc_ata_sht);
+		ata_dump_ops(DRV_NAME, &pdc_sata_ops);
+		ata_dump_ops(DRV_NAME, &pdc_old_sata_ops);
+		ata_dump_ops(DRV_NAME, &pdc_pata_ops);
+	}
 	return pci_register_driver(&pdc_ata_pci_driver);
 }
 
Index: work/drivers/ata/sata_qstor.c
===================================================================
--- work.orig/drivers/ata/sata_qstor.c
+++ work/drivers/ata/sata_qstor.c
@@ -677,6 +677,10 @@ static int qs_ata_init_one(struct pci_de
 
 static int __init qs_ata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &qs_ata_sht);
+		ata_dump_ops(DRV_NAME, &qs_ata_ops);
+	}
 	return pci_register_driver(&qs_ata_pci_driver);
 }
 
Index: work/drivers/ata/sata_sil.c
===================================================================
--- work.orig/drivers/ata/sata_sil.c
+++ work/drivers/ata/sata_sil.c
@@ -719,6 +719,10 @@ static int sil_pci_device_resume(struct 
 
 static int __init sil_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sil_sht);
+		ata_dump_ops(DRV_NAME, &sil_ops);
+	}
 	return pci_register_driver(&sil_pci_driver);
 }
 
Index: work/drivers/ata/sata_sil24.c
===================================================================
--- work.orig/drivers/ata/sata_sil24.c
+++ work/drivers/ata/sata_sil24.c
@@ -1412,6 +1412,10 @@ static int sil24_port_resume(struct ata_
 
 static int __init sil24_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sil24_sht);
+		ata_dump_ops(DRV_NAME, &sil24_ops);
+	}
 	return pci_register_driver(&sil24_pci_driver);
 }
 
Index: work/drivers/ata/sata_sis.c
===================================================================
--- work.orig/drivers/ata/sata_sis.c
+++ work/drivers/ata/sata_sis.c
@@ -366,6 +366,10 @@ static int sis_init_one(struct pci_dev *
 
 static int __init sis_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sis_sht);
+		ata_dump_ops(DRV_NAME, &sis_ops);
+	}
 	return pci_register_driver(&sis_pci_driver);
 }
 
Index: work/drivers/ata/sata_svw.c
===================================================================
--- work.orig/drivers/ata/sata_svw.c
+++ work/drivers/ata/sata_svw.c
@@ -502,6 +502,10 @@ static struct pci_driver k2_sata_pci_dri
 
 static int __init k2_sata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &k2_sata_sht);
+		ata_dump_ops(DRV_NAME, &k2_sata_ops);
+	}
 	return pci_register_driver(&k2_sata_pci_driver);
 }
 
Index: work/drivers/ata/sata_sx4.c
===================================================================
--- work.orig/drivers/ata/sata_sx4.c
+++ work/drivers/ata/sata_sx4.c
@@ -1444,6 +1444,10 @@ static int pdc_sata_init_one(struct pci_
 
 static int __init pdc_sata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pdc_sata_sht);
+		ata_dump_ops(DRV_NAME, &pdc_20621_ops);
+	}
 	return pci_register_driver(&pdc_sata_pci_driver);
 }
 
Index: work/drivers/ata/sata_uli.c
===================================================================
--- work.orig/drivers/ata/sata_uli.c
+++ work/drivers/ata/sata_uli.c
@@ -286,6 +286,10 @@ static int uli_init_one(struct pci_dev *
 
 static int __init uli_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &uli_sht);
+		ata_dump_ops(DRV_NAME, &uli_ops);
+	}
 	return pci_register_driver(&uli_pci_driver);
 }
 
Index: work/drivers/ata/sata_via.c
===================================================================
--- work.orig/drivers/ata/sata_via.c
+++ work/drivers/ata/sata_via.c
@@ -550,6 +550,12 @@ static int svia_init_one(struct pci_dev 
 
 static int __init svia_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &svia_sht);
+		ata_dump_ops(DRV_NAME, &vt6420_sata_ops);
+		ata_dump_ops(DRV_NAME, &vt6421_pata_ops);
+		ata_dump_ops(DRV_NAME, &vt6421_sata_ops);
+	}
 	return pci_register_driver(&svia_pci_driver);
 }
 
Index: work/drivers/ata/sata_vsc.c
===================================================================
--- work.orig/drivers/ata/sata_vsc.c
+++ work/drivers/ata/sata_vsc.c
@@ -472,6 +472,10 @@ static struct pci_driver vsc_sata_pci_dr
 
 static int __init vsc_sata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &vsc_sata_sht);
+		ata_dump_ops(DRV_NAME, &vsc_sata_ops);
+	}
 	return pci_register_driver(&vsc_sata_pci_driver);
 }
 
Index: work/include/linux/libata.h
===================================================================
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -790,6 +790,9 @@ static inline int ata_port_is_dummy(stru
 	return ap->ops == &ata_dummy_port_ops;
 }
 
+extern void ata_dump_sht(const char *drv_name, const struct scsi_host_template *sht);
+extern void ata_dump_ops(const char *drv_name, const struct ata_port_operations *ops);
+
 extern void sata_print_link_status(struct ata_link *link);
 extern void ata_port_probe(struct ata_port *);
 extern void ata_bus_reset(struct ata_port *ap);
Index: work/kernel/kallsyms.c
===================================================================
--- work.orig/kernel/kallsyms.c
+++ work/kernel/kallsyms.c
@@ -291,6 +291,7 @@ int lookup_symbol_name(unsigned long add
 	/* see if it's in a module */
 	return lookup_module_symbol_name(addr, symname);
 }
+EXPORT_SYMBOL_GPL(lookup_symbol_name);
 
 int lookup_symbol_attrs(unsigned long addr, unsigned long *size,
 			unsigned long *offset, char *modname, char *name)

[-- Attachment #4: verify-after --]
[-- Type: text/plain, Size: 39545 bytes --]

---
 drivers/ata/ahci.c              |    6 ++++
 drivers/ata/ata_generic.c       |    4 +++
 drivers/ata/ata_piix.c          |    8 ++++++
 drivers/ata/libata-core.c       |   52 ++++++++++++++++++++++++++++++++++++++++
 drivers/ata/pata_acpi.c         |    4 +++
 drivers/ata/pata_ali.c          |    8 ++++++
 drivers/ata/pata_amd.c          |   11 ++++++++
 drivers/ata/pata_artop.c        |    5 +++
 drivers/ata/pata_at32.c         |    4 +++
 drivers/ata/pata_atiixp.c       |    4 +++
 drivers/ata/pata_bf54x.c        |    4 +++
 drivers/ata/pata_cmd640.c       |    4 +++
 drivers/ata/pata_cmd64x.c       |    7 +++++
 drivers/ata/pata_cs5520.c       |    4 +++
 drivers/ata/pata_cs5530.c       |    4 +++
 drivers/ata/pata_cs5535.c       |    4 +++
 drivers/ata/pata_cs5536.c       |    4 +++
 drivers/ata/pata_cypress.c      |    4 +++
 drivers/ata/pata_efar.c         |    4 +++
 drivers/ata/pata_hpt366.c       |    4 +++
 drivers/ata/pata_hpt37x.c       |    7 +++++
 drivers/ata/pata_hpt3x2n.c      |    4 +++
 drivers/ata/pata_hpt3x3.c       |    4 +++
 drivers/ata/pata_icside.c       |    4 +++
 drivers/ata/pata_isapnp.c       |    4 +++
 drivers/ata/pata_it8213.c       |    4 +++
 drivers/ata/pata_it821x.c       |    5 +++
 drivers/ata/pata_ixp4xx_cf.c    |    4 +++
 drivers/ata/pata_jmicron.c      |    4 +++
 drivers/ata/pata_legacy.c       |   14 ++++++++++
 drivers/ata/pata_marvell.c      |    4 +++
 drivers/ata/pata_mpc52xx.c      |    4 +++
 drivers/ata/pata_mpiix.c        |    4 +++
 drivers/ata/pata_netcell.c      |    4 +++
 drivers/ata/pata_ninja32.c      |    4 +++
 drivers/ata/pata_ns87410.c      |    4 +++
 drivers/ata/pata_ns87415.c      |    5 +++
 drivers/ata/pata_oldpiix.c      |    4 +++
 drivers/ata/pata_opti.c         |    4 +++
 drivers/ata/pata_optidma.c      |    5 +++
 drivers/ata/pata_pcmcia.c       |    5 +++
 drivers/ata/pata_pdc2027x.c     |    5 +++
 drivers/ata/pata_pdc202xx_old.c |    5 +++
 drivers/ata/pata_platform.c     |    4 +++
 drivers/ata/pata_qdi.c          |    5 +++
 drivers/ata/pata_radisys.c      |    4 +++
 drivers/ata/pata_rz1000.c       |    4 +++
 drivers/ata/pata_sc1200.c       |    4 +++
 drivers/ata/pata_scc.c          |    4 +++
 drivers/ata/pata_serverworks.c  |    5 +++
 drivers/ata/pata_sil680.c       |    4 +++
 drivers/ata/pata_sis.c          |   10 +++++++
 drivers/ata/pata_sl82c105.c     |    4 +++
 drivers/ata/pata_triflex.c      |    4 +++
 drivers/ata/pata_via.c          |    5 +++
 drivers/ata/pata_winbond.c      |    4 +++
 drivers/ata/pdc_adma.c          |    4 +++
 drivers/ata/sata_fsl.c          |    4 +++
 drivers/ata/sata_inic162x.c     |    4 +++
 drivers/ata/sata_mv.c           |    7 +++++
 drivers/ata/sata_nv.c           |   10 +++++++
 drivers/ata/sata_promise.c      |    7 +++++
 drivers/ata/sata_qstor.c        |    4 +++
 drivers/ata/sata_sil.c          |    4 +++
 drivers/ata/sata_sil24.c        |    4 +++
 drivers/ata/sata_sis.c          |    4 +++
 drivers/ata/sata_svw.c          |    4 +++
 drivers/ata/sata_sx4.c          |    4 +++
 drivers/ata/sata_uli.c          |    4 +++
 drivers/ata/sata_via.c          |    6 ++++
 drivers/ata/sata_vsc.c          |    4 +++
 include/linux/libata.h          |    3 ++
 kernel/kallsyms.c               |    1 
 73 files changed, 399 insertions(+)

Index: work/drivers/ata/ahci.c
===================================================================
--- work.orig/drivers/ata/ahci.c
+++ work/drivers/ata/ahci.c
@@ -2212,6 +2212,12 @@ static int ahci_init_one(struct pci_dev 
 
 static int __init ahci_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ahci_sht);
+		ata_dump_ops(DRV_NAME, &ahci_ops);
+		ata_dump_ops(DRV_NAME, &ahci_vt8251_ops);
+		ata_dump_ops(DRV_NAME, &ahci_p5wdh_ops);
+	}
 	return pci_register_driver(&ahci_pci_driver);
 }
 
Index: work/drivers/ata/ata_generic.c
===================================================================
--- work.orig/drivers/ata/ata_generic.c
+++ work/drivers/ata/ata_generic.c
@@ -187,6 +187,10 @@ static struct pci_driver ata_generic_pci
 
 static int __init ata_generic_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &generic_sht);
+		ata_dump_ops(DRV_NAME, &generic_port_ops);
+	}
 	return pci_register_driver(&ata_generic_pci_driver);
 }
 
Index: work/drivers/ata/ata_piix.c
===================================================================
--- work.orig/drivers/ata/ata_piix.c
+++ work/drivers/ata/ata_piix.c
@@ -1558,6 +1558,14 @@ static int __init piix_init(void)
 	in_module_init = 0;
 
 	DPRINTK("done\n");
+	{
+		ata_dump_sht(DRV_NAME, &piix_sht);
+		ata_dump_ops(DRV_NAME, &piix_pata_ops);
+		ata_dump_ops(DRV_NAME, &piix_vmw_ops);
+		ata_dump_ops(DRV_NAME, &ich_pata_ops);
+		ata_dump_ops(DRV_NAME, &piix_sata_ops);
+		ata_dump_ops(DRV_NAME, &piix_sidpr_sata_ops);
+	}
 	return 0;
 }
 
Index: work/drivers/ata/pata_acpi.c
===================================================================
--- work.orig/drivers/ata/pata_acpi.c
+++ work/drivers/ata/pata_acpi.c
@@ -295,6 +295,10 @@ static struct pci_driver pacpi_pci_drive
 
 static int __init pacpi_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pacpi_sht);
+		ata_dump_ops(DRV_NAME, &pacpi_ops);
+	}
 	return pci_register_driver(&pacpi_pci_driver);
 }
 
Index: work/drivers/ata/pata_ali.c
===================================================================
--- work.orig/drivers/ata/pata_ali.c
+++ work/drivers/ata/pata_ali.c
@@ -557,6 +557,14 @@ static struct pci_driver ali_pci_driver 
 
 static int __init ali_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ali_sht);
+		ata_dump_ops(DRV_NAME, &ali_early_port_ops);
+		ata_dump_ops(DRV_NAME, &ali_dma_base_ops);
+		ata_dump_ops(DRV_NAME, &ali_20_port_ops);
+		ata_dump_ops(DRV_NAME, &ali_c2_port_ops);
+		ata_dump_ops(DRV_NAME, &ali_c5_port_ops);
+	}
 	return pci_register_driver(&ali_pci_driver);
 }
 
Index: work/drivers/ata/pata_amd.c
===================================================================
--- work.orig/drivers/ata/pata_amd.c
+++ work/drivers/ata/pata_amd.c
@@ -614,6 +614,17 @@ static struct pci_driver amd_pci_driver 
 
 static int __init amd_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &amd_sht);
+		ata_dump_ops(DRV_NAME, &amd_base_port_ops);
+		ata_dump_ops(DRV_NAME, &amd33_port_ops);
+		ata_dump_ops(DRV_NAME, &amd66_port_ops);
+		ata_dump_ops(DRV_NAME, &amd100_port_ops);
+		ata_dump_ops(DRV_NAME, &amd133_port_ops);
+		ata_dump_ops(DRV_NAME, &nv_base_port_ops);
+		ata_dump_ops(DRV_NAME, &nv100_port_ops);
+		ata_dump_ops(DRV_NAME, &nv133_port_ops);
+	}
 	return pci_register_driver(&amd_pci_driver);
 }
 
Index: work/drivers/ata/pata_artop.c
===================================================================
--- work.orig/drivers/ata/pata_artop.c
+++ work/drivers/ata/pata_artop.c
@@ -456,6 +456,11 @@ static struct pci_driver artop_pci_drive
 
 static int __init artop_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &artop_sht);
+		ata_dump_ops(DRV_NAME, &artop6210_ops);
+		ata_dump_ops(DRV_NAME, &artop6260_ops);
+	}
 	return pci_register_driver(&artop_pci_driver);
 }
 
Index: work/drivers/ata/pata_at32.c
===================================================================
--- work.orig/drivers/ata/pata_at32.c
+++ work/drivers/ata/pata_at32.c
@@ -391,6 +391,10 @@ static struct platform_driver pata_at32_
 
 static int __init pata_at32_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &at32_sht);
+		ata_dump_ops(DRV_NAME, &at32_port_ops);
+	}
 	return platform_driver_probe(&pata_at32_driver, pata_at32_probe);
 }
 
Index: work/drivers/ata/pata_atiixp.c
===================================================================
--- work.orig/drivers/ata/pata_atiixp.c
+++ work/drivers/ata/pata_atiixp.c
@@ -273,6 +273,10 @@ static struct pci_driver atiixp_pci_driv
 
 static int __init atiixp_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &atiixp_sht);
+		ata_dump_ops(DRV_NAME, &atiixp_port_ops);
+	}
 	return pci_register_driver(&atiixp_pci_driver);
 }
 
Index: work/drivers/ata/pata_bf54x.c
===================================================================
--- work.orig/drivers/ata/pata_bf54x.c
+++ work/drivers/ata/pata_bf54x.c
@@ -1596,6 +1596,10 @@ static int __init bfin_atapi_init(void)
 		bfin_port_info[0].udma_mask = ATA_UDMA5;
 	};
 
+	{
+		ata_dump_sht(DRV_NAME, &bfin_sht);
+		ata_dump_ops(DRV_NAME, &bfin_pata_ops);
+	}
 	return platform_driver_register(&bfin_atapi_driver);
 }
 
Index: work/drivers/ata/pata_cmd640.c
===================================================================
--- work.orig/drivers/ata/pata_cmd640.c
+++ work/drivers/ata/pata_cmd640.c
@@ -261,6 +261,10 @@ static struct pci_driver cmd640_pci_driv
 
 static int __init cmd640_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cmd640_sht);
+		ata_dump_ops(DRV_NAME, &cmd640_port_ops);
+	}
 	return pci_register_driver(&cmd640_pci_driver);
 }
 
Index: work/drivers/ata/pata_cmd64x.c
===================================================================
--- work.orig/drivers/ata/pata_cmd64x.c
+++ work/drivers/ata/pata_cmd64x.c
@@ -428,6 +428,13 @@ static struct pci_driver cmd64x_pci_driv
 
 static int __init cmd64x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cmd64x_sht);
+		ata_dump_ops(DRV_NAME, &cmd64x_base_ops);
+		ata_dump_ops(DRV_NAME, &cmd64x_port_ops);
+		ata_dump_ops(DRV_NAME, &cmd646r1_port_ops);
+		ata_dump_ops(DRV_NAME, &cmd648_port_ops);
+	}
 	return pci_register_driver(&cmd64x_pci_driver);
 }
 
Index: work/drivers/ata/pata_cs5520.c
===================================================================
--- work.orig/drivers/ata/pata_cs5520.c
+++ work/drivers/ata/pata_cs5520.c
@@ -342,6 +342,10 @@ static struct pci_driver cs5520_pci_driv
 
 static int __init cs5520_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cs5520_sht);
+		ata_dump_ops(DRV_NAME, &cs5520_port_ops);
+	}
 	return pci_register_driver(&cs5520_pci_driver);
 }
 
Index: work/drivers/ata/pata_cs5530.c
===================================================================
--- work.orig/drivers/ata/pata_cs5530.c
+++ work/drivers/ata/pata_cs5530.c
@@ -368,6 +368,10 @@ static struct pci_driver cs5530_pci_driv
 
 static int __init cs5530_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cs5530_sht);
+		ata_dump_ops(DRV_NAME, &cs5530_port_ops);
+	}
 	return pci_register_driver(&cs5530_pci_driver);
 }
 
Index: work/drivers/ata/pata_cs5535.c
===================================================================
--- work.orig/drivers/ata/pata_cs5535.c
+++ work/drivers/ata/pata_cs5535.c
@@ -222,6 +222,10 @@ static struct pci_driver cs5535_pci_driv
 
 static int __init cs5535_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cs5535_sht);
+		ata_dump_ops(DRV_NAME, &cs5535_port_ops);
+	}
 	return pci_register_driver(&cs5535_pci_driver);
 }
 
Index: work/drivers/ata/pata_cs5536.c
===================================================================
--- work.orig/drivers/ata/pata_cs5536.c
+++ work/drivers/ata/pata_cs5536.c
@@ -283,6 +283,10 @@ static struct pci_driver cs5536_pci_driv
 
 static int __init cs5536_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cs5536_sht);
+		ata_dump_ops(DRV_NAME, &cs5536_port_ops);
+	}
 	return pci_register_driver(&cs5536_pci_driver);
 }
 
Index: work/drivers/ata/pata_cypress.c
===================================================================
--- work.orig/drivers/ata/pata_cypress.c
+++ work/drivers/ata/pata_cypress.c
@@ -159,6 +159,10 @@ static struct pci_driver cy82c693_pci_dr
 
 static int __init cy82c693_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &cy82c693_sht);
+		ata_dump_ops(DRV_NAME, &cy82c693_port_ops);
+	}
 	return pci_register_driver(&cy82c693_pci_driver);
 }
 
Index: work/drivers/ata/pata_efar.c
===================================================================
--- work.orig/drivers/ata/pata_efar.c
+++ work/drivers/ata/pata_efar.c
@@ -298,6 +298,10 @@ static struct pci_driver efar_pci_driver
 
 static int __init efar_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &efar_sht);
+		ata_dump_ops(DRV_NAME, &efar_ops);
+	}
 	return pci_register_driver(&efar_pci_driver);
 }
 
Index: work/drivers/ata/pata_hpt366.c
===================================================================
--- work.orig/drivers/ata/pata_hpt366.c
+++ work/drivers/ata/pata_hpt366.c
@@ -430,6 +430,10 @@ static struct pci_driver hpt36x_pci_driv
 
 static int __init hpt36x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &hpt36x_sht);
+		ata_dump_ops(DRV_NAME, &hpt366_port_ops);
+	}
 	return pci_register_driver(&hpt36x_pci_driver);
 }
 
Index: work/drivers/ata/pata_hpt37x.c
===================================================================
--- work.orig/drivers/ata/pata_hpt37x.c
+++ work/drivers/ata/pata_hpt37x.c
@@ -1073,6 +1073,13 @@ static struct pci_driver hpt37x_pci_driv
 
 static int __init hpt37x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &hpt37x_sht);
+		ata_dump_ops(DRV_NAME, &hpt370_port_ops);
+		ata_dump_ops(DRV_NAME, &hpt370a_port_ops);
+		ata_dump_ops(DRV_NAME, &hpt372_port_ops);
+		ata_dump_ops(DRV_NAME, &hpt374_port_ops);
+	}
 	return pci_register_driver(&hpt37x_pci_driver);
 }
 
Index: work/drivers/ata/pata_hpt3x2n.c
===================================================================
--- work.orig/drivers/ata/pata_hpt3x2n.c
+++ work/drivers/ata/pata_hpt3x2n.c
@@ -590,6 +590,10 @@ static struct pci_driver hpt3x2n_pci_dri
 
 static int __init hpt3x2n_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &hpt3x2n_sht);
+		ata_dump_ops(DRV_NAME, &hpt3x2n_port_ops);
+	}
 	return pci_register_driver(&hpt3x2n_pci_driver);
 }
 
Index: work/drivers/ata/pata_hpt3x3.c
===================================================================
--- work.orig/drivers/ata/pata_hpt3x3.c
+++ work/drivers/ata/pata_hpt3x3.c
@@ -240,6 +240,10 @@ static struct pci_driver hpt3x3_pci_driv
 
 static int __init hpt3x3_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &hpt3x3_sht);
+		ata_dump_ops(DRV_NAME, &hpt3x3_port_ops);
+	}
 	return pci_register_driver(&hpt3x3_pci_driver);
 }
 
Index: work/drivers/ata/pata_icside.c
===================================================================
--- work.orig/drivers/ata/pata_icside.c
+++ work/drivers/ata/pata_icside.c
@@ -637,6 +637,10 @@ static struct ecard_driver pata_icside_d
 
 static int __init pata_icside_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pata_icside_sht);
+		ata_dump_ops(DRV_NAME, &pata_icside_port_ops);
+	}
 	return ecard_register_driver(&pata_icside_driver);
 }
 
Index: work/drivers/ata/pata_isapnp.c
===================================================================
--- work.orig/drivers/ata/pata_isapnp.c
+++ work/drivers/ata/pata_isapnp.c
@@ -122,6 +122,10 @@ static struct pnp_driver isapnp_driver =
 
 static int __init isapnp_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &isapnp_sht);
+		ata_dump_ops(DRV_NAME, &isapnp_port_ops);
+	}
 	return pnp_register_driver(&isapnp_driver);
 }
 
Index: work/drivers/ata/pata_it8213.c
===================================================================
--- work.orig/drivers/ata/pata_it8213.c
+++ work/drivers/ata/pata_it8213.c
@@ -310,6 +310,10 @@ static struct pci_driver it8213_pci_driv
 
 static int __init it8213_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &it8213_sht);
+		ata_dump_ops(DRV_NAME, &it8213_ops);
+	}
 	return pci_register_driver(&it8213_pci_driver);
 }
 
Index: work/drivers/ata/pata_it821x.c
===================================================================
--- work.orig/drivers/ata/pata_it821x.c
+++ work/drivers/ata/pata_it821x.c
@@ -764,6 +764,11 @@ static struct pci_driver it821x_pci_driv
 
 static int __init it821x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &it821x_sht);
+		ata_dump_ops(DRV_NAME, &it821x_smart_port_ops);
+		ata_dump_ops(DRV_NAME, &it821x_passthru_port_ops);
+	}
 	return pci_register_driver(&it821x_pci_driver);
 }
 
Index: work/drivers/ata/pata_ixp4xx_cf.c
===================================================================
--- work.orig/drivers/ata/pata_ixp4xx_cf.c
+++ work/drivers/ata/pata_ixp4xx_cf.c
@@ -209,6 +209,10 @@ static struct platform_driver ixp4xx_pat
 
 static int __init ixp4xx_pata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ixp4xx_sht);
+		ata_dump_ops(DRV_NAME, &ixp4xx_port_ops);
+	}
 	return platform_driver_register(&ixp4xx_pata_platform_driver);
 }
 
Index: work/drivers/ata/pata_jmicron.c
===================================================================
--- work.orig/drivers/ata/pata_jmicron.c
+++ work/drivers/ata/pata_jmicron.c
@@ -180,6 +180,10 @@ static struct pci_driver jmicron_pci_dri
 
 static int __init jmicron_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &jmicron_sht);
+		ata_dump_ops(DRV_NAME, &jmicron_ops);
+	}
 	return pci_register_driver(&jmicron_pci_driver);
 }
 
Index: work/drivers/ata/pata_legacy.c
===================================================================
--- work.orig/drivers/ata/pata_legacy.c
+++ work/drivers/ata/pata_legacy.c
@@ -1267,6 +1267,20 @@ static __init int legacy_init(void)
 	}
 	if (ct != 0)
 		return 0;
+	{
+		ata_dump_sht(DRV_NAME, &legacy_sht);
+		ata_dump_ops(DRV_NAME, &simple_port_ops);
+		ata_dump_ops(DRV_NAME, &legacy_port_ops);
+		ata_dump_ops(DRV_NAME, &pdc20230_port_ops);
+		ata_dump_ops(DRV_NAME, &ht6560a_port_ops);
+		ata_dump_ops(DRV_NAME, &ht6560b_port_ops);
+		ata_dump_ops(DRV_NAME, &opti82c611a_port_ops);
+		ata_dump_ops(DRV_NAME, &opti82c46x_port_ops);
+		ata_dump_ops(DRV_NAME, &qdi6500_port_ops);
+		ata_dump_ops(DRV_NAME, &qdi6580_port_ops);
+		ata_dump_ops(DRV_NAME, &qdi6580dp_port_ops);
+		ata_dump_ops(DRV_NAME, &winbond_port_ops);
+	}
 	return -ENODEV;
 }
 
Index: work/drivers/ata/pata_marvell.c
===================================================================
--- work.orig/drivers/ata/pata_marvell.c
+++ work/drivers/ata/pata_marvell.c
@@ -168,6 +168,10 @@ static struct pci_driver marvell_pci_dri
 
 static int __init marvell_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &marvell_sht);
+		ata_dump_ops(DRV_NAME, &marvell_ops);
+	}
 	return pci_register_driver(&marvell_pci_driver);
 }
 
Index: work/drivers/ata/pata_mpc52xx.c
===================================================================
--- work.orig/drivers/ata/pata_mpc52xx.c
+++ work/drivers/ata/pata_mpc52xx.c
@@ -503,6 +503,10 @@ static int __init
 mpc52xx_ata_init(void)
 {
 	printk(KERN_INFO "ata: MPC52xx IDE/ATA libata driver\n");
+	{
+		ata_dump_sht(DRV_NAME, &mpc52xx_ata_sht);
+		ata_dump_ops(DRV_NAME, &mpc52xx_ata_port_ops);
+	}
 	return of_register_platform_driver(&mpc52xx_ata_of_platform_driver);
 }
 
Index: work/drivers/ata/pata_mpiix.c
===================================================================
--- work.orig/drivers/ata/pata_mpiix.c
+++ work/drivers/ata/pata_mpiix.c
@@ -247,6 +247,10 @@ static struct pci_driver mpiix_pci_drive
 
 static int __init mpiix_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &mpiix_sht);
+		ata_dump_ops(DRV_NAME, &mpiix_port_ops);
+	}
 	return pci_register_driver(&mpiix_pci_driver);
 }
 
Index: work/drivers/ata/pata_netcell.c
===================================================================
--- work.orig/drivers/ata/pata_netcell.c
+++ work/drivers/ata/pata_netcell.c
@@ -94,6 +94,10 @@ static struct pci_driver netcell_pci_dri
 
 static int __init netcell_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &netcell_sht);
+		ata_dump_ops(DRV_NAME, &netcell_ops);
+	}
 	return pci_register_driver(&netcell_pci_driver);
 }
 
Index: work/drivers/ata/pata_ninja32.c
===================================================================
--- work.orig/drivers/ata/pata_ninja32.c
+++ work/drivers/ata/pata_ninja32.c
@@ -156,6 +156,10 @@ static struct pci_driver ninja32_pci_dri
 
 static int __init ninja32_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ninja32_sht);
+		ata_dump_ops(DRV_NAME, &ninja32_port_ops);
+	}
 	return pci_register_driver(&ninja32_pci_driver);
 }
 
Index: work/drivers/ata/pata_ns87410.c
===================================================================
--- work.orig/drivers/ata/pata_ns87410.c
+++ work/drivers/ata/pata_ns87410.c
@@ -186,6 +186,10 @@ static struct pci_driver ns87410_pci_dri
 
 static int __init ns87410_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ns87410_sht);
+		ata_dump_ops(DRV_NAME, &ns87410_port_ops);
+	}
 	return pci_register_driver(&ns87410_pci_driver);
 }
 
Index: work/drivers/ata/pata_ns87415.c
===================================================================
--- work.orig/drivers/ata/pata_ns87415.c
+++ work/drivers/ata/pata_ns87415.c
@@ -399,6 +399,11 @@ static struct pci_driver ns87415_pci_dri
 
 static int __init ns87415_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &ns87415_sht);
+		ata_dump_ops(DRV_NAME, &ns87415_pata_ops);
+		//ata_dump_ops(DRV_NAME, &ns87560_pata_ops);
+	}
 	return pci_register_driver(&ns87415_pci_driver);
 }
 
Index: work/drivers/ata/pata_oldpiix.c
===================================================================
--- work.orig/drivers/ata/pata_oldpiix.c
+++ work/drivers/ata/pata_oldpiix.c
@@ -286,6 +286,10 @@ static struct pci_driver oldpiix_pci_dri
 
 static int __init oldpiix_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &oldpiix_sht);
+		ata_dump_ops(DRV_NAME, &oldpiix_pata_ops);
+	}
 	return pci_register_driver(&oldpiix_pci_driver);
 }
 
Index: work/drivers/ata/pata_opti.c
===================================================================
--- work.orig/drivers/ata/pata_opti.c
+++ work/drivers/ata/pata_opti.c
@@ -212,6 +212,10 @@ static struct pci_driver opti_pci_driver
 
 static int __init opti_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &opti_sht);
+		ata_dump_ops(DRV_NAME, &opti_port_ops);
+	}
 	return pci_register_driver(&opti_pci_driver);
 }
 
Index: work/drivers/ata/pata_optidma.c
===================================================================
--- work.orig/drivers/ata/pata_optidma.c
+++ work/drivers/ata/pata_optidma.c
@@ -469,6 +469,11 @@ static struct pci_driver optidma_pci_dri
 
 static int __init optidma_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &optidma_sht);
+		ata_dump_ops(DRV_NAME, &optidma_port_ops);
+		ata_dump_ops(DRV_NAME, &optiplus_port_ops);
+	}
 	return pci_register_driver(&optidma_pci_driver);
 }
 
Index: work/drivers/ata/pata_pcmcia.c
===================================================================
--- work.orig/drivers/ata/pata_pcmcia.c
+++ work/drivers/ata/pata_pcmcia.c
@@ -449,6 +449,11 @@ static struct pcmcia_driver pcmcia_drive
 
 static int __init pcmcia_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pcmcia_sht);
+		ata_dump_ops(DRV_NAME, &pcmcia_port_ops);
+		ata_dump_ops(DRV_NAME, &pcmcia_8bit_port_ops);
+	}
 	return pcmcia_register_driver(&pcmcia_driver);
 }
 
Index: work/drivers/ata/pata_pdc2027x.c
===================================================================
--- work.orig/drivers/ata/pata_pdc2027x.c
+++ work/drivers/ata/pata_pdc2027x.c
@@ -783,6 +783,11 @@ static int __devinit pdc2027x_init_one(s
  */
 static int __init pdc2027x_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pdc2027x_sht);
+		ata_dump_ops(DRV_NAME, &pdc2027x_pata100_ops);
+		ata_dump_ops(DRV_NAME, &pdc2027x_pata133_ops);
+	}
 	return pci_register_driver(&pdc2027x_pci_driver);
 }
 
Index: work/drivers/ata/pata_pdc202xx_old.c
===================================================================
--- work.orig/drivers/ata/pata_pdc202xx_old.c
+++ work/drivers/ata/pata_pdc202xx_old.c
@@ -353,6 +353,11 @@ static struct pci_driver pdc202xx_pci_dr
 
 static int __init pdc202xx_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pdc202xx_sht);
+		ata_dump_ops(DRV_NAME, &pdc2024x_port_ops);
+		ata_dump_ops(DRV_NAME, &pdc2026x_port_ops);
+	}
 	return pci_register_driver(&pdc202xx_pci_driver);
 }
 
Index: work/drivers/ata/pata_platform.c
===================================================================
--- work.orig/drivers/ata/pata_platform.c
+++ work/drivers/ata/pata_platform.c
@@ -233,6 +233,10 @@ static struct platform_driver pata_platf
 
 static int __init pata_platform_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pata_platform_sht);
+		ata_dump_ops(DRV_NAME, &pata_platform_port_ops);
+	}
 	return platform_driver_register(&pata_platform_driver);
 }
 
Index: work/drivers/ata/pata_qdi.c
===================================================================
--- work.orig/drivers/ata/pata_qdi.c
+++ work/drivers/ata/pata_qdi.c
@@ -337,6 +337,11 @@ static __init int qdi_init(void)
 	}
 	if (ct != 0)
 		return 0;
+	{
+		ata_dump_sht(DRV_NAME, &qdi_sht);
+		ata_dump_ops(DRV_NAME, &qdi6500_port_ops);
+		ata_dump_ops(DRV_NAME, &qdi6580_port_ops);
+	}
 	return -ENODEV;
 }
 
Index: work/drivers/ata/pata_radisys.c
===================================================================
--- work.orig/drivers/ata/pata_radisys.c
+++ work/drivers/ata/pata_radisys.c
@@ -251,6 +251,10 @@ static struct pci_driver radisys_pci_dri
 
 static int __init radisys_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &radisys_sht);
+		ata_dump_ops(DRV_NAME, &radisys_pata_ops);
+	}
 	return pci_register_driver(&radisys_pci_driver);
 }
 
Index: work/drivers/ata/pata_rz1000.c
===================================================================
--- work.orig/drivers/ata/pata_rz1000.c
+++ work/drivers/ata/pata_rz1000.c
@@ -138,6 +138,10 @@ static struct pci_driver rz1000_pci_driv
 
 static int __init rz1000_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &rz1000_sht);
+		ata_dump_ops(DRV_NAME, &rz1000_port_ops);
+	}
 	return pci_register_driver(&rz1000_pci_driver);
 }
 
Index: work/drivers/ata/pata_sc1200.c
===================================================================
--- work.orig/drivers/ata/pata_sc1200.c
+++ work/drivers/ata/pata_sc1200.c
@@ -236,6 +236,10 @@ static struct pci_driver sc1200_pci_driv
 
 static int __init sc1200_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sc1200_sht);
+		ata_dump_ops(DRV_NAME, &sc1200_port_ops);
+	}
 	return pci_register_driver(&sc1200_pci_driver);
 }
 
Index: work/drivers/ata/pata_scc.c
===================================================================
--- work.orig/drivers/ata/pata_scc.c
+++ work/drivers/ata/pata_scc.c
@@ -1174,6 +1174,10 @@ static int __init scc_init (void)
 		return rc;
 
 	DPRINTK("done\n");
+	{
+		ata_dump_sht(DRV_NAME, &scc_sht);
+		ata_dump_ops(DRV_NAME, &scc_pata_ops);
+	}
 	return 0;
 }
 
Index: work/drivers/ata/pata_serverworks.c
===================================================================
--- work.orig/drivers/ata/pata_serverworks.c
+++ work/drivers/ata/pata_serverworks.c
@@ -525,6 +525,11 @@ static struct pci_driver serverworks_pci
 
 static int __init serverworks_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &serverworks_sht);
+		ata_dump_ops(DRV_NAME, &serverworks_osb4_port_ops);
+		ata_dump_ops(DRV_NAME, &serverworks_csb_port_ops);
+	}
 	return pci_register_driver(&serverworks_pci_driver);
 }
 
Index: work/drivers/ata/pata_sil680.c
===================================================================
--- work.orig/drivers/ata/pata_sil680.c
+++ work/drivers/ata/pata_sil680.c
@@ -397,6 +397,10 @@ static struct pci_driver sil680_pci_driv
 
 static int __init sil680_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sil680_sht);
+		ata_dump_ops(DRV_NAME, &sil680_port_ops);
+	}
 	return pci_register_driver(&sil680_pci_driver);
 }
 
Index: work/drivers/ata/pata_sis.c
===================================================================
--- work.orig/drivers/ata/pata_sis.c
+++ work/drivers/ata/pata_sis.c
@@ -868,6 +868,16 @@ static struct pci_driver sis_pci_driver 
 
 static int __init sis_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sis_sht);
+		ata_dump_ops(DRV_NAME, &sis_133_for_sata_ops);
+		ata_dump_ops(DRV_NAME, &sis_base_ops);
+		ata_dump_ops(DRV_NAME, &sis_133_ops);
+		ata_dump_ops(DRV_NAME, &sis_133_early_ops);
+		ata_dump_ops(DRV_NAME, &sis_100_ops);
+		ata_dump_ops(DRV_NAME, &sis_66_ops);
+		ata_dump_ops(DRV_NAME, &sis_old_ops);
+	}
 	return pci_register_driver(&sis_pci_driver);
 }
 
Index: work/drivers/ata/pata_sl82c105.c
===================================================================
--- work.orig/drivers/ata/pata_sl82c105.c
+++ work/drivers/ata/pata_sl82c105.c
@@ -314,6 +314,10 @@ static struct pci_driver sl82c105_pci_dr
 
 static int __init sl82c105_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sl82c105_sht);
+		ata_dump_ops(DRV_NAME, &sl82c105_port_ops);
+	}
 	return pci_register_driver(&sl82c105_pci_driver);
 }
 
Index: work/drivers/ata/pata_triflex.c
===================================================================
--- work.orig/drivers/ata/pata_triflex.c
+++ work/drivers/ata/pata_triflex.c
@@ -229,6 +229,10 @@ static struct pci_driver triflex_pci_dri
 
 static int __init triflex_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &triflex_sht);
+		ata_dump_ops(DRV_NAME, &triflex_port_ops);
+	}
 	return pci_register_driver(&triflex_pci_driver);
 }
 
Index: work/drivers/ata/pata_via.c
===================================================================
--- work.orig/drivers/ata/pata_via.c
+++ work/drivers/ata/pata_via.c
@@ -596,6 +596,11 @@ static struct pci_driver via_pci_driver 
 
 static int __init via_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &via_sht);
+		ata_dump_ops(DRV_NAME, &via_port_ops);
+		ata_dump_ops(DRV_NAME, &via_port_ops_noirq);
+	}
 	return pci_register_driver(&via_pci_driver);
 }
 
Index: work/drivers/ata/pata_winbond.c
===================================================================
--- work.orig/drivers/ata/pata_winbond.c
+++ work/drivers/ata/pata_winbond.c
@@ -256,6 +256,10 @@ static __init int winbond_init(void)
 	}
 	if (ct != 0)
 		return 0;
+	{
+		ata_dump_sht(DRV_NAME, &winbond_sht);
+		ata_dump_ops(DRV_NAME, &winbond_port_ops);
+	}
 	return -ENODEV;
 }
 
Index: work/drivers/ata/pdc_adma.c
===================================================================
--- work.orig/drivers/ata/pdc_adma.c
+++ work/drivers/ata/pdc_adma.c
@@ -714,6 +714,10 @@ static int adma_ata_init_one(struct pci_
 
 static int __init adma_ata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &adma_ata_sht);
+		ata_dump_ops(DRV_NAME, &adma_ata_ops);
+	}
 	return pci_register_driver(&adma_ata_pci_driver);
 }
 
Index: work/drivers/ata/sata_fsl.c
===================================================================
--- work.orig/drivers/ata/sata_fsl.c
+++ work/drivers/ata/sata_fsl.c
@@ -1360,6 +1360,10 @@ static struct of_platform_driver fsl_sat
 static int __init sata_fsl_init(void)
 {
 	of_register_platform_driver(&fsl_sata_driver);
+	{
+		ata_dump_sht(DRV_NAME, &sata_fsl_sht);
+		ata_dump_ops(DRV_NAME, &sata_fsl_ops);
+	}
 	return 0;
 }
 
Index: work/drivers/ata/sata_inic162x.c
===================================================================
--- work.orig/drivers/ata/sata_inic162x.c
+++ work/drivers/ata/sata_inic162x.c
@@ -731,6 +731,10 @@ static struct pci_driver inic_pci_driver
 
 static int __init inic_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &inic_sht);
+		ata_dump_ops(DRV_NAME, &inic_port_ops);
+	}
 	return pci_register_driver(&inic_pci_driver);
 }
 
Index: work/drivers/ata/sata_mv.c
===================================================================
--- work.orig/drivers/ata/sata_mv.c
+++ work/drivers/ata/sata_mv.c
@@ -2677,6 +2677,13 @@ static int mv_init_one(struct pci_dev *p
 
 static int __init mv_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &mv5_sht);
+		ata_dump_sht(DRV_NAME, &mv6_sht);
+		ata_dump_ops(DRV_NAME, &mv5_ops);
+		ata_dump_ops(DRV_NAME, &mv6_ops);
+		ata_dump_ops(DRV_NAME, &mv_iie_ops);
+	}
 	return pci_register_driver(&mv_pci_driver);
 }
 
Index: work/drivers/ata/sata_nv.c
===================================================================
--- work.orig/drivers/ata/sata_nv.c
+++ work/drivers/ata/sata_nv.c
@@ -2416,6 +2416,16 @@ static void nv_adma_host_stop(struct ata
 
 static int __init nv_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &nv_sht);
+		ata_dump_sht(DRV_NAME, &nv_adma_sht);
+		ata_dump_sht(DRV_NAME, &nv_swncq_sht);
+		ata_dump_ops(DRV_NAME, &nv_generic_ops);
+		ata_dump_ops(DRV_NAME, &nv_nf2_ops);
+		ata_dump_ops(DRV_NAME, &nv_ck804_ops);
+		ata_dump_ops(DRV_NAME, &nv_adma_ops);
+		ata_dump_ops(DRV_NAME, &nv_swncq_ops);
+	}
 	return pci_register_driver(&nv_pci_driver);
 }
 
Index: work/drivers/ata/sata_promise.c
===================================================================
--- work.orig/drivers/ata/sata_promise.c
+++ work/drivers/ata/sata_promise.c
@@ -1060,6 +1060,13 @@ static int pdc_ata_init_one(struct pci_d
 
 static int __init pdc_ata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pdc_ata_sht);
+		ata_dump_ops(DRV_NAME, &pdc_common_ops);
+		ata_dump_ops(DRV_NAME, &pdc_sata_ops);
+		ata_dump_ops(DRV_NAME, &pdc_old_sata_ops);
+		ata_dump_ops(DRV_NAME, &pdc_pata_ops);
+	}
 	return pci_register_driver(&pdc_ata_pci_driver);
 }
 
Index: work/drivers/ata/sata_qstor.c
===================================================================
--- work.orig/drivers/ata/sata_qstor.c
+++ work/drivers/ata/sata_qstor.c
@@ -663,6 +663,10 @@ static int qs_ata_init_one(struct pci_de
 
 static int __init qs_ata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &qs_ata_sht);
+		ata_dump_ops(DRV_NAME, &qs_ata_ops);
+	}
 	return pci_register_driver(&qs_ata_pci_driver);
 }
 
Index: work/drivers/ata/sata_sil.c
===================================================================
--- work.orig/drivers/ata/sata_sil.c
+++ work/drivers/ata/sata_sil.c
@@ -688,6 +688,10 @@ static int sil_pci_device_resume(struct 
 
 static int __init sil_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sil_sht);
+		ata_dump_ops(DRV_NAME, &sil_ops);
+	}
 	return pci_register_driver(&sil_pci_driver);
 }
 
Index: work/drivers/ata/sata_sil24.c
===================================================================
--- work.orig/drivers/ata/sata_sil24.c
+++ work/drivers/ata/sata_sil24.c
@@ -1394,6 +1394,10 @@ static int sil24_port_resume(struct ata_
 
 static int __init sil24_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sil24_sht);
+		ata_dump_ops(DRV_NAME, &sil24_ops);
+	}
 	return pci_register_driver(&sil24_pci_driver);
 }
 
Index: work/drivers/ata/sata_sis.c
===================================================================
--- work.orig/drivers/ata/sata_sis.c
+++ work/drivers/ata/sata_sis.c
@@ -333,6 +333,10 @@ static int sis_init_one(struct pci_dev *
 
 static int __init sis_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &sis_sht);
+		ata_dump_ops(DRV_NAME, &sis_ops);
+	}
 	return pci_register_driver(&sis_pci_driver);
 }
 
Index: work/drivers/ata/sata_svw.c
===================================================================
--- work.orig/drivers/ata/sata_svw.c
+++ work/drivers/ata/sata_svw.c
@@ -474,6 +474,10 @@ static struct pci_driver k2_sata_pci_dri
 
 static int __init k2_sata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &k2_sata_sht);
+		ata_dump_ops(DRV_NAME, &k2_sata_ops);
+	}
 	return pci_register_driver(&k2_sata_pci_driver);
 }
 
Index: work/drivers/ata/sata_sx4.c
===================================================================
--- work.orig/drivers/ata/sata_sx4.c
+++ work/drivers/ata/sata_sx4.c
@@ -1433,6 +1433,10 @@ static int pdc_sata_init_one(struct pci_
 
 static int __init pdc_sata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &pdc_sata_sht);
+		ata_dump_ops(DRV_NAME, &pdc_20621_ops);
+	}
 	return pci_register_driver(&pdc_sata_pci_driver);
 }
 
Index: work/drivers/ata/sata_uli.c
===================================================================
--- work.orig/drivers/ata/sata_uli.c
+++ work/drivers/ata/sata_uli.c
@@ -248,6 +248,10 @@ static int uli_init_one(struct pci_dev *
 
 static int __init uli_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &uli_sht);
+		ata_dump_ops(DRV_NAME, &uli_ops);
+	}
 	return pci_register_driver(&uli_pci_driver);
 }
 
Index: work/drivers/ata/sata_via.c
===================================================================
--- work.orig/drivers/ata/sata_via.c
+++ work/drivers/ata/sata_via.c
@@ -462,6 +462,12 @@ static int svia_init_one(struct pci_dev 
 
 static int __init svia_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &svia_sht);
+		ata_dump_ops(DRV_NAME, &vt6420_sata_ops);
+		ata_dump_ops(DRV_NAME, &vt6421_pata_ops);
+		ata_dump_ops(DRV_NAME, &vt6421_sata_ops);
+	}
 	return pci_register_driver(&svia_pci_driver);
 }
 
Index: work/drivers/ata/sata_vsc.c
===================================================================
--- work.orig/drivers/ata/sata_vsc.c
+++ work/drivers/ata/sata_vsc.c
@@ -443,6 +443,10 @@ static struct pci_driver vsc_sata_pci_dr
 
 static int __init vsc_sata_init(void)
 {
+	{
+		ata_dump_sht(DRV_NAME, &vsc_sata_sht);
+		ata_dump_ops(DRV_NAME, &vsc_sata_ops);
+	}
 	return pci_register_driver(&vsc_sata_pci_driver);
 }
 
Index: work/drivers/ata/libata-core.c
===================================================================
--- work.orig/drivers/ata/libata-core.c
+++ work/drivers/ata/libata-core.c
@@ -7768,3 +7768,55 @@ EXPORT_SYMBOL_GPL(ata_cable_80wire);
 EXPORT_SYMBOL_GPL(ata_cable_unknown);
 EXPORT_SYMBOL_GPL(ata_cable_ignore);
 EXPORT_SYMBOL_GPL(ata_cable_sata);
+
+#include <linux/kallsyms.h>
+
+void ata_dump_sht(const char *drv_name, const struct scsi_host_template *sht)
+{
+	const int begin_off = offsetof(struct scsi_host_template, detect);
+	const int end_off = offsetof(struct scsi_host_template, eh_timed_out) + sizeof(void *);
+	char symname[KSYM_NAME_LEN];
+	void **pp;
+
+	if (lookup_symbol_name((unsigned long)sht, symname))
+		snprintf(symname, KSYM_NAME_LEN, "%p", sht);
+	printk("SHT %s %s: %s", drv_name, symname, sht->name);
+
+	for (pp = (void *)sht + begin_off; pp < (void **)((void *)sht + end_off); pp++) {
+		if (lookup_symbol_name((unsigned long)*pp, symname))
+			snprintf(symname, KSYM_NAME_LEN, "%p", *pp);
+		printk(" <%s>", symname);
+	}
+
+	printk(" %s %d %d %u %u %lu %d %u %u %u %u %u %u %u %u %u\n",
+	       sht->proc_name, sht->can_queue, sht->this_id,
+	       sht->sg_tablesize, sht->max_sectors, sht->dma_boundary,
+	       sht->cmd_per_lun, sht->present, sht->supported_mode,
+	       sht->unchecked_isa_dma, sht->use_clustering, sht->emulated,
+	       sht->skip_settle_delay, sht->ordered_tag, sht->use_sg_chaining,
+	       sht->max_host_blocked);
+}
+EXPORT_SYMBOL_GPL(ata_dump_sht);
+
+void ata_dump_ops(const char *drv_name, const struct ata_port_operations *ops)
+{
+	const int begin_off = 0;
+	const int end_off = offsetof(struct ata_port_operations, eng_timeout) + sizeof(void *);
+	struct ata_port_operations my_ops = *ops;
+	char symname[KSYM_NAME_LEN];
+	void **pp;
+
+	if (lookup_symbol_name((unsigned long)ops, symname))
+		snprintf(symname, KSYM_NAME_LEN, "%p", ops);
+	printk("OPS %s %s:", drv_name, symname);
+
+	ata_finalize_port_ops(&my_ops);
+
+	for (pp = (void *)&my_ops + begin_off; pp < (void **)((void *)&my_ops + end_off); pp++) {
+		if (lookup_symbol_name((unsigned long)*pp, symname))
+			snprintf(symname, KSYM_NAME_LEN, "%p", *pp);
+		printk(" <%s>", symname);
+	}
+	printk("\n");
+}
+EXPORT_SYMBOL_GPL(ata_dump_ops);
Index: work/include/linux/libata.h
===================================================================
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -803,6 +803,9 @@ static inline int ata_port_is_dummy(stru
 	return ap->ops == &ata_dummy_port_ops;
 }
 
+extern void ata_dump_sht(const char *drv_name, const struct scsi_host_template *sht);
+extern void ata_dump_ops(const char *drv_name, const struct ata_port_operations *ops);
+
 extern void sata_print_link_status(struct ata_link *link);
 extern void ata_port_probe(struct ata_port *);
 extern void ata_bus_reset(struct ata_port *ap);
Index: work/kernel/kallsyms.c
===================================================================
--- work.orig/kernel/kallsyms.c
+++ work/kernel/kallsyms.c
@@ -291,6 +291,7 @@ int lookup_symbol_name(unsigned long add
 	/* see if it's in a module */
 	return lookup_module_symbol_name(addr, symname);
 }
+EXPORT_SYMBOL_GPL(lookup_symbol_name);
 
 int lookup_symbol_attrs(unsigned long addr, unsigned long *size,
 			unsigned long *offset, char *modname, char *name)

[-- Attachment #5: out.before --]
[-- Type: text/plain, Size: 108352 bytes --]

OPS ahci ahci_ops: <sata_pmp_qc_defer_cmd_switch> <0000000000000000> <ahci_qc_prep> <ahci_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ahci_freeze> <ahci_thaw> <ahci_error_handler> <ahci_post_internal_cmd> <ahci_scr_read> <ahci_scr_write> <ahci_pmp_attach> <ahci_pmp_detach> <ahci_enable_alpm> <ahci_disable_alpm> <ahci_port_suspend> <ahci_port_resume> <ahci_port_start> <ahci_port_stop> <0000000000000000> <ata_noop_dev_select> <ahci_check_status> <ahci_check_status> <0000000000000000> <ahci_tf_read> <0000000000000000> <0000000000000000> <0000000000000000> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS ahci ahci_p5wdh_ops: <sata_pmp_qc_defer_cmd_switch> <0000000000000000> <ahci_qc_prep> <ahci_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ahci_freeze> <ahci_thaw> <ahci_p5wdh_error_handler> <ahci_post_internal_cmd> <ahci_scr_read> <ahci_scr_write> <ahci_pmp_attach> <ahci_pmp_detach> <ahci_enable_alpm> <ahci_disable_alpm> <ahci_port_suspend> <ahci_port_resume> <ahci_port_start> <ahci_port_stop> <0000000000000000> <ata_noop_dev_select> <ahci_check_status> <ahci_check_status> <0000000000000000> <ahci_tf_read> <0000000000000000> <0000000000000000> <0000000000000000> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS ahci ahci_vt8251_ops: <sata_pmp_qc_defer_cmd_switch> <0000000000000000> <ahci_qc_prep> <ahci_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ahci_freeze> <ahci_thaw> <ahci_vt8251_error_handler> <ahci_post_internal_cmd> <ahci_scr_read> <ahci_scr_write> <ahci_pmp_attach> <ahci_pmp_detach> <ahci_enable_alpm> <ahci_disable_alpm> <ahci_port_suspend> <ahci_port_resume> <ahci_port_start> <ahci_port_stop> <0000000000000000> <ata_noop_dev_select> <ahci_check_status> <ahci_check_status> <0000000000000000> <ahci_tf_read> <0000000000000000> <0000000000000000> <0000000000000000> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS ata_generic generic_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <generic_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS ata_piix ich_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ich_pata_cable_detect> <ata_pci_default_filter> <piix_set_piomode> <ich_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <piix_pata_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS ata_piix piix_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <piix_set_piomode> <piix_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <piix_pata_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS ata_piix piix_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS ata_piix piix_sidpr_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <piix_sidpr_error_handler> <ata_bmdma_post_internal_cmd> <piix_sidpr_scr_read> <piix_sidpr_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000000000
 00>
OPS ata_piix piix_vmw_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <piix_set_piomode> <piix_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <piix_pata_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <piix_vmw_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_acpi pacpi_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <pacpi_qc_issue_prot> <pacpi_cable_detect> <pacpi_mode_filter> <pacpi_set_piomode> <pacpi_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <pacpi_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pacpi_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_20_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ali_20_filter> <ali_set_piomode> <ali_set_dmamode> <0000000000000000> <ali_lock_sectors> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_c2_port_ops: <0000000000000000> <ali_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <ali_c2_cable_detect> <ata_pci_default_filter> <ali_set_piomode> <ali_set_dmamode> <0000000000000000> <ali_lock_sectors> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_c5_port_ops: <0000000000000000> <ali_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <ali_c2_cable_detect> <ata_pci_default_filter> <ali_set_piomode> <ali_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_early_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <ali_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS pata_amd amd100_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <amd100_set_piomode> <amd100_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd amd133_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <amd_cable_detect> <ata_pci_default_filter> <amd133_set_piomode> <amd133_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd amd33_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <amd33_set_piomode> <amd33_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd amd66_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <amd66_set_piomode> <amd66_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd nv100_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_ignore> <nv_mode_filter> <nv100_set_piomode> <nv100_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <nv_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd nv133_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_ignore> <nv_mode_filter> <nv133_set_piomode> <nv133_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <nv_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_artop artop6210_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <artop6210_set_piomode> <artop6210_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <artop6210_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000
 >
OPS pata_artop artop6260_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <artop6260_cable_detect> <ata_pci_default_filter> <artop6260_set_piomode> <artop6260_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <artop6260_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000
 000000>
OPS pata_atiixp atiixp_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <atiixp_cable_detect> <ata_pci_default_filter> <atiixp_set_piomode> <atiixp_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <atiixp_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <atiixp_bmdma_start> <atiixp_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000
 000>
OPS pata_cmd640 cmd640_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <cmd640_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cmd640_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <cmd640_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer_noirq> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000
 000>
OPS pata_cmd64x cmd646r1_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cmd64x_set_piomode> <cmd64x_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <cmd646r1_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS pata_cmd64x cmd648_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <cmd648_cable_detect> <ata_pci_default_filter> <cmd64x_set_piomode> <cmd64x_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <cmd648_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000
 000>
OPS pata_cmd64x cmd64x_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cmd64x_set_piomode> <cmd64x_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_cs5520 cs5520_port_ops: <0000000000000000> <0000000000000000> <ata_dumb_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cs5520_set_piomode> <cs5520_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000000000
 00>
OPS pata_cs5530 cs5530_port_ops: <0000000000000000> <0000000000000000> <ata_dumb_qc_prep> <cs5530_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cs5530_set_piomode> <cs5530_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000000
 00000>
OPS pata_cypress cy82c693_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cy82c693_set_piomode> <cy82c693_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS pata_efar efar_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <efar_cable_detect> <ata_pci_default_filter> <efar_set_piomode> <efar_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <efar_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt366 hpt366_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <hpt36x_cable_detect> <hpt366_filter> <hpt366_set_piomode> <hpt366_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt37x hpt370a_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <hpt370a_filter> <hpt370_set_piomode> <hpt370_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt37x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <hpt370_bmdma_start> <hpt370_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt37x hpt370_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <hpt370_filter> <hpt370_set_piomode> <hpt370_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt37x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <hpt370_bmdma_start> <hpt370_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt37x hpt372_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <hpt372_set_piomode> <hpt372_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt37x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <hpt37x_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt37x hpt374_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <hpt372_set_piomode> <hpt372_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt374_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <hpt37x_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt3x2n hpt3x2n_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <hpt3x2n_qc_issue_prot> <hpt3x2n_cable_detect> <ata_pci_default_filter> <hpt3x2n_set_piomode> <hpt3x2n_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt3x2n_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <hpt3x2n_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000
 00000000000>
OPS pata_hpt3x3 hpt3x3_port_ops: <0000000000000000> <hpt3x3_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <hpt3x3_set_piomode> <hpt3x3_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_it8213 it8213_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <it8213_cable_detect> <ata_pci_default_filter> <it8213_set_piomode> <it8213_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <it8213_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_it821x it821x_passthru_port_ops: <0000000000000000> <it821x_check_atapi_dma> <ata_qc_prep> <it821x_passthru_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <it821x_passthru_set_piomode> <it821x_passthru_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <it821x_port_start> <0000000000000000> <0000000000000000> <it821x_passthru_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <it821x_passthru_bmdma_start> <it821x_pa
 ssthru_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_it821x it821x_smart_port_ops: <0000000000000000> <it821x_check_atapi_dma> <ata_qc_prep> <it821x_smart_qc_issue_prot> <it821x_ident_hack> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <it821x_smart_set_mode> <it821x_dev_config> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <it821x_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <000000000000000
 0> <0000000000000000>
OPS pata_jmicron jmicron_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <jmicron_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_marvell marvell_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <marvell_cable_detect> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <marvell_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_mpiix mpiix_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <mpiix_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <mpiix_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <mpiix_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS pata_netcell netcell_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_80wire> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ninja32 ninja32_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <ninja32_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ninja32_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ns87410 ns87410_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ns87410_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <ns87410_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ns87410_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS pata_ns87415 ns87415_pata_ops: <0000000000000000> <ns87415_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <ns87415_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ns87415_bmdma_irq_clear> <ns87415_bmdma_setup> <ns87415_bmdma_start> <ns87415_bmdma_stop> <ata_bmdma_status> <00000000000000
 00> <0000000000000000>
OPS pata_oldpiix oldpiix_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <oldpiix_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <oldpiix_set_piomode> <oldpiix_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <oldpiix_pata_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000
 00000000>
OPS pata_optidma optidma_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <optidma_set_pio_mode> <optidma_set_dma_mode> <optidma_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <optidma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000000
 0>
OPS pata_optidma optiplus_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <optiplus_set_pio_mode> <optiplus_set_dma_mode> <optidma_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <optidma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS pata_opti opti_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <opti_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <opti_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_pcmcia pcmcia_8bit_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <0000000000000000> <0000000000000000> <pcmcia_set_mode_8bit> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer_8bit> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <000000000000
 0000>
OPS pata_pcmcia pcmcia_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <0000000000000000> <0000000000000000> <pcmcia_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer_noirq> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS pata_pdc2027x pdc2027x_pata100_ops: <0000000000000000> <pdc2027x_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <pdc2027x_cable_detect> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <pdc2027x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000
 000000000000>
OPS pata_pdc2027x pdc2027x_pata133_ops: <0000000000000000> <pdc2027x_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <pdc2027x_cable_detect> <pdc2027x_mode_filter> <pdc2027x_set_piomode> <pdc2027x_set_dmamode> <pdc2027x_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <pdc2027x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000
 > <0000000000000000>
OPS pata_pdc202xx_old pdc2024x_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <pdc202xx_set_piomode> <pdc202xx_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000
 000000000>
OPS pata_pdc202xx_old pdc2026x_port_ops: <0000000000000000> <pdc2026x_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <pdc2026x_cable_detect> <ata_pci_default_filter> <pdc202xx_set_piomode> <pdc202xx_set_dmamode> <0000000000000000> <pdc2026x_dev_config> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc2026x_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <pdc2026x_bmdma_start> <pdc2026x_bmdma_stop> <ata_bmdma_status> 
 <0000000000000000> <0000000000000000>
OPS pata_radisys radisys_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <radisys_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <radisys_set_piomode> <radisys_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000
 000000>
OPS pata_rz1000 rz1000_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <rz1000_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_serverworks serverworks_csb_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <serverworks_cable_detect> <serverworks_csb_filter> <serverworks_set_piomode> <serverworks_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <000000
 0000000000> <0000000000000000>
OPS pata_serverworks serverworks_osb4_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <serverworks_cable_detect> <serverworks_osb4_filter> <serverworks_set_piomode> <serverworks_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000
 000000000000> <0000000000000000>
OPS pata_sil680 sil680_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sil680_cable_detect> <ata_pci_default_filter> <sil680_set_piomode> <sil680_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000
 >
OPS pata_sis sis_100_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_66_cable_detect> <ata_pci_default_filter> <sis_100_set_piomode> <sis_100_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sis sis_133_early_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_66_cable_detect> <ata_pci_default_filter> <sis_100_set_piomode> <sis_133_early_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000000
 0>
OPS pata_sis sis_133_for_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_133_cable_detect> <ata_pci_default_filter> <sis_133_set_piomode> <sis_133_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000000
 00000>
OPS pata_sis sis_133_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_133_cable_detect> <ata_pci_default_filter> <sis_133_set_piomode> <sis_133_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sis sis_66_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_66_cable_detect> <ata_pci_default_filter> <sis_old_set_piomode> <sis_66_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sis sis_old_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <sis_old_set_piomode> <sis_old_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sl82c105 sl82c105_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <sl82c105_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sl82c105_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <sl82c105_bmdma_start> <sl82c105_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000
 0000000000>
OPS pata_triflex triflex_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <triflex_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <triflex_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <triflex_bmdma_start> <triflex_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS pata_via via_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <via_cable_detect> <ata_pci_default_filter> <via_set_piomode> <via_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <via_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_via via_port_ops_noirq: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <via_cable_detect> <ata_pci_default_filter> <via_set_piomode> <via_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <via_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer_noirq> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pdc_adma adma_ata_ops: <0000000000000000> <adma_check_atapi_dma> <adma_qc_prep> <adma_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <adma_freeze> <adma_thaw> <adma_error_handler> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <adma_port_start> <adma_port_stop> <adma_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <adma_bmdma_stop> <adma_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_inic162x inic_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <inic_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <inic_dev_config> <inic_freeze> <inic_thaw> <inic_error_handler> <inic_post_internal_cmd> <inic_scr_read> <inic_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <inic_port_resume> <inic_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <inic_bmdma_setup> <inic_bmdma_start> <inic_bmdma_stop> <inic_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_mv mv5_ops: <0000000000000000> <0000000000000000> <mv_qc_prep> <mv_qc_issue> <ata_cable_sata> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_eh_freeze> <mv_eh_thaw> <mv_error_handler> <mv_post_int_cmd> <mv5_scr_read> <mv5_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_port_start> <mv_port_stop> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_mv mv6_ops: <0000000000000000> <0000000000000000> <mv_qc_prep> <mv_qc_issue> <ata_cable_sata> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_eh_freeze> <mv_eh_thaw> <mv_error_handler> <mv_post_int_cmd> <mv_scr_read> <mv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_port_start> <mv_port_stop> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_mv mv_iie_ops: <0000000000000000> <0000000000000000> <mv_qc_prep_iie> <mv_qc_issue> <ata_cable_sata> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_eh_freeze> <mv_eh_thaw> <mv_error_handler> <mv_post_int_cmd> <mv_scr_read> <mv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_port_start> <mv_port_stop> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_nv nv_adma_ops: <ata_std_qc_defer> <nv_adma_check_atapi_dma> <nv_adma_qc_prep> <nv_adma_qc_issue> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_adma_freeze> <nv_adma_thaw> <nv_adma_error_handler> <nv_adma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_adma_port_suspend> <nv_adma_port_resume> <nv_adma_port_start> <nv_adma_port_stop> <nv_adma_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <nv_adma_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <nv_adma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_nv nv_ck804_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_ck804_freeze> <nv_ck804_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <nv_ck804_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_nv nv_generic_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_nv nv_nf2_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_nf2_freeze> <nv_nf2_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_nv nv_swncq_ops: <ata_std_qc_defer> <0000000000000000> <nv_swncq_qc_prep> <nv_swncq_qc_issue> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_mcp55_freeze> <nv_mcp55_thaw> <nv_swncq_error_handler> <ata_bmdma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_swncq_port_suspend> <nv_swncq_port_resume> <nv_swncq_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_promise pdc_old_sata_ops: <0000000000000000> <pdc_old_sata_check_atapi_dma> <pdc_qc_prep> <pdc_qc_issue_prot> <pdc_sata_cable_detect> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_freeze> <pdc_thaw> <pdc_sata_error_handler> <pdc_post_internal_cmd> <pdc_sata_scr_read> <pdc_sata_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_sata_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
 
OPS sata_promise pdc_pata_ops: <0000000000000000> <pdc_check_atapi_dma> <pdc_qc_prep> <pdc_qc_issue_prot> <pdc_pata_cable_detect> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_freeze> <pdc_thaw> <pdc_pata_error_handler> <pdc_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_common_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_promise pdc_sata_ops: <0000000000000000> <pdc_check_atapi_dma> <pdc_qc_prep> <pdc_qc_issue_prot> <pdc_sata_cable_detect> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_freeze> <pdc_thaw> <pdc_sata_error_handler> <pdc_post_internal_cmd> <pdc_sata_scr_read> <pdc_sata_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_sata_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_qstor qs_ata_ops: <0000000000000000> <qs_check_atapi_dma> <qs_qc_prep> <qs_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <qs_freeze> <qs_thaw> <qs_error_handler> <0000000000000000> <qs_scr_read> <qs_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <qs_port_start> <0000000000000000> <qs_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <qs_bmdma_stop> <qs_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_sil24 sil24_ops: <sil24_qc_defer> <0000000000000000> <sil24_qc_prep> <sil24_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <sil24_dev_config> <sil24_freeze> <sil24_thaw> <sil24_error_handler> <sil24_post_internal_cmd> <sil24_scr_read> <sil24_scr_write> <sil24_pmp_attach> <sil24_pmp_detach> <0000000000000000> <0000000000000000> <0000000000000000> <sil24_port_resume> <sil24_port_start> <0000000000000000> <0000000000000000> <ata_noop_dev_select> <sil24_check_status> <sil24_check_status> <0000000000000000> <sil24_tf_read> <0000000000000000> <0000000000000000> <0000000000000000> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_sil sil_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <sil_set_mode> <sil_dev_config> <sil_freeze> <sil_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <sil_scr_read> <sil_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_sis sis_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <sis_scr_read> <sis_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_svw k2_sata_ops: <0000000000000000> <k2_sata_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <k2_sata_scr_read> <k2_sata_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <k2_stat_check_status> <0000000000000000> <k2_sata_tf_load> <k2_sata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <k2_bmdma_setup_mmio> <k2_bmdma_start_mmio> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00
 00000000000000>
OPS sata_sx4 pdc_20621_ops: <0000000000000000> <0000000000000000> <pdc20621_qc_prep> <pdc20621_qc_issue_prot> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc20621_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_20621_phy_reset> <pdc_eng_timeout>
OPS sata_uli uli_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <uli_scr_read> <uli_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_via vt6420_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <svia_noop_freeze> <ata_bmdma_thaw> <vt6420_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_via vt6421_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <vt6421_pata_cable_detect> <ata_pci_default_filter> <vt6421_set_pio_mode> <vt6421_set_dma_mode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS sata_via vt6421_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <svia_scr_read> <svia_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_vsc vsc_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <vsc_freeze> <vsc_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <vsc_sata_scr_read> <vsc_sata_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <vsc_sata_tf_load> <vsc_sata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sc1200 sc1200_port_ops: <0000000000000000> <0000000000000000> <ata_dumb_qc_prep> <sc1200_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <sc1200_set_piomode> <sc1200_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000
 >
SHT ahci ahci_sht: ahci <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_change_queue_depth> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> ahci 31 -1 168 0 4294967295 1 0 0 0 1 1 0 0 0 0
SHT ata_generic generic_sht: ata_generic <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> ata_generic 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT ata_piix piix_sht: ata_piix <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> ata_piix 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_acpi pacpi_sht: pata_acpi <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_acpi 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_ali ali_sht: pata_ali <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_ali 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_amd amd_sht: pata_amd <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_amd 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_artop artop_sht: pata_artop <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_artop 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_atiixp atiixp_sht: pata_atiixp <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_atiixp 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cmd640 cmd640_sht: pata_cmd640 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cmd640 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cmd64x cmd64x_sht: pata_cmd64x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cmd64x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cs5520 cs5520_sht: pata_cs5520 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cs5520 1 -1 64 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cs5530 cs5530_sht: pata_cs5530 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cs5530 1 -1 64 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cypress cy82c693_sht: pata_cypress <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cypress 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_efar efar_sht: pata_efar <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_efar 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_hpt366 hpt36x_sht: pata_hpt366 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_hpt366 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_hpt37x hpt37x_sht: pata_hpt37x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_hpt37x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_hpt3x2n hpt3x2n_sht: pata_hpt3x2n <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_hpt3x2n 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_hpt3x3 hpt3x3_sht: pata_hpt3x3 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_hpt3x3 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_it8213 it8213_sht: pata_it8213 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_it8213 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_it821x it821x_sht: pata_it821x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_it821x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_jmicron jmicron_sht: pata_jmicron <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_jmicron 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_marvell marvell_sht: pata_marvell <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_marvell 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_mpiix mpiix_sht: pata_mpiix <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_mpiix 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_netcell netcell_sht: pata_netcell <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_netcell 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_ninja32 ninja32_sht: pata_ninja32 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_ninja32 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_ns87410 ns87410_sht: pata_ns87410 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_ns87410 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_ns87415 ns87415_sht: pata_ns87415 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_ns87415 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_oldpiix oldpiix_sht: pata_oldpiix <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_oldpiix 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_optidma optidma_sht: pata_optidma <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_optidma 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_opti opti_sht: pata_opti <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_opti 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_pcmcia pcmcia_sht: pata_pcmcia <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_pcmcia 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_pdc2027x pdc2027x_sht: pata_pdc2027x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_pdc2027x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_pdc202xx_old pdc202xx_sht: pata_pdc202xx_old <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_pdc202xx_old 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_radisys radisys_sht: pata_radisys <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_radisys 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_rz1000 rz1000_sht: pata_rz1000 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_rz1000 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_serverworks serverworks_sht: pata_serverworks <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_serverworks 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_sil680 sil680_sht: pata_sil680 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_sil680 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_sis sis_sht: pata_sis <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_sis 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_sl82c105 sl82c105_sht: pata_sl82c105 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_sl82c105 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_triflex triflex_sht: pata_triflex <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_triflex 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_via via_sht: pata_via <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_via 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pdc_adma adma_ata_sht: pdc_adma <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pdc_adma 1 -1 128 0 4294967295 1 0 0 0 1 1 0 0 0 0
SHT sata_inic162x inic_sht: sata_inic162x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <inic_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_inic162x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_mv mv5_sht: sata_mv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_mv 1 -1 88 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_mv mv6_sht: sata_mv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_mv 1 -1 88 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_nv nv_adma_sht: sata_nv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_adma_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_change_queue_depth> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_nv 32 -1 61 0 4294967295 1 0 0 0 1 1 0 0 0 0
SHT sata_nv nv_sht: sata_nv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_nv 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_nv nv_swncq_sht: sata_nv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_swncq_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_change_queue_depth> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_nv 32 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_promise pdc_ata_sht: sata_promise <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_promise 1 -1 127 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_qstor qs_ata_sht: sata_qstor <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_qstor 1 -1 128 0 18446744073709551615 1 0 0 0 1 1 0 0 0 0
SHT sata_sil24 sil24_sht: sata_sil24 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_change_queue_depth> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_sil24 31 -1 253 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_sil sil_sht: sata_sil <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_sil 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_sis sis_sht: sata_sis <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_sis 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_svw k2_sata_sht: sata_svw <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_svw 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_sx4 pdc_sata_sht: sata_sx4 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_sx4 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_uli uli_sht: sata_uli <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_uli 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_via svia_sht: sata_via <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_via 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_vsc vsc_sata_sht: sata_vsc <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_vsc 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sc1200 sc1200_sht: sc1200 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sc1200 1 -1 64 0 65535 1 0 0 0 1 1 0 0 0 0

[-- Attachment #6: out.after --]
[-- Type: text/plain, Size: 113069 bytes --]

OPS ahci ahci_ops: <sata_pmp_qc_defer_cmd_switch> <0000000000000000> <ahci_qc_prep> <ahci_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ahci_freeze> <ahci_thaw> <ahci_error_handler> <ahci_post_internal_cmd> <ahci_scr_read> <ahci_scr_write> <ahci_pmp_attach> <ahci_pmp_detach> <ahci_enable_alpm> <ahci_disable_alpm> <ahci_port_suspend> <ahci_port_resume> <ahci_port_start> <ahci_port_stop> <0000000000000000> <ata_noop_dev_select> <ahci_check_status> <ahci_check_status> <0000000000000000> <ahci_tf_read> <0000000000000000> <0000000000000000> <0000000000000000> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS ahci ahci_p5wdh_ops: <sata_pmp_qc_defer_cmd_switch> <0000000000000000> <ahci_qc_prep> <ahci_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ahci_freeze> <ahci_thaw> <ahci_p5wdh_error_handler> <ahci_post_internal_cmd> <ahci_scr_read> <ahci_scr_write> <ahci_pmp_attach> <ahci_pmp_detach> <ahci_enable_alpm> <ahci_disable_alpm> <ahci_port_suspend> <ahci_port_resume> <ahci_port_start> <ahci_port_stop> <0000000000000000> <ata_noop_dev_select> <ahci_check_status> <ahci_check_status> <0000000000000000> <ahci_tf_read> <0000000000000000> <0000000000000000> <0000000000000000> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS ahci ahci_vt8251_ops: <sata_pmp_qc_defer_cmd_switch> <0000000000000000> <ahci_qc_prep> <ahci_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ahci_freeze> <ahci_thaw> <ahci_vt8251_error_handler> <ahci_post_internal_cmd> <ahci_scr_read> <ahci_scr_write> <ahci_pmp_attach> <ahci_pmp_detach> <ahci_enable_alpm> <ahci_disable_alpm> <ahci_port_suspend> <ahci_port_resume> <ahci_port_start> <ahci_port_stop> <0000000000000000> <ata_noop_dev_select> <ahci_check_status> <ahci_check_status> <0000000000000000> <ahci_tf_read> <0000000000000000> <0000000000000000> <0000000000000000> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS ata_generic generic_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <generic_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS ata_piix ich_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ich_pata_cable_detect> <ata_pci_default_filter> <piix_set_piomode> <ich_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <piix_pata_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS ata_piix piix_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <piix_set_piomode> <piix_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <piix_pata_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS ata_piix piix_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS ata_piix piix_sidpr_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <piix_sidpr_error_handler> <ata_bmdma_post_internal_cmd> <piix_sidpr_scr_read> <piix_sidpr_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000000000
 00>
OPS ata_piix piix_vmw_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <piix_set_piomode> <piix_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <piix_pata_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <piix_vmw_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_acpi pacpi_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <pacpi_qc_issue_prot> <pacpi_cable_detect> <pacpi_mode_filter> <pacpi_set_piomode> <pacpi_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <pacpi_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pacpi_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_20_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ali_20_filter> <ali_set_piomode> <ali_set_dmamode> <0000000000000000> <ali_lock_sectors> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_c2_port_ops: <0000000000000000> <ali_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <ali_c2_cable_detect> <ata_pci_default_filter> <ali_set_piomode> <ali_set_dmamode> <0000000000000000> <ali_lock_sectors> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_c5_port_ops: <0000000000000000> <ali_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <ali_c2_cable_detect> <ata_pci_default_filter> <ali_set_piomode> <ali_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_dma_base_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <ali_set_piomode> <ali_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ali ali_early_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <ali_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS pata_amd amd100_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <amd100_set_piomode> <amd100_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd amd133_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <amd_cable_detect> <ata_pci_default_filter> <amd133_set_piomode> <amd133_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd amd33_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <amd33_set_piomode> <amd33_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd amd66_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <amd66_set_piomode> <amd66_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd amd_base_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <amd_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd nv100_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_ignore> <nv_mode_filter> <nv100_set_piomode> <nv100_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <nv_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd nv133_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_ignore> <nv_mode_filter> <nv133_set_piomode> <nv133_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <nv_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_amd nv_base_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_ignore> <nv_mode_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <nv_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_artop artop6210_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <artop6210_set_piomode> <artop6210_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <artop6210_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000
 >
OPS pata_artop artop6260_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <artop6260_cable_detect> <ata_pci_default_filter> <artop6260_set_piomode> <artop6260_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <artop6260_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000
 000000>
OPS pata_atiixp atiixp_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <atiixp_cable_detect> <ata_pci_default_filter> <atiixp_set_piomode> <atiixp_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <atiixp_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <atiixp_bmdma_start> <atiixp_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000
 000>
OPS pata_cmd640 cmd640_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <cmd640_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cmd640_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <cmd640_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer_noirq> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000
 000>
OPS pata_cmd64x cmd646r1_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cmd64x_set_piomode> <cmd64x_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <cmd646r1_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS pata_cmd64x cmd648_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <cmd648_cable_detect> <ata_pci_default_filter> <cmd64x_set_piomode> <cmd64x_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <cmd648_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000
 000>
OPS pata_cmd64x cmd64x_base_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <cmd64x_set_piomode> <cmd64x_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_cmd64x cmd64x_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cmd64x_set_piomode> <cmd64x_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_cs5520 cs5520_port_ops: <0000000000000000> <0000000000000000> <ata_dumb_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cs5520_set_piomode> <cs5520_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000000000
 00>
OPS pata_cs5530 cs5530_port_ops: <0000000000000000> <0000000000000000> <ata_dumb_qc_prep> <cs5530_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cs5530_set_piomode> <cs5530_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000000
 00000>
OPS pata_cypress cy82c693_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <cy82c693_set_piomode> <cy82c693_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS pata_efar efar_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <efar_cable_detect> <ata_pci_default_filter> <efar_set_piomode> <efar_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <efar_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt366 hpt366_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <hpt36x_cable_detect> <hpt366_filter> <hpt366_set_piomode> <hpt366_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt37x hpt370a_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <hpt370a_filter> <hpt370_set_piomode> <hpt370_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt37x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <hpt370_bmdma_start> <hpt370_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt37x hpt370_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <hpt370_filter> <hpt370_set_piomode> <hpt370_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt37x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <hpt370_bmdma_start> <hpt370_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt37x hpt372_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <hpt372_set_piomode> <hpt372_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt37x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <hpt37x_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt37x hpt374_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <hpt372_set_piomode> <hpt372_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt374_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <hpt37x_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_hpt3x2n hpt3x2n_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <hpt3x2n_qc_issue_prot> <hpt3x2n_cable_detect> <ata_pci_default_filter> <hpt3x2n_set_piomode> <hpt3x2n_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <hpt3x2n_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <hpt3x2n_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000
 00000000000>
OPS pata_hpt3x3 hpt3x3_port_ops: <0000000000000000> <hpt3x3_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <hpt3x3_set_piomode> <hpt3x3_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_it8213 it8213_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <it8213_cable_detect> <ata_pci_default_filter> <it8213_set_piomode> <it8213_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <it8213_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_it821x it821x_passthru_port_ops: <0000000000000000> <it821x_check_atapi_dma> <ata_qc_prep> <it821x_passthru_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <it821x_passthru_set_piomode> <it821x_passthru_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <it821x_port_start> <0000000000000000> <0000000000000000> <it821x_passthru_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <it821x_passthru_bmdma_start> <it821x_pa
 ssthru_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_it821x it821x_smart_port_ops: <0000000000000000> <it821x_check_atapi_dma> <ata_qc_prep> <it821x_smart_qc_issue_prot> <it821x_ident_hack> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <it821x_smart_set_mode> <it821x_dev_config> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <it821x_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <000000000000000
 0> <0000000000000000>
OPS pata_jmicron jmicron_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <jmicron_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_marvell marvell_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <marvell_cable_detect> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <marvell_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_mpiix mpiix_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <mpiix_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <mpiix_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <mpiix_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS pata_netcell netcell_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_80wire> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ninja32 ninja32_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <ninja32_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ninja32_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_ns87410 ns87410_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ns87410_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <ns87410_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ns87410_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS pata_ns87415 ns87415_pata_ops: <0000000000000000> <ns87415_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <ns87415_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ns87415_bmdma_irq_clear> <ns87415_bmdma_setup> <ns87415_bmdma_start> <ns87415_bmdma_stop> <ata_bmdma_status> <00000000000000
 00> <0000000000000000>
OPS pata_oldpiix oldpiix_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <oldpiix_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <oldpiix_set_piomode> <oldpiix_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <oldpiix_pata_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000
 00000000>
OPS pata_optidma optidma_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <optidma_set_pio_mode> <optidma_set_dma_mode> <optidma_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <optidma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000000
 0>
OPS pata_optidma optiplus_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <optiplus_set_pio_mode> <optiplus_set_dma_mode> <optidma_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <optidma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS pata_opti opti_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <opti_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <opti_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_pcmcia pcmcia_8bit_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <0000000000000000> <0000000000000000> <pcmcia_set_mode_8bit> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer_8bit> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <000000000000
 0000>
OPS pata_pcmcia pcmcia_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <0000000000000000> <0000000000000000> <0000000000000000> <pcmcia_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer_noirq> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS pata_pdc2027x pdc2027x_pata100_ops: <0000000000000000> <pdc2027x_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <pdc2027x_cable_detect> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <pdc2027x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000
 000000000000>
OPS pata_pdc2027x pdc2027x_pata133_ops: <0000000000000000> <pdc2027x_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <pdc2027x_cable_detect> <pdc2027x_mode_filter> <pdc2027x_set_piomode> <pdc2027x_set_dmamode> <pdc2027x_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <pdc2027x_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000
 > <0000000000000000>
OPS pata_pdc202xx_old pdc2024x_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <pdc202xx_set_piomode> <pdc202xx_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000
 000000000>
OPS pata_pdc202xx_old pdc2026x_port_ops: <0000000000000000> <pdc2026x_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <pdc2026x_cable_detect> <ata_pci_default_filter> <pdc202xx_set_piomode> <pdc202xx_set_dmamode> <0000000000000000> <pdc2026x_dev_config> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc2026x_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <pdc2026x_bmdma_start> <pdc2026x_bmdma_stop> <ata_bmdma_status> 
 <0000000000000000> <0000000000000000>
OPS pata_radisys radisys_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <radisys_qc_issue_prot> <ata_cable_unknown> <ata_pci_default_filter> <radisys_set_piomode> <radisys_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000
 000000>
OPS pata_rz1000 rz1000_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <rz1000_set_mode> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_serverworks serverworks_csb_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <serverworks_cable_detect> <serverworks_csb_filter> <serverworks_set_piomode> <serverworks_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <000000
 0000000000> <0000000000000000>
OPS pata_serverworks serverworks_osb4_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <serverworks_cable_detect> <serverworks_osb4_filter> <serverworks_set_piomode> <serverworks_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000
 000000000000> <0000000000000000>
OPS pata_sil680 sil680_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sil680_cable_detect> <ata_pci_default_filter> <sil680_set_piomode> <sil680_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000
 >
OPS pata_sis sis_100_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_66_cable_detect> <ata_pci_default_filter> <sis_100_set_piomode> <sis_100_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sis sis_133_early_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_66_cable_detect> <ata_pci_default_filter> <sis_100_set_piomode> <sis_133_early_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000000
 0>
OPS pata_sis sis_133_for_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_133_cable_detect> <ata_pci_default_filter> <sis_133_set_piomode> <sis_133_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00000000000
 00000>
OPS pata_sis sis_133_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_133_cable_detect> <ata_pci_default_filter> <sis_133_set_piomode> <sis_133_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sis sis_66_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <sis_66_cable_detect> <ata_pci_default_filter> <sis_old_set_piomode> <sis_66_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sis sis_base_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sis sis_old_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <sis_old_set_piomode> <sis_old_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sis_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_sl82c105 sl82c105_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <sl82c105_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <sl82c105_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <sl82c105_bmdma_start> <sl82c105_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000
 0000000000>
OPS pata_triflex triflex_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <triflex_set_piomode> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <triflex_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <triflex_bmdma_start> <triflex_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS pata_via via_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <via_cable_detect> <ata_pci_default_filter> <via_set_piomode> <via_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <via_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pata_via via_port_ops_noirq: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <via_cable_detect> <ata_pci_default_filter> <via_set_piomode> <via_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <via_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer_noirq> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS pdc_adma adma_ata_ops: <0000000000000000> <adma_check_atapi_dma> <adma_qc_prep> <adma_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <adma_freeze> <adma_thaw> <adma_error_handler> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <adma_port_start> <adma_port_stop> <adma_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <adma_bmdma_stop> <adma_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_inic162x inic_port_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <inic_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <inic_dev_config> <inic_freeze> <inic_thaw> <inic_error_handler> <inic_post_internal_cmd> <inic_scr_read> <inic_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <inic_port_resume> <inic_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <inic_bmdma_setup> <inic_bmdma_start> <inic_bmdma_stop> <inic_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_mv mv5_ops: <0000000000000000> <0000000000000000> <mv_qc_prep> <mv_qc_issue> <ata_cable_sata> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_eh_freeze> <mv_eh_thaw> <mv_error_handler> <mv_post_int_cmd> <mv5_scr_read> <mv5_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_port_start> <mv_port_stop> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_mv mv6_ops: <0000000000000000> <0000000000000000> <mv_qc_prep> <mv_qc_issue> <ata_cable_sata> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_eh_freeze> <mv_eh_thaw> <mv_error_handler> <mv_post_int_cmd> <mv_scr_read> <mv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_port_start> <mv_port_stop> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_mv mv_iie_ops: <0000000000000000> <0000000000000000> <mv_qc_prep_iie> <mv_qc_issue> <ata_cable_sata> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_eh_freeze> <mv_eh_thaw> <mv_error_handler> <mv_post_int_cmd> <mv_scr_read> <mv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <mv_port_start> <mv_port_stop> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_nv nv_adma_ops: <ata_std_qc_defer> <nv_adma_check_atapi_dma> <nv_adma_qc_prep> <nv_adma_qc_issue> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_adma_freeze> <nv_adma_thaw> <nv_adma_error_handler> <nv_adma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_adma_port_suspend> <nv_adma_port_resume> <nv_adma_port_start> <nv_adma_port_stop> <nv_adma_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <nv_adma_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <nv_adma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_nv nv_ck804_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_ck804_freeze> <nv_ck804_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <nv_ck804_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_nv nv_generic_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_nv nv_nf2_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_nf2_freeze> <nv_nf2_thaw> <nv_error_handler> <ata_bmdma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_nv nv_swncq_ops: <ata_std_qc_defer> <0000000000000000> <nv_swncq_qc_prep> <nv_swncq_qc_issue> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_mcp55_freeze> <nv_mcp55_thaw> <nv_swncq_error_handler> <ata_bmdma_post_internal_cmd> <nv_scr_read> <nv_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_swncq_port_suspend> <nv_swncq_port_resume> <nv_swncq_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_promise pdc_common_ops: <0000000000000000> <pdc_check_atapi_dma> <pdc_qc_prep> <pdc_qc_issue_prot> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_freeze> <pdc_thaw> <ata_bmdma_error_handler> <pdc_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_promise pdc_old_sata_ops: <0000000000000000> <pdc_old_sata_check_atapi_dma> <pdc_qc_prep> <pdc_qc_issue_prot> <pdc_sata_cable_detect> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_freeze> <pdc_thaw> <pdc_sata_error_handler> <pdc_post_internal_cmd> <pdc_sata_scr_read> <pdc_sata_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_sata_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
 
OPS sata_promise pdc_pata_ops: <0000000000000000> <pdc_check_atapi_dma> <pdc_qc_prep> <pdc_qc_issue_prot> <pdc_pata_cable_detect> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_freeze> <pdc_thaw> <pdc_pata_error_handler> <pdc_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_common_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_promise pdc_sata_ops: <0000000000000000> <pdc_check_atapi_dma> <pdc_qc_prep> <pdc_qc_issue_prot> <pdc_sata_cable_detect> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_freeze> <pdc_thaw> <pdc_sata_error_handler> <pdc_post_internal_cmd> <pdc_sata_scr_read> <pdc_sata_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_sata_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_qstor qs_ata_ops: <0000000000000000> <qs_check_atapi_dma> <qs_qc_prep> <qs_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <qs_freeze> <qs_thaw> <qs_error_handler> <0000000000000000> <qs_scr_read> <qs_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <qs_port_start> <0000000000000000> <qs_host_stop> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <qs_bmdma_stop> <qs_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_sil24 sil24_ops: <sil24_qc_defer> <0000000000000000> <sil24_qc_prep> <sil24_qc_issue> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <sil24_dev_config> <sil24_freeze> <sil24_thaw> <sil24_error_handler> <sil24_post_internal_cmd> <sil24_scr_read> <sil24_scr_write> <sil24_pmp_attach> <sil24_pmp_detach> <0000000000000000> <0000000000000000> <0000000000000000> <sil24_port_resume> <sil24_port_start> <0000000000000000> <0000000000000000> <ata_noop_dev_select> <sil24_check_status> <sil24_check_status> <0000000000000000> <sil24_tf_read> <0000000000000000> <0000000000000000> <0000000000000000> <ata_noop_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000>
OPS sata_sil sil_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <sil_set_mode> <sil_dev_config> <sil_freeze> <sil_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <sil_scr_read> <sil_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_sis sis_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <sis_scr_read> <sis_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_svw k2_sata_ops: <0000000000000000> <k2_sata_check_atapi_dma> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <k2_sata_scr_read> <k2_sata_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <k2_stat_check_status> <0000000000000000> <k2_sata_tf_load> <k2_sata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <k2_bmdma_setup_mmio> <k2_bmdma_start_mmio> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <00
 00000000000000>
OPS sata_sx4 pdc_20621_ops: <0000000000000000> <0000000000000000> <pdc20621_qc_prep> <pdc20621_qc_issue_prot> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <pdc_tf_load_mmio> <ata_tf_read> <pdc_exec_command_mmio> <ata_data_xfer> <ata_irq_on> <pdc20621_irq_clear> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <pdc_20621_phy_reset> <pdc_eng_timeout>
OPS sata_uli uli_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <uli_scr_read> <uli_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_via vt6420_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <svia_noop_freeze> <ata_bmdma_thaw> <vt6420_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_via vt6421_pata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <vt6421_pata_cable_detect> <ata_pci_default_filter> <vt6421_set_pio_mode> <vt6421_set_dma_mode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <000000000000
 0000>
OPS sata_via vt6421_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <svia_scr_read> <svia_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sata_vsc vsc_sata_ops: <0000000000000000> <0000000000000000> <ata_qc_prep> <ata_qc_issue_prot> <0000000000000000> <ata_pci_default_filter> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <vsc_freeze> <vsc_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <vsc_sata_scr_read> <vsc_sata_scr_write> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <vsc_sata_tf_load> <vsc_sata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000>
OPS sc1200 sc1200_port_ops: <0000000000000000> <0000000000000000> <ata_dumb_qc_prep> <sc1200_qc_issue_prot> <ata_cable_40wire> <ata_pci_default_filter> <sc1200_set_piomode> <sc1200_set_dmamode> <0000000000000000> <0000000000000000> <ata_bmdma_freeze> <ata_bmdma_thaw> <ata_bmdma_error_handler> <ata_bmdma_post_internal_cmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_sff_port_start> <0000000000000000> <0000000000000000> <ata_std_dev_select> <ata_check_status> <0000000000000000> <ata_tf_load> <ata_tf_read> <ata_exec_command> <ata_data_xfer> <ata_irq_on> <ata_bmdma_irq_clear> <ata_bmdma_setup> <ata_bmdma_start> <ata_bmdma_stop> <ata_bmdma_status> <0000000000000000> <0000000000000000
 >
SHT ahci ahci_sht: ahci <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_change_queue_depth> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> ahci 31 -1 168 0 4294967295 1 0 0 0 1 1 0 0 0 0
SHT ata_generic generic_sht: ata_generic <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> ata_generic 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT ata_piix piix_sht: ata_piix <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> ata_piix 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_acpi pacpi_sht: pata_acpi <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_acpi 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_ali ali_sht: pata_ali <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_ali 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_amd amd_sht: pata_amd <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_amd 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_artop artop_sht: pata_artop <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_artop 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_atiixp atiixp_sht: pata_atiixp <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_atiixp 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cmd640 cmd640_sht: pata_cmd640 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cmd640 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cmd64x cmd64x_sht: pata_cmd64x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cmd64x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cs5520 cs5520_sht: pata_cs5520 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cs5520 1 -1 64 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cs5530 cs5530_sht: pata_cs5530 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cs5530 1 -1 64 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_cypress cy82c693_sht: pata_cypress <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_cypress 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_efar efar_sht: pata_efar <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_efar 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_hpt366 hpt36x_sht: pata_hpt366 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_hpt366 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_hpt37x hpt37x_sht: pata_hpt37x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_hpt37x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_hpt3x2n hpt3x2n_sht: pata_hpt3x2n <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_hpt3x2n 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_hpt3x3 hpt3x3_sht: pata_hpt3x3 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_hpt3x3 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_it8213 it8213_sht: pata_it8213 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_it8213 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_it821x it821x_sht: pata_it821x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_it821x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_jmicron jmicron_sht: pata_jmicron <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_jmicron 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_marvell marvell_sht: pata_marvell <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_marvell 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_mpiix mpiix_sht: pata_mpiix <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_mpiix 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_netcell netcell_sht: pata_netcell <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_netcell 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_ninja32 ninja32_sht: pata_ninja32 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_ninja32 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_ns87410 ns87410_sht: pata_ns87410 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_ns87410 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_ns87415 ns87415_sht: pata_ns87415 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_ns87415 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_oldpiix oldpiix_sht: pata_oldpiix <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_oldpiix 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_optidma optidma_sht: pata_optidma <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_optidma 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_opti opti_sht: pata_opti <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_opti 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_pcmcia pcmcia_sht: pata_pcmcia <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_pcmcia 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_pdc2027x pdc2027x_sht: pata_pdc2027x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_pdc2027x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_pdc202xx_old pdc202xx_sht: pata_pdc202xx_old <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_pdc202xx_old 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_radisys radisys_sht: pata_radisys <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_radisys 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_rz1000 rz1000_sht: pata_rz1000 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_rz1000 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_serverworks serverworks_sht: pata_serverworks <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_serverworks 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_sil680 sil680_sht: pata_sil680 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_sil680 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_sis sis_sht: pata_sis <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_sis 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_sl82c105 sl82c105_sht: pata_sl82c105 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_sl82c105 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_triflex triflex_sht: pata_triflex <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_triflex 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pata_via via_sht: pata_via <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pata_via 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT pdc_adma adma_ata_sht: pdc_adma <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> pdc_adma 1 -1 128 0 4294967295 1 0 0 0 1 1 0 0 0 0
SHT sata_inic162x inic_sht: sata_inic162x <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <inic_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_inic162x 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_mv mv5_sht: sata_mv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_mv 1 -1 88 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_mv mv6_sht: sata_mv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_mv 1 -1 88 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_nv nv_adma_sht: sata_nv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_adma_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_change_queue_depth> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_nv 32 -1 61 0 4294967295 1 0 0 0 1 1 0 0 0 0
SHT sata_nv nv_sht: sata_nv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_nv 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_nv nv_swncq_sht: sata_nv <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <nv_swncq_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_change_queue_depth> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_nv 32 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_promise pdc_ata_sht: sata_promise <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_promise 1 -1 127 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_qstor qs_ata_sht: sata_qstor <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_qstor 1 -1 128 0 18446744073709551615 1 0 0 0 1 1 0 0 0 0
SHT sata_sil24 sil24_sht: sata_sil24 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_change_queue_depth> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_sil24 31 -1 253 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_sil sil_sht: sata_sil <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_sil 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_sis sis_sht: sata_sis <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_sis 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_svw k2_sata_sht: sata_svw <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_svw 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_sx4 pdc_sata_sht: sata_sx4 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_sx4 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_uli uli_sht: sata_uli <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_uli 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_via svia_sht: sata_via <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_via 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sata_vsc vsc_sata_sht: sata_vsc <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sata_vsc 1 -1 128 0 65535 1 0 0 0 1 1 0 0 0 0
SHT sc1200 sc1200_sht: sc1200 <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_ioctl> <ata_scsi_queuecmd> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_scsi_slave_config> <ata_scsi_slave_destroy> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <0000000000000000> <ata_std_bios_param> <0000000000000000> <0000000000000000> sc1200 1 -1 64 0 65535 1 0 0 0 1 1 0 0 0 0

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

* GIT tree available
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (9 preceding siblings ...)
  2008-01-30  9:49 ` How to verify sht-ops-conversion patch doesn't change anything Tejun Heo
@ 2008-01-30  9:51 ` Tejun Heo
  2008-01-31  8:29 ` [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Akira Iguchi
  2008-01-31  8:34 ` Akira Iguchi
  12 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-30  9:51 UTC (permalink / raw)
  To: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo

http://git.kernel.org/?p=linux/kernel/git/tj/libata-dev.git;a=shortlog;h=cleanup-sht-ops
git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata-dev.git cleanup-sht-ops

Thanks.

-- 
tejun

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

* Re: [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance
  2008-01-30  9:28 ` [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance Tejun Heo
@ 2008-01-30 17:09   ` Mark Lord
  2008-01-31  3:39     ` Tejun Heo
  2008-02-01 20:49   ` Jeff Garzik
  1 sibling, 1 reply; 32+ messages in thread
From: Mark Lord @ 2008-01-30 17:09 UTC (permalink / raw)
  To: Tejun Heo
  Cc: jeff, linux-ide, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Tejun Heo wrote:
> libata lets low level drivers build scsi_host_template and
> ata_port_operations tables and register them with upper layers.  This
> allows low level drivers high level of flexibility but also burdens
> them with lots of boilerplate entries in thoes data structures.
..
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index 939bf1d..c365650 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -452,61 +452,28 @@ static void mv_channel_reset(struct mv_host_priv *hpriv, void __iomem *mmio,
>  			     unsigned int port_no);
>  
>  static struct scsi_host_template mv5_sht = {
> -	.module			= THIS_MODULE,
> -	.name			= DRV_NAME,
> -	.ioctl			= ata_scsi_ioctl,
> -	.queuecommand		= ata_scsi_queuecmd,
> -	.can_queue		= ATA_DEF_QUEUE,
> -	.this_id		= ATA_SHT_THIS_ID,
> +	ATA_BASE_SHT(DRV_NAME),
>  	.sg_tablesize		= MV_MAX_SG_CT / 2,
..

I think this will need to be re-diff'd against the latest sata_mv,
which now has NCQ support.

Cheers

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

* Re: [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance
  2008-01-30 17:09   ` Mark Lord
@ 2008-01-31  3:39     ` Tejun Heo
  2008-01-31  4:04       ` Mark Lord
  0 siblings, 1 reply; 32+ messages in thread
From: Tejun Heo @ 2008-01-31  3:39 UTC (permalink / raw)
  To: Mark Lord
  Cc: jeff, linux-ide, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Mark Lord wrote:
> Tejun Heo wrote:
>> libata lets low level drivers build scsi_host_template and
>> ata_port_operations tables and register them with upper layers.  This
>> allows low level drivers high level of flexibility but also burdens
>> them with lots of boilerplate entries in thoes data structures.
> ..
>> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
>> index 939bf1d..c365650 100644
>> --- a/drivers/ata/sata_mv.c
>> +++ b/drivers/ata/sata_mv.c
>> @@ -452,61 +452,28 @@ static void mv_channel_reset(struct mv_host_priv
>> *hpriv, void __iomem *mmio,
>>                   unsigned int port_no);
>>  
>>  static struct scsi_host_template mv5_sht = {
>> -    .module            = THIS_MODULE,
>> -    .name            = DRV_NAME,
>> -    .ioctl            = ata_scsi_ioctl,
>> -    .queuecommand        = ata_scsi_queuecmd,
>> -    .can_queue        = ATA_DEF_QUEUE,
>> -    .this_id        = ATA_SHT_THIS_ID,
>> +    ATA_BASE_SHT(DRV_NAME),
>>      .sg_tablesize        = MV_MAX_SG_CT / 2,
> ..
> 
> I think this will need to be re-diff'd against the latest sata_mv,
> which now has NCQ support.

No problem at all.  Just push it into #upstream.  :-)

-- 
tejun

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

* Re: [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance
  2008-01-31  3:39     ` Tejun Heo
@ 2008-01-31  4:04       ` Mark Lord
  2008-01-31  4:12         ` Tejun Heo
  0 siblings, 1 reply; 32+ messages in thread
From: Mark Lord @ 2008-01-31  4:04 UTC (permalink / raw)
  To: Tejun Heo
  Cc: jeff, linux-ide, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Tejun Heo wrote:
> Mark Lord wrote:
>> Tejun Heo wrote:
>>> libata lets low level drivers build scsi_host_template and
>>> ata_port_operations tables and register them with upper layers.  This
>>> allows low level drivers high level of flexibility but also burdens
>>> them with lots of boilerplate entries in thoes data structures.
>> ..
>>> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
>>> index 939bf1d..c365650 100644
>>> --- a/drivers/ata/sata_mv.c
>>> +++ b/drivers/ata/sata_mv.c
>>> @@ -452,61 +452,28 @@ static void mv_channel_reset(struct mv_host_priv
>>> *hpriv, void __iomem *mmio,
>>>                   unsigned int port_no);
>>>  
>>>  static struct scsi_host_template mv5_sht = {
>>> -    .module            = THIS_MODULE,
>>> -    .name            = DRV_NAME,
>>> -    .ioctl            = ata_scsi_ioctl,
>>> -    .queuecommand        = ata_scsi_queuecmd,
>>> -    .can_queue        = ATA_DEF_QUEUE,
>>> -    .this_id        = ATA_SHT_THIS_ID,
>>> +    ATA_BASE_SHT(DRV_NAME),
>>>      .sg_tablesize        = MV_MAX_SG_CT / 2,
>> ..
>>
>> I think this will need to be re-diff'd against the latest sata_mv,
>> which now has NCQ support.
> 
> No problem at all.  Just push it into #upstream.  :-)
..

Oh, it is/was already there.  And I quoted the wrong lines from your patch.
Let's try again:
>
>  static struct scsi_host_template mv6_sht = {
> -       .module                 = THIS_MODULE,
> -       .name                   = DRV_NAME,
> -       .ioctl                  = ata_scsi_ioctl,
> -       .queuecommand           = ata_scsi_queuecmd,
> -       .can_queue              = ATA_DEF_QUEUE,
> -       .this_id                = ATA_SHT_THIS_ID,
> +       ATA_BASE_SHT(DRV_NAME),
>         .sg_tablesize           = MV_MAX_SG_CT / 2,
> -       .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
> -       .emulated               = ATA_SHT_EMULATED,
> -       .use_clustering         = 1,
> -       .proc_name              = DRV_NAME,
>         .dma_boundary           = MV_DMA_BOUNDARY,
> -       .slave_configure        = ata_scsi_slave_config,
> -       .slave_destroy          = ata_scsi_slave_destroy,
> -       .bios_param             = ata_std_bios_param,
>  };

That doesn't look correct.  :)
Shouldn't it be ATA_NCQ_SHT(DRV_NAME) there?

Cheers





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

* Re: [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance
  2008-01-31  4:04       ` Mark Lord
@ 2008-01-31  4:12         ` Tejun Heo
  0 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-01-31  4:12 UTC (permalink / raw)
  To: Mark Lord
  Cc: jeff, linux-ide, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Mark Lord wrote:
>>> I think this will need to be re-diff'd against the latest sata_mv,
>>> which now has NCQ support.
>>
>> No problem at all.  Just push it into #upstream.  :-)
> ..
> 
> Oh, it is/was already there.  And I quoted the wrong lines from your patch.
> Let's try again:

Is it?  I don't see it in my copy of #upstream which I synced yesterday.
 Pulling again... Oh.. it's there.  I must have made a mistake while
pulling yesterday.

>>  static struct scsi_host_template mv6_sht = {
>> -       .module                 = THIS_MODULE,
>> -       .name                   = DRV_NAME,
>> -       .ioctl                  = ata_scsi_ioctl,
>> -       .queuecommand           = ata_scsi_queuecmd,
>> -       .can_queue              = ATA_DEF_QUEUE,
>> -       .this_id                = ATA_SHT_THIS_ID,
>> +       ATA_BASE_SHT(DRV_NAME),
>>         .sg_tablesize           = MV_MAX_SG_CT / 2,
>> -       .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
>> -       .emulated               = ATA_SHT_EMULATED,
>> -       .use_clustering         = 1,
>> -       .proc_name              = DRV_NAME,
>>         .dma_boundary           = MV_DMA_BOUNDARY,
>> -       .slave_configure        = ata_scsi_slave_config,
>> -       .slave_destroy          = ata_scsi_slave_destroy,
>> -       .bios_param             = ata_std_bios_param,
>>  };
> 
> That doesn't look correct.  :)
> Shouldn't it be ATA_NCQ_SHT(DRV_NAME) there?

On top of a984f58dd97f22f5113700322fed311a0ee29947, it is correct
because .can_queue is ATA_DEF_QUEUE and no queue_depth callback is
specified.  Anyways, after review, I'll regenerate the patchset on top
of the current sata_mv.

Thanks.

-- 
tejun

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

* Re: [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (10 preceding siblings ...)
  2008-01-30  9:51 ` GIT tree available Tejun Heo
@ 2008-01-31  8:29 ` Akira Iguchi
  2008-02-09  1:55   ` Tejun Heo
  2008-01-31  8:34 ` Akira Iguchi
  12 siblings, 1 reply; 32+ messages in thread
From: Akira Iguchi @ 2008-01-31  8:29 UTC (permalink / raw)
  To: Tejun Heo
  Cc: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, leoli

Tejun Heo wrote:
>The following drivers need specific platform to build, so they need
>verification.  If you work on one of the following drivers, please
>verify that the driver builds and works fine.  It would be best if you
>can verify that the sht and ops don't change by the fifth path using
>the method I'll write in another message.
..
>* pata_scc

I check pata_scc and it works fine.
Your verification method detects 1 difference in ops
(.thaw: NULL -> ata_bmdma_thaw) but there is no problem.

Cheers

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

* Re: [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations
  2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
                   ` (11 preceding siblings ...)
  2008-01-31  8:29 ` [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Akira Iguchi
@ 2008-01-31  8:34 ` Akira Iguchi
  12 siblings, 0 replies; 32+ messages in thread
From: Akira Iguchi @ 2008-01-31  8:34 UTC (permalink / raw)
  To: Tejun Heo
  Cc: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi,
	alessandro.zummo, domen.puncer, leoli

Tejun Heo wrote:
>The following drivers need specific platform to build, so they need
>verification.  If you work on one of the following drivers, please
>verify that the driver builds and works fine.  It would be best if you
>can verify that the sht and ops don't change by the fifth path using
>the method I'll write in another message.
..
>* pata_scc

I check pata_scc and it works fine.
Your verification method detects 1 difference in ops
(.thaw: NULL -> ata_bmdma_thaw) but there is no problem.

Cheers

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

* Re: [PATCH 1/9] libata: PCI device should be powered up before being accessed
  2008-01-30  9:28 ` [PATCH 1/9] libata: PCI device should be powered up before being accessed Tejun Heo
@ 2008-02-01 20:44   ` Jeff Garzik
  2008-02-11 19:24   ` Jeff Garzik
  1 sibling, 0 replies; 32+ messages in thread
From: Jeff Garzik @ 2008-02-01 20:44 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Tejun Heo wrote:
> diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
> index 7e68edf..5ef6594 100644
> --- a/drivers/ata/pata_ali.c
> +++ b/drivers/ata/pata_ali.c
> @@ -597,6 +597,11 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
>  	const struct ata_port_info *ppi[] = { NULL, NULL };
>  	u8 tmp;
>  	struct pci_dev *isa_bridge;
> +	int rc;
> +
> +	rc = pcim_enable_device(pdev);
> +	if (rc)
> +		return rc;
>  
>  	/*
>  	 * The chipset revision selects the driver operations and
> @@ -632,8 +637,15 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
>  #ifdef CONFIG_PM
>  static int ali_reinit_one(struct pci_dev *pdev)
>  {
> +	struct ata_host *host = dev_get_drvdata(&pdev->dev);
> +	int rc;
> +
> +	rc = ata_pci_device_do_resume(pdev);
> +	if (rc)
> +		return rc;
>  	ali_init_chipset(pdev);
> -	return ata_pci_device_resume(pdev);
> +	ata_host_resume(host);
> +	return 0;
>  }
>  #endif
>  
> diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
> index 761a666..567fe6b 100644
> --- a/drivers/ata/pata_amd.c
> +++ b/drivers/ata/pata_amd.c
> @@ -662,10 +662,15 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
>  	static int printed_version;
>  	int type = id->driver_data;
>  	u8 fifo;
> +	int rc;
>  
>  	if (!printed_version++)
>  		dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
>  
> +	rc = pcim_enable_device(pdev);
> +	if (rc)
> +		return rc;
> +
>  	pci_read_config_byte(pdev, 0x41, &fifo);
>  
>  	/* Check for AMD7409 without swdma errata and if found adjust type */
> @@ -709,6 +714,13 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
>  #ifdef CONFIG_PM
>  static int amd_reinit_one(struct pci_dev *pdev)
>  {
> +	struct ata_host *host = dev_get_drvdata(&pdev->dev);
> +	int rc;
> +
> +	rc = ata_pci_device_do_resume(pdev);
> +	if (rc)
> +		return rc;
> +
>  	if (pdev->vendor == PCI_VENDOR_ID_AMD) {
>  		u8 fifo;
>  		pci_read_config_byte(pdev, 0x41, &fifo);
> @@ -721,7 +733,9 @@ static int amd_reinit_one(struct pci_dev *pdev)
>  		    pdev->device == PCI_DEVICE_ID_AMD_COBRA_7401)
>  		    	ata_pci_clear_simplex(pdev);
>  	}
> -	return ata_pci_device_resume(pdev);
> +
> +	ata_host_resume(host);
> +	return 0;
>  }
>  #endif
>  
> diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
> index d421831..2f81480 100644
> --- a/drivers/ata/pata_artop.c
> +++ b/drivers/ata/pata_artop.c
> @@ -446,11 +446,16 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
>  		.port_ops	= &artop6260_ops,
>  	};
>  	const struct ata_port_info *ppi[] = { NULL, NULL };
> +	int rc;
>  
>  	if (!printed_version++)
>  		dev_printk(KERN_DEBUG, &pdev->dev,
>  			   "version " DRV_VERSION "\n");
>  
> +	rc = pcim_enable_device(pdev);
> +	if (rc)
> +		return rc;
> +
>  	if (id->driver_data == 0) {	/* 6210 variant */
>  		ppi[0] = &info_6210;
>  		ppi[1] = &ata_dummy_port_info;

While _I_ do not object, I'm curious to see what Alan thinks about 
adding enable-device to all these drivers.  Seems like the right (and 
necessary) thing to do, from my perspective...

	Jeff



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

* Re: [PATCH 3/9] libata: implement and use ata_noop_irq_clear()
  2008-01-30  9:28 ` [PATCH 3/9] libata: implement and use ata_noop_irq_clear() Tejun Heo
@ 2008-02-01 20:45   ` Jeff Garzik
  0 siblings, 0 replies; 32+ messages in thread
From: Jeff Garzik @ 2008-02-01 20:45 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Tejun Heo wrote:
> ->irq_clear() is used to clear IRQ bit of a SFF controller and isn't
> useful for drivers which don't use libata SFF HSM implementation.
> However, it's a required callback and many drivers implement their own
> noop version as placeholder.  This patch implements ata_noop_irq_clear
> and use it to replace those custom placeholders.
> 
> Also, SFF drivers which don't support BMDMA don't need to use
> ata_bmdma_irq_clear().  It becomes noop if BMDMA address isn't
> initialized.  Convert them to use ata_noop_irq_clear().
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>

ACK patches 2-3



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

* Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables
  2008-01-30  9:28 ` [PATCH 4/9] libata: normalize port_info, port_operations and sht tables Tejun Heo
@ 2008-02-01 20:46   ` Jeff Garzik
  2008-02-09  1:57     ` Tejun Heo
  2008-02-04 14:24   ` Alan Cox
  1 sibling, 1 reply; 32+ messages in thread
From: Jeff Garzik @ 2008-02-01 20:46 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Tejun Heo wrote:
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index 07dcaf6..08301ca 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -351,6 +351,8 @@ static const struct ata_port_operations ahci_vt8251_ops = {
>  	.port_suspend		= ahci_port_suspend,
>  	.port_resume		= ahci_port_resume,
>  #endif
> +	.enable_pm		= ahci_enable_alpm,
> +	.disable_pm		= ahci_disable_alpm,
>  
>  	.port_start		= ahci_port_start,
>  	.port_stop		= ahci_port_stop,
> @@ -385,6 +387,8 @@ static const struct ata_port_operations ahci_p5wdh_ops = {
>  	.port_suspend		= ahci_port_suspend,
>  	.port_resume		= ahci_port_resume,
>  #endif
> +	.enable_pm		= ahci_enable_alpm,
> +	.disable_pm		= ahci_disable_alpm,
>  
>  	.port_start		= ahci_port_start,
>  	.port_stop		= ahci_port_stop,

The last one is probably OK, but I didn't think vt8521 could do this?

ACK everything else


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

* Re: [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance
  2008-01-30  9:28 ` [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance Tejun Heo
  2008-01-30 17:09   ` Mark Lord
@ 2008-02-01 20:49   ` Jeff Garzik
  2008-02-02  0:06     ` Tejun Heo
  1 sibling, 1 reply; 32+ messages in thread
From: Jeff Garzik @ 2008-02-01 20:49 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Tejun Heo wrote:
> libata lets low level drivers build scsi_host_template and
> ata_port_operations tables and register them with upper layers.  This
> allows low level drivers high level of flexibility but also burdens
> them with lots of boilerplate entries in thoes data structures.
> 
> This becomes worse for drivers which support related similar
> controllers which differ slightly.  They share most of the operations
> except for a few.  However, the driver still needs to list all
> operations for each variant.  This results in large number of
> duplicate entries, which is not only inefficient but also error-prone
> as it becomes very difficult to tell what the actual differences are.
> 
> This duplicate boilerplates all over the low level drivers also make
> updating the core layer exteremely difficult and error-prone.  When
> compounded with multi-branched development model, it ends up
> accumulating inconsistencies over time.  Some of those inconsistencies
> cause immediate problems and fixed.  Others just remain there dormant
> making maintenance increasingly difficult.
> 
> To rectify the problem, this patch implements SHT initializers and
> ata_port_operations inheritance.  SHT initializers can be used to
> initialize all the boilerplate entries in a sht.  Three variants of
> them exist - BASE, BMDMA and NCQ - for different types of drivers.
> Note that entries can be overriden by putting individual initializers
> after the helper macro.
> 
> Ops handling is a bit more involved to allow LLDs to easily re-use
> their own ops tables overriding only specific methods.  This is
> basically poor man's class inheritance.  An ops table has ->inherits
> field which can be set to any ops table as long as it doesn't create a
> loop.  When the host is started, the inheritance chain is followed and
> any operation which isn't specified is taken from the nearest ancestor
> which has it specified.  This operation is called finalization and
> done only once per an ops table and the LLD doesn't have to do
> anything special about it other than making the ops table non-const
> such that libata can update it.
> 
> libata provides four base ops tables lower drivers can inherit from -
> base, sata, pmp, sff and bmdma.  To avoid overriding these ops
> accidentaly, these ops are declared const and LLDs should always
> inherit these instead of using them directly.
> 
> After finalization, all the sht and ops table are identical before and
> after the patch except for setting .irq_handler to ata_interrupt in
> drivers which didn't use to.  The .irq_handler doesn't have any actual
> effect and the field will soon be removed by later patch.
> 
> * sata_sx4 is still using old style EH and currently doesn't take
>   advantage of ops inheritance.
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>

Two comments:

1) Please split into SHT and ops patches (SHT first, I presume)

2) It seems like inheritance would be easier and less error-prone if the 
ops were copied, rather than modifying the structures in-place.  Comments?


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

* Re: [PATCH 9/9] libata: make reset related methods proper port operations
  2008-01-30  9:29 ` [PATCH 9/9] libata: make reset related methods proper port operations Tejun Heo
@ 2008-02-01 20:52   ` Jeff Garzik
  0 siblings, 0 replies; 32+ messages in thread
From: Jeff Garzik @ 2008-02-01 20:52 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

ACK patches 6-9



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

* Re: [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance
  2008-02-01 20:49   ` Jeff Garzik
@ 2008-02-02  0:06     ` Tejun Heo
  0 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-02-02  0:06 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Jeff Garzik wrote:
> Two comments:
> 
> 1) Please split into SHT and ops patches (SHT first, I presume)

Sure.

> 2) It seems like inheritance would be easier and less error-prone if the
> ops were copied, rather than modifying the structures in-place.  Comments?

I thought about making per-port copies on host allocation or host start.
 The pros of such approach would be...

* LLD's ops table can be made const.

* LLD can modify ops table freely after the copying happens.  To take
advantage of this, host allocation is probably the best place to copy
the ops tables.

Cons are...

* It changes the way a libata LLD should handle ops table.  The current
usage model is based on that ops table is used directly and shared and a
separate table should be defined for different variants.  I think it's
better to keep the current way and inheritance makes it easy.  This
almost cancels out the second pro point.

* More overhead (doesn't really matter tho).

I don't see where modifying the ops table in-place is more difficult or
error-prone.  Only LLD's own ops tables need to drop const and it's not
like ops tables are directly manipulated by any code other than the
finalization code.

Another thing is that what was needed here was static class inheritance
and the in-place finalization is run-time variant of inheritance
resolving done by OO compilers.  I think it's nice to keep that familiar
semantics.

Thanks.

-- 
tejun

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

* Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables
  2008-01-30  9:28 ` [PATCH 4/9] libata: normalize port_info, port_operations and sht tables Tejun Heo
  2008-02-01 20:46   ` Jeff Garzik
@ 2008-02-04 14:24   ` Alan Cox
  2008-02-09  6:11     ` Tejun Heo
  1 sibling, 1 reply; 32+ messages in thread
From: Alan Cox @ 2008-02-04 14:24 UTC (permalink / raw)
  Cc: jeff, linux-ide, liml, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli, Tejun Heo

> * Every driver for SFF controllers now uses ata_pci_default_filter()
>   unless the driver has custom implementation.

That is only needed for DMA capable devices. I guess it does no harm to
be consistent and call it anyway but you then say ..

> * No reason to set ata_pci_default_filter() for PIO-only drivers.

and your patches add the calls for the CS5520 ?


> diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
> index 972ed9f..5614e76 100644
> --- a/drivers/ata/pata_cs5520.c
> +++ b/drivers/ata/pata_cs5520.c
> @@ -160,6 +160,7 @@ static struct scsi_host_template cs5520_sht = {
>  static struct ata_port_operations cs5520_port_ops = {
>  	.set_piomode		= cs5520_set_piomode,
>  	.set_dmamode		= cs5520_set_dmamode,
> +	.mode_filter		= ata_pci_default_filter,

This case is wrong. CS5520 doesn't do DMA (just VDMA which we don't
support) and in addition doesn't use BAR4 so its not a generic PCI
controller and this is asking for trouble later.

> diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
> index 8f79447..ebb9dc1 100644
> --- a/drivers/ata/pata_opti.c
> +++ b/drivers/ata/pata_opti.c
> @@ -184,6 +184,7 @@ static struct scsi_host_template opti_sht = {
>  
>  static struct ata_port_operations opti_port_ops = {
>  	.set_piomode	= opti_set_piomode,
> +	.mode_filter	= ata_pci_default_filter,

PIO only


> --- a/drivers/ata/pata_rz1000.c
> +++ b/drivers/ata/pata_rz1000.c
> @@ -72,6 +72,7 @@ static struct scsi_host_template rz1000_sht = {
>  
>  static struct ata_port_operations rz1000_port_ops = {
>  	.set_mode	= rz1000_set_mode,
> +	.mode_filter	= ata_pci_default_filter,

PIO only


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

* Re: [PATCH 7/9] libata: stop overloading port_info->private_data
  2008-01-30  9:29 ` [PATCH 7/9] libata: stop overloading port_info->private_data Tejun Heo
@ 2008-02-04 14:26   ` Alan Cox
  2008-02-09  2:07     ` Tejun Heo
  0 siblings, 1 reply; 32+ messages in thread
From: Alan Cox @ 2008-02-04 14:26 UTC (permalink / raw)
  Cc: jeff, linux-ide, liml, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli, Tejun Heo

On Wed, 30 Jan 2008 18:29:01 +0900
Tejun Heo <htejun@gmail.com> wrote:

> port_info->private_data is currently used for two purposes - to record
> private data about the port_info or to specify host->private_data to
> use when allocating ata_host.


Sensible point, horrible implementation - I'd NAK this strongly in favour
of switching to:

ata_pci_init_one(....., private_ptr);

otherwise when that glue changes we are going to keep having to fix six
or more drivers.

Alan

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

* Re: [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations
  2008-01-31  8:29 ` [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Akira Iguchi
@ 2008-02-09  1:55   ` Tejun Heo
  0 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-02-09  1:55 UTC (permalink / raw)
  To: Akira Iguchi
  Cc: jeff, linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, leoli

Akira Iguchi wrote:
> Tejun Heo wrote:
>> The following drivers need specific platform to build, so they need
>> verification.  If you work on one of the following drivers, please
>> verify that the driver builds and works fine.  It would be best if you
>> can verify that the sht and ops don't change by the fifth path using
>> the method I'll write in another message.
> ..
>> * pata_scc
> 
> I check pata_scc and it works fine.
> Your verification method detects 1 difference in ops
> (.thaw: NULL -> ata_bmdma_thaw) but there is no problem.

Thanks.  I'll fix that up.

-- 
tejun

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

* Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables
  2008-02-01 20:46   ` Jeff Garzik
@ 2008-02-09  1:57     ` Tejun Heo
  0 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-02-09  1:57 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Jeff Garzik wrote:
> Tejun Heo wrote:
>> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
>> index 07dcaf6..08301ca 100644
>> --- a/drivers/ata/ahci.c
>> +++ b/drivers/ata/ahci.c
>> @@ -351,6 +351,8 @@ static const struct ata_port_operations
>> ahci_vt8251_ops = {
>>      .port_suspend        = ahci_port_suspend,
>>      .port_resume        = ahci_port_resume,
>>  #endif
>> +    .enable_pm        = ahci_enable_alpm,
>> +    .disable_pm        = ahci_disable_alpm,
>>  
>>      .port_start        = ahci_port_start,
>>      .port_stop        = ahci_port_stop,
>> @@ -385,6 +387,8 @@ static const struct ata_port_operations
>> ahci_p5wdh_ops = {
>>      .port_suspend        = ahci_port_suspend,
>>      .port_resume        = ahci_port_resume,
>>  #endif
>> +    .enable_pm        = ahci_enable_alpm,
>> +    .disable_pm        = ahci_disable_alpm,
>>  
>>      .port_start        = ahci_port_start,
>>      .port_stop        = ahci_port_stop,
> 
> The last one is probably OK, but I didn't think vt8521 could do this?

I don't know.  Those should be determined by CAP bits and if vt8251 lies
about it, it should be blacklisted by clearing CAP bit as other features.

-- 
tejun

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

* Re: [PATCH 7/9] libata: stop overloading port_info->private_data
  2008-02-04 14:26   ` Alan Cox
@ 2008-02-09  2:07     ` Tejun Heo
  0 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-02-09  2:07 UTC (permalink / raw)
  To: Alan Cox
  Cc: jeff, linux-ide, liml, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Alan Cox wrote:
> On Wed, 30 Jan 2008 18:29:01 +0900
> Tejun Heo <htejun@gmail.com> wrote:
> 
>> port_info->private_data is currently used for two purposes - to record
>> private data about the port_info or to specify host->private_data to
>> use when allocating ata_host.
> 
> Sensible point, horrible implementation - I'd NAK this strongly in favour
> of switching to:
> 
> ata_pci_init_one(....., private_ptr);
>
> otherwise when that glue changes we are going to keep having to fix six
> or more drivers.

That alloc-init-register sequence is now the standard initialization
sequence used by all drivers which either aren't SFF or need extra stuff
on top of SFF.  ata_pci_init_one() being pretty simple at this point, I
thought the converted ones could just follow the suit instead of
updating every ata_pci_init_one() call.

Oh well, you deal with most SFF drivers anyway.  I'll add "void
*host_priv" to ata_pci_init_one().

Thanks.

-- 
tejun

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

* Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables
  2008-02-04 14:24   ` Alan Cox
@ 2008-02-09  6:11     ` Tejun Heo
  2008-02-09  6:53       ` Tejun Heo
  0 siblings, 1 reply; 32+ messages in thread
From: Tejun Heo @ 2008-02-09  6:11 UTC (permalink / raw)
  To: Alan Cox
  Cc: jeff, linux-ide, liml, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Alan Cox wrote:
>> * Every driver for SFF controllers now uses ata_pci_default_filter()
>>   unless the driver has custom implementation.
> 
> That is only needed for DMA capable devices. I guess it does no harm to
> be consistent and call it anyway but you then say ..

Yeah, it's kind of fuzzy to distinguish SFF and BMDMA functions and we
mix the names.  I'll clean up the names afterwards.  Things like that
are much easier after this patchset.

>> * No reason to set ata_pci_default_filter() for PIO-only drivers.
> 
> and your patches add the calls for the CS5520 ?
> 
>> diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
>> index 972ed9f..5614e76 100644
>> --- a/drivers/ata/pata_cs5520.c
>> +++ b/drivers/ata/pata_cs5520.c
>> @@ -160,6 +160,7 @@ static struct scsi_host_template cs5520_sht = {
>>  static struct ata_port_operations cs5520_port_ops = {
>>  	.set_piomode		= cs5520_set_piomode,
>>  	.set_dmamode		= cs5520_set_dmamode,
>> +	.mode_filter		= ata_pci_default_filter,
> 
> This case is wrong. CS5520 doesn't do DMA (just VDMA which we don't
> support) and in addition doesn't use BAR4 so its not a generic PCI
> controller and this is asking for trouble later.

Ah.. okay.  Thanks for pointing out.

>> diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
>> index 8f79447..ebb9dc1 100644
>> --- a/drivers/ata/pata_opti.c
>> +++ b/drivers/ata/pata_opti.c
>> @@ -184,6 +184,7 @@ static struct scsi_host_template opti_sht = {
>>  
>>  static struct ata_port_operations opti_port_ops = {
>>  	.set_piomode	= opti_set_piomode,
>> +	.mode_filter	= ata_pci_default_filter,
> 
> PIO only
> 
> 
>> --- a/drivers/ata/pata_rz1000.c
>> +++ b/drivers/ata/pata_rz1000.c
>> @@ -72,6 +72,7 @@ static struct scsi_host_template rz1000_sht = {
>>  
>>  static struct ata_port_operations rz1000_port_ops = {
>>  	.set_mode	= rz1000_set_mode,
>> +	.mode_filter	= ata_pci_default_filter,
> 
> PIO only

Will update accordingly.  Thanks.

-- 
tejun

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

* Re: [PATCH 4/9] libata: normalize port_info, port_operations and sht tables
  2008-02-09  6:11     ` Tejun Heo
@ 2008-02-09  6:53       ` Tejun Heo
  0 siblings, 0 replies; 32+ messages in thread
From: Tejun Heo @ 2008-02-09  6:53 UTC (permalink / raw)
  To: Alan Cox
  Cc: jeff, linux-ide, liml, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Tejun Heo wrote:
>>> * No reason to set ata_pci_default_filter() for PIO-only drivers.
>> and your patches add the calls for the CS5520 ?
>>
>>> diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
>>> index 972ed9f..5614e76 100644
>>> --- a/drivers/ata/pata_cs5520.c
>>> +++ b/drivers/ata/pata_cs5520.c
>>> @@ -160,6 +160,7 @@ static struct scsi_host_template cs5520_sht = {
>>>  static struct ata_port_operations cs5520_port_ops = {
>>>  	.set_piomode		= cs5520_set_piomode,
>>>  	.set_dmamode		= cs5520_set_dmamode,
>>> +	.mode_filter		= ata_pci_default_filter,
>> This case is wrong. CS5520 doesn't do DMA (just VDMA which we don't
>> support) and in addition doesn't use BAR4 so its not a generic PCI
>> controller and this is asking for trouble later.

Hmm... cs5520's vdma looks like BMDMA and behaves like one.  BMDMA
methods are used and, although it doesn't use BAR4, ioaddr->bmdma_addr
is initialized, so as long as libata SFF layer is concerned, it can be
considered a BMDMA controller.

Thanks.

-- 
tejun

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

* Re: [PATCH 1/9] libata: PCI device should be powered up before being accessed
  2008-01-30  9:28 ` [PATCH 1/9] libata: PCI device should be powered up before being accessed Tejun Heo
  2008-02-01 20:44   ` Jeff Garzik
@ 2008-02-11 19:24   ` Jeff Garzik
  1 sibling, 0 replies; 32+ messages in thread
From: Jeff Garzik @ 2008-02-11 19:24 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-ide, liml, alan, kngregertsen, sonic.adi, rmk,
	alessandro.zummo, domen.puncer, akira2.iguchi, leoli

Tejun Heo wrote:
> PCI device should be powered up or powered up before its PCI regsiters
> are accessed.  Although PCI configuration register access is allowed
> in D3hot, PCI device is free to reset its status when transiting from
> D3hot to D0 causing configuration data to change.
> 
> Many libata SFF drivers which use ata_pci_init_one() read and update
> configuration registers before calling ata_pci_init_one() which
> enables the PCI device.  Also, in resume paths, some drivers access
> registers without resuming the PCI device.
> 
> This patch adds a call to pcim_enable_device() in init path if
> register is accessed before calling ata_pci_init_one() and make resume
> paths first resume PCI devices, access PCI configuration regiters then
> resume ATA host.
> 
> While at it...
> 
> * cmd640 was strange in that it set ->resume even when CONFIG_PM is
>   not.  This is by-product of minimal build fix.  Updated.
> 
> * In cs5530, Don't BUG() on reinit failure.  Just whine and fail
>   resume.
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>

Any objections, anyone?

I would like to merge this for 2.6.25, as it is IMO bug fixes.

	Jeff




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

end of thread, other threads:[~2008-02-11 19:24 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-30  9:28 [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Tejun Heo
2008-01-30  9:28 ` [PATCH 1/9] libata: PCI device should be powered up before being accessed Tejun Heo
2008-02-01 20:44   ` Jeff Garzik
2008-02-11 19:24   ` Jeff Garzik
2008-01-30  9:28 ` [PATCH 2/9] libata: reorganize ata_port_operations Tejun Heo
2008-01-30  9:28 ` [PATCH 3/9] libata: implement and use ata_noop_irq_clear() Tejun Heo
2008-02-01 20:45   ` Jeff Garzik
2008-01-30  9:28 ` [PATCH 4/9] libata: normalize port_info, port_operations and sht tables Tejun Heo
2008-02-01 20:46   ` Jeff Garzik
2008-02-09  1:57     ` Tejun Heo
2008-02-04 14:24   ` Alan Cox
2008-02-09  6:11     ` Tejun Heo
2008-02-09  6:53       ` Tejun Heo
2008-01-30  9:28 ` [PATCH 5/9] libata: implement and use SHT initializers and ops inheritance Tejun Heo
2008-01-30 17:09   ` Mark Lord
2008-01-31  3:39     ` Tejun Heo
2008-01-31  4:04       ` Mark Lord
2008-01-31  4:12         ` Tejun Heo
2008-02-01 20:49   ` Jeff Garzik
2008-02-02  0:06     ` Tejun Heo
2008-01-30  9:29 ` [PATCH 6/9] make ata_pci_init_one() not use ops->irq_handler and pi->sht Tejun Heo
2008-01-30  9:29 ` [PATCH 7/9] libata: stop overloading port_info->private_data Tejun Heo
2008-02-04 14:26   ` Alan Cox
2008-02-09  2:07     ` Tejun Heo
2008-01-30  9:29 ` [PATCH 8/9] libata: kill port_info->sht and ->irq_handler Tejun Heo
2008-01-30  9:29 ` [PATCH 9/9] libata: make reset related methods proper port operations Tejun Heo
2008-02-01 20:52   ` Jeff Garzik
2008-01-30  9:49 ` How to verify sht-ops-conversion patch doesn't change anything Tejun Heo
2008-01-30  9:51 ` GIT tree available Tejun Heo
2008-01-31  8:29 ` [PATCHSET libata-dev#upstream] clean up scsi_host_templates and ata_port_operations Akira Iguchi
2008-02-09  1:55   ` Tejun Heo
2008-01-31  8:34 ` Akira Iguchi

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