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
49fd6ef1
Commit
49fd6ef1
authored
Sep 03, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Organize incoming commands in queue
parent
967b475a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
143 additions
and
146 deletions
+143
-146
ahci_elphel.c
src/drivers/ata/ahci_elphel.c
+136
-144
ahci_elphel.h
src/drivers/ata/ahci_elphel.h
+7
-2
No files found.
src/drivers/ata/ahci_elphel.c
View file @
49fd6ef1
This diff is collapsed.
Click to expand it.
src/drivers/ata/ahci_elphel.h
View file @
49fd6ef1
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
/** Flag indicating that recording should be stopped right after the last chunk of data
/** Flag indicating that recording should be stopped right after the last chunk of data
* is written */
* is written */
#define DELAYED_FINISH (1 << 3)
#define DELAYED_FINISH (1 << 3)
#define LOCK_TAIL (1 << 4)
/** The length of a command FIS in double words */
/** The length of a command FIS in double words */
#define CMD_FIS_LEN 5
#define CMD_FIS_LEN 5
/** This is used to get 28-bit address from 64-bit value */
/** This is used to get 28-bit address from 64-bit value */
...
@@ -54,6 +55,8 @@
...
@@ -54,6 +55,8 @@
/** Maximum number of entries in PRDT table. HW max is 64k.
/** Maximum number of entries in PRDT table. HW max is 64k.
* Set this value the same as AHCI_MAX_SG in ahci.h */
* Set this value the same as AHCI_MAX_SG in ahci.h */
#define MAX_SGL_LEN 168
#define MAX_SGL_LEN 168
/** Maximum number of frames which will be processed at the same time */
#define MAX_CMD_SLOTS 4
/** This structure holds raw device buffer pointers */
/** This structure holds raw device buffer pointers */
struct
drv_pointers
{
struct
drv_pointers
{
...
@@ -108,12 +111,14 @@ struct elphel_ahci_priv {
...
@@ -108,12 +111,14 @@ struct elphel_ahci_priv {
int
curr_cmd
;
int
curr_cmd
;
size_t
max_data_sz
;
size_t
max_data_sz
;
struct
drv_pointers
lba_ptr
;
struct
drv_pointers
lba_ptr
;
struct
frame_buffers
fbuffs
;
struct
frame_buffers
fbuffs
[
MAX_CMD_SLOTS
]
;
struct
fvec
data_chunks
[
MAX_DATA_CHUNKS
];
struct
fvec
data_chunks
[
MAX_
CMD_SLOTS
][
MAX_
DATA_CHUNKS
];
struct
fvec
sgl
[
MAX_SGL_LEN
];
struct
fvec
sgl
[
MAX_SGL_LEN
];
int
sg_elems
;
int
sg_elems
;
int
curr_data_chunk
;
///< index of a data chunk used during last transaction
int
curr_data_chunk
;
///< index of a data chunk used during last transaction
size_t
curr_data_offset
;
///< offset of the last byte in a data chunk pointed to by @e curr_data_chunk
size_t
curr_data_offset
;
///< offset of the last byte in a data chunk pointed to by @e curr_data_chunk
size_t
head_ptr
;
///< pointer to command slot which will be written next
size_t
tail_ptr
;
///< pointer to next free command slot
};
};
#endif
/* _AHCI_ELPHEL_EXT */
#endif
/* _AHCI_ELPHEL_EXT */
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