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>
这个提交包含在:
@@ -1096,7 +1096,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
|
||||
{
|
||||
struct sata_fsl_host_priv *host_priv = ap->host->private_data;
|
||||
void __iomem *hcr_base = host_priv->hcr_base;
|
||||
u32 hstatus, qc_active = 0;
|
||||
u32 hstatus, done_mask = 0;
|
||||
struct ata_queued_cmd *qc;
|
||||
u32 SError;
|
||||
|
||||
@@ -1116,28 +1116,28 @@ static void sata_fsl_host_intr(struct ata_port *ap)
|
||||
}
|
||||
|
||||
/* Read command completed register */
|
||||
qc_active = ioread32(hcr_base + CC);
|
||||
done_mask = ioread32(hcr_base + CC);
|
||||
|
||||
VPRINTK("Status of all queues :\n");
|
||||
VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n",
|
||||
qc_active,
|
||||
VPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n",
|
||||
done_mask,
|
||||
ioread32(hcr_base + CA),
|
||||
ioread32(hcr_base + CE),
|
||||
ioread32(hcr_base + CQ),
|
||||
ap->qc_active);
|
||||
|
||||
if (qc_active & ap->qc_active) {
|
||||
if (done_mask & ap->qc_active) {
|
||||
int i;
|
||||
/* clear CC bit, this will also complete the interrupt */
|
||||
iowrite32(qc_active, hcr_base + CC);
|
||||
iowrite32(done_mask, hcr_base + CC);
|
||||
|
||||
DPRINTK("Status of all queues :\n");
|
||||
DPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x\n",
|
||||
qc_active, ioread32(hcr_base + CA),
|
||||
DPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x\n",
|
||||
done_mask, ioread32(hcr_base + CA),
|
||||
ioread32(hcr_base + CE));
|
||||
|
||||
for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) {
|
||||
if (qc_active & (1 << i)) {
|
||||
if (done_mask & (1 << i)) {
|
||||
qc = ata_qc_from_tag(ap, i);
|
||||
if (qc) {
|
||||
ata_qc_complete(qc);
|
||||
@@ -1164,7 +1164,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
|
||||
/* Spurious Interrupt!! */
|
||||
DPRINTK("spurious interrupt!!, CC = 0x%x\n",
|
||||
ioread32(hcr_base + CC));
|
||||
iowrite32(qc_active, hcr_base + CC);
|
||||
iowrite32(done_mask, hcr_base + CC);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
在新工单中引用
屏蔽一个用户