lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a76df69-8c6c-52a6-0afd-fd0b8d2ff703@codeaurora.org>
Date:   Mon, 12 Mar 2018 12:44:22 -0400
From:   Sinan Kaya <okaya@...eaurora.org>
To:     Nipun Gupta <nipun.gupta@....com>, hch@....de,
        robin.murphy@....com, linux@...linux.org.uk,
        gregkh@...uxfoundation.org, m.szyprowski@...sung.com,
        bhelgaas@...gle.com
Cc:     dmitry.torokhov@...il.com, rafael.j.wysocki@...el.com,
        jarkko.sakkinen@...ux.intel.com, linus.walleij@...aro.org,
        johan@...nel.org, msuchanek@...e.de, linux-kernel@...r.kernel.org,
        iommu@...ts.linux-foundation.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH] dma-mapping: move dma configuration to bus infrastructure

On 3/12/2018 11:24 AM, Nipun Gupta wrote:
> +	if (dma_dev->of_node) {
> +		ret = of_dma_configure(dev, dma_dev->of_node);
> +	} else if (has_acpi_companion(dma_dev)) {
> +		attr = acpi_get_dma_attr(to_acpi_device_node(dma_dev->fwnode));
> +		if (attr != DEV_DMA_NOT_SUPPORTED)
> +			ret = acpi_dma_configure(dev, attr);
> +	}
> +
> +	pci_put_host_bridge_device(bridge);
> +
> +	return ret;
> +}
> +
> +void pci_dma_deconfigure(struct device *dev)
> +{
> +	of_dma_deconfigure(dev);
> +	acpi_dma_deconfigure(dev);
> +}

Isn't this one or the other one but not both?

Something like:

if (dev->of_node)
	of_dma_deconfigure(dev);
else
	acpi_dma_deconfigure(dev);

should work.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ