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
4ee3713c
Commit
4ee3713c
authored
Aug 30, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up
parent
1ab07949
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
ahci_elphel.c
src/drivers/ata/ahci_elphel.c
+1
-10
No files found.
src/drivers/ata/ahci_elphel.c
View file @
4ee3713c
...
...
@@ -621,8 +621,6 @@ static int map_vectors(struct elphel_ahci_priv *dpriv)
vect
.
iov_len
=
chunks
[
i
].
iov_len
-
dpriv
->
curr_data_offset
;
}
else
{
total_sz
+=
chunks
[
i
].
iov_len
;
// vect.iov_base = chunks[i].iov_base;
// vect.iov_len = chunks[i].iov_len;
vect
=
chunks
[
i
];
}
if
(
total_sz
>
dpriv
->
max_data_sz
)
{
...
...
@@ -639,14 +637,13 @@ static int map_vectors(struct elphel_ahci_priv *dpriv)
}
printk
(
KERN_DEBUG
"mapping data chunk number %d: total_sz = %u, vect.iov_len = %u
\n
"
,
i
,
total_sz
,
vect
.
iov_len
);
if
(
vect
.
iov_len
!=
0
)
{
// sg_set_buf(&dpriv->sgl[index++], vect.iov_base, vect.iov_len);
dpriv
->
sgl
[
index
++
]
=
vect
;
}
if
(
finish
)
break
;
}
if
(
finish
==
0
)
{
/
/ frame vectors have been fully processed, stop calling me
/
* frame vectors have been fully processed, stop calling me */
dpriv
->
curr_data_chunk
=
MAX_DATA_CHUNKS
;
dpriv
->
curr_data_offset
=
0
;
}
...
...
@@ -731,7 +728,6 @@ static void align_frame(struct device *dev, struct elphel_ahci_priv *dpriv)
/* copy JPEG marker */
len
=
chunks
[
CHUNK_LEADER
].
iov_len
;
printk
(
KERN_DEBUG
">>> copy %u bytes from LEADER to common buffer
\n
"
,
len
);
vectcpy
(
cbuff
,
chunks
[
CHUNK_LEADER
].
iov_base
,
len
);
vectshrink
(
&
chunks
[
CHUNK_LEADER
],
chunks
[
CHUNK_LEADER
].
iov_len
);
...
...
@@ -1134,12 +1130,7 @@ static int process_cmd(struct device *dev, struct elphel_ahci_priv *dpriv, struc
dump_sg_list
(
dpriv
->
sgl
,
dpriv
->
sg_elems
);
dpriv
->
lba_ptr
.
wr_count
=
get_blocks_num
(
dpriv
->
sgl
,
dpriv
->
sg_elems
);
printk
(
KERN_DEBUG
">>> trying to write data from sg list %u blocks, LBA: %llu
\n
"
,
dpriv
->
lba_ptr
.
wr_count
,
dpriv
->
lba_ptr
.
lba_write
);
dma_sync_single_for_device
(
dev
,
cbuff
->
iov_dma
,
cbuff
->
iov_len
,
DMA_TO_DEVICE
);
// if (dpriv->data_chunks[CHUNK_DATA_0].iov_len != 0)
// dma_sync_single_for_device(dev, dpriv->data_chunks[CHUNK_DATA_0].iov_dma, dpriv->data_chunks[CHUNK_DATA_0].iov_len, DMA_TO_DEVICE);
// if (dpriv->data_chunks[CHUNK_DATA_1].iov_len != 0)
// dma_sync_single_for_device(dev, dpriv->data_chunks[CHUNK_DATA_1].iov_dma, dpriv->data_chunks[CHUNK_DATA_1].iov_len, DMA_TO_DEVICE);
elphel_cmd_issue
(
port
,
dpriv
->
lba_ptr
.
lba_write
,
dpriv
->
lba_ptr
.
wr_count
,
dpriv
->
sgl
,
dpriv
->
sg_elems
,
dpriv
->
curr_cmd
);
}
...
...
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