diff options
Diffstat (limited to 'drivers/scsi/aacraid/commctrl.c')
-rw-r--r-- | drivers/scsi/aacraid/commctrl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index e21070f4eac1..83d5680e1326 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c | |||
@@ -69,7 +69,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) | |||
69 | return -ENOMEM; | 69 | return -ENOMEM; |
70 | } | 70 | } |
71 | 71 | ||
72 | kfib = fibptr->hw_fib; | 72 | kfib = fibptr->hw_fib_va; |
73 | /* | 73 | /* |
74 | * First copy in the header so that we can check the size field. | 74 | * First copy in the header so that we can check the size field. |
75 | */ | 75 | */ |
@@ -91,9 +91,9 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) | |||
91 | goto cleanup; | 91 | goto cleanup; |
92 | } | 92 | } |
93 | /* Highjack the hw_fib */ | 93 | /* Highjack the hw_fib */ |
94 | hw_fib = fibptr->hw_fib; | 94 | hw_fib = fibptr->hw_fib_va; |
95 | hw_fib_pa = fibptr->hw_fib_pa; | 95 | hw_fib_pa = fibptr->hw_fib_pa; |
96 | fibptr->hw_fib = kfib = pci_alloc_consistent(dev->pdev, size, &fibptr->hw_fib_pa); | 96 | fibptr->hw_fib_va = kfib = pci_alloc_consistent(dev->pdev, size, &fibptr->hw_fib_pa); |
97 | memset(((char *)kfib) + dev->max_fib_size, 0, size - dev->max_fib_size); | 97 | memset(((char *)kfib) + dev->max_fib_size, 0, size - dev->max_fib_size); |
98 | memcpy(kfib, hw_fib, dev->max_fib_size); | 98 | memcpy(kfib, hw_fib, dev->max_fib_size); |
99 | } | 99 | } |
@@ -137,7 +137,7 @@ cleanup: | |||
137 | if (hw_fib) { | 137 | if (hw_fib) { |
138 | pci_free_consistent(dev->pdev, size, kfib, fibptr->hw_fib_pa); | 138 | pci_free_consistent(dev->pdev, size, kfib, fibptr->hw_fib_pa); |
139 | fibptr->hw_fib_pa = hw_fib_pa; | 139 | fibptr->hw_fib_pa = hw_fib_pa; |
140 | fibptr->hw_fib = hw_fib; | 140 | fibptr->hw_fib_va = hw_fib; |
141 | } | 141 | } |
142 | if (retval != -EINTR) | 142 | if (retval != -EINTR) |
143 | aac_fib_free(fibptr); | 143 | aac_fib_free(fibptr); |
@@ -282,15 +282,15 @@ return_fib: | |||
282 | fib = list_entry(entry, struct fib, fiblink); | 282 | fib = list_entry(entry, struct fib, fiblink); |
283 | fibctx->count--; | 283 | fibctx->count--; |
284 | spin_unlock_irqrestore(&dev->fib_lock, flags); | 284 | spin_unlock_irqrestore(&dev->fib_lock, flags); |
285 | if (copy_to_user(f.fib, fib->hw_fib, sizeof(struct hw_fib))) { | 285 | if (copy_to_user(f.fib, fib->hw_fib_va, sizeof(struct hw_fib))) { |
286 | kfree(fib->hw_fib); | 286 | kfree(fib->hw_fib_va); |
287 | kfree(fib); | 287 | kfree(fib); |
288 | return -EFAULT; | 288 | return -EFAULT; |
289 | } | 289 | } |
290 | /* | 290 | /* |
291 | * Free the space occupied by this copy of the fib. | 291 | * Free the space occupied by this copy of the fib. |
292 | */ | 292 | */ |
293 | kfree(fib->hw_fib); | 293 | kfree(fib->hw_fib_va); |
294 | kfree(fib); | 294 | kfree(fib); |
295 | status = 0; | 295 | status = 0; |
296 | } else { | 296 | } else { |
@@ -340,7 +340,7 @@ int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context * fibctx) | |||
340 | /* | 340 | /* |
341 | * Free the space occupied by this copy of the fib. | 341 | * Free the space occupied by this copy of the fib. |
342 | */ | 342 | */ |
343 | kfree(fib->hw_fib); | 343 | kfree(fib->hw_fib_va); |
344 | kfree(fib); | 344 | kfree(fib); |
345 | } | 345 | } |
346 | /* | 346 | /* |