Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'dmaengine-fix-4.8-rc5' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
"The fixes this time are all in drivers:

- possible NULL dereference in img-mdc
- correct device identity for free_irq in at_xdmac
- missing of_node_put() in fsl probe
- fix debug log and hotchain corner case for pxa-dma
- fix checking hardware bits in isr in usb dmac"

* tag 'dmaengine-fix-4.8-rc5' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: img-mdc: fix a possible NULL dereference
dmaengine: at_xdmac: fix to pass correct device identity to free_irq()
dmaengine: fsl_raid: add missing of_node_put() in fsl_re_probe()
dmaengine: pxa_dma: fix debug message
dmaengine: pxa_dma: fix hotchain corner case
dmaengine: usb-dmac: check CHCR.DE bit in usb_dmac_isr_channel()

+22 -17
+2 -2
drivers/dma/at_xdmac.c
··· 2067 2067 err_clk_disable: 2068 2068 clk_disable_unprepare(atxdmac->clk); 2069 2069 err_free_irq: 2070 - free_irq(atxdmac->irq, atxdmac->dma.dev); 2070 + free_irq(atxdmac->irq, atxdmac); 2071 2071 return ret; 2072 2072 } 2073 2073 ··· 2081 2081 dma_async_device_unregister(&atxdmac->dma); 2082 2082 clk_disable_unprepare(atxdmac->clk); 2083 2083 2084 - free_irq(atxdmac->irq, atxdmac->dma.dev); 2084 + free_irq(atxdmac->irq, atxdmac); 2085 2085 2086 2086 for (i = 0; i < atxdmac->dma.chancnt; i++) { 2087 2087 struct at_xdmac_chan *atchan = &atxdmac->chan[i];
+1
drivers/dma/fsl_raid.c
··· 836 836 rc = of_property_read_u32(np, "reg", &off); 837 837 if (rc) { 838 838 dev_err(dev, "Reg property not found in JQ node\n"); 839 + of_node_put(np); 839 840 return -ENODEV; 840 841 } 841 842 /* Find out the Job Rings present under each JQ */
+1 -3
drivers/dma/img-mdc-dma.c
··· 861 861 { 862 862 struct mdc_dma *mdma; 863 863 struct resource *res; 864 - const struct of_device_id *match; 865 864 unsigned int i; 866 865 u32 val; 867 866 int ret; ··· 870 871 return -ENOMEM; 871 872 platform_set_drvdata(pdev, mdma); 872 873 873 - match = of_match_device(mdc_dma_of_match, &pdev->dev); 874 - mdma->soc = match->data; 874 + mdma->soc = of_device_get_match_data(&pdev->dev); 875 875 876 876 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 877 877 mdma->regs = devm_ioremap_resource(&pdev->dev, res);
+7 -4
drivers/dma/pxa_dma.c
··· 638 638 vd_last_issued = list_entry(vc->desc_issued.prev, 639 639 struct virt_dma_desc, node); 640 640 pxad_desc_chain(vd_last_issued, vd); 641 - if (is_chan_running(chan) || is_desc_completed(vd_last_issued)) 641 + if (is_chan_running(chan) || is_desc_completed(vd)) 642 642 return true; 643 643 } 644 644 ··· 671 671 struct virt_dma_desc *vd, *tmp; 672 672 unsigned int dcsr; 673 673 unsigned long flags; 674 + bool vd_completed; 674 675 dma_cookie_t last_started = 0; 675 676 676 677 BUG_ON(!chan); ··· 682 681 683 682 spin_lock_irqsave(&chan->vc.lock, flags); 684 683 list_for_each_entry_safe(vd, tmp, &chan->vc.desc_issued, node) { 684 + vd_completed = is_desc_completed(vd); 685 685 dev_dbg(&chan->vc.chan.dev->device, 686 - "%s(): checking txd %p[%x]: completed=%d\n", 687 - __func__, vd, vd->tx.cookie, is_desc_completed(vd)); 686 + "%s(): checking txd %p[%x]: completed=%d dcsr=0x%x\n", 687 + __func__, vd, vd->tx.cookie, vd_completed, 688 + dcsr); 688 689 last_started = vd->tx.cookie; 689 690 if (to_pxad_sw_desc(vd)->cyclic) { 690 691 vchan_cyclic_callback(vd); 691 692 break; 692 693 } 693 - if (is_desc_completed(vd)) { 694 + if (vd_completed) { 694 695 list_del(&vd->node); 695 696 vchan_cookie_complete(vd); 696 697 } else {
+11 -8
drivers/dma/sh/usb-dmac.c
··· 600 600 { 601 601 struct usb_dmac_chan *chan = dev; 602 602 irqreturn_t ret = IRQ_NONE; 603 - u32 mask = USB_DMACHCR_TE; 604 - u32 check_bits = USB_DMACHCR_TE | USB_DMACHCR_SP; 603 + u32 mask = 0; 605 604 u32 chcr; 605 + bool xfer_end = false; 606 606 607 607 spin_lock(&chan->vc.lock); 608 608 609 609 chcr = usb_dmac_chan_read(chan, USB_DMACHCR); 610 - if (chcr & check_bits) 611 - mask |= USB_DMACHCR_DE | check_bits; 610 + if (chcr & (USB_DMACHCR_TE | USB_DMACHCR_SP)) { 611 + mask |= USB_DMACHCR_DE | USB_DMACHCR_TE | USB_DMACHCR_SP; 612 + if (chcr & USB_DMACHCR_DE) 613 + xfer_end = true; 614 + ret |= IRQ_HANDLED; 615 + } 612 616 if (chcr & USB_DMACHCR_NULL) { 613 617 /* An interruption of TE will happen after we set FTE */ 614 618 mask |= USB_DMACHCR_NULL; 615 619 chcr |= USB_DMACHCR_FTE; 616 620 ret |= IRQ_HANDLED; 617 621 } 618 - usb_dmac_chan_write(chan, USB_DMACHCR, chcr & ~mask); 622 + if (mask) 623 + usb_dmac_chan_write(chan, USB_DMACHCR, chcr & ~mask); 619 624 620 - if (chcr & check_bits) { 625 + if (xfer_end) 621 626 usb_dmac_isr_transfer_end(chan); 622 - ret |= IRQ_HANDLED; 623 - } 624 627 625 628 spin_unlock(&chan->vc.lock); 626 629