|
@@ -293,6 +293,7 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host,
|
|
|
{
|
|
|
struct sata_fsl_host_priv *host_priv = host->private_data;
|
|
|
void __iomem *hcr_base = host_priv->hcr_base;
|
|
|
+ unsigned long flags;
|
|
|
|
|
|
if (count > ICC_MAX_INT_COUNT_THRESHOLD)
|
|
|
count = ICC_MAX_INT_COUNT_THRESHOLD;
|
|
@@ -305,12 +306,12 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host,
|
|
|
(count > ICC_MIN_INT_COUNT_THRESHOLD))
|
|
|
ticks = ICC_SAFE_INT_TICKS;
|
|
|
|
|
|
- spin_lock(&host->lock);
|
|
|
+ spin_lock_irqsave(&host->lock, flags);
|
|
|
iowrite32((count << 24 | ticks), hcr_base + ICC);
|
|
|
|
|
|
intr_coalescing_count = count;
|
|
|
intr_coalescing_ticks = ticks;
|
|
|
- spin_unlock(&host->lock);
|
|
|
+ spin_unlock_irqrestore(&host->lock, flags);
|
|
|
|
|
|
DPRINTK("interrupt coalescing, count = 0x%x, ticks = %x\n",
|
|
|
intr_coalescing_count, intr_coalescing_ticks);
|