Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1407736
| From | "Sricharan" <sricharan@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH V3 1/2] i2c: qup: Fix broken dma when CONFIG_DEBUG_SG is enabled |
| Date | 2016-05-27 00:10 +0200 |
| Message-ID | <rDbDz-3vK-5@gated-at.bofh.it> (permalink) |
| References | <rCCcO-76f-17@gated-at.bofh.it> <rCCcO-76f-15@gated-at.bofh.it> <rD8w3-1sN-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
>> sg_set_buf expects that the buf parameter passed in should be from
>> lowmem and a valid pageframe. This is not true for pages from
>> dma_alloc_coherent which can be carveouts, hence the check fails.
>
>OK, given you mean dma_pool_alloc here, the check fails for the
>pageframe because of the pool? Is my understanding correct?
>
Yes right. Since those are carveouts, there is no valid pageframe,
so the check fails.
>> Change allocation of sg buffers from dma_coherent memory to kzalloc
>> to fix the issue.
>
>But why can you drop the coherency?
>
The coherency is not dropped here. dma_map/unmap used
makes the buffer coherent before passing it to
dmaengine. Previously it was not required.
I can add this in description if its not clear.
>> @@ -1268,6 +1260,8 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap,
>> }
>> }
>>
>> + idx = 0;
>> +
>
>This looks like an unrelated change.
Ha, wrong. This should have been in a separate patch. This was to fix a
initialization issue in dma mode. Sorry, should not have been here, will
move it to out.
Regards,
Sricharan
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH V3 1/2] i2c: qup: Fix broken dma when CONFIG_DEBUG_SG is enabled Sricharan R <sricharan@codeaurora.org> - 2016-05-25 10:20 +0200
Re: [PATCH V3 1/2] i2c: qup: Fix broken dma when CONFIG_DEBUG_SG is enabled Wolfram Sang <wsa@the-dreams.de> - 2016-05-26 20:50 +0200
RE: [PATCH V3 1/2] i2c: qup: Fix broken dma when CONFIG_DEBUG_SG is enabled "Sricharan" <sricharan@codeaurora.org> - 2016-05-27 00:10 +0200
csiph-web