Skip to content

Commit

Permalink
Fix spinlock recursion in sdhci-bcm2708.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ddv2005 authored and popcornmix committed Aug 9, 2012
1 parent b6d5be4 commit 921a3d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/mmc/host/sdhci-bcm2708.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ sdhci_bcm2708_platdma_reset(struct sdhci_host *host, struct mmc_data *data)

BUG_ON(NULL == host);

spin_lock_irqsave(&host->lock, flags);
// spin_lock_irqsave(&host->lock, flags);

if (host_priv->dma_wanted) {
if (NULL == data) {
Expand Down Expand Up @@ -736,7 +736,7 @@ sdhci_bcm2708_platdma_reset(struct sdhci_host *host, struct mmc_data *data)
#endif
}

spin_unlock_irqrestore(&host->lock, flags);
// spin_unlock_irqrestore(&host->lock, flags);
}


Expand All @@ -753,7 +753,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host,

BUG_ON(NULL == host);

spin_lock_irqsave(&host->lock, flags);
// spin_lock_irqsave(&host->lock, flags);
data = host->data;

#ifdef CHECK_DMA_USE
Expand All @@ -778,7 +778,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host,

if (NULL == data) {
DBG("PDMA unused completion - status 0x%X\n", dma_cs);
spin_unlock_irqrestore(&host->lock, flags);
// spin_unlock_irqrestore(&host->lock, flags);
return;
}
sg = data->sg;
Expand Down Expand Up @@ -871,7 +871,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host,
SDHCI_INT_SPACE_AVAIL);
}
}
spin_unlock_irqrestore(&host->lock, flags);
// spin_unlock_irqrestore(&host->lock, flags);
}

static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id)
Expand Down

1 comment on commit 921a3d1

@grigorig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this help with? I don't understand why this lock is harmful.

Please sign in to comment.