From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "Max S." <max@schneidersoft.net>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: Usb to can driver
Date: Wed, 03 Jul 2013 09:55:55 +0200 [thread overview]
Message-ID: <51D3D90B.2060809@pengutronix.de> (raw)
In-Reply-To: <1372810462.15632.2.camel@blackbox>
[-- Attachment #1: Type: text/plain, Size: 1693 bytes --]
On 07/03/2013 02:14 AM, Max S. wrote:
>> > Can you send a patch? :)
>> >
> sure. attached.
Thanks. Please the mailinglist for all linux can related patches.
> However, since i don't have the hardware; I can't test this.
Me neither, but the patch looks good.
> From f6f2ec1b1c2fa4f2d29fb48e8a315ff814ed2be9 Mon Sep 17 00:00:00 2001
> From: Maximilian Schneider <max@schneidersoft.net>
> Date: Tue, 2 Jul 2013 23:43:29 +0000
> Subject: [PATCH] use of raw input in net lookup
>
>
> Signed-off-by: Maximilian Schneider <max@schneidersoft.net>
> ---
> drivers/net/can/usb/esd_usb2.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
> index 6aa7b32..ee89b19 100644
> --- a/drivers/net/can/usb/esd_usb2.c
> +++ b/drivers/net/can/usb/esd_usb2.c
> @@ -412,10 +412,16 @@ static void esd_usb2_read_bulk_callback(struct urb *urb)
>
> switch (msg->msg.hdr.cmd) {
> case CMD_CAN_RX:
> + if (msg->msg.rx.net >= dev->net_count)
I've added an error message here.
> + break;
> +
> esd_usb2_rx_can_msg(dev->nets[msg->msg.rx.net], msg);
> break;
>
> case CMD_CAN_TX:
> + if (msg->msg.txdone.net >= dev->net_count)
and here, too.
> + break;
> +
> esd_usb2_tx_done_msg(dev->nets[msg->msg.txdone.net],
> msg);
> break;
> -- 1.7.10.4
>
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: 259 bytes --]
next prev parent reply other threads:[~2013-07-03 7:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 23:59 Usb to can driver Max S.
2013-06-26 7:10 ` 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 [this message]
-- 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=51D3D90B.2060809@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=max@schneidersoft.net \
/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.