Message ID | 200912220802.50090.roman.fietze@telemotive.de (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Grant Likely |
Headers | show |
On Tue, Dec 22, 2009 at 12:02 AM, Roman Fietze <roman.fietze@telemotive.de> wrote: > > Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> > --- > arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c > index 2fd1f3f..1e4f725 100644 > --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c > +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c > @@ -460,9 +460,9 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match) > if (!lpbfifo.bcom_tx_task) > goto err_bcom_tx; > > - rc = request_irq(bcom_get_task_irq(lpbfifo.bcom_rx_task), > + rc = request_irq(bcom_get_task_irq(lpbfifo.bcom_tx_task), > mpc52xx_lpbfifo_bcom_irq, 0, > - "mpc52xx-lpbfifo-rx", &lpbfifo); > + "mpc52xx-lpbfifo-tx", &lpbfifo); Is this really what you want? In the TX path, it is the FIFO irq that indicates the transfer is complete (ie, the DMA fills the FIFO and finishes before the FIFO has drained). If both irqs were enabled, then the DMA irq would fire first, followed by the FIFO irq. For the use cases I was dealing with, the next transfer cannot be kicked off until the FIFO has drained. In the RX path, the DMA irq indicates that the transfer is complete (ie, the localbus fills the FIFO and finishes before the DMA drains the FIFO. For my use cases, the RX DMA irq was always required, but the TX DMA irq was never needed. Does your use case differ? g.
Hello Grant, On Tuesday 22 December 2009 08:20:16 Grant Likely wrote: > Is this really what you want? In the TX path, it is the FIFO irq > that indicates the transfer is complete (ie, the DMA fills the FIFO > and finishes before the FIFO has drained). If both irqs were > enabled, then the DMA irq would fire first, followed by the FIFO > irq. For the use cases I was dealing with, the next transfer cannot > be kicked off until the FIFO has drained. I added another patch (PATCH 10/13) that takes care of this problem. Debugging output (some tiny printk's when I detected the "abnormal" case) showed, that when receiving data one cannot predict the order of the the SDMA and SCLPC interrupt, esp. when e.g. the BestComm has other tasks with higher prio running, in my case ATA+FEC. I hope I didn't kill the TX side with this change, because, as I said, could not yet test it. Two possible solutions came into my mind: 1) let the SDMA interrupts run freely in parallel and just use the SCLPC interrupt to detect a finished transaction. 2) Always wait for both, the second one defined the end of the transaction. IMHO some waste of time. > In the RX path, the DMA irq indicates that the transfer is complete > (ie, the localbus fills the FIFO and finishes before the DMA drains > the FIFO. See above. That's not always true as stress tests showed. I had cases where the BestComm was second. The SDMA beeing first is almost always true for non BD tasks (there is one available in the 2.4.25, but not in the 2.6 yet), and is mostly true even with BD tasks, but not 100%. > For my use cases, the RX DMA irq was always required, but the TX DMA > irq was never needed. Unloading the module caused an oops when I did not request the TX SDMA IRQ. Have to check that again. > Does your use case differ? I'm currently using your modified lpc test driver and I am currently in the process of porting a 2.4.25 MOST150 FPGA driver to 2.6 using the platform LPC driver. As soon as I have results using the FPGA driver (very high load) I will come back with the results or probably further patches. One of them might be increasing the number of BDs again, because the BestComm seems to take some time until it gives them back to the world, and then sometimes in batches. I had a similar problem on a high speed SPI link using the BestComm. Roman
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index 2fd1f3f..1e4f725 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c @@ -460,9 +460,9 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match) if (!lpbfifo.bcom_tx_task) goto err_bcom_tx; - rc = request_irq(bcom_get_task_irq(lpbfifo.bcom_rx_task), + rc = request_irq(bcom_get_task_irq(lpbfifo.bcom_tx_task), mpc52xx_lpbfifo_bcom_irq, 0, - "mpc52xx-lpbfifo-rx", &lpbfifo); + "mpc52xx-lpbfifo-tx", &lpbfifo); if (rc) goto err_bcom_tx_irq;
Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> --- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)