diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:21 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:24 -0400 |
commit | 520d06f92b32d7abe5127d7cc46a819db0f384e6 (patch) | |
tree | fd4f9ce7fdfa4296a1e71457906500736ca27fa0 /drivers/ata/sata_fsl.c | |
parent | 4c9bf4e799ce06a7378f1196587084802a414c03 (diff) |
libata: remove check_status from non-SFF drivers
Now that all SFF stuff is separated out of core layer, core layer
doesn't call ops->[alt_]check_status(). In fact, no one calls them
for non-SFF drivers anymore. Kill them.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/sata_fsl.c')
-rw-r--r-- | drivers/ata/sata_fsl.c | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index e880b7ec060f..0cb0a57ddb36 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -244,17 +244,6 @@ struct sata_fsl_port_priv { | |||
244 | dma_addr_t cmdslot_paddr; | 244 | dma_addr_t cmdslot_paddr; |
245 | struct command_desc *cmdentry; | 245 | struct command_desc *cmdentry; |
246 | dma_addr_t cmdentry_paddr; | 246 | dma_addr_t cmdentry_paddr; |
247 | |||
248 | /* | ||
249 | * SATA FSL controller has a Status FIS which should contain the | ||
250 | * received D2H FIS & taskfile registers. This SFIS is present in | ||
251 | * the command descriptor, and to have a ready reference to it, | ||
252 | * we are caching it here, quite similar to what is done in H/W on | ||
253 | * AHCI compliant devices by copying taskfile fields to a 32-bit | ||
254 | * register. | ||
255 | */ | ||
256 | |||
257 | struct ata_taskfile tf; | ||
258 | }; | 247 | }; |
259 | 248 | ||
260 | /* | 249 | /* |
@@ -569,31 +558,6 @@ static void sata_fsl_thaw(struct ata_port *ap) | |||
569 | ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); | 558 | ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); |
570 | } | 559 | } |
571 | 560 | ||
572 | /* | ||
573 | * NOTE : 1st D2H FIS from device does not update sfis in command descriptor. | ||
574 | */ | ||
575 | static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd | ||
576 | *qc, | ||
577 | struct ata_port *ap) | ||
578 | { | ||
579 | struct sata_fsl_port_priv *pp = ap->private_data; | ||
580 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | ||
581 | void __iomem *hcr_base = host_priv->hcr_base; | ||
582 | unsigned int tag = sata_fsl_tag(qc->tag, hcr_base); | ||
583 | struct command_desc *cd; | ||
584 | |||
585 | cd = pp->cmdentry + tag; | ||
586 | |||
587 | ata_tf_from_fis(cd->sfis, &pp->tf); | ||
588 | } | ||
589 | |||
590 | static u8 sata_fsl_check_status(struct ata_port *ap) | ||
591 | { | ||
592 | struct sata_fsl_port_priv *pp = ap->private_data; | ||
593 | |||
594 | return pp->tf.command; | ||
595 | } | ||
596 | |||
597 | static int sata_fsl_port_start(struct ata_port *ap) | 561 | static int sata_fsl_port_start(struct ata_port *ap) |
598 | { | 562 | { |
599 | struct device *dev = ap->host->dev; | 563 | struct device *dev = ap->host->dev; |
@@ -1004,10 +968,9 @@ static void sata_fsl_error_intr(struct ata_port *ap) | |||
1004 | /* record error info */ | 968 | /* record error info */ |
1005 | qc = ata_qc_from_tag(ap, link->active_tag); | 969 | qc = ata_qc_from_tag(ap, link->active_tag); |
1006 | 970 | ||
1007 | if (qc) { | 971 | if (qc) |
1008 | sata_fsl_cache_taskfile_from_d2h_fis(qc, qc->ap); | ||
1009 | qc->err_mask |= err_mask; | 972 | qc->err_mask |= err_mask; |
1010 | } else | 973 | else |
1011 | ehi->err_mask |= err_mask; | 974 | ehi->err_mask |= err_mask; |
1012 | 975 | ||
1013 | ehi->action |= action; | 976 | ehi->action |= action; |
@@ -1020,14 +983,6 @@ static void sata_fsl_error_intr(struct ata_port *ap) | |||
1020 | ata_port_abort(ap); | 983 | ata_port_abort(ap); |
1021 | } | 984 | } |
1022 | 985 | ||
1023 | static void sata_fsl_qc_complete(struct ata_queued_cmd *qc) | ||
1024 | { | ||
1025 | if (qc->flags & ATA_QCFLAG_RESULT_TF) { | ||
1026 | DPRINTK("xx_qc_complete called\n"); | ||
1027 | sata_fsl_cache_taskfile_from_d2h_fis(qc, qc->ap); | ||
1028 | } | ||
1029 | } | ||
1030 | |||
1031 | static void sata_fsl_host_intr(struct ata_port *ap) | 986 | static void sata_fsl_host_intr(struct ata_port *ap) |
1032 | { | 987 | { |
1033 | struct ata_link *link = &ap->link; | 988 | struct ata_link *link = &ap->link; |
@@ -1068,10 +1023,8 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1068 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { | 1023 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { |
1069 | if (qc_active & (1 << i)) { | 1024 | if (qc_active & (1 << i)) { |
1070 | qc = ata_qc_from_tag(ap, i); | 1025 | qc = ata_qc_from_tag(ap, i); |
1071 | if (qc) { | 1026 | if (qc) |
1072 | sata_fsl_qc_complete(qc); | ||
1073 | ata_qc_complete(qc); | 1027 | ata_qc_complete(qc); |
1074 | } | ||
1075 | DPRINTK | 1028 | DPRINTK |
1076 | ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", | 1029 | ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", |
1077 | i, ioread32(hcr_base + CC), | 1030 | i, ioread32(hcr_base + CC), |
@@ -1087,10 +1040,8 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1087 | DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", | 1040 | DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", |
1088 | link->active_tag, ioread32(hcr_base + CC)); | 1041 | link->active_tag, ioread32(hcr_base + CC)); |
1089 | 1042 | ||
1090 | if (qc) { | 1043 | if (qc) |
1091 | sata_fsl_qc_complete(qc); | ||
1092 | ata_qc_complete(qc); | 1044 | ata_qc_complete(qc); |
1093 | } | ||
1094 | } else { | 1045 | } else { |
1095 | /* Spurious Interrupt!! */ | 1046 | /* Spurious Interrupt!! */ |
1096 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", | 1047 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", |
@@ -1197,9 +1148,6 @@ static struct scsi_host_template sata_fsl_sht = { | |||
1197 | static const struct ata_port_operations sata_fsl_ops = { | 1148 | static const struct ata_port_operations sata_fsl_ops = { |
1198 | .inherits = &sata_port_ops, | 1149 | .inherits = &sata_port_ops, |
1199 | 1150 | ||
1200 | .sff_check_status = sata_fsl_check_status, | ||
1201 | .sff_check_altstatus = sata_fsl_check_status, | ||
1202 | |||
1203 | .qc_prep = sata_fsl_qc_prep, | 1151 | .qc_prep = sata_fsl_qc_prep, |
1204 | .qc_issue = sata_fsl_qc_issue, | 1152 | .qc_issue = sata_fsl_qc_issue, |
1205 | .qc_fill_rtf = sata_fsl_qc_fill_rtf, | 1153 | .qc_fill_rtf = sata_fsl_qc_fill_rtf, |