netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
Subject: Re: RFC: [PATCH] can: c_can: disable one shot mode until driver is fixed
Date: Thu, 24 Mar 2011 11:44:46 +0100	[thread overview]
Message-ID: <4D8B209E.5010907@pengutronix.de> (raw)
In-Reply-To: <20110324102852.GA339-MxZ6Iy/zr/UdbCeoMzGj59i2O/JbrIOy@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1823 bytes --]

On 03/24/2011 11:28 AM, Kurt Van Dijck wrote:
> On Thu, Mar 24, 2011 at 11:12:29AM +0100, Marc Kleine-Budde wrote:
>> This patch disables the one shot mode, until the driver has been fixed and
>> tested to support it.
>>
> isn't this part necessary now (temporarily) to avoid dead code?

It's not necessary, the driver should still work. But it's dead code. If
someone fixes the driver she/he can easily revert the patch.

Can I fold your patch and add your S-o-b?

Marc
> 
> diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
> index 1405078..2c3d090 100644
> --- a/drivers/net/can/c_can/c_can.c
> +++ b/drivers/net/can/c_can/c_can.c
> @@ -588,14 +588,9 @@ static void c_can_chip_config(struct net_device *dev)
>  {
>  	struct c_can_priv *priv = netdev_priv(dev);
>  
> -	if (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT)
> -		/* disable automatic retransmission */
> -		priv->write_reg(priv, &priv->regs->control,
> -				CONTROL_DISABLE_AR);
> -	else
> -		/* enable automatic retransmission */
> -		priv->write_reg(priv, &priv->regs->control,
> -				CONTROL_ENABLE_AR);
> +	/* enable automatic retransmission */
> +	priv->write_reg(priv, &priv->regs->control,
> +			CONTROL_ENABLE_AR);
>  
>  	if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY &
>  					CAN_CTRLMODE_LOOPBACK)) {
> 
> _______________________________________________
> Socketcan-core mailing list
> Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
> https://lists.berlios.de/mailman/listinfo/socketcan-core


-- 
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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 188 bytes --]

_______________________________________________
Socketcan-core mailing list
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-core

  parent reply	other threads:[~2011-03-24 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24 10:12 RFC: [PATCH] can: c_can: disable one shot mode until driver is fixed Marc Kleine-Budde
     [not found] ` <1300961549-28882-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-03-24 10:28   ` Kurt Van Dijck
     [not found]     ` <20110324102852.GA339-MxZ6Iy/zr/UdbCeoMzGj59i2O/JbrIOy@public.gmane.org>
2011-03-24 10:44       ` Marc Kleine-Budde [this message]
     [not found]         ` <4D8B209E.5010907-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-03-24 10:52           ` Kurt Van Dijck

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=4D8B209E.5010907@pengutronix.de \
    --to=mkl-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).