Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 143585 Details for
Bug 208493
[2.6.24 regression] arcmsr causes dma_free_coherent() warning flood
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
arcmsr-pci-alloc-consistent.patch (text/plain), 2.06 KB, created by
Daniel Drake (RETIRED)
on 2008-02-15 19:26:24 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Daniel Drake (RETIRED)
Created:
2008-02-15 19:26:24 UTC
Size:
2.06 KB
patch
obsolete
>From: Nick Cheng <nick.cheng@areca.com.tw> > >Partial backport of 76d78300 ("arcmsr: updates (1.20.00.15)") by >Daniel Drake <dsd@gentoo.org>. Removes pci_free_consistent usage, which >should not be used when IRQs are disabled for portability reasons. Fixes a >spew of dma_free_coherent irqs_disabled() warnings. > >diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c >index f4a202e..4f9ff32 100644 >--- a/drivers/scsi/arcmsr/arcmsr_hba.c >+++ b/drivers/scsi/arcmsr/arcmsr_hba.c >@@ -1380,12 +1388,13 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, \ > > case ARCMSR_MESSAGE_READ_RQBUFFER: { > unsigned long *ver_addr; >- dma_addr_t buf_handle; > uint8_t *pQbuffer, *ptmpQbuffer; > int32_t allxfer_len = 0; >+ void *tmp; > >- ver_addr = pci_alloc_consistent(acb->pdev, 1032, &buf_handle); >- if (!ver_addr) { >+ tmp = kmalloc(1032, GFP_KERNEL|GFP_DMA); >+ ver_addr = (unsigned long *)tmp; >+ if (!tmp) { > retvalue = ARCMSR_MESSAGE_FAIL; > goto message_out; > } >@@ -1421,18 +1430,19 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, \ > memcpy(pcmdmessagefld->messagedatabuffer, (uint8_t *)ver_addr, allxfer_len); > pcmdmessagefld->cmdmessage.Length = allxfer_len; > pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK; >- pci_free_consistent(acb->pdev, 1032, ver_addr, buf_handle); >+ kfree(tmp); > } > break; > > case ARCMSR_MESSAGE_WRITE_WQBUFFER: { > unsigned long *ver_addr; >- dma_addr_t buf_handle; > int32_t my_empty_len, user_len, wqbuf_firstindex, wqbuf_lastindex; > uint8_t *pQbuffer, *ptmpuserbuffer; >+ void *tmp; > >- ver_addr = pci_alloc_consistent(acb->pdev, 1032, &buf_handle); >- if (!ver_addr) { >+ tmp = kmalloc(1032, GFP_KERNEL|GFP_DMA); >+ ver_addr = (unsigned long *)tmp; >+ if (!tmp) { > retvalue = ARCMSR_MESSAGE_FAIL; > goto message_out; > } >@@ -1482,7 +1492,7 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, \ > retvalue = ARCMSR_MESSAGE_FAIL; > } > } >- pci_free_consistent(acb->pdev, 1032, ver_addr, buf_handle); >+ kfree(tmp); > } > break; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208493
:
142544
|
142545
|
142546
| 143585