Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 49112
b: refs/heads/master
c: 9f35fa8
h: refs/heads/master
v: v3
  • Loading branch information
Sumant Patro authored and James Bottomley committed Feb 16, 2007
1 parent 5d396b3 commit f6b698c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf62a0a543fbab15286509d2e04e3dcf5549e966
refs/heads/master: 9f35fa8a14e6216a859e2dfbe50ade497f9603ef
12 changes: 6 additions & 6 deletions trunk/drivers/scsi/megaraid/megaraid_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -2711,9 +2711,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
* For each user buffer, create a mirror buffer and copy in
*/
for (i = 0; i < ioc->sge_count; i++) {
kbuff_arr[i] = pci_alloc_consistent(instance->pdev,
kbuff_arr[i] = dma_alloc_coherent(&instance->pdev->dev,
ioc->sgl[i].iov_len,
&buf_handle);
&buf_handle, GFP_KERNEL);
if (!kbuff_arr[i]) {
printk(KERN_DEBUG "megasas: Failed to alloc "
"kernel SGL buffer for IOCTL \n");
Expand All @@ -2740,8 +2740,8 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
}

if (ioc->sense_len) {
sense = pci_alloc_consistent(instance->pdev, ioc->sense_len,
&sense_handle);
sense = dma_alloc_coherent(&instance->pdev->dev, ioc->sense_len,
&sense_handle, GFP_KERNEL);
if (!sense) {
error = -ENOMEM;
goto out;
Expand Down Expand Up @@ -2800,12 +2800,12 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,

out:
if (sense) {
pci_free_consistent(instance->pdev, ioc->sense_len,
dma_free_coherent(&instance->pdev->dev, ioc->sense_len,
sense, sense_handle);
}

for (i = 0; i < ioc->sge_count && kbuff_arr[i]; i++) {
pci_free_consistent(instance->pdev,
dma_free_coherent(&instance->pdev->dev,
kern_sge32[i].length,
kbuff_arr[i], kern_sge32[i].phys_addr);
}
Expand Down

0 comments on commit f6b698c

Please sign in to comment.