aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 9c5e4da5a132..4070894ed5f0 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -2711,9 +2711,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
2711 * For each user buffer, create a mirror buffer and copy in 2711 * For each user buffer, create a mirror buffer and copy in
2712 */ 2712 */
2713 for (i = 0; i < ioc->sge_count; i++) { 2713 for (i = 0; i < ioc->sge_count; i++) {
2714 kbuff_arr[i] = pci_alloc_consistent(instance->pdev, 2714 kbuff_arr[i] = dma_alloc_coherent(&instance->pdev->dev,
2715 ioc->sgl[i].iov_len, 2715 ioc->sgl[i].iov_len,
2716 &buf_handle); 2716 &buf_handle, GFP_KERNEL);
2717 if (!kbuff_arr[i]) { 2717 if (!kbuff_arr[i]) {
2718 printk(KERN_DEBUG "megasas: Failed to alloc " 2718 printk(KERN_DEBUG "megasas: Failed to alloc "
2719 "kernel SGL buffer for IOCTL \n"); 2719 "kernel SGL buffer for IOCTL \n");
@@ -2740,8 +2740,8 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
2740 } 2740 }
2741 2741
2742 if (ioc->sense_len) { 2742 if (ioc->sense_len) {
2743 sense = pci_alloc_consistent(instance->pdev, ioc->sense_len, 2743 sense = dma_alloc_coherent(&instance->pdev->dev, ioc->sense_len,
2744 &sense_handle); 2744 &sense_handle, GFP_KERNEL);
2745 if (!sense) { 2745 if (!sense) {
2746 error = -ENOMEM; 2746 error = -ENOMEM;
2747 goto out; 2747 goto out;
@@ -2800,12 +2800,12 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
2800 2800
2801 out: 2801 out:
2802 if (sense) { 2802 if (sense) {
2803 pci_free_consistent(instance->pdev, ioc->sense_len, 2803 dma_free_coherent(&instance->pdev->dev, ioc->sense_len,
2804 sense, sense_handle); 2804 sense, sense_handle);
2805 } 2805 }
2806 2806
2807 for (i = 0; i < ioc->sge_count && kbuff_arr[i]; i++) { 2807 for (i = 0; i < ioc->sge_count && kbuff_arr[i]; i++) {
2808 pci_free_consistent(instance->pdev, 2808 dma_free_coherent(&instance->pdev->dev,
2809 kern_sge32[i].length, 2809 kern_sge32[i].length,
2810 kbuff_arr[i], kern_sge32[i].phys_addr); 2810 kbuff_arr[i], kern_sge32[i].phys_addr);
2811 } 2811 }