PCI: Remove pci_set_dma_max_seg_size()
The few callers can just use dma_set_max_seg_size ()directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>hifive-unleashed-5.1
parent
a6f44cf9f5
commit
b0da3498c5
|
@ -873,7 +873,7 @@ static int inic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
* like others but it will lock up the whole machine HARD if
|
* like others but it will lock up the whole machine HARD if
|
||||||
* 65536 byte PRD entry is fed. Reduce maximum segment size.
|
* 65536 byte PRD entry is fed. Reduce maximum segment size.
|
||||||
*/
|
*/
|
||||||
rc = pci_set_dma_max_seg_size(pdev, 65536 - 512);
|
rc = dma_set_max_seg_size(&pdev->dev, 65536 - 512);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_err(&pdev->dev, "failed to set the maximum segment size\n");
|
dev_err(&pdev->dev, "failed to set the maximum segment size\n");
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
@ -780,7 +780,7 @@ static int rsxx_pci_probe(struct pci_dev *dev,
|
||||||
goto failed_enable;
|
goto failed_enable;
|
||||||
|
|
||||||
pci_set_master(dev);
|
pci_set_master(dev);
|
||||||
pci_set_dma_max_seg_size(dev, RSXX_HW_BLK_SIZE);
|
dma_set_max_seg_size(&dev->dev, RSXX_HW_BLK_SIZE);
|
||||||
|
|
||||||
st = pci_set_dma_mask(dev, DMA_BIT_MASK(64));
|
st = pci_set_dma_mask(dev, DMA_BIT_MASK(64));
|
||||||
if (st) {
|
if (st) {
|
||||||
|
|
|
@ -2397,7 +2397,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
|
||||||
dev->dev.dma_parms = &dev->dma_parms;
|
dev->dev.dma_parms = &dev->dma_parms;
|
||||||
dev->dev.coherent_dma_mask = 0xffffffffull;
|
dev->dev.coherent_dma_mask = 0xffffffffull;
|
||||||
|
|
||||||
pci_set_dma_max_seg_size(dev, 65536);
|
dma_set_max_seg_size(&dev->dev, 65536);
|
||||||
dma_set_seg_boundary(&dev->dev, 0xffffffff);
|
dma_set_seg_boundary(&dev->dev, 0xffffffff);
|
||||||
|
|
||||||
/* Fix up broken headers */
|
/* Fix up broken headers */
|
||||||
|
|
|
@ -516,7 +516,7 @@ static int ism_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
goto err_unmap;
|
goto err_unmap;
|
||||||
|
|
||||||
dma_set_seg_boundary(&pdev->dev, SZ_1M - 1);
|
dma_set_seg_boundary(&pdev->dev, SZ_1M - 1);
|
||||||
pci_set_dma_max_seg_size(pdev, SZ_1M);
|
dma_set_max_seg_size(&pdev->dev, SZ_1M);
|
||||||
pci_set_master(pdev);
|
pci_set_master(pdev);
|
||||||
|
|
||||||
ism->smcd = smcd_alloc_dev(&pdev->dev, dev_name(&pdev->dev), &ism_ops,
|
ism->smcd = smcd_alloc_dev(&pdev->dev, dev_name(&pdev->dev), &ism_ops,
|
||||||
|
|
|
@ -1747,7 +1747,7 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
shost->max_sectors = (shost->sg_tablesize * 8) + 112;
|
shost->max_sectors = (shost->sg_tablesize * 8) + 112;
|
||||||
}
|
}
|
||||||
|
|
||||||
error = pci_set_dma_max_seg_size(pdev,
|
error = dma_set_max_seg_size(&pdev->dev,
|
||||||
(aac->adapter_info.options & AAC_OPT_NEW_COMM) ?
|
(aac->adapter_info.options & AAC_OPT_NEW_COMM) ?
|
||||||
(shost->max_sectors << 9) : 65536);
|
(shost->max_sectors << 9) : 65536);
|
||||||
if (error)
|
if (error)
|
||||||
|
|
|
@ -119,20 +119,11 @@ static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
|
||||||
{
|
{
|
||||||
return dma_set_coherent_mask(&dev->dev, mask);
|
return dma_set_coherent_mask(&dev->dev, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int pci_set_dma_max_seg_size(struct pci_dev *dev,
|
|
||||||
unsigned int size)
|
|
||||||
{
|
|
||||||
return dma_set_max_seg_size(&dev->dev, size);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
|
static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
|
||||||
{ return -EIO; }
|
{ return -EIO; }
|
||||||
static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
|
static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
|
||||||
{ return -EIO; }
|
{ return -EIO; }
|
||||||
static inline int pci_set_dma_max_seg_size(struct pci_dev *dev,
|
|
||||||
unsigned int size)
|
|
||||||
{ return -EIO; }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue