On Mon, Mar 5, 2018 at 1:35 AM, Stéphane Grosjean <s.grosjean@xxxxxxxxxxxxxxx> wrote: > Hi, > > The "BUG! echo_skb is occupied" msg is printed when the network tx queue is restarted, while there is no room left in the echo_skb array. Note that this msg does not prevent any CAN frame to be written on the bus. > > There's actually one place where the network tx queue is restarted, however the echo_skb array is filled: > > (see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/peak_canfd/peak_pciefd_main.c#n353) > > A driver version in which the below patch has been applied > > /* handle tx link interrupt (if any) */ > if (pciefd_irq_is_lnk(priv->irq_status)) { > unsigned long flags; > > spin_lock_irqsave(&priv->tx_lock, flags); > priv->tx_pages_free++; > spin_unlock_irqrestore(&priv->tx_lock, flags); > - > - /* wake producer up */ > - netif_wake_queue(priv->ucan.ndev); > } > > has run during the whole weekend (~60 h). The echo_skb array size has also been reduced to 8 slots (instead of 24), to increase the probability for the issue to occur; two "cangen -g 0 -i" were running on can0 and can1. Unfortunately, during this period, the "BUG! echo is occupied" msg has been still sporadically printed (4 times, 2 times for can0, 2 times for can1). > > Still under investigation... > > Regards, > > >> -----Original Message----- >> From: Diana Burgess <diana@xxxxxxxxxxxxxxxx> >> Sent: samedi 3 mars 2018 02:38 >> To: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> >> Cc: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>; Stéphane Grosjean >> <s.grosjean@xxxxxxxxxxxxxxx>; Philipp Schrader <philipp@peloton- >> tech.com>; linux-can@xxxxxxxxxxxxxxx; linux-rt-users@xxxxxxxxxxxxxxx >> Subject: Re: peak_pciefd 0000:06:00.0 can1: can_put_echo_skb: BUG! >> echo_skb is occupied! >> >> On Tue, Feb 27, 2018 at 12:58 AM, Sebastian Andrzej Siewior >> <bigeasy@xxxxxxxxxxxxx> wrote: >> > On 2018-02-26 11:55:11 [-0800], Diana Burgess wrote: >> >> That patch is part of my branch already so it does not fix this bug. >> >> >> >> Also 4.15 is not part of rt-devel yet so I did not try to build and >> >> run that version. >> > about that. The tree you were using is not updated (is EOL) so I >> > suggest to upgrade to 4.14-RT. This may not fix your bug but you get a >> > kernel with stable/security updates. >> > >> > You mentioned that you use -RT and you see this problem only with the >> > peak card. You never mentioned if this also happens often or rarely or >> > if this happens once you disable RT and you keep doing what you are >> > doing. >> > >> >> >> >> Thanks, >> >> >> > >> > Sebastian >> >> I've upgraded to 4.14-RT and tried with and without RT. Using RT I see the >> bug approximately every 45s (though it is not consistent). This time between >> bugs increases when not using RT, but does not go away. >> >> -- >> Diana Burgess > > -- > PEAK-System Technik GmbH > Sitz der Gesellschaft Darmstadt - HRB 9183 > Geschaeftsfuehrung: Alexander Gach / Uwe Wilhelm > -- Stephane Grosjean sent out the following two patches which fixed the bug: can: peak/pcie_fd: fix echo_skb is occupied! bug can: peak/pcie_fd: remove useless code when interface starts -- Diana Burgess -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html