Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96941
b: refs/heads/master
c: 96e2c48
h: refs/heads/master
i:
  96939: 28ebc7e
v: v3
  • Loading branch information
Mark Lord authored and Jeff Garzik committed May 19, 2008
1 parent d55d8c7 commit 6a15e6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a44253d24a97ec3efe601267274a5fb64d8696c1
refs/heads/master: 96e2c487933e5f69e98fffdcae2c35c78a671c07
12 changes: 7 additions & 5 deletions trunk/drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ struct mv_port_signal {

struct mv_host_priv {
u32 hp_flags;
u32 main_irq_mask;
struct mv_port_signal signal[8];
const struct mv_hw_ops *ops;
int n_ports;
Expand Down Expand Up @@ -843,10 +844,12 @@ static void mv_set_main_irq_mask(struct ata_host *host,
struct mv_host_priv *hpriv = host->private_data;
u32 old_mask, new_mask;

old_mask = readl(hpriv->main_irq_mask_addr);
old_mask = hpriv->main_irq_mask;
new_mask = (old_mask & ~disable_bits) | enable_bits;
if (new_mask != old_mask)
if (new_mask != old_mask) {
hpriv->main_irq_mask = new_mask;
writelfl(new_mask, hpriv->main_irq_mask_addr);
}
}

static void mv_enable_port_irqs(struct ata_port *ap,
Expand Down Expand Up @@ -2200,12 +2203,11 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance)
struct ata_host *host = dev_instance;
struct mv_host_priv *hpriv = host->private_data;
unsigned int handled = 0;
u32 main_irq_cause, main_irq_mask, pending_irqs;
u32 main_irq_cause, pending_irqs;

spin_lock(&host->lock);
main_irq_cause = readl(hpriv->main_irq_cause_addr);
main_irq_mask = readl(hpriv->main_irq_mask_addr);
pending_irqs = main_irq_cause & main_irq_mask;
pending_irqs = main_irq_cause & hpriv->main_irq_mask;
/*
* Deal with cases where we either have nothing pending, or have read
* a bogus register value which can indicate HW removal or PCI fault.
Expand Down

0 comments on commit 6a15e6d

Please sign in to comment.