netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net/can/mscan: add listen only mode
Date: Wed, 09 Nov 2011 16:52:38 +0100	[thread overview]
Message-ID: <4EBAA1C6.8080503@pengutronix.de> (raw)
In-Reply-To: <1320325243-24907-1-git-send-email-mkl@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]

On 11/03/2011 02:00 PM, Marc Kleine-Budde wrote:
> This patch adds listen only mode to the mscan controller.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

ping, any comments?

Marc
> ---
> 
> ...can be pulled via:
> 
> The following changes since commit 8b3408f8ee994973869d8ba32c5bf482bc4ddca4:
> 
>   dp83640: free packet queues on remove (2011-10-24 19:14:50 -0400)
> 
> are available in the git repository at:
>   git://git.pengutronix.de/git/mkl/linux-2.6.git can/mscan-listen-only-for-net-next
> 
> Marc Kleine-Budde (1):
>       net/can/mscan: add listen only mode
> 
>  drivers/net/can/mscan/mscan.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
> index ec4a311..74f3b18 100644
> --- a/drivers/net/can/mscan/mscan.c
> +++ b/drivers/net/can/mscan/mscan.c
> @@ -581,7 +581,10 @@ static int mscan_open(struct net_device *dev)
>  
>  	priv->open_time = jiffies;
>  
> -	clrbits8(&regs->canctl1, MSCAN_LISTEN);
> +	if (ctrlmode.flags & CAN_CTRLMODE_LISTENONLY)
> +		setbits8(&regs->canctl1, MSCAN_LISTEN);
> +	else
> +		clrbits8(&regs->canctl1, MSCAN_LISTEN);
>  
>  	ret = mscan_start(dev);
>  	if (ret)
> @@ -690,7 +693,8 @@ struct net_device *alloc_mscandev(void)
>  	priv->can.bittiming_const = &mscan_bittiming_const;
>  	priv->can.do_set_bittiming = mscan_do_set_bittiming;
>  	priv->can.do_set_mode = mscan_do_set_mode;
> -	priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES;
> +	priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES |
> +		CAN_CTRLMODE_LISTENONLY;
>  
>  	for (i = 0; i < TX_QUEUE_SIZE; i++) {
>  		priv->tx_queue[i].id = i;


-- 
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: 262 bytes --]

  reply	other threads:[~2011-11-09 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 13:00 [PATCH] net/can/mscan: add listen only mode Marc Kleine-Budde
2011-11-09 15:52 ` Marc Kleine-Budde [this message]
2011-11-09 16:01   ` Wolfgang Grandegger
  -- strict thread matches above, loose matches on Subject: below --
2011-11-09 20:50 Marc Kleine-Budde
2011-11-14  5:51 ` David Miller

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=4EBAA1C6.8080503@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@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 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).