From: Wolfgang Grandegger <wg@grandegger.com>
To: "j.p.lammertink" <j.p.lammertink@kubicas.com>
Cc: linux-can@vger.kernel.org
Subject: Re: Losing CAN messages with socket-CAN
Date: Wed, 24 Apr 2013 12:59:41 +0200 [thread overview]
Message-ID: <5177BB1D.7070405@grandegger.com> (raw)
In-Reply-To: <20130424091101.3CC0EEB62F6D@bmail02.one.com>
Hi Jeroen,
On 04/24/2013 11:11 AM, j.p.lammertink wrote:
> Hi Wolfgang,
>
> I think I have a patch for the "Loosing CAN messages problem"
> See at the bottom Appendix 7 Sugested patch.
> I realize that this patch has a performance penalty, but I didn't dare
> to make more rigorous changes.
> I've put the patch on top of Patch 1, of the patches that you sugested (see
> text below)
>
> I'm interested in all feedback.
Well, we want to get rid of the pch_can driver sooner than later.
Therefore I would appreciate if you could test and improve the c_can
driver instead.
Wolfgang.
...
> --------------------------------------------------------------------------
> Appendix 7 Suggested patch
>
> diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
> index 44b9a7a..81d599f 100644
> --- a/drivers/net/can/pch_can.c
> +++ b/drivers/net/can/pch_can.c
> @@ -912,7 +912,6 @@ static netdev_tx_t pch_xmit(struct sk_buff *skb, struct net_device *ndev)
>
> tx_obj_no = priv->tx_obj;
> if (priv->tx_obj == PCH_TX_OBJ_END) {
> - if (ioread32(&priv->regs->treq2) & PCH_TREQ2_TX_MASK)
This means that there are pending TX messages. If there are none, there
is no need to stop the queue. I'm puzzled!
> netif_stop_queue(ndev);
>
> priv->tx_obj = PCH_TX_OBJ_START;
>
Hm, is this code protected by spin_lock_irqsave/spin_unlock_irqrestore?
Wolfgang.
next prev parent reply other threads:[~2013-04-24 10:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 9:11 Losing CAN messages with socket-CAN j.p.lammertink
2013-04-24 10:59 ` Wolfgang Grandegger [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-04-18 10:34 j.p.lammertink
2013-04-08 14:43 j.p.lammertink
2013-04-05 13:31 j.p.lammertink
2013-04-07 13:13 ` Wolfgang Grandegger
2013-04-07 21:05 ` Kurt Van Dijck
2013-04-04 16:16 j.p.lammertink
2013-04-04 21:12 ` Wolfgang Grandegger
2013-04-04 14:44 j.p.lammertink
2013-04-04 15:11 ` Wolfgang Grandegger
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=5177BB1D.7070405@grandegger.com \
--to=wg@grandegger.com \
--cc=j.p.lammertink@kubicas.com \
--cc=linux-can@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.