commit 5b5464d78665b1b2199b02d827a3c5f85dbe2c4b Author: Jeff Garzik Date: Tue Aug 8 21:34:17 2006 -0400 [SCSI] stex: use dma_alloc_coherent() pci_alloc_consistent() API prevents us from using GFP_KERNEL. 5b5464d78665b1b2199b02d827a3c5f85dbe2c4b diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index f35833a..fceae17 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -1112,8 +1112,8 @@ stex_probe(struct pci_dev *pdev, const s goto out_iounmap; } - hba->dma_mem = pci_alloc_consistent(pdev, - STEX_BUFFER_SIZE, &hba->dma_handle); + hba->dma_mem = dma_alloc_coherent(&pdev->dev, + STEX_BUFFER_SIZE, &hba->dma_handle, GFP_KERNEL); if (!hba->dma_mem) { err = -ENOMEM; printk(KERN_ERR DRV_NAME "(%s): dma mem alloc failed\n", @@ -1168,8 +1168,8 @@ stex_probe(struct pci_dev *pdev, const s out_free_irq: free_irq(pdev->irq, hba); out_pci_free: - pci_free_consistent(pdev, STEX_BUFFER_SIZE, - hba->dma_mem, hba->dma_handle); + dma_free_coherent(&pdev->dev, STEX_BUFFER_SIZE, + hba->dma_mem, hba->dma_handle); out_iounmap: iounmap(hba->mmio_base); out_release_regions: @@ -1219,8 +1219,8 @@ static void stex_hba_free(struct st_hba pci_release_regions(hba->pdev); - pci_free_consistent(hba->pdev, STEX_BUFFER_SIZE, - hba->dma_mem, hba->dma_handle); + dma_free_coherent(&hba->pdev->dev, STEX_BUFFER_SIZE, + hba->dma_mem, hba->dma_handle); } static void stex_remove(struct pci_dev *pdev)