* [PATCH net-next] can: cc770: store echo skb before starting the transfer
@ 2011-12-12 15:07 Wolfgang Grandegger
2012-01-31 21:59 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Grandegger @ 2011-12-12 15:07 UTC (permalink / raw)
To: netdev; +Cc: linux-can
On slow systems and high CAN bitrates, the error message
"can_put_echo_skb: BUG! echo_skb is occupied!" did show up because
can_put_echo_skb() was called after starting the transfer.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
---
drivers/net/can/cc770/cc770.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/can/cc770/cc770.c b/drivers/net/can/cc770/cc770.c
index 7668967..c30f0e6 100644
--- a/drivers/net/can/cc770/cc770.c
+++ b/drivers/net/can/cc770/cc770.c
@@ -440,12 +440,14 @@ static netdev_tx_t cc770_start_xmit(struct sk_buff *skb, struct net_device *dev)
for (i = 0; i < dlc; i++)
cc770_write_reg(priv, msgobj[mo].data[i], cf->data[i]);
+ /* Store echo skb before starting the transfer */
+ can_put_echo_skb(skb, dev, 0);
+
cc770_write_reg(priv, msgobj[mo].ctrl1,
RMTPND_RES | TXRQST_SET | CPUUPD_RES | NEWDAT_UNC);
stats->tx_bytes += dlc;
- can_put_echo_skb(skb, dev, 0);
/*
* HM: We had some cases of repeated IRQs so make sure the
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] can: cc770: store echo skb before starting the transfer
2011-12-12 15:07 [PATCH net-next] can: cc770: store echo skb before starting the transfer Wolfgang Grandegger
@ 2012-01-31 21:59 ` Marc Kleine-Budde
0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2012-01-31 21:59 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linux-can
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
On 12/12/2011 04:07 PM, Wolfgang Grandegger wrote:
> On slow systems and high CAN bitrates, the error message
> "can_put_echo_skb: BUG! echo_skb is occupied!" did show up because
> can_put_echo_skb() was called after starting the transfer.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Applied to can-next.
tnx 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: 262 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-31 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12 15:07 [PATCH net-next] can: cc770: store echo skb before starting the transfer Wolfgang Grandegger
2012-01-31 21:59 ` Marc Kleine-Budde
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).