linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: jeff@garzik.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 09/22] pata_cmd640/bf54x/icside: fix inheritance
Date: Tue, 21 Oct 2008 18:17:47 +0900	[thread overview]
Message-ID: <1224580680-13698-10-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1224580680-13698-1-git-send-email-tj@kernel.org>

cmd640 is PIO only while bf54x and icside are BMDMAs.  Fix
inheritance.  bf54x and icside are quasi-BMDMA controllers which don't
use the standard BMDMA registers so they don't initialize bmdma_addr
and inherited from sff to avoid the default mode_filter which disables
DMA modes if bmdma_addr is not initialized.

This patch makes both drivers explicitly specify ->mode_filter to
ATA_OP_NULL while inheriting from ata_bmdma_port_ops.  These will be
removed by the next patch.

This patch makes all and only BMDMA drivers inherit from
ata_bmdma_port_ops to ease further SFF/BMDMA separation.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 drivers/ata/pata_bf54x.c  |    4 +++-
 drivers/ata/pata_cmd640.c |    4 ++--
 drivers/ata/pata_icside.c |    4 +++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index b833328..27cd40a 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1460,7 +1460,7 @@ static struct scsi_host_template bfin_sht = {
 };
 
 static struct ata_port_operations bfin_pata_ops = {
-	.inherits		= &ata_sff_port_ops,
+	.inherits		= &ata_bmdma_port_ops,
 
 	.set_piomode		= bfin_set_piomode,
 	.set_dmamode		= bfin_set_dmamode,
@@ -1490,6 +1490,8 @@ static struct ata_port_operations bfin_pata_ops = {
 
 	.port_start		= bfin_port_start,
 	.port_stop		= bfin_port_stop,
+
+	.mode_filter		= ATA_OP_NULL,	/* will be removed soon */
 };
 
 static struct ata_port_info bfin_port_info[] = {
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index 2de30b9..4b2612b 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -166,11 +166,11 @@ static int cmd640_port_start(struct ata_port *ap)
 }
 
 static struct scsi_host_template cmd640_sht = {
-	ATA_BMDMA_SHT(DRV_NAME),
+	ATA_PIO_SHT(DRV_NAME),
 };
 
 static struct ata_port_operations cmd640_port_ops = {
-	.inherits	= &ata_bmdma_port_ops,
+	.inherits	= &ata_sff_port_ops,
 	/* In theory xfer_noirq is not needed once we kill the prefetcher */
 	.sff_data_xfer	= ata_sff_data_xfer_noirq,
 	.qc_issue	= cmd640_qc_issue,
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index cf9e984..f2623c6 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -333,7 +333,7 @@ static void pata_icside_postreset(struct ata_link *link, unsigned int *classes)
 }
 
 static struct ata_port_operations pata_icside_port_ops = {
-	.inherits		= &ata_sff_port_ops,
+	.inherits		= &ata_bmdma_port_ops,
 	/* no need to build any PRD tables for DMA */
 	.qc_prep		= ata_noop_qc_prep,
 	.sff_data_xfer		= ata_sff_data_xfer_noirq,
@@ -346,6 +346,8 @@ static struct ata_port_operations pata_icside_port_ops = {
 	.set_dmamode		= pata_icside_set_dmamode,
 	.postreset		= pata_icside_postreset,
 	.post_internal_cmd	= pata_icside_bmdma_stop,
+
+	.mode_filter		= ATA_OP_NULL,	/* will be removed soon */
 };
 
 static void __devinit
-- 
1.5.4.5


  parent reply	other threads:[~2008-10-21  9:20 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21  9:17 [PATCHSET #upstream] libata: separate out SFF and BMDMA Tejun Heo
2008-10-21  9:17 ` [PATCH 01/22] pata_sch: use ata_pci_sff_init_one() Tejun Heo
2008-10-21  9:17 ` [PATCH 02/22] sata_inic162x: inic162x is not dependent on CONFIG_ATA_SFF Tejun Heo
2008-10-21  9:17 ` [PATCH 03/22] sata_mv: remove unnecessary initialization Tejun Heo
2008-10-21  9:17 ` [PATCH 04/22] libata-sff: clear IRQ from ata_sff_error_handler() only when necessary Tejun Heo
2008-10-21  9:53   ` Sergei Shtylyov
2008-10-21 11:45     ` [PATCH 04/22, UPDATED] " Tejun Heo
2008-10-28  4:10   ` [PATCH 04/22] " Jeff Garzik
2008-10-28  4:28     ` Tejun Heo
2008-10-21  9:17 ` [PATCH 05/22] libata-sff: kill unused prototype and make ata_dev_select() static Tejun Heo
2010-05-07 13:47   ` Sergei Shtylyov
2008-10-21  9:17 ` [PATCH 06/22] libata: kill ATA_FLAG_DISABLED Tejun Heo
2008-10-21  9:17 ` [PATCH 07/22] sata_inic162x: kill PORT_PRD_ADDR initialization Tejun Heo
2008-10-21  9:17 ` [PATCH 08/22] libata-sff: reorder SFF/BMDMA functions Tejun Heo
2008-10-21  9:17 ` Tejun Heo [this message]
2008-10-21  9:17 ` [PATCH 10/22] libata-sff: clean up BMDMA initialization Tejun Heo
2008-10-28  4:16   ` Jeff Garzik
2008-10-21  9:17 ` [PATCH 11/22] libata-sff: introduce ata_sff_init/exit() and ata_sff_port_init() Tejun Heo
2008-10-21  9:17 ` [PATCH 12/22] libata-sff: ap->[last_]ctl are SFF specific Tejun Heo
2008-10-21  9:17 ` [PATCH 13/22] libata-sff: port_task is " Tejun Heo
2008-10-21  9:17 ` [PATCH 14/22] libata-sff: separate out BMDMA EHs Tejun Heo
2008-10-21  9:17 ` [PATCH 15/22] libata-sff: ata_sff_[dumb_]qc_prep are BMDMA specific Tejun Heo
2008-10-21  9:17 ` [PATCH 16/22] libata-sff: prd is " Tejun Heo
2008-10-21  9:17 ` [PATCH 17/22] libata-sff: separate out BMDMA qc_issue Tejun Heo
2008-10-21  9:17 ` [PATCH 18/22] libata-sff: ata_sff_irq_clear() is BMDMA specific Tejun Heo
2008-10-21  9:17 ` [PATCH 19/22] libata-sff: separate out BMDMA irq handler Tejun Heo
2008-10-21  9:17 ` [PATCH 20/22] libata-sff: separate out BMDMA init Tejun Heo
2008-10-21 15:49   ` [PATCH 20/22 UPDATED] " Tejun Heo
2008-10-21  9:17 ` [PATCH 21/22] sata_qstor: kill dummy BMDMA ops Tejun Heo
2008-10-21 10:10   ` Sergei Shtylyov
2008-10-21 11:27     ` Tejun Heo
2008-10-21  9:18 ` [PATCH 22/22] libata-sff: make BMDMA optional Tejun Heo
2008-10-21  9:26 ` [PATCHSET #upstream] libata: separate out SFF and BMDMA Tejun Heo
2008-10-21 11:36 ` Sergei Shtylyov
2008-10-21 11:43   ` Tejun Heo
2008-10-27 19:43 ` Mark Lord
2008-10-28  1:06   ` Tejun Heo
2008-10-28  4:20 ` Jeff Garzik
2008-11-03 14:26   ` Tejun Heo
2008-11-04  5:35     ` Jeff Garzik
2008-11-04  5:38       ` Tejun Heo
2008-10-28  4:31 ` [PATCH 04/22 DESC UPDATED] libata-sff: clear IRQ from ata_sff_error_handler() only when necessary Tejun Heo
2010-05-07 13:59 ` [PATCHSET #upstream] libata: separate out SFF and BMDMA Sergei Shtylyov
2010-05-08 15:33   ` Tejun Heo

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=1224580680-13698-10-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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).