Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d07102a1
Commit
d07102a1
authored
Jan 12, 2011
by
Sascha Hauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmaengine i.MX dma: check sg entries for valid addresses and lengths
Signed-off-by:
Sascha Hauer
<
s.hauer@pengutronix.de
>
parent
1e070a60
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
drivers/dma/imx-dma.c
drivers/dma/imx-dma.c
+15
-0
No files found.
drivers/dma/imx-dma.c
View file @
d07102a1
...
...
@@ -243,6 +243,21 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
else
dmamode
=
DMA_MODE_WRITE
;
switch
(
imxdmac
->
word_size
)
{
case
DMA_SLAVE_BUSWIDTH_4_BYTES
:
if
(
sgl
->
length
&
3
||
sgl
->
dma_address
&
3
)
return
NULL
;
break
;
case
DMA_SLAVE_BUSWIDTH_2_BYTES
:
if
(
sgl
->
length
&
1
||
sgl
->
dma_address
&
1
)
return
NULL
;
break
;
case
DMA_SLAVE_BUSWIDTH_1_BYTE
:
break
;
default:
return
NULL
;
}
ret
=
imx_dma_setup_sg
(
imxdmac
->
imxdma_channel
,
sgl
,
sg_len
,
dma_length
,
imxdmac
->
per_address
,
dmamode
);
if
(
ret
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment