Commit aaf49288 authored by Mikhail Karpenko's avatar Mikhail Karpenko

Enable/disable panic on cmd timeout, disable direct recording in driver

parent f7f5be40
...@@ -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 = {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment