netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 9/9] can: pch_can: don't copy data to rx'ed RTR frames
Date: Sat, 25 Dec 2010 17:25:12 +0100	[thread overview]
Message-ID: <4D161AE8.1060905@pengutronix.de> (raw)
In-Reply-To: <4D161334.3090100-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>


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

On 12/25/2010 04:52 PM, Oliver Hartkopp wrote:
> On 25.12.2010 15:40, Marc Kleine-Budde wrote:
>> Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
>> Cc: Tomoya <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
>> ---
>>  drivers/net/can/pch_can.c |   15 ++++++++-------
>>  1 files changed, 8 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
>> index c42e972..ee488ac 100644
>> --- a/drivers/net/can/pch_can.c
>> +++ b/drivers/net/can/pch_can.c
>> @@ -692,16 +692,17 @@ static int pch_can_rx_normal(struct net_device *ndev, u32 obj_num, int quota)
>>  			cf->can_id = id;
>>  		}
>>  
>> -		if (id2 & PCH_ID2_DIR)
>> -			cf->can_id |= CAN_RTR_FLAG;
>> -
>>  		cf->can_dlc = get_can_dlc((ioread32(&priv->regs->
>>  						    ifregs[0].mcont)) & 0xF);
>>  
>> -		for (i = 0; i < cf->can_dlc; i += 2) {
>> -			data_reg = ioread16(&priv->regs->ifregs[0].data[i / 2]);
>> -			cf->data[i] = data_reg;
>> -			cf->data[i + 1] = data_reg >> 8;
>> +		if (id2 & PCH_ID2_DIR) {
>> +			cf->can_id |= CAN_RTR_FLAG;
>> +
> 
> } else {

doh! Should not write patches after big xmas lunch.
> 
> ???
> 
>> +			for (i = 0; i < cf->can_dlc; i += 2) {
>> +				data_reg = ioread16(&priv->regs->ifregs[0].data[i / 2]);
>> +				cf->data[i] = data_reg;
>> +				cf->data[i + 1] = data_reg >> 8;
>> +			}
>>  		}
>>  
>>  		netif_receive_skb(skb);
> 
> Regards,
> Oliver

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 #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:[~2010-12-25 16:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-25 14:40 [PATCH 0/9] can: don't copy data to rx'ed RTR frames Marc Kleine-Budde
2010-12-25 14:40 ` [PATCH 2/9] can: bfin_can: " Marc Kleine-Budde
2010-12-25 14:40 ` [PATCH 4/9] can: sja1000: " Marc Kleine-Budde
2010-12-25 14:40 ` [PATCH 5/9] can: mcp251x: " Marc Kleine-Budde
     [not found] ` <1293288034-22428-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-12-25 14:40   ` [PATCH 1/9] can: at91_can: " Marc Kleine-Budde
2010-12-25 14:40   ` [PATCH 3/9] can: flexcan: " Marc Kleine-Budde
2010-12-25 14:40   ` [PATCH 6/9] can: ti_hecc: " Marc Kleine-Budde
2010-12-25 14:40 ` [PATCH 7/9] can: janz-ican3: cleanup of ican3_to_can_frame and can_frame_to_ican3 Marc Kleine-Budde
     [not found]   ` <1293288034-22428-8-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-12-26  3:32     ` David Miller
2010-12-25 14:40 ` [PATCH 8/9] can: janz-ican3: don't copy data to rx'ed RTR frames Marc Kleine-Budde
2010-12-25 14:40 ` [PATCH 9/9] can: pch_can: " Marc Kleine-Budde
     [not found]   ` <1293288034-22428-10-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-12-25 15:52     ` Oliver Hartkopp
     [not found]       ` <4D161334.3090100-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
2010-12-25 16:25         ` 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=4D161AE8.1060905@pengutronix.de \
    --to=mkl-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
    --cc=socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@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).