Skip to content

Commit

Permalink
Merge branch 'topic/intel' into for-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinod Koul committed Oct 24, 2018
2 parents 9b01029 + f4d34aa commit b29cf44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 2 additions & 3 deletions drivers/dma/idma64.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ static void idma64_chan_irq(struct idma64 *idma64, unsigned short c,
{
struct idma64_chan *idma64c = &idma64->chan[c];
struct idma64_desc *desc;
unsigned long flags;

spin_lock_irqsave(&idma64c->vchan.lock, flags);
spin_lock(&idma64c->vchan.lock);
desc = idma64c->desc;
if (desc) {
if (status_err & (1 << c)) {
Expand All @@ -161,7 +160,7 @@ static void idma64_chan_irq(struct idma64 *idma64, unsigned short c,
if (idma64c->desc == NULL || desc->status == DMA_ERROR)
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)
Expand Down
16 changes: 11 additions & 5 deletions drivers/dma/ioat/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void
ioat_init_channel(struct ioatdma_device *ioat_dma,
struct ioatdma_chan *ioat_chan, int idx);
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 ioat_dca_enabled = 1;
Expand Down Expand Up @@ -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_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 device *dev = &ioat_dma->pdev->dev;
Expand All @@ -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 &= 0x1f; /* bits [4:0] valid */
if (xfercap_log == 0)
return 0;
return;
dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log);

for (i = 0; i < dma->chancnt; i++) {
Expand All @@ -611,7 +611,6 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
}
}
dma->chancnt = i;
return i;
}

/**
Expand Down Expand Up @@ -1205,8 +1204,15 @@ static void ioat_shutdown(struct pci_dev *pdev)

spin_lock_bh(&ioat_chan->prep_lock);
set_bit(IOAT_CHAN_DOWN, &ioat_chan->state);
del_timer_sync(&ioat_chan->timer);
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 */
ioat_reset_hw(ioat_chan);
}
Expand Down

0 comments on commit b29cf44

Please sign in to comment.