Skip to contentSkip to conversation

remove dma_supported and pci_dma_supported as public APIs

PATCH In review Christoph Hellwig 6 participants 21 messages Oct 3, 2015 – Oct 7, 2015

Subsystems (21)
lore
Share & tools
lore
#0 lore raw

All driver 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.

#1 lore raw

PATCH 1/15 pcnet32: use pci_set_dma_mask insted of pci_dma_supported

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

---
 drivers/net/ethernet/amd/pcnet32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/amd/pcnet32.c +1 -1
index bc8b04f..e2afabf 100644
@@ -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;
Signature · 1 line
1.9.1
maintainer Acked-by on v1 1/15
#2 lore raw

Re: [PATCH 01/15] pcnet32: use pci_set_dma_mask insted of pci_dma_supported

Quoted 8 lines · Christoph Hellwig

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

---
 drivers/net/ethernet/amd/pcnet32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
drivers/net/ethernet/amd/pcnet32.c +1 -1
index bc8b04f..e2afabf 100644
@@ -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;
#3 lore raw

PATCH 2/15 tw68-core: use pci_set_dma_mask insted of pci_dma_supported

In reply to Christoph Hellwig

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

---
 drivers/media/pci/tw68/tw68-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/tw68/tw68-core.c +1 -1
index 04706cc..8c5655d 100644
@@ -257,7 +257,7 @@ static int tw68_initdev(struct pci_dev *pci_dev,
 		dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
 		dev->pci_lat, (u64)pci_resource_start(pci_dev, 0));
 	pci_set_master(pci_dev);
-	if (!pci_dma_supported(pci_dev, DMA_BIT_MASK(32))) {
+	if (!pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32))) {
 		pr_info("%s: Oops: no 32bit PCI DMA ???\n", dev->name);
 		err = -EIO;
 		goto fail1;
Signature · 1 line
1.9.1
#4 lore raw

PATCH 3/15 saa7164: use pci_set_dma_mask insted of pci_dma_supported

In reply to Christoph Hellwig

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

---
 drivers/media/pci/saa7164/saa7164-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/saa7164/saa7164-core.c +1 -1
index 3206a82..8f36b48 100644
@@ -1264,7 +1264,7 @@ static int saa7164_initdev(struct pci_dev *pci_dev,
 
 	pci_set_master(pci_dev);
 	/* TODO */
-	if (!pci_dma_supported(pci_dev, 0xffffffff)) {
+	if (!pci_set_dma_mask(pci_dev, 0xffffffff)) {
 		printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name);
 		err = -EIO;
 		goto fail_irq;
Signature · 1 line
1.9.1
#5 lore raw

PATCH 4/15 saa7134: use pci_set_dma_mask insted of pci_dma_supported

In reply to Christoph Hellwig

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

---
 drivers/media/pci/saa7134/saa7134-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/saa7134/saa7134-core.c +1 -1
index 72d7f99..6ba4086 100644
@@ -949,7 +949,7 @@ static int saa7134_initdev(struct pci_dev *pci_dev,
 	       pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
 	       dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
 	pci_set_master(pci_dev);
-	if (!pci_dma_supported(pci_dev, DMA_BIT_MASK(32))) {
+	if (!pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32))) {
 		pr_warn("%s: Oops: no 32bit PCI DMA ???\n", dev->name);
 		err = -EIO;
 		goto fail1;
Signature · 1 line
1.9.1
#6 lore raw

PATCH 5/15 cx88: use pci_set_dma_mask insted of pci_dma_supported

In reply to Christoph Hellwig

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

---
 drivers/media/pci/cx88/cx88-alsa.c  | 2 +-
 drivers/media/pci/cx88/cx88-mpeg.c  | 2 +-
 drivers/media/pci/cx88/cx88-video.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/media/pci/cx88/cx88-alsa.c +1 -1
index 7f8dc60..0703a81 100644
@@ -890,7 +890,7 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,
 		return err;
 	}
 
-	if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) {
+	if (!pci_set_dma_mask(pci,DMA_BIT_MASK(32))) {
 		dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
 		err = -EIO;
 		cx88_core_put(core, pci);
drivers/media/pci/cx88/cx88-mpeg.c +1 -1
index 34f5057..9b3b565 100644
@@ -393,7 +393,7 @@ static int cx8802_init_common(struct cx8802_dev *dev)
 	if (pci_enable_device(dev->pci))
 		return -EIO;
 	pci_set_master(dev->pci);
-	if (!pci_dma_supported(dev->pci,DMA_BIT_MASK(32))) {
+	if (!pci_set_dma_mask(dev->pci,DMA_BIT_MASK(32))) {
 		printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name);
 		return -EIO;
 	}
drivers/media/pci/cx88/cx88-video.c +1 -1
index 400e5ca..f12af31 100644
@@ -1311,7 +1311,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
 	       dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
 
 	pci_set_master(pci_dev);
-	if (!pci_dma_supported(pci_dev,DMA_BIT_MASK(32))) {
+	if (!pci_set_dma_mask(pci_dev,DMA_BIT_MASK(32))) {
 		printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name);
 		err = -EIO;
 		goto fail_core;
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by on v1 5/15
#7 lore raw

Re: [PATCH 05/15] cx88: use pci_set_dma_mask insted of pci_dma_supported

Hi Christoph,

Em Sat, 3 Oct 2015 17:19:29 +0200
Christoph Hellwig <[email protected]> escreveu:

Quoted 2 lines

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

For this and the other patches touching at drivers/media:

Quoted 47 lines
---
 drivers/media/pci/cx88/cx88-alsa.c  | 2 +-
 drivers/media/pci/cx88/cx88-mpeg.c  | 2 +-
 drivers/media/pci/cx88/cx88-video.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/media/pci/cx88/cx88-alsa.c +1 -1
index 7f8dc60..0703a81 100644
@@ -890,7 +890,7 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,
 		return err;
 	}
 
-	if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) {
+	if (!pci_set_dma_mask(pci,DMA_BIT_MASK(32))) {
 		dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
 		err = -EIO;
 		cx88_core_put(core, pci);
drivers/media/pci/cx88/cx88-mpeg.c +1 -1
index 34f5057..9b3b565 100644
@@ -393,7 +393,7 @@ static int cx8802_init_common(struct cx8802_dev *dev)
 	if (pci_enable_device(dev->pci))
 		return -EIO;
 	pci_set_master(dev->pci);
-	if (!pci_dma_supported(dev->pci,DMA_BIT_MASK(32))) {
+	if (!pci_set_dma_mask(dev->pci,DMA_BIT_MASK(32))) {
 		printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name);
 		return -EIO;
 	}
drivers/media/pci/cx88/cx88-video.c +1 -1
index 400e5ca..f12af31 100644
@@ -1311,7 +1311,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
 	       dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
 
 	pci_set_master(pci_dev);
-	if (!pci_dma_supported(pci_dev,DMA_BIT_MASK(32))) {
+	if (!pci_set_dma_mask(pci_dev,DMA_BIT_MASK(32))) {
 		printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name);
 		err = -EIO;
 		goto fail_core;
#8 lore raw

PATCH 6/15 cx25821: use pci_set_dma_mask insted of pci_dma_supported

In reply to Christoph Hellwig

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

---
 drivers/media/pci/cx25821/cx25821-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/cx25821/cx25821-core.c +1 -1
index 559f829..dbc695f 100644
@@ -1319,7 +1319,7 @@ static int cx25821_initdev(struct pci_dev *pci_dev,
 		dev->pci_lat, (unsigned long long)dev->base_io_addr);
 
 	pci_set_master(pci_dev);
-	if (!pci_dma_supported(pci_dev, 0xffffffff)) {
+	if (!pci_set_dma_mask(pci_dev, 0xffffffff)) {
 		pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name);
 		err = -EIO;
 		goto fail_irq;
Signature · 1 line
1.9.1
#9 lore raw

PATCH 7/15 cx23885: use pci_set_dma_mask insted of pci_dma_supported

In reply to Christoph Hellwig

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

---
 drivers/media/pci/cx23885/cx23885-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/cx23885/cx23885-core.c +1 -1
index 7aee76a..8194052 100644
@@ -1990,7 +1990,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev,
 		(unsigned long long)pci_resource_start(pci_dev, 0));
 
 	pci_set_master(pci_dev);
-	if (!pci_dma_supported(pci_dev, 0xffffffff)) {
+	if (!pci_set_dma_mask(pci_dev, 0xffffffff)) {
 		printk("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name);
 		err = -EIO;
 		goto fail_context;
Signature · 1 line
1.9.1
#10 lore raw

PATCH 8/15 netup_unidvb: use pci_set_dma_mask insted of pci_dma_supported

In reply to Christoph Hellwig

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

---
 drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +1 -1
index 6d8bf627..511144f 100644
@@ -809,7 +809,7 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev,
 		"%s(): board vendor 0x%x, revision 0x%x\n",
 		__func__, board_vendor, board_revision);
 	pci_set_master(pci_dev);
-	if (!pci_dma_supported(pci_dev, 0xffffffff)) {
+	if (!pci_set_dma_mask(pci_dev, 0xffffffff)) {
 		dev_err(&pci_dev->dev,
 			"%s(): 32bit PCI DMA is not supported\n", __func__);
 		goto pci_detect_err;
Signature · 1 line
1.9.1
Acked-by on v1 8/15
#11 lore raw

Re: [PATCH 08/15] netup_unidvb: use pci_set_dma_mask insted of pci_dma_supported

Hello,

thanks !

2015-10-03 18:19 GMT+03:00 Christoph Hellwig <[email protected]>:

Quoted 28 lines

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

---
 drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +1 -2
index 6d8bf627..511144f 100644
@@ -809,7 +809,7 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev,
                "%s(): board vendor 0x%x, revision 0x%x\n",
                __func__, board_vendor, board_revision);
        pci_set_master(pci_dev);
-       if (!pci_dma_supported(pci_dev, 0xffffffff)) {
+       if (!pci_set_dma_mask(pci_dev, 0xffffffff)) {
                dev_err(&pci_dev->dev,
                        "%s(): 32bit PCI DMA is not supported\n", __func__);
                goto pci_detect_err;
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Abylay Ospan,
NetUP Inc.
http://www.netup.tv
#12 lore raw

PATCH 9/15 mpsc: use dma_set_mask insted of dma_supported

In reply to Christoph Hellwig

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

---
 drivers/tty/serial/mpsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/mpsc.c +1 -1
index 82bb6d1..11e084e 100644
@@ -755,7 +755,7 @@ static int mpsc_alloc_ring_mem(struct mpsc_port_info *pi)
 		pi->port.line);
 
 	if (!pi->dma_region) {
-		if (!dma_supported(pi->port.dev, 0xffffffff)) {
+		if (!dma_set_mask(pi->port.dev, 0xffffffff)) {
 			printk(KERN_ERR "MPSC: Inadequate DMA support\n");
 			rc = -ENXIO;
 		} else if ((pi->dma_region = dma_alloc_noncoherent(pi->port.dev,
Signature · 1 line
1.9.1
#13 lore raw

PATCH 10/15 nouveau: don't call pci_dma_supported

In reply to Christoph Hellwig

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

---
 drivers/gpu/drm/nouveau/nouveau_ttm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_ttm.c +5 -2
index 3f0fb55..bb030e6 100644
@@ -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;
 
Signature · 1 line
1.9.1
#14 lore raw

PATCH 11/15 sfc: don't call dma_supported

In reply to Christoph Hellwig

dma_set_mask already checks for a supported DMA mask before updating it, the call to dma_supported is redundant.

---
 drivers/net/ethernet/sfc/efx.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/net/ethernet/sfc/efx.c +3 -5
index 974637d..4abe886 100644
@@ -1247,11 +1247,9 @@ static int efx_init_io(struct efx_nic *efx)
 	 * masks event though they reject 46 bit masks.
 	 */
 	while (dma_mask > 0x7fffffffUL) {
-		if (dma_supported(&pci_dev->dev, dma_mask)) {
-			rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask);
-			if (rc == 0)
-				break;
-		}
+		rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask);
+		if (rc == 0)
+			break;
 		dma_mask >>= 1;
 	}
 	if (rc) {
Signature · 1 line
1.9.1
#16 lore raw

PATCH 12/15 kaweth: remove ifdefed out call to dma_supported

In reply to Christoph Hellwig
---
 drivers/net/usb/kaweth.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/net/usb/kaweth.c +0 -6
index 1e9cdca..f64b25c 100644
@@ -1177,12 +1177,6 @@ err_fw:
 	INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl);
 	usb_set_intfdata(intf, kaweth);
 
-#if 0
-// dma_supported() is deeply broken on almost all architectures
-	if (dma_supported (dev, 0xffffffffffffffffULL))
-		kaweth->net->features |= NETIF_F_HIGHDMA;
-#endif
-
 	SET_NETDEV_DEV(netdev, dev);
 	if (register_netdev(netdev) != 0) {
 		dev_err(dev, "Error registering netdev.\n");
Signature · 1 line
1.9.1
#17 lore raw

PATCH 13/15 usbnet: remove ifdefed out call to dma_supported

In reply to Christoph Hellwig
---
 drivers/net/usb/usbnet.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/net/usb/usbnet.c +0 -6
index b4cf107..9497d51 100644
@@ -1661,12 +1661,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 	 * bind() should set rx_urb_size in that case.
 	 */
 	dev->hard_mtu = net->mtu + net->hard_header_len;
-#if 0
-// dma_supported() is deeply broken on almost all architectures
-	// possible with some EHCI controllers
-	if (dma_supported (&udev->dev, DMA_BIT_MASK(64)))
-		net->features |= NETIF_F_HIGHDMA;
-#endif
 
 	net->netdev_ops = &usbnet_netdev_ops;
 	net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
Signature · 1 line
1.9.1
#18 lore raw

PATCH 14/15 pci: remove pci_dma_supported

In reply to Christoph Hellwig
---
 drivers/parisc/ccio-dma.c            | 2 --
 include/asm-generic/pci-dma-compat.h | 6 ------
 2 files changed, 8 deletions(-)
drivers/parisc/ccio-dma.c +0 -2
index 957b421..8e11fb2 100644
@@ -704,8 +704,6 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
  * ccio_dma_supported - Verify the IOMMU supports the DMA address range.
  * @dev: The PCI device.
  * @mask: A bit mask describing the DMA address range of the device.
- *
- * This function implements the pci_dma_supported function.
  */
 static int 
 ccio_dma_supported(struct device *dev, u64 mask)
include/asm-generic/pci-dma-compat.h +0 -6
index c110843..eafce7b 100644
@@ -6,12 +6,6 @@
 
 #include <linux/dma-mapping.h>
 
-static inline int
-pci_dma_supported(struct pci_dev *hwdev, u64 mask)
-{
-	return dma_supported(hwdev == NULL ? NULL : &hwdev->dev, mask);
-}
-
 static inline void *
 pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
 		     dma_addr_t *dma_handle)
Signature · 1 line
1.9.1
#19 lore raw

PATCH 15/15 dma: remove external references to dma_supported

In reply to Christoph Hellwig
---
 Documentation/DMA-API.txt       | 13 -------------
 drivers/usb/host/ehci-hcd.c     |  2 +-
 drivers/usb/host/fotg210-hcd.c  |  2 +-
 drivers/usb/host/fusbh200-hcd.c |  2 +-
 drivers/usb/host/oxu210hp-hcd.c |  2 +-
 5 files changed, 4 insertions(+), 17 deletions(-)
Documentation/DMA-API.txt +0 -13
index edccacd..55f48684 100644
@@ -142,19 +142,6 @@ Part Ic - DMA addressing limitations
 ------------------------------------
 
 int
-dma_supported(struct device *dev, u64 mask)
-
-Checks to see if the device can support DMA to the memory described by
-mask.
-
-Returns: 1 if it can and 0 if it can't.
-
-Notes: This routine merely tests to see if the mask is possible.  It
-won't change the current mask settings.  It is more intended as an
-internal API for use by the platform than an external API for use by
-driver writers.
-
-int
 dma_set_mask_and_coherent(struct device *dev, u64 mask)
 
 Checks to see if the mask is possible and updates the device
drivers/usb/host/ehci-hcd.c +1 -1
index c63d82c..48c92bf 100644
@@ -589,7 +589,7 @@ static int ehci_run (struct usb_hcd *hcd)
 	 * streaming mappings for I/O buffers, like pci_map_single(),
 	 * can return segments above 4GB, if the device allows.
 	 *
-	 * NOTE:  the dma mask is visible through dma_supported(), so
+	 * NOTE:  the dma mask is visible through dev->dma_mask, so
 	 * drivers can pass this info along ... like NETIF_F_HIGHDMA,
 	 * Scsi_Host.highmem_io, and so forth.  It's readonly to all
 	 * host side drivers though.
drivers/usb/host/fotg210-hcd.c +1 -1
index 000ed80..c5fc3ef 100644
@@ -5258,7 +5258,7 @@ static int fotg210_run(struct usb_hcd *hcd)
 	 * streaming mappings for I/O buffers, like pci_map_single(),
 	 * can return segments above 4GB, if the device allows.
 	 *
-	 * NOTE:  the dma mask is visible through dma_supported(), so
+	 * NOTE:  the dma mask is visible through dev->dma_mask, so
 	 * drivers can pass this info along ... like NETIF_F_HIGHDMA,
 	 * Scsi_Host.highmem_io, and so forth.  It's readonly to all
 	 * host side drivers though.
drivers/usb/host/fusbh200-hcd.c +1 -1
index 1fd8718..4a1243a 100644
@@ -5181,7 +5181,7 @@ static int fusbh200_run (struct usb_hcd *hcd)
 	 * streaming mappings for I/O buffers, like pci_map_single(),
 	 * can return segments above 4GB, if the device allows.
 	 *
-	 * NOTE:  the dma mask is visible through dma_supported(), so
+	 * NOTE:  the dma mask is visible through dev->dma_mask, so
 	 * drivers can pass this info along ... like NETIF_F_HIGHDMA,
 	 * Scsi_Host.highmem_io, and so forth.  It's readonly to all
 	 * host side drivers though.
drivers/usb/host/oxu210hp-hcd.c +1 -1
index fe3bd1c..1f139d8 100644
@@ -2721,7 +2721,7 @@ static int oxu_run(struct usb_hcd *hcd)
 	 * streaming mappings for I/O buffers, like pci_map_single(),
 	 * can return segments above 4GB, if the device allows.
 	 *
-	 * NOTE:  the dma mask is visible through dma_supported(), so
+	 * NOTE:  the dma mask is visible through dev->dma_mask, so
 	 * drivers can pass this info along ... like NETIF_F_HIGHDMA,
 	 * Scsi_Host.highmem_io, and so forth.  It's readonly to all
 	 * host side drivers though.
Signature · 1 line
1.9.1
maintainer Acked-by on v1 15/15
#20 lore raw

Re: [PATCH 15/15] dma: remove external references to dma_supported

Quoted 8 lines · Christoph Hellwig
---
 Documentation/DMA-API.txt       | 13 -------------
 drivers/usb/host/ehci-hcd.c     |  2 +-
 drivers/usb/host/fotg210-hcd.c  |  2 +-
 drivers/usb/host/fusbh200-hcd.c |  2 +-
 drivers/usb/host/oxu210hp-hcd.c |  2 +-
 5 files changed, 4 insertions(+), 17 deletions(-)