Commit 04b7fe6a authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide

Pull IDE update from David Miller:
 "Just one change, getting rid of usage of the deprecated PCI DMA
  interfaces in the IDE drivers"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  ide: remove deprecated use of pci api
parents 388f9976 d681f116
...@@ -123,7 +123,7 @@ static int cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -123,7 +123,7 @@ static int cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
return -ENODEV; return -ENODEV;
} }
pci_set_master(dev); pci_set_master(dev);
if (pci_set_dma_mask(dev, DMA_BIT_MASK(32))) { if (dma_set_mask(&dev->dev, DMA_BIT_MASK(32))) {
printk(KERN_WARNING "%s: No suitable DMA available.\n", printk(KERN_WARNING "%s: No suitable DMA available.\n",
d->name); d->name);
return -ENODEV; return -ENODEV;
......
...@@ -1689,10 +1689,9 @@ static int pmac_ide_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d) ...@@ -1689,10 +1689,9 @@ static int pmac_ide_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
* The +2 is +1 for the stop command and +1 to allow for * The +2 is +1 for the stop command and +1 to allow for
* aligning the start address to a multiple of 16 bytes. * aligning the start address to a multiple of 16 bytes.
*/ */
pmif->dma_table_cpu = pci_alloc_consistent( pmif->dma_table_cpu = dma_alloc_coherent(&dev->dev,
dev,
(MAX_DCMDS + 2) * sizeof(struct dbdma_cmd), (MAX_DCMDS + 2) * sizeof(struct dbdma_cmd),
&hwif->dmatable_dma); &hwif->dmatable_dma, GFP_KERNEL);
if (pmif->dma_table_cpu == NULL) { if (pmif->dma_table_cpu == NULL) {
printk(KERN_ERR "%s: unable to allocate DMA command list\n", printk(KERN_ERR "%s: unable to allocate DMA command list\n",
hwif->name); hwif->name);
......
...@@ -209,7 +209,7 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d) ...@@ -209,7 +209,7 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
* a DMA mask field to the struct ide_port_info if we need it * a DMA mask field to the struct ide_port_info if we need it
* (or let lower level driver set the DMA mask) * (or let lower level driver set the DMA mask)
*/ */
ret = pci_set_dma_mask(dev, DMA_BIT_MASK(32)); ret = dma_set_mask(&dev->dev, DMA_BIT_MASK(32));
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "%s %s: can't set DMA mask\n", printk(KERN_ERR "%s %s: can't set DMA mask\n",
d->name, pci_name(dev)); d->name, pci_name(dev));
......
...@@ -334,8 +334,8 @@ static int ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d) ...@@ -334,8 +334,8 @@ static int ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d)
if (ide_allocate_dma_engine(hwif)) if (ide_allocate_dma_engine(hwif))
goto dma_pci_alloc_failure; goto dma_pci_alloc_failure;
pad = pci_alloc_consistent(dev, IOC4_IDE_CACHELINE_SIZE, pad = dma_alloc_coherent(&dev->dev, IOC4_IDE_CACHELINE_SIZE,
(dma_addr_t *)&hwif->extra_base); (dma_addr_t *)&hwif->extra_base, GFP_KERNEL);
if (pad) { if (pad) {
ide_set_hwifdata(hwif, pad); ide_set_hwifdata(hwif, pad);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment