All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Cc: vkoul@kernel.org, dmaengine@vger.kernel.org,
	Raju.Rangoju@amd.com, Frank.li@nxp.com
Subject: Re: [PATCH v2 2/7] dmaengine: ae4dma: Add AMD ae4dma controller driver
Date: Mon, 17 Jun 2024 11:50:49 -0500	[thread overview]
Message-ID: <20240617165049.GA1217718@bhelgaas> (raw)
In-Reply-To: <20240617100359.2550541-3-Basavaraj.Natikar@amd.com>

On Mon, Jun 17, 2024 at 03:33:54PM +0530, Basavaraj Natikar wrote:
> Add support for AMD AE4DMA controller. It performs high-bandwidth
> memory to memory and IO copy operation. Device commands are managed
> via a circular queue of 'descriptors', each of which specifies source
> and destination addresses for copying a single buffer of data.

> +static void ae4_free_irqs(struct ae4_device *ae4)
> +{
> +	struct ae4_msix *ae4_msix;
> +	struct pci_dev *pdev;
> +	struct pt_device *pt;
> +	struct device *dev;
> +	int i;
> +
> +	if (ae4) {

I don't think this test is necessary.  I don't think it's possible to
get here with ae4==0.

> +		pt = &ae4->pt;
> +		dev = pt->dev;
> +		pdev = to_pci_dev(dev);
> +
> +		ae4_msix = ae4->ae4_msix;
> +		if (ae4_msix && ae4_msix->msix_count)
> +			pci_disable_msix(pdev);
> +		else if (pdev->irq)
> +			pci_disable_msi(pdev);
> +
> +		for (i = 0; i < MAX_AE4_HW_QUEUES; i++)
> +			ae4->ae4_irq[i] = 0;

Clearing ae4_irq[] also doesn't seem necessary, since this is only
used in .remove(), and ae4 should never be used again.  If this path
becomes used in some future path that depends on ae4_irq[] being
cleared, perhaps the clearing could be moved to that patch.

> +	}
> +}
> +
> +static void ae4_deinit(struct ae4_device *ae4)
> +{
> +	ae4_free_irqs(ae4);
> +}

> +static void ae4_pci_remove(struct pci_dev *pdev)
> +{
> +	struct ae4_device *ae4 = dev_get_drvdata(&pdev->dev);
> +
> +	ae4_destroy_work(ae4);
> +	ae4_deinit(ae4);
> +}

  parent reply	other threads:[~2024-06-17 16:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 10:03 [PATCH v2 0/7] Add support of AMD AE4DMA DMA Engine Basavaraj Natikar
2024-06-17 10:03 ` [PATCH v2 1/7] dmaengine: Move AMD DMA driver to separate directory Basavaraj Natikar
2024-06-17 10:03 ` [PATCH v2 2/7] dmaengine: ae4dma: Add AMD ae4dma controller driver Basavaraj Natikar
2024-06-17 16:40   ` Bjorn Helgaas
2024-06-18 13:23     ` Basavaraj Natikar
2024-06-17 16:50   ` Bjorn Helgaas [this message]
2024-06-18 13:28     ` Basavaraj Natikar
2024-06-18  8:14   ` Philipp Stanner
2024-06-18 13:32     ` Basavaraj Natikar
2024-06-17 10:03 ` [PATCH v2 3/7] dmaengine: ptdma: Move common functions to common code Basavaraj Natikar
2024-06-17 10:03 ` [PATCH v2 4/7] dmaengine: ptdma: Extend ptdma to support multi-channel and version Basavaraj Natikar
2024-06-17 10:03 ` [PATCH v2 5/7] dmaengine: ae4dma: Register AE4DMA using pt_dmaengine_register Basavaraj Natikar
2024-06-19  7:17   ` Philipp Stanner
2024-06-19  7:29   ` Philipp Stanner
2024-06-19  7:52     ` Basavaraj Natikar
2024-06-23 16:45   ` kernel test robot
2024-06-17 10:03 ` [PATCH v2 6/7] dmaengine: ptdma: Extend ptdma-debugfs to support multi-queue Basavaraj Natikar
2024-06-17 10:03 ` [PATCH v2 7/7] dmaengine: ae4dma: Register debugfs using ptdma_debugfs_setup Basavaraj Natikar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240617165049.GA1217718@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=Frank.li@nxp.com \
    --cc=Raju.Rangoju@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.