Skip to content

Commit 453cd37

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: hptiop: use dma_set_mask
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent e4db40e commit 453cd37

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/scsi/hptiop.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,11 +1309,11 @@ static int hptiop_probe(struct pci_dev *pcidev, const struct pci_device_id *id)
13091309

13101310
/* Enable 64bit DMA if possible */
13111311
iop_ops = (struct hptiop_adapter_ops *)id->driver_data;
1312-
if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(iop_ops->hw_dma_bit_mask))) {
1313-
if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) {
1314-
printk(KERN_ERR "hptiop: fail to set dma_mask\n");
1315-
goto disable_pci_device;
1316-
}
1312+
if (dma_set_mask(&pcidev->dev,
1313+
DMA_BIT_MASK(iop_ops->hw_dma_bit_mask)) ||
1314+
dma_set_mask(&pcidev->dev, DMA_BIT_MASK(32))) {
1315+
printk(KERN_ERR "hptiop: fail to set dma_mask\n");
1316+
goto disable_pci_device;
13171317
}
13181318

13191319
if (pci_request_regions(pcidev, driver_name)) {

0 commit comments

Comments
 (0)