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
aaf49288
Commit
aaf49288
authored
Apr 05, 2017
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable/disable panic on cmd timeout, disable direct recording in driver
parent
f7f5be40
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6969 additions
and
9 deletions
+6969
-9
ahci_elphel.c
src/drivers/ata/ahci_elphel.c
+16
-9
libata-core.c
src/drivers/ata/libata-core.c
+6953
-0
No files found.
src/drivers/ata/ahci_elphel.c
View file @
aaf49288
...
@@ -481,14 +481,15 @@ static int elphel_drv_probe(struct platform_device *pdev)
...
@@ -481,14 +481,15 @@ static int elphel_drv_probe(struct platform_device *pdev)
}
}
/* reassign automatically assigned interrupt handler */
/* reassign automatically assigned interrupt handler */
irq_num
=
platform_get_irq
(
pdev
,
0
);
/* this is disabled because recording in both modes goes through system */
host
=
platform_get_drvdata
(
pdev
);
// irq_num = platform_get_irq(pdev, 0);
devm_free_irq
(
dev
,
irq_num
,
host
);
// host = platform_get_drvdata(pdev);
ret
=
devm_request_irq
(
dev
,
irq_num
,
elphel_irq_handler
,
IRQF_SHARED
,
dev_name
(
dev
),
host
);
// devm_free_irq(dev, irq_num, host);
if
(
ret
)
{
// ret = devm_request_irq(dev, irq_num, elphel_irq_handler, IRQF_SHARED, dev_name(dev), host);
dev_err
(
dev
,
"failed to reassign default IRQ handler to Elphel handler
\n
"
);
// if (ret) {
return
ret
;
// dev_err(dev, "failed to reassign default IRQ handler to Elphel handler\n");
}
// return ret;
// }
return
0
;
return
0
;
}
}
...
@@ -521,6 +522,9 @@ static void elphel_qc_prep(struct ata_queued_cmd *qc)
...
@@ -521,6 +522,9 @@ static void elphel_qc_prep(struct ata_queued_cmd *qc)
struct
scatterlist
*
sg
;
struct
scatterlist
*
sg
;
struct
ahci_sg
*
ahci_sg
;
struct
ahci_sg
*
ahci_sg
;
dev_dbg
(
ap
->
dev
,
"cmd = 0x%x, qc->tag = %u, ap->qc_active = %u, link->sactive = %u, link->active_tag = %u
\n
"
,
qc
->
tf
.
command
,
qc
->
tag
,
ap
->
qc_active
,
ap
->
link
.
sactive
,
ap
->
link
.
active_tag
);
/* There is only one slot in controller thus we need to change tag*/
/* There is only one slot in controller thus we need to change tag*/
qc
->
tag
=
0
;
qc
->
tag
=
0
;
...
@@ -1351,6 +1355,9 @@ static ssize_t rawdev_write(struct device *dev, ///< device structure associate
...
@@ -1351,6 +1355,9 @@ static ssize_t rawdev_write(struct device *dev, ///< device structure associate
struct
frame_buffers
*
buffs
;
struct
frame_buffers
*
buffs
;
struct
fvec
*
chunks
;
struct
fvec
*
chunks
;
/* disable recording using direct driver commands */
return
-
EINVAL
;
/* simple check if we've got the right command */
/* simple check if we've got the right command */
if
(
buff_sz
!=
sizeof
(
struct
frame_data
))
{
if
(
buff_sz
!=
sizeof
(
struct
frame_data
))
{
dev_err
(
dev
,
"the size of the data buffer is incorrect, should be equal to sizeof(struct frame_data)
\n
"
);
dev_err
(
dev
,
"the size of the data buffer is incorrect, should be equal to sizeof(struct frame_data)
\n
"
);
...
@@ -1817,7 +1824,7 @@ static struct ata_port_operations ahci_elphel_ops = {
...
@@ -1817,7 +1824,7 @@ static struct ata_port_operations ahci_elphel_ops = {
.
inherits
=
&
ahci_ops
,
.
inherits
=
&
ahci_ops
,
.
port_start
=
elphel_port_start
,
.
port_start
=
elphel_port_start
,
.
qc_prep
=
elphel_qc_prep
,
.
qc_prep
=
elphel_qc_prep
,
.
qc_defer
=
elphel_qc_defer
,
/* .qc_defer = elphel_qc_defer, */
};
};
static
const
struct
ata_port_info
ahci_elphel_port_info
=
{
static
const
struct
ata_port_info
ahci_elphel_port_info
=
{
...
...
src/drivers/ata/libata-core.c
0 → 100644
View file @
aaf49288
This diff is collapsed.
Click to expand it.
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