* [PATCH v0 1/2] libahci: Implement the function restart_engine to restart the port dma engine. [not found] ` <1402090134-23164-2-git-send-email-stripathi@apm.com> @ 2014-06-06 22:29 ` Tejun Heo 0 siblings, 0 replies; 2+ messages in thread From: Tejun Heo @ 2014-06-06 22:29 UTC (permalink / raw) To: linux-arm-kernel On Sat, Jun 07, 2014 at 02:58:53AM +0530, Suman Tripathi wrote: > This patch implements the function restart_engine function to add the flexibility to restart the port dma engine from the libata framework. > > Signed-off-by: Loc Ho <lho@apm.com> > Signed-off-by: Suman Tripathi <stripathi@apm.com> > --- > drivers/ata/libahci.c | 11 +++++++++++ > include/linux/libata.h | 1 + > 2 files changed, 12 insertions(+) > > diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c > index b986145..5f9a13e 100644 > --- a/drivers/ata/libahci.c > +++ b/drivers/ata/libahci.c > @@ -70,6 +70,7 @@ static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); > static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); > static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); > static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc); > +static int ahci_restart_engine(struct ata_port *ap); > static int ahci_port_start(struct ata_port *ap); > static void ahci_port_stop(struct ata_port *ap); > static void ahci_qc_prep(struct ata_queued_cmd *qc); > @@ -178,6 +179,7 @@ struct ata_port_operations ahci_ops = { > #endif > .port_start = ahci_port_start, > .port_stop = ahci_port_stop, > + .restart_engine = ahci_restart_engine, Umm... you're adding something very ahci-specific as general libata callback. I haven't looked at the second patch yet but don't think this is gonna work out. Thanks. -- tejun ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <1402090134-23164-3-git-send-email-stripathi@apm.com>]
* [PATCH v0 2/2] ata: Fix the dma state machine lockup for the PIO mode commands. [not found] ` <1402090134-23164-3-git-send-email-stripathi@apm.com> @ 2014-06-06 22:30 ` Tejun Heo 0 siblings, 0 replies; 2+ messages in thread From: Tejun Heo @ 2014-06-06 22:30 UTC (permalink / raw) To: linux-arm-kernel On Sat, Jun 07, 2014 at 02:58:54AM +0530, Suman Tripathi wrote: > @@ -5072,6 +5072,16 @@ int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active) > if (qc) { > ata_qc_complete(qc); > nr_done++; > + /* > + * Some controller unable to clear the BSY bit after > + * receiving the PIO Setup FIS from device resulting > + * the DMA state to go into CMFatalErrorUpdate state. > + * So need to restart the dma engine to get the > + * controller out of this state. > + */ > + if ((ap->flags & ATA_HORKAGE_BROKEN_PIO_CMD) && > + (qc->tf.protocol == ATA_PROT_PIO)) > + ap->ops->restart_engine(ap); Why aren't you doing this by wrapping irq handler? Thanks. -- tejun ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-06 22:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1402090134-23164-1-git-send-email-stripathi@apm.com>
[not found] ` <1402090134-23164-2-git-send-email-stripathi@apm.com>
2014-06-06 22:29 ` [PATCH v0 1/2] libahci: Implement the function restart_engine to restart the port dma engine Tejun Heo
[not found] ` <1402090134-23164-3-git-send-email-stripathi@apm.com>
2014-06-06 22:30 ` [PATCH v0 2/2] ata: Fix the dma state machine lockup for the PIO mode commands Tejun Heo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).