Commit 407b3ea0 authored by Vinod Koul's avatar Vinod Koul

Merge branch 'fixes' into next

Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parents 4faee8b6 d5c10e0f
...@@ -102,6 +102,8 @@ static int idxd_setup_interrupts(struct idxd_device *idxd) ...@@ -102,6 +102,8 @@ static int idxd_setup_interrupts(struct idxd_device *idxd)
spin_lock_init(&idxd->irq_entries[i].list_lock); spin_lock_init(&idxd->irq_entries[i].list_lock);
} }
idxd_msix_perm_setup(idxd);
irq_entry = &idxd->irq_entries[0]; irq_entry = &idxd->irq_entries[0];
rc = request_threaded_irq(irq_entry->vector, NULL, idxd_misc_thread, rc = request_threaded_irq(irq_entry->vector, NULL, idxd_misc_thread,
0, "idxd-misc", irq_entry); 0, "idxd-misc", irq_entry);
...@@ -148,7 +150,6 @@ static int idxd_setup_interrupts(struct idxd_device *idxd) ...@@ -148,7 +150,6 @@ static int idxd_setup_interrupts(struct idxd_device *idxd)
} }
idxd_unmask_error_interrupts(idxd); idxd_unmask_error_interrupts(idxd);
idxd_msix_perm_setup(idxd);
return 0; return 0;
err_wq_irqs: err_wq_irqs:
...@@ -162,6 +163,7 @@ static int idxd_setup_interrupts(struct idxd_device *idxd) ...@@ -162,6 +163,7 @@ static int idxd_setup_interrupts(struct idxd_device *idxd)
err_misc_irq: err_misc_irq:
/* Disable error interrupt generation */ /* Disable error interrupt generation */
idxd_mask_error_interrupts(idxd); idxd_mask_error_interrupts(idxd);
idxd_msix_perm_clear(idxd);
err_irq_entries: err_irq_entries:
pci_free_irq_vectors(pdev); pci_free_irq_vectors(pdev);
dev_err(dev, "No usable interrupts\n"); dev_err(dev, "No usable interrupts\n");
......
...@@ -855,8 +855,8 @@ static int usb_dmac_probe(struct platform_device *pdev) ...@@ -855,8 +855,8 @@ static int usb_dmac_probe(struct platform_device *pdev)
error: error:
of_dma_controller_free(pdev->dev.of_node); of_dma_controller_free(pdev->dev.of_node);
pm_runtime_put(&pdev->dev);
error_pm: error_pm:
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return ret; return ret;
} }
......
...@@ -394,6 +394,7 @@ struct xilinx_dma_tx_descriptor { ...@@ -394,6 +394,7 @@ struct xilinx_dma_tx_descriptor {
* @genlock: Support genlock mode * @genlock: Support genlock mode
* @err: Channel has errors * @err: Channel has errors
* @idle: Check for channel idle * @idle: Check for channel idle
* @terminating: Check for channel being synchronized by user
* @tasklet: Cleanup work after irq * @tasklet: Cleanup work after irq
* @config: Device configuration info * @config: Device configuration info
* @flush_on_fsync: Flush on Frame sync * @flush_on_fsync: Flush on Frame sync
...@@ -431,6 +432,7 @@ struct xilinx_dma_chan { ...@@ -431,6 +432,7 @@ struct xilinx_dma_chan {
bool genlock; bool genlock;
bool err; bool err;
bool idle; bool idle;
bool terminating;
struct tasklet_struct tasklet; struct tasklet_struct tasklet;
struct xilinx_vdma_config config; struct xilinx_vdma_config config;
bool flush_on_fsync; bool flush_on_fsync;
...@@ -1049,6 +1051,13 @@ static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan) ...@@ -1049,6 +1051,13 @@ static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan)
/* Run any dependencies, then free the descriptor */ /* Run any dependencies, then free the descriptor */
dma_run_dependencies(&desc->async_tx); dma_run_dependencies(&desc->async_tx);
xilinx_dma_free_tx_descriptor(chan, desc); xilinx_dma_free_tx_descriptor(chan, desc);
/*
* While we ran a callback the user called a terminate function,
* which takes care of cleaning up any remaining descriptors
*/
if (chan->terminating)
break;
} }
spin_unlock_irqrestore(&chan->lock, flags); spin_unlock_irqrestore(&chan->lock, flags);
...@@ -1965,6 +1974,8 @@ static dma_cookie_t xilinx_dma_tx_submit(struct dma_async_tx_descriptor *tx) ...@@ -1965,6 +1974,8 @@ static dma_cookie_t xilinx_dma_tx_submit(struct dma_async_tx_descriptor *tx)
if (desc->cyclic) if (desc->cyclic)
chan->cyclic = true; chan->cyclic = true;
chan->terminating = false;
spin_unlock_irqrestore(&chan->lock, flags); spin_unlock_irqrestore(&chan->lock, flags);
return cookie; return cookie;
...@@ -2436,6 +2447,7 @@ static int xilinx_dma_terminate_all(struct dma_chan *dchan) ...@@ -2436,6 +2447,7 @@ static int xilinx_dma_terminate_all(struct dma_chan *dchan)
xilinx_dma_chan_reset(chan); xilinx_dma_chan_reset(chan);
/* Remove and free all of the descriptors in the lists */ /* Remove and free all of the descriptors in the lists */
chan->terminating = true;
xilinx_dma_free_descriptors(chan); xilinx_dma_free_descriptors(chan);
chan->idle = true; chan->idle = true;
......
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