diff options
author | Tejun Heo <tj@kernel.org> | 2013-07-02 19:54:16 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-07-02 19:54:16 -0700 |
commit | 5a0a6a4f17a3606289f96356383db695a555bdbd (patch) | |
tree | 0f8e206d65ef29bf81a13213af00db56c90af06c /drivers/ata/sata_rcar.c | |
parent | 9bbb1b0e2a83c5b3922a050acc932ee3004e85b6 (diff) | |
parent | 1cfc7df3de10c40ed459e13cce6de616023bf41c (diff) |
Merge branch 'libata/for-3.10-fixes' into libata/for-3.11
libata/for-3.10-fixes never got submitted during v3.10 cycle. Merge
it into for-3.11 so that it can be routed together with other changes
scheduled for v3.11.
Three trivial conflicts in drivers/ata/sata_rcar.c. All are caused by
1b20f6a9ad ("sata_rcar: add 'base' local variable to some functions")
conflicting with logic updates in for-3.10-fixes. The offending
commit simply adds local variable @base on functions which
dereferences sata_rcar_priv->base multiple times. The resolutions are
trivial - applying s/priv->base/base/ in the conflicting logic
updates.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/sata_rcar.c')
-rw-r--r-- | drivers/ata/sata_rcar.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index f0d3e43570ee..8108eb065444 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -186,7 +186,7 @@ static void sata_rcar_thaw(struct ata_port *ap) void __iomem *base = priv->base; /* ack */ - iowrite32(~SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG); + iowrite32(~(u32)SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG); ata_sff_thaw(ap); @@ -545,6 +545,7 @@ static void sata_rcar_bmdma_start(struct ata_queued_cmd *qc) /* start host DMA transaction */ dmactl = ioread32(base + ATAPI_CONTROL1_REG); + dmactl &= ~ATAPI_CONTROL1_STOP; dmactl |= ATAPI_CONTROL1_START; iowrite32(dmactl, base + ATAPI_CONTROL1_REG); } @@ -622,17 +623,16 @@ static struct ata_port_operations sata_rcar_port_ops = { .bmdma_status = sata_rcar_bmdma_status, }; -static int sata_rcar_serr_interrupt(struct ata_port *ap) +static void sata_rcar_serr_interrupt(struct ata_port *ap) { struct sata_rcar_priv *priv = ap->host->private_data; struct ata_eh_info *ehi = &ap->link.eh_info; int freeze = 0; - int handled = 0; u32 serror; serror = ioread32(priv->base + SCRSERR_REG); if (!serror) - return 0; + return; DPRINTK("SError @host_intr: 0x%x\n", serror); @@ -645,7 +645,6 @@ static int sata_rcar_serr_interrupt(struct ata_port *ap) ata_ehi_push_desc(ehi, "%s", "hotplug"); freeze = serror & SERR_COMM_WAKE ? 0 : 1; - handled = 1; } /* freeze or abort */ @@ -653,11 +652,9 @@ static int sata_rcar_serr_interrupt(struct ata_port *ap) ata_port_freeze(ap); else ata_port_abort(ap); - - return handled; } -static int sata_rcar_ata_interrupt(struct ata_port *ap) +static void sata_rcar_ata_interrupt(struct ata_port *ap) { struct ata_queued_cmd *qc; int handled = 0; @@ -666,7 +663,9 @@ static int sata_rcar_ata_interrupt(struct ata_port *ap) if (qc) handled |= ata_bmdma_port_intr(ap, qc); - return handled; + /* be sure to clear ATA interrupt */ + if (!handled) + sata_rcar_check_status(ap); } static irqreturn_t sata_rcar_interrupt(int irq, void *dev_instance) @@ -682,19 +681,21 @@ static irqreturn_t sata_rcar_interrupt(int irq, void *dev_instance) spin_lock_irqsave(&host->lock, flags); sataintstat = ioread32(base + SATAINTSTAT_REG); + sataintstat &= SATA_RCAR_INT_MASK; if (!sataintstat) goto done; /* ack */ - iowrite32(sataintstat & ~SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG); + iowrite32(~sataintstat & 0x7ff, base + SATAINTSTAT_REG); ap = host->ports[0]; if (sataintstat & SATAINTSTAT_ATA) - handled |= sata_rcar_ata_interrupt(ap); + sata_rcar_ata_interrupt(ap); if (sataintstat & SATAINTSTAT_SERR) - handled |= sata_rcar_serr_interrupt(ap); + sata_rcar_serr_interrupt(ap); + handled = 1; done: spin_unlock_irqrestore(&host->lock, flags); |