From: Jeff Garzik <jgarzik@pobox.com>
To: Raghavendra Koushik <raghavendra.koushik@s2io.com>
Cc: ravinandan.arakali@s2io.com,
"'Francois Romieu'" <romieu@fr.zoreil.com>,
netdev@oss.sgi.com, leonid.grossman@s2io.com,
rapuru.sriram@s2io.com
Subject: Re: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes
Date: Fri, 15 Oct 2004 14:52:17 -0400 [thread overview]
Message-ID: <41701C61.2090109@pobox.com> (raw)
In-Reply-To: <200410141735.i9EHZJ39006121@guinness.s2io.com>
Raghavendra Koushik wrote:
> As I said the s2io_close can be called from stack or by the reset task. If
> called from the task (or work) is it still Ok to flush all scheduled works?
[...]
> I believe the best way to restart the NIC is to call s2io_close and
> s2io_open sequentially.
Look at other drivers, e.g. drivers/net/tulip/tulip_core.c. You will
see two levels of functions:
tulip_open() -- net stack dev->open() hook
tulip_close() -- net stack dev->stop() hook
tulip_up() -- reset-and-start-hardware helper function
tulip_down() -- stop-hardware helper function
If S2IO follows this model, all good.
If you have both the net stack and your own code directly calling the
net stack dev->stop() hook, that will lead to problems. If you are
doing this, you must _precisely duplicate_ the code in dev_close() in
order to avoid races; but even then, you are really interfering with the
code that synchronizes and manages reference-counted objects (struct
net_device), which is unwise.
Jeff
next prev parent reply other threads:[~2004-10-15 18:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-14 1:13 [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes Ravinandan Arakali
2004-10-14 14:44 ` Jeff Garzik
2004-10-14 17:35 ` Raghavendra Koushik
2004-10-15 18:52 ` Jeff Garzik [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-10-07 1:24 Ravinandan Arakali
2004-10-07 1:23 Ravinandan Arakali
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=41701C61.2090109@pobox.com \
--to=jgarzik@pobox.com \
--cc=leonid.grossman@s2io.com \
--cc=netdev@oss.sgi.com \
--cc=raghavendra.koushik@s2io.com \
--cc=rapuru.sriram@s2io.com \
--cc=ravinandan.arakali@s2io.com \
--cc=romieu@fr.zoreil.com \
/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).