[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D161334.3090100@hartkopp.net>
Date: Sat, 25 Dec 2010 16:52:20 +0100
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Marc Kleine-Budde <mkl@...gutronix.de>
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 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 {
???
> + 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists