Commit b29cf443 authored by Vinod Koul's avatar Vinod Koul

Merge branch 'topic/intel' into for-linus

parents 9b01029d f4d34aa8
...@@ -142,9 +142,8 @@ static void idma64_chan_irq(struct idma64 *idma64, unsigned short c, ...@@ -142,9 +142,8 @@ static void idma64_chan_irq(struct idma64 *idma64, unsigned short c,
{ {
struct idma64_chan *idma64c = &idma64->chan[c]; struct idma64_chan *idma64c = &idma64->chan[c];
struct idma64_desc *desc; struct idma64_desc *desc;
unsigned long flags;
spin_lock_irqsave(&idma64c->vchan.lock, flags); spin_lock(&idma64c->vchan.lock);
desc = idma64c->desc; desc = idma64c->desc;
if (desc) { if (desc) {
if (status_err & (1 << c)) { if (status_err & (1 << c)) {
...@@ -161,7 +160,7 @@ static void idma64_chan_irq(struct idma64 *idma64, unsigned short c, ...@@ -161,7 +160,7 @@ static void idma64_chan_irq(struct idma64 *idma64, unsigned short c,
if (idma64c->desc == NULL || desc->status == DMA_ERROR) if (idma64c->desc == NULL || desc->status == DMA_ERROR)
idma64_stop_transfer(idma64c); idma64_stop_transfer(idma64c);
} }
spin_unlock_irqrestore(&idma64c->vchan.lock, flags); spin_unlock(&idma64c->vchan.lock);
} }
static irqreturn_t idma64_irq(int irq, void *dev) static irqreturn_t idma64_irq(int irq, void *dev)
......
...@@ -129,7 +129,7 @@ static void ...@@ -129,7 +129,7 @@ static void
ioat_init_channel(struct ioatdma_device *ioat_dma, ioat_init_channel(struct ioatdma_device *ioat_dma,
struct ioatdma_chan *ioat_chan, int idx); struct ioatdma_chan *ioat_chan, int idx);
static void ioat_intr_quirk(struct ioatdma_device *ioat_dma); static void ioat_intr_quirk(struct ioatdma_device *ioat_dma);
static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma); static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma);
static int ioat3_dma_self_test(struct ioatdma_device *ioat_dma); static int ioat3_dma_self_test(struct ioatdma_device *ioat_dma);
static int ioat_dca_enabled = 1; static int ioat_dca_enabled = 1;
...@@ -575,7 +575,7 @@ static void ioat_dma_remove(struct ioatdma_device *ioat_dma) ...@@ -575,7 +575,7 @@ static void ioat_dma_remove(struct ioatdma_device *ioat_dma)
* ioat_enumerate_channels - find and initialize the device's channels * ioat_enumerate_channels - find and initialize the device's channels
* @ioat_dma: the ioat dma device to be enumerated * @ioat_dma: the ioat dma device to be enumerated
*/ */
static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma) static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
{ {
struct ioatdma_chan *ioat_chan; struct ioatdma_chan *ioat_chan;
struct device *dev = &ioat_dma->pdev->dev; struct device *dev = &ioat_dma->pdev->dev;
...@@ -594,7 +594,7 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma) ...@@ -594,7 +594,7 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
xfercap_log = readb(ioat_dma->reg_base + IOAT_XFERCAP_OFFSET); xfercap_log = readb(ioat_dma->reg_base + IOAT_XFERCAP_OFFSET);
xfercap_log &= 0x1f; /* bits [4:0] valid */ xfercap_log &= 0x1f; /* bits [4:0] valid */
if (xfercap_log == 0) if (xfercap_log == 0)
return 0; return;
dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log); dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log);
for (i = 0; i < dma->chancnt; i++) { for (i = 0; i < dma->chancnt; i++) {
...@@ -611,7 +611,6 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma) ...@@ -611,7 +611,6 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
} }
} }
dma->chancnt = i; dma->chancnt = i;
return i;
} }
/** /**
...@@ -1205,8 +1204,15 @@ static void ioat_shutdown(struct pci_dev *pdev) ...@@ -1205,8 +1204,15 @@ static void ioat_shutdown(struct pci_dev *pdev)
spin_lock_bh(&ioat_chan->prep_lock); spin_lock_bh(&ioat_chan->prep_lock);
set_bit(IOAT_CHAN_DOWN, &ioat_chan->state); set_bit(IOAT_CHAN_DOWN, &ioat_chan->state);
del_timer_sync(&ioat_chan->timer);
spin_unlock_bh(&ioat_chan->prep_lock); spin_unlock_bh(&ioat_chan->prep_lock);
/*
* Synchronization rule for del_timer_sync():
* - The caller must not hold locks which would prevent
* completion of the timer's handler.
* So prep_lock cannot be held before calling it.
*/
del_timer_sync(&ioat_chan->timer);
/* this should quiesce then reset */ /* this should quiesce then reset */
ioat_reset_hw(ioat_chan); ioat_reset_hw(ioat_chan);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment