Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
ee11ae90
Commit
ee11ae90
authored
Sep 03, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix disk buffer roll over
parent
49fd6ef1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
ahci_elphel.c
src/drivers/ata/ahci_elphel.c
+4
-0
No files found.
src/drivers/ata/ahci_elphel.c
View file @
ee11ae90
...
@@ -1137,6 +1137,10 @@ static int process_cmd(struct device *dev, struct elphel_ahci_priv *dpriv, struc
...
@@ -1137,6 +1137,10 @@ static int process_cmd(struct device *dev, struct elphel_ahci_priv *dpriv, struc
dump_sg_list
(
dpriv
->
sgl
,
dpriv
->
sg_elems
);
dump_sg_list
(
dpriv
->
sgl
,
dpriv
->
sg_elems
);
dpriv
->
lba_ptr
.
wr_count
=
get_blocks_num
(
dpriv
->
sgl
,
dpriv
->
sg_elems
);
dpriv
->
lba_ptr
.
wr_count
=
get_blocks_num
(
dpriv
->
sgl
,
dpriv
->
sg_elems
);
if
(
dpriv
->
lba_ptr
.
lba_write
+
dpriv
->
lba_ptr
.
wr_count
>
dpriv
->
lba_ptr
.
lba_end
)
{
/* the frame rolls over the buffer boundary, don't split it and start writing from the beginning */
dpriv
->
lba_ptr
.
lba_write
=
dpriv
->
lba_ptr
.
lba_start
;
}
cbuff
=
&
dpriv
->
fbuffs
[
dpriv
->
head_ptr
].
common_buff
;
cbuff
=
&
dpriv
->
fbuffs
[
dpriv
->
head_ptr
].
common_buff
;
dma_sync_single_for_device
(
dev
,
cbuff
->
iov_dma
,
cbuff
->
iov_len
,
DMA_TO_DEVICE
);
dma_sync_single_for_device
(
dev
,
cbuff
->
iov_dma
,
cbuff
->
iov_len
,
DMA_TO_DEVICE
);
printk
(
KERN_DEBUG
">>> time before issuing command: %u
\n
"
,
get_rtc_usec
());
printk
(
KERN_DEBUG
">>> time before issuing command: %u
\n
"
,
get_rtc_usec
());
...
...
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