diff options
author | Tejun Heo <tj@kernel.org> | 2010-06-25 09:02:59 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-08-01 19:46:48 -0400 |
commit | 752e386c247664152f2cce37915d1f50631d7f42 (patch) | |
tree | 790193f1320094acbf2584d5a890703ce8c6fb7e /drivers/ata/sata_fsl.c | |
parent | af4d6e257dc36646bb62adececdd10ad83323788 (diff) |
sata_fsl,mv,nv: prepare for NCQ command completion update
Make the following changes to prepare for NCQ command completion
update. Changes made by this patch don't cause any functional
difference.
* sata_fsl_host_intr(): rename the local variable qc_active to
done_mask as that's what it is.
* mv_process_crpb_response(): restructure if clause for easier update.
* nv_adma_interrupt(): drop unnecessary error variable.
* nv_swncq_sdbfis(): drop unnecessary nr_done and return 0 on success.
Typo fix.
* nv_swncq_dmafis(): drop unused return value and return void.
* nv_swncq_host_interrupt(): drop unnecessary return value handling.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ashish Kalra <ashish.kalra@freescale.com>
Cc: Saeed Bishara <saeed@marvell.com>
Cc: Mark Lord <liml@rtr.ca>
Cc: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_fsl.c')
-rw-r--r-- | drivers/ata/sata_fsl.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 61c89b54ea23..18c986dbb7f1 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -1096,7 +1096,7 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1096 | { | 1096 | { |
1097 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 1097 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
1098 | void __iomem *hcr_base = host_priv->hcr_base; | 1098 | void __iomem *hcr_base = host_priv->hcr_base; |
1099 | u32 hstatus, qc_active = 0; | 1099 | u32 hstatus, done_mask = 0; |
1100 | struct ata_queued_cmd *qc; | 1100 | struct ata_queued_cmd *qc; |
1101 | u32 SError; | 1101 | u32 SError; |
1102 | 1102 | ||
@@ -1116,28 +1116,28 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | /* Read command completed register */ | 1118 | /* Read command completed register */ |
1119 | qc_active = ioread32(hcr_base + CC); | 1119 | done_mask = ioread32(hcr_base + CC); |
1120 | 1120 | ||
1121 | VPRINTK("Status of all queues :\n"); | 1121 | VPRINTK("Status of all queues :\n"); |
1122 | VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n", | 1122 | VPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n", |
1123 | qc_active, | 1123 | done_mask, |
1124 | ioread32(hcr_base + CA), | 1124 | ioread32(hcr_base + CA), |
1125 | ioread32(hcr_base + CE), | 1125 | ioread32(hcr_base + CE), |
1126 | ioread32(hcr_base + CQ), | 1126 | ioread32(hcr_base + CQ), |
1127 | ap->qc_active); | 1127 | ap->qc_active); |
1128 | 1128 | ||
1129 | if (qc_active & ap->qc_active) { | 1129 | if (done_mask & ap->qc_active) { |
1130 | int i; | 1130 | int i; |
1131 | /* clear CC bit, this will also complete the interrupt */ | 1131 | /* clear CC bit, this will also complete the interrupt */ |
1132 | iowrite32(qc_active, hcr_base + CC); | 1132 | iowrite32(done_mask, hcr_base + CC); |
1133 | 1133 | ||
1134 | DPRINTK("Status of all queues :\n"); | 1134 | DPRINTK("Status of all queues :\n"); |
1135 | DPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x\n", | 1135 | DPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x\n", |
1136 | qc_active, ioread32(hcr_base + CA), | 1136 | done_mask, ioread32(hcr_base + CA), |
1137 | ioread32(hcr_base + CE)); | 1137 | ioread32(hcr_base + CE)); |
1138 | 1138 | ||
1139 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { | 1139 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { |
1140 | if (qc_active & (1 << i)) { | 1140 | if (done_mask & (1 << i)) { |
1141 | qc = ata_qc_from_tag(ap, i); | 1141 | qc = ata_qc_from_tag(ap, i); |
1142 | if (qc) { | 1142 | if (qc) { |
1143 | ata_qc_complete(qc); | 1143 | ata_qc_complete(qc); |
@@ -1164,7 +1164,7 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1164 | /* Spurious Interrupt!! */ | 1164 | /* Spurious Interrupt!! */ |
1165 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", | 1165 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", |
1166 | ioread32(hcr_base + CC)); | 1166 | ioread32(hcr_base + CC)); |
1167 | iowrite32(qc_active, hcr_base + CC); | 1167 | iowrite32(done_mask, hcr_base + CC); |
1168 | return; | 1168 | return; |
1169 | } | 1169 | } |
1170 | } | 1170 | } |