linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "AnilKumar, Chimata" <anilkumar@ti.com>
Cc: "wg@grandegger.com" <wg@grandegger.com>,
	"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"Gole, Anant" <anantgole@ti.com>, "Nori, Sekhar" <nsekhar@ti.com>
Subject: Re: [PATCH] can: ti_hecc: fix rx wrong sequence issue
Date: Mon, 05 Nov 2012 14:56:55 +0100	[thread overview]
Message-ID: <5097C5A7.4010002@pengutronix.de> (raw)
In-Reply-To: <331ABD5ECB02734CA317220B2BBEABC13EA647DC@DBDE01.ent.ti.com>

[-- Attachment #1: Type: text/plain, Size: 2022 bytes --]

On 11/05/2012 02:47 PM, AnilKumar, Chimata wrote:
> On Mon, Nov 05, 2012 at 17:04:55, Marc Kleine-Budde wrote:
>> Hello,
> 
> Hi Marc,
> 
> Thanks for looking into this issue, I had spent some considerable
> time for debugging this issue, I have seen better sequence with
> below changes at 500KBPS but issue still there. Because of some
> other higher priority task I left there.

I'm testing with cansequence at 500 kbit/s at the moment. With my
current patch, I'm not seeing any out-of-order problem. With "ping -f"
and serial load, the driver goes into a rx-overflow. But this is
probably due to too high load.

The hardware I'm using has an issue with 1Mbit/s, thus I cannot test this.

> Some of my observations in the driver:-
> 1. One is buffer mailbox (12th mailbox we are missing)
> 
> @@ -627,18 +617,34 @@ static int ti_hecc_rx_poll(struct napi_struct *napi, int quota)
>  			if (ti_hecc_rx_pkt(priv, priv->rx_next) < 0)
>  				return num_pkts;
>  			++num_pkts;
> -		} else if (priv->rx_next > HECC_RX_BUFFER_MBOX) {
> +		} else if (priv->rx_next >= HECC_RX_BUFFER_MBOX) {
>  			break; /* pkt not received yet */
>  		}
>  		--priv->rx_next;
> -		if (priv->rx_next == HECC_RX_BUFFER_MBOX) {
> -			/* enable high bank mailboxes */
> -			spin_lock_irqsave(&priv->mbx_lock, flags);
> +		if (priv->rx_next == (HECC_RX_BUFFER_MBOX - 1)) {
> 
> 2. Lower mail box configuration is not happening properly. I have
> changed this.
> 3. Removed spinlocks (Just for testing)

I've reworked the poll-loop completely.

[...]

> I can test the series if your patches are ready.

I'll send you a preliminary version to test soon, it wouldn't be finial,
but you can test, also include 1Mbit/s.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2012-11-05 13:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08  6:40 [PATCH] can: ti_hecc: fix rx wrong sequence issue AnilKumar Ch
2012-10-08  9:12 ` Jan Lübbe
2012-10-11 12:01   ` Jan Lübbe
2012-10-08  9:28 ` Wolfgang Grandegger
2012-11-05 11:34 ` Marc Kleine-Budde
2012-11-05 13:47   ` AnilKumar, Chimata
2012-11-05 13:56     ` Marc Kleine-Budde [this message]
2012-11-05 18:15   ` Marc Kleine-Budde
2012-11-05 18:40     ` Marc Kleine-Budde
2014-09-08 10:15       ` Jan Sondhauss

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=5097C5A7.4010002@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=anantgole@ti.com \
    --cc=anilkumar@ti.com \
    --cc=linux-can@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=swarren@wwwdotorg.org \
    --cc=wg@grandegger.com \
    /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;
as well as URLs for NNTP newsgroup(s).