netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org,
	Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Christian Pellegrin <chripell-VaTbYqLCNhc@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	Masayuki Ohtake
	<masa-korg-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH net-next-2.6 v3] can: Topcliff: PCH_CAN driver: Add Flow control,
Date: Fri, 19 Nov 2010 10:20:39 +0100	[thread overview]
Message-ID: <4CE64167.2030405@pengutronix.de> (raw)
In-Reply-To: <007401cb87b1$a773b3d0$66f8800a-a06+6cuVnkTSQfdrb5gaxUEOCMrvLtNR@public.gmane.org>


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

On 11/19/2010 07:18 AM, Tomoya MORINAGA wrote:
> On Tuesday, November 16, 2010 9:22 PM, Marc Kleine-Budde wrote :
> 
> Except the following, I have updated/resubmitted already .
> 
>>>  static int pch_can_rx_poll(struct napi_struct *napi, int quota)
>>>  {
>>>   struct net_device *ndev = napi->dev;
>>>   struct pch_can_priv *priv = netdev_priv(ndev);
>>> - struct net_device_stats *stats = &(priv->ndev->stats);
>>> - u32 dlc;
>>>   u32 int_stat;
>>>   int rcv_pkts = 0;
>                     ^^^^
>> can be removed...if you remove the += below
> Since there is "goto" code, "=0" is better.

The compiler would complain, if there's an unused variable.

>>> - spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
>>> + pch_can_rw_msg_obj(&priv->regs->ifregs[1].creq, tx_obj_no);
>> Still we have the busy waiting in the TX path. Maybe you can move the
>> waiting before accessing the if[1] and remove the busy waiting here.
> I can't understand your saying.
> For transmitting data, calling pch_can_rw_msg_obj is mandatory.

Yes, but the busy wait is not needed. It should be enough to do the
busy-waiting _before_ accessing the if[1].

cheers, 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-11-19  9:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4CE2434B.5050701@dsn.okisemi.com>
2010-11-16 11:04 ` [PATCH net-next-2.6 v3] can: Topcliff: PCH_CAN driver: Add Flow control, Wolfgang Grandegger
     [not found] ` <4CE2434B.5050701-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
2010-11-16 12:22   ` Marc Kleine-Budde
2010-11-19  6:18     ` Tomoya MORINAGA
     [not found]       ` <007401cb87b1$a773b3d0$66f8800a-a06+6cuVnkTSQfdrb5gaxUEOCMrvLtNR@public.gmane.org>
2010-11-19  9:20         ` Marc Kleine-Budde [this message]
2010-11-22  5:05           ` Tomoya MORINAGA
     [not found]             ` <003201cb8a02$f05b15e0$66f8800a-a06+6cuVnkTSQfdrb5gaxUEOCMrvLtNR@public.gmane.org>
2010-11-22  8:27               ` Marc Kleine-Budde
2010-11-24  0:09                 ` Tomoya MORINAGA
     [not found]                   ` <000b01cb8b6b$d7542a90$66f8800a-a06+6cuVnkTSQfdrb5gaxUEOCMrvLtNR@public.gmane.org>
2010-11-24 12:34                     ` Marc Kleine-Budde
2010-11-25 12:03                       ` Tomoya MORINAGA
     [not found]                         ` <001b01cb8c98$d06aaa00$66f8800a-a06+6cuVnkTSQfdrb5gaxUEOCMrvLtNR@public.gmane.org>
2010-11-25 12:08                           ` Marc Kleine-Budde
2010-11-25 12:34                             ` Tomoya MORINAGA
     [not found]                               ` <002f01cb8c9d$103f7760$66f8800a-a06+6cuVnkTSQfdrb5gaxUEOCMrvLtNR@public.gmane.org>
2010-11-25 12:40                                 ` Marc Kleine-Budde
2010-11-16  8:39 Tomoya MORINAGA

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=4CE64167.2030405@pengutronix.de \
    --to=mkl-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=chripell-VaTbYqLCNhc@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=joel.clark-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=margie.foster-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=masa-korg-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=qi.wang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
    --cc=tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org \
    --cc=wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org \
    --cc=yong.y.wang-ral2JQCrhuEAvxtiuMwx3w@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).