linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephane Grosjean <s.grosjean@peak-system.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
	Sebastian Haas <dev@sebastianhaas.info>,
	Wolfgang Grandegger <wg@grandegger.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: About PCAN-USB issues
Date: Tue, 24 Jan 2012 18:12:24 +0100	[thread overview]
Message-ID: <4F1EE678.2050604@peak-system.com> (raw)
In-Reply-To: <4F1E9DA9.9060804@hartkopp.net>

Hello all,

I'm finally back to the linux-can... I'm currently working on several 
projects so the peak_usb did progress slowly these last days...

Back to the issue: I changed the way the can state is handled in the 
peak_usb driver and finally get an easy tesbed to create bus-off 
events... Now, the driver puts the candev into that state only once, no 
more periodic error-warnings or else. I'm looking now to how the restart 
mechanism works.

1st: since the restart can be automatic, the related do_set_mode 
callback is called from a timer context, in which you're not allowed to 
sleep. So I suppose this is the reason of some Kernel hangs you (Oliver) 
detected last week: the peak_usb driver (tries to) reset the device by 
sending an usb message, using usb_bulk_msg(), which usage is not allowed 
in such a context! To confirm, is someone able to do the same with the 
ems_usb driver, please? It seems that this driver acts as the peak_usb does.

Moreover, it seems that the "manual" restart is also called from such a 
timer context, so the consequences are the same...

I'll have to change the way that reset is done into full asynchronous mode.

Regards,

Stéphane

--
PEAK-System Technik GmbH, Otto-Roehm-Strasse 69, D-64293 Darmstadt 
Geschaeftsleitung: A.Gach/U.Wilhelm,St.Nr.:007/241/13586 FA Darmstadt 
HRB-9183 Darmstadt, Ust.IdNr.:DE 202220078, WEE-Reg.-Nr.: DE39305391 
Tel.+49 (0)6151-817320 / Fax:+49 (0)6151-817329, info@peak-system.com

  parent reply	other threads:[~2012-01-24 17:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1567213.2GCzMlGyKY@lisa>
2012-01-24 12:01 ` increase buffer size Oliver Hartkopp
2012-01-24 15:42   ` [Socketcan-users] " Steffen Rose
2012-01-24 16:17     ` Oliver Hartkopp
2012-01-24 17:12   ` Stephane Grosjean [this message]
2012-01-25 10:25     ` About PCAN-USB issues Wolfgang Grandegger
2012-01-31 17:58     ` Marc Kleine-Budde

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=4F1EE678.2050604@peak-system.com \
    --to=s.grosjean@peak-system.com \
    --cc=dev@sebastianhaas.info \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    --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).