[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D161AE8.1060905@pengutronix.de>
Date: Sat, 25 Dec 2010 17:25:12 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Oliver Hartkopp <socketcan@...tkopp.net>
CC: netdev@...r.kernel.org, socketcan-core@...ts.berlios.de
Subject: Re: [PATCH 9/9] can: pch_can: don't copy data to rx'ed RTR frames
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@...gutronix.de>
>> Cc: Tomoya <tomoya-linux@....okisemi.com>
>> ---
>> 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 |
Download attachment "signature.asc" of type "application/pgp-signature" (263 bytes)
Powered by blists - more mailing lists