* [PATCH #upstream 1/3] libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops
@ 2008-03-25 12:34 Tejun Heo
2008-03-25 12:35 ` [PATCH 2/3] pdc_adma: inherit ata_sff_port_ops Tejun Heo
2008-04-04 7:50 ` [PATCH #upstream 1/3] libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops Jeff Garzik
0 siblings, 2 replies; 4+ messages in thread
From: Tejun Heo @ 2008-03-25 12:34 UTC (permalink / raw)
To: Jeff Garzik, Mark Lord, IDE/ATA development list
pdc_adma has interface similar to SFF but has its own DMA interface.
It currently implements noop bmdma ops to avoid crashing
ata_bmdma_error_handler() which BTW actually is EH for SFF drivers.
This patch makes ata_bmdma_error_handler() dereference bmdma ops iff
bmdma_addr is initialized as done in ata_bmdma_post_internal_cmd.
This change allows pdc_adma to standardize ops and use SFF
error_handler and post_internal_cmd.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>
---
This patch series in on top of #cleanup-sht-ops (ed75ba53) and not for
#upstream-fixes. Tested with pdc_adma controllers Mark sent me. :-)
drivers/ata/libata-sff.c | 3 ++-
drivers/ata/pdc_adma.c | 16 ++--------------
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 2a229a1..0e30c11 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -424,7 +424,8 @@ void ata_bmdma_error_handler(struct ata_port *ap)
ap->hsm_task_state = HSM_ST_IDLE;
- if (qc && (qc->tf.protocol == ATA_PROT_DMA ||
+ if (ap->ioaddr.bmdma_addr &&
+ qc && (qc->tf.protocol == ATA_PROT_DMA ||
qc->tf.protocol == ATAPI_PROT_DMA)) {
u8 host_stat;
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index 5ed065d..577a0e5 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -136,8 +136,6 @@ static void adma_port_stop(struct ata_port *ap);
static void adma_qc_prep(struct ata_queued_cmd *qc);
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_freeze(struct ata_port *ap);
static void adma_thaw(struct ata_port *ap);
static int adma_prereset(struct ata_link *link, unsigned long deadline);
@@ -158,8 +156,6 @@ static struct ata_port_operations adma_ata_ops = {
.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,
@@ -168,6 +164,8 @@ static struct ata_port_operations adma_ata_ops = {
.thaw = adma_thaw,
.prereset = adma_prereset,
.softreset = ata_std_softreset,
+ .error_handler = ata_bmdma_error_handler,
+ .post_internal_cmd = ata_bmdma_post_internal_cmd,
.port_start = adma_port_start,
.port_stop = adma_port_stop,
@@ -204,16 +202,6 @@ static int adma_check_atapi_dma(struct ata_queued_cmd *qc)
return 1; /* ATAPI DMA not yet supported */
}
-static void adma_bmdma_stop(struct ata_queued_cmd *qc)
-{
- /* nothing */
-}
-
-static u8 adma_bmdma_status(struct ata_port *ap)
-{
- return 0;
-}
-
static void adma_reset_engine(struct ata_port *ap)
{
void __iomem *chan = ADMA_PORT_REGS(ap);
--
1.5.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] pdc_adma: inherit ata_sff_port_ops
2008-03-25 12:34 [PATCH #upstream 1/3] libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops Tejun Heo
@ 2008-03-25 12:35 ` Tejun Heo
2008-03-25 12:36 ` [PATCH 3/3] pdc_adma: kill adma_host_stop() Tejun Heo
2008-04-04 7:50 ` [PATCH #upstream 1/3] libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops Jeff Garzik
1 sibling, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2008-03-25 12:35 UTC (permalink / raw)
To: Jeff Garzik, Mark Lord, IDE/ATA development list
With the previous ops standardization, pdc_adma now can inherit
ata_sff_port_ops instead of ata_base_port_ops. Make the change.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>
---
drivers/ata/pdc_adma.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index 577a0e5..6a4654e 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -147,25 +147,15 @@ static struct scsi_host_template adma_ata_sht = {
};
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,
- .check_status = ata_check_status,
- .exec_command = ata_exec_command,
- .data_xfer = ata_data_xfer,
+ .inherits = &ata_sff_port_ops,
+
.check_atapi_dma = adma_check_atapi_dma,
.qc_prep = adma_qc_prep,
.qc_issue = adma_qc_issue,
- .irq_on = ata_irq_on,
.freeze = adma_freeze,
.thaw = adma_thaw,
.prereset = adma_prereset,
- .softreset = ata_std_softreset,
- .error_handler = ata_bmdma_error_handler,
- .post_internal_cmd = ata_bmdma_post_internal_cmd,
.port_start = adma_port_start,
.port_stop = adma_port_stop,
--
1.5.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] pdc_adma: kill adma_host_stop()
2008-03-25 12:35 ` [PATCH 2/3] pdc_adma: inherit ata_sff_port_ops Tejun Heo
@ 2008-03-25 12:36 ` Tejun Heo
0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2008-03-25 12:36 UTC (permalink / raw)
To: Jeff Garzik, Mark Lord, IDE/ATA development list
adma_host_stop() does the same thing that adma_port_stop() does. Kill
it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>
---
drivers/ata/pdc_adma.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index 6a4654e..c431bf3 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -131,7 +131,6 @@ struct adma_port_priv {
static int adma_ata_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent);
static int adma_port_start(struct ata_port *ap);
-static void adma_host_stop(struct ata_host *host);
static void adma_port_stop(struct ata_port *ap);
static void adma_qc_prep(struct ata_queued_cmd *qc);
static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
@@ -159,7 +158,6 @@ static struct ata_port_operations adma_ata_ops = {
.port_start = adma_port_start,
.port_stop = adma_port_stop,
- .host_stop = adma_host_stop,
};
static struct ata_port_info adma_port_info[] = {
@@ -591,14 +589,6 @@ static void adma_port_stop(struct ata_port *ap)
adma_reset_engine(ap);
}
-static void adma_host_stop(struct ata_host *host)
-{
- unsigned int port_no;
-
- for (port_no = 0; port_no < ADMA_PORTS; ++port_no)
- adma_reset_engine(host->ports[port_no]);
-}
-
static void adma_host_init(struct ata_host *host, unsigned int chip_id)
{
unsigned int port_no;
--
1.5.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH #upstream 1/3] libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops
2008-03-25 12:34 [PATCH #upstream 1/3] libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops Tejun Heo
2008-03-25 12:35 ` [PATCH 2/3] pdc_adma: inherit ata_sff_port_ops Tejun Heo
@ 2008-04-04 7:50 ` Jeff Garzik
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2008-04-04 7:50 UTC (permalink / raw)
To: Tejun Heo; +Cc: Mark Lord, IDE/ATA development list
Tejun Heo wrote:
> pdc_adma has interface similar to SFF but has its own DMA interface.
> It currently implements noop bmdma ops to avoid crashing
> ata_bmdma_error_handler() which BTW actually is EH for SFF drivers.
>
> This patch makes ata_bmdma_error_handler() dereference bmdma ops iff
> bmdma_addr is initialized as done in ata_bmdma_post_internal_cmd.
> This change allows pdc_adma to standardize ops and use SFF
> error_handler and post_internal_cmd.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Mark Lord <liml@rtr.ca>
> ---
> This patch series in on top of #cleanup-sht-ops (ed75ba53) and not for
> #upstream-fixes. Tested with pdc_adma controllers Mark sent me. :-)
>
> drivers/ata/libata-sff.c | 3 ++-
> drivers/ata/pdc_adma.c | 16 ++--------------
> 2 files changed, 4 insertions(+), 15 deletions(-)
applied 1-3
I realize now that the lack of this patchset (broken ordering on my
part) probably caused the previously-emailed-about compile breakage.
sorry! I'll pull the rest after a resync, since I ack'd that 27-patch
patchset.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-04 7:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-25 12:34 [PATCH #upstream 1/3] libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops Tejun Heo
2008-03-25 12:35 ` [PATCH 2/3] pdc_adma: inherit ata_sff_port_ops Tejun Heo
2008-03-25 12:36 ` [PATCH 3/3] pdc_adma: kill adma_host_stop() Tejun Heo
2008-04-04 7:50 ` [PATCH #upstream 1/3] libata/pdc_adma: make SFF EH handle non-bmdma SFF drivers and standardize pdc_adma ops Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).