pcnet32: use pci_set_dma_mask insted of pci_dma_supported
authorChristoph Hellwig <[email protected]>
Tue, 10 Nov 2015 22:45:17 +0000 (14:45 -0800)
committerLinus Torvalds <[email protected]>
Wed, 11 Nov 2015 00:32:11 +0000 (16:32 -0800)
All drivers should be using dma_set_mask / pci_set_dma_mask to try to
set the dma mask instead of just querying it.  Without that some iommu
implementations may not work.

pci_dma_supported is removed entirely, but dma_supported stays for
dma_ops implementations for now.

This patch (of 15):

This ensures the dma mask that is supported by the driver is recorded
in the device structure.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Don Fry <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: Alexey Khoroshilov <[email protected]>
Cc: Ben Skeggs <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Pawel Osciak <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: Sergey Kozlov <[email protected]>
Cc: Shradha Shah <[email protected]>
Cc: Solarflare linux maintainers <[email protected]>
Cc: Steven Toth <[email protected]>
Cc: Thierry Reding <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/net/ethernet/amd/pcnet32.c

index bc8b04f4288286d0bf253417b08c7fa6fe1e59ca..e2afabf3a465860230cbae73d8e37166d30c5394 100644 (file)
@@ -1500,7 +1500,7 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent)
                return -ENODEV;
        }
 
-       if (!pci_dma_supported(pdev, PCNET32_DMA_MASK)) {
+       if (!pci_set_dma_mask(pdev, PCNET32_DMA_MASK)) {
                if (pcnet32_debug & NETIF_MSG_PROBE)
                        pr_err("architecture does not support 32bit PCI busmaster DMA\n");
                return -ENODEV;