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: <1443885579-7094-11-git-send-email-hch@lst.de>
Date:	Sat,  3 Oct 2015 17:19:34 +0200
From:	Christoph Hellwig <hch@....de>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Don Fry <pcnet32@...ntier.com>,
	Oliver Neukum <oneukum@...e.com>
Cc:	linux-net-drivers@...arflare.com, dri-devel@...ts.freedesktop.org,
	linux-media@...r.kernel.org, netdev@...r.kernel.org,
	linux-parisc@...r.kernel.org, linux-serial@...r.kernel.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 10/15] nouveau: don't call pci_dma_supported

Just try to set a 64-bit DMA mask first and retry with the smaller dma_mask
if dma_set_mask failed.

Signed-off-by: Christoph Hellwig <hch@....de>
---
 drivers/gpu/drm/nouveau/nouveau_ttm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 3f0fb55..bb030e6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -350,11 +350,14 @@ nouveau_ttm_init(struct nouveau_drm *drm)
 
 	bits = nvxx_mmu(&drm->device)->dma_bits;
 	if (nvxx_device(&drm->device)->func->pci) {
-		if (drm->agp.bridge ||
-		     !pci_dma_supported(dev->pdev, DMA_BIT_MASK(bits)))
+		if (drm->agp.bridge)
 			bits = 32;
 
 		ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(bits));
+		if (ret && bits != 32) {
+			bits = 32;
+			ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(bits));
+		}
 		if (ret)
 			return ret;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ