From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
linux1394-devel <linux1394-devel@lists.sourceforge.net>
Subject: Re: [Q] How to invalidate ARP cache for a network device from within kernel
Date: Sat, 27 Nov 2010 09:33:42 +0100 [thread overview]
Message-ID: <20101127093342.3f1d01ce@stein> (raw)
In-Reply-To: <1290821143.4145.3.camel@maxim-laptop>
On Nov 27 Maxim Levitsky wrote:
> Subject: [PATCH 1/3] firewire: net: restart ISO channel on bus resets
>
> ---
> drivers/firewire/net.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
> index 1a467a9..007969c 100644
> --- a/drivers/firewire/net.c
> +++ b/drivers/firewire/net.c
> @@ -1593,10 +1593,15 @@ static void fwnet_update(struct fw_unit *unit)
> {
> struct fw_device *device = fw_parent_device(unit);
> struct fwnet_peer *peer = dev_get_drvdata(&unit->device);
> + struct fwnet_device *dev = peer->dev;
> int generation;
>
> generation = device->generation;
>
> + fw_iso_context_stop(dev->broadcast_rcv_context);
> + fw_iso_context_start(dev->broadcast_rcv_context, -1, 0,
> + FW_ISO_CONTEXT_MATCH_ALL_TAGS);
> +
> spin_lock_irq(&peer->dev->lock);
> peer->node_id = device->node_id;
> peer->generation = generation;
Could you add a changelog?
And it can be optimized to do only once per bus generation. E.g. add a
generation field for the IR context in fwnet_device. Or do it only if
fw_unit is that of the local node.
OTOH, is this actually necessary on normal bus resets? It should only
be necessary after PM resume, right? If so, perhaps do it only if the
generation increased by more than one.
Also, wouldn't a fw_iso_context_start alone, without prior stop,
suffice?
--
Stefan Richter
-=====-==-=- =-== ==-==
http://arcgraph.de/sr/
next prev parent reply other threads:[~2010-11-27 8:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-26 17:38 [Q] How to invalidate ARP cache for a network device from within kernel Maxim Levitsky
2010-11-27 1:18 ` Stefan Richter
2010-11-27 1:25 ` Maxim Levitsky
2010-11-27 8:33 ` Stefan Richter [this message]
2010-11-27 15:19 ` Stefan Richter
2010-11-27 15:44 ` Maxim Levitsky
2010-11-27 14:13 ` Stefan Richter
2010-11-27 14:33 ` Maxim Levitsky
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=20101127093342.3f1d01ce@stein \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=maximlevitsky@gmail.com \
--cc=netdev@vger.kernel.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).