Skip to content

Commit

Permalink
scsi: hptiop: use dma_set_mask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Martin K. Petersen committed Nov 15, 2018
1 parent e4db40e commit 453cd37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/scsi/hptiop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,11 +1309,11 @@ static int hptiop_probe(struct pci_dev *pcidev, const struct pci_device_id *id)

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

if (pci_request_regions(pcidev, driver_name)) {
Expand Down

0 comments on commit 453cd37

Please sign in to comment.