Re: [PATCH v3 07/11] dmaengine: switchtec-dma: disable channels before freeing on registration failure

Logan Gunthorpe <[email protected]> Mon, 27 Jul 2026 15:51:16 -0600
Newsgroups org.kernel.vger.dmaengine,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci
Message-ID <[email protected]>

On 2026-07-27 15:21, Frank Li wrote:
> On Mon, Jul 27, 2026 at 12:15:22PM -0600, Logan Gunthorpe wrote:
>> +static void switchtec_dma_chans_disable(struct pci_dev *pdev,
>> +					struct switchtec_dma_dev *swdma_dev)
>> +{
>> +	int i;
>> +
>> +	if (swdma_dev->chan_status_irq >= 0) {
>> +		pci_free_irq(pdev, swdma_dev->chan_status_irq, swdma_dev);
>> +		swdma_dev->chan_status_irq = -1;
>> +	}
>> +
>> +	for (i = 0; i < swdma_dev->chan_cnt; i++)
>> +		list_del(&swdma_dev->swdma_chans[i]->dma_chan.device_node);
>> +}
>> +
> 
> Maybe historic reason, it is not good to touch dma_chan::device_node.
> Suppose some hepler function to manage channels.
> 
> Reviewed-by: Frank Li <[email protected]>

Ok, thanks. When I have some free time I'll see if I can clean that up,
but not for this series.

Logan