From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Yoann DI RUZZA <ydiruzza@gmail.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: Driver for CAN in at91
Date: Tue, 11 Feb 2014 09:53:56 +0100 [thread overview]
Message-ID: <52F9E524.9050403@pengutronix.de> (raw)
In-Reply-To: <CACwGGR+nqwjL6M08SYMQDwWM=Eib6Y0OcZDQ7mxZdenGk1x3qg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]
On 02/11/2014 09:46 AM, Yoann DI RUZZA wrote:
> > diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
> > index 1cf6104..d4c3213 100644
> > --- a/drivers/net/can/at91_can.c
> > +++ b/drivers/net/can/at91_can.c
> > @@ -422,7 +422,11 @@ static void at91_chip_start(struct net_device
> *dev)
> > at91_transceiver_switch(priv, 1);
> >
> > /* enable chip */
> > - at91_write(priv, AT91_MR, AT91_MR_CANEN);
> > + if(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
> > + reg_mr = reg_mr | AT91_MR_CANEN | AT91_MR_ABM;
> > + else
> > + reg_mr = reg_mr | AT91_MR_CANEN;
>
> The documentation says it's "autobaud/liste mode". Is this another name
> for listen only?
>
> Yes, in this mode you can make autobauding because you don't have bus
> error even if you don't have the right baudrate.
> LISTEN_ONLY is the word used on the other net can driver (mcp251x for
> example).
Thanks for clarifying this.
>
> Your patch does change what's written to the CAN core, the original code
> writes only AT91_MR_CANEN, you preserve the original contents. Who will
> clear AT91_MR_ABM if you switch from listen only to normal mode?
>
>
> I modify the patch to correct this.
> thanks
Thanks for the patch, please send it via "git send-email" next time, as
you mailer has converted tabs into spaces. I've applied the patch manually.
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: 242 bytes --]
prev parent reply other threads:[~2014-02-11 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACwGGRJ2WX2fJJVfvwAk27mp2JhRfLMT8ZeNwfw0w1kPPCAvoA@mail.gmail.com>
2014-02-06 14:29 ` Driver for CAN in at91 Marc Kleine-Budde
[not found] ` <CACwGGR+nqwjL6M08SYMQDwWM=Eib6Y0OcZDQ7mxZdenGk1x3qg@mail.gmail.com>
2014-02-11 8:53 ` Marc Kleine-Budde [this message]
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=52F9E524.9050403@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=ydiruzza@gmail.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 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.