All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Max S." <max@schneidersoft.net>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Usb to can driver
Date: Tue, 25 Jun 2013 23:59:18 +0000	[thread overview]
Message-ID: <1372204758.9593.13.camel@blackbox> (raw)

Some more questions regarding usb to can driver.

When CAN_CTRLMODE_LISTENONLY is set; why does the start_xmit function still get called?
Its not really a problem, I'm just wondering why when a socket is listen only, it still attempts to TX...

My firmware implements LOOPBACK by default. That is all frames sent by
the can hardware are also returned over usb. I use this effect to call
can_get_echo_skb() during bulk in. To support LOOPBACK mode as per
socketcan; should i also call netif_rx() durring bulk in if CAN_CTRLMODE_LOOPBACK is
set?

I am currently using:
struct __packed gs_host_frame {
	u32 echo_id;
	u32 can_id;

	u32 can_dlc;
	u32 channel;
	u32 flags;

	u8 data[8];
};
as the data format between host/device. Using u32 for
memory alignment as suggested. Is there any way I can reduce the amount
of wasted space? At 1Mhz std rtr frame is ~21K frames/s. For two
channels both ways that's 21x2x2=84k frames/s. At 28 bytes per frame
that's 84x28x8=18.816Mbit/s too much for a USB full-speed device. I
want to reduce gs_host_frame size and get closer to 12Mbit/s.

What is the purpose of enum can_mode and set mode? I see that allot of drivers more or less ignore it.
reacting to only START but not SLEEP or STOP...

Max Schnedier.


             reply	other threads:[~2013-06-25 23:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 23:59 Max S. [this message]
2013-06-26  7:10 ` Usb to can driver wg
2013-06-26 18:55   ` Max S.
2013-06-26 18:58     ` Marc Kleine-Budde
     [not found]       ` <1372810462.15632.2.camel@blackbox>
2013-07-03  7:55         ` Marc Kleine-Budde
  -- strict thread matches above, loose matches on Subject: below --
2013-04-23 17:15 Max S.
2013-04-23 21:47 ` Marc Kleine-Budde
2013-04-24 15:48   ` Max S.
2013-04-24 16:07     ` Marc Kleine-Budde
2013-04-24 17:40       ` Oliver Hartkopp
2013-04-24 21:24         ` Marc Kleine-Budde
2013-04-25 23:35           ` Max S.
2013-04-26  5:25             ` Oliver Hartkopp
2013-04-26  8:55               ` Kurt Van Dijck
2013-04-26  8:26             ` Marc Kleine-Budde
2013-04-24 21:33       ` Max S.
2013-05-02 11:07         ` Marc Kleine-Budde
2013-05-02 11:09           ` Marc Kleine-Budde
2013-05-02 11:30           ` Wolfgang Grandegger
2013-05-02 11:32             ` Marc Kleine-Budde
2013-05-16 11:40         ` Marc Kleine-Budde
2013-06-04 13:18           ` Max S.
2013-06-04 14:40             ` Wolfgang Grandegger
2013-06-04 14:41             ` Marc Kleine-Budde
2013-04-24  6:38 ` Sven Geggus

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=1372204758.9593.13.camel@blackbox \
    --to=max@schneidersoft.net \
    --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.