LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Fietze <roman.fietze@telemotive.de>
To: linuxppc-dev@lists.ozlabs.org
Subject: BestComm BD tasks, buffer done flag question
Date: Fri, 19 Mar 2010 09:15:47 +0100	[thread overview]
Message-ID: <201003190915.47713.roman.fietze@telemotive.de> (raw)

Hello,

I'm using Grant's platform SCLPC/BestComm driver to transfer data from
an FPGA (to disk). Very often I get a negative result from
bcom_buffer_done because BCOM_BD_READY is not set.

When searching for a solution I found this mail from Rob Broersen
talking about a similar promlem in the MPC5200's FEC interrupt
handler:

http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg16324.html

When I now do something ugly like

	if (!bcom_buffer_done(lpbfifo->bcom_cur_task))
		mdelay(1);

	/* retry */
	if (!bcom_buffer_done(lpbfifo->bcom_cur_task)) {
		ERROR!!!
		return IRQ_HANDLED;
	}

	HANDLE BD

in the ISR I always succeed, even in the cases where the first check
fails and I call the mdelay. Before that I very often ran into the
ERROR!!! case and my transfer "failed".

Is there a better solution? Does the FEC interrupt handler really work
fine as it is right now? I ask, because when I assume that there would
be just one active DB (as it always is with the SCLPC platform driver)
this one would evt. stall if there wasn't a second interrupt causing
the loop to handle it in this second interrupt.


Roman

=2D-=20
Roman Fietze                Telemotive AG B=FCro M=FChlhausen
Breitwiesen                              73347 M=FChlhausen
Tel.: +49(0)7335/18493-45        http://www.telemotive.de

                 reply	other threads:[~2010-03-19  8:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201003190915.47713.roman.fietze@telemotive.de \
    --to=roman.fietze@telemotive.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox