.. | .. |
---|
551 | 551 | |
---|
552 | 552 | /* The bad descriptor currently is in the head of vc list */ |
---|
553 | 553 | vd = vchan_next_desc(&chan->vc); |
---|
| 554 | + if (!vd) { |
---|
| 555 | + dev_err(chan2dev(chan), "BUG: %s, IRQ with no descriptors\n", |
---|
| 556 | + axi_chan_name(chan)); |
---|
| 557 | + goto out; |
---|
| 558 | + } |
---|
554 | 559 | /* Remove the completed descriptor from issued list */ |
---|
555 | 560 | list_del(&vd->node); |
---|
556 | 561 | |
---|
.. | .. |
---|
565 | 570 | /* Try to restart the controller */ |
---|
566 | 571 | axi_chan_start_first_queued(chan); |
---|
567 | 572 | |
---|
| 573 | +out: |
---|
568 | 574 | spin_unlock_irqrestore(&chan->vc.lock, flags); |
---|
569 | 575 | } |
---|
570 | 576 | |
---|
.. | .. |
---|
636 | 642 | |
---|
637 | 643 | vchan_get_all_descriptors(&chan->vc, &head); |
---|
638 | 644 | |
---|
639 | | - /* |
---|
640 | | - * As vchan_dma_desc_free_list can access to desc_allocated list |
---|
641 | | - * we need to call it in vc.lock context. |
---|
642 | | - */ |
---|
643 | | - vchan_dma_desc_free_list(&chan->vc, &head); |
---|
644 | | - |
---|
645 | 645 | spin_unlock_irqrestore(&chan->vc.lock, flags); |
---|
| 646 | + |
---|
| 647 | + vchan_dma_desc_free_list(&chan->vc, &head); |
---|
646 | 648 | |
---|
647 | 649 | dev_vdbg(dchan2dev(dchan), "terminated: %s\n", axi_chan_name(chan)); |
---|
648 | 650 | |
---|
.. | .. |
---|
935 | 937 | |
---|
936 | 938 | pm_runtime_put(chip->dev); |
---|
937 | 939 | |
---|
938 | | - ret = dma_async_device_register(&dw->dma); |
---|
| 940 | + ret = dmaenginem_async_device_register(&dw->dma); |
---|
939 | 941 | if (ret) |
---|
940 | 942 | goto err_pm_disable; |
---|
941 | 943 | |
---|
.. | .. |
---|
977 | 979 | list_del(&chan->vc.chan.device_node); |
---|
978 | 980 | tasklet_kill(&chan->vc.task); |
---|
979 | 981 | } |
---|
980 | | - |
---|
981 | | - dma_async_device_unregister(&dw->dma); |
---|
982 | 982 | |
---|
983 | 983 | return 0; |
---|
984 | 984 | } |
---|