From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:23:46
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.
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:23:44
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <redacted>
---
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(-)
@@ -1311,7 +1311,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,dev->pci_lat,(unsignedlonglong)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;gotofail_core;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:23:51
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/media/pci/saa7134/saa7134-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:23:55
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/tty/serial/mpsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:23:59
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/media/pci/cx23885/cx23885-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:24:09
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@lst.de>
---
drivers/gpu/drm/nouveau/nouveau_ttm.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
@@ -1661,12 +1661,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)*bind()shouldsetrx_urb_sizeinthatcase.*/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;-#endifnet->netdev_ops=&usbnet_netdev_ops;net->watchdog_timeo=TX_TIMEOUT_JIFFIES;
@@ -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
@@ -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");
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:26:18
dma_set_mask already checks for a supported DMA mask before updating it,
the call to dma_supported is redundant.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/net/ethernet/sfc/efx.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:26:54
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:28:03
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/media/pci/cx25821/cx25821-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:29:05
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/media/pci/saa7164/saa7164-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:30:00
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/media/pci/tw68/tw68-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Christoph Hellwig <hch@lst.de> Date: 2015-10-03 15:30:53
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/net/ethernet/amd/pcnet32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
dma_set_mask already checks for a supported DMA mask before updating it,
the call to dma_supported is redundant.
Signed-off-by: Christoph Hellwig <hch@lst.de>
From: Don Fry <pcnet32@frontier.com> Date: 2015-10-06 04:05:51
On Sat, 2015-10-03 at 17:19 +0200, Christoph Hellwig wrote:
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/net/ethernet/amd/pcnet32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This ensures the dma mask that is supported by the driver is recorded
in the device structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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__);gotopci_detect_err;--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html