public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: "Hen, Shmulik" <shmulik.hen@intel.com>
Cc: "'Olaf Titz'" <olaf@bigred.inka.de>,
	linux-kernel@vger.kernel.org,
	"'LNML'" <linux-net@vger.kernel.org>
Subject: Re: catch 22 - porting net driver from 2.2 to 2.4
Date: Sun, 12 Nov 2000 07:20:50 -0500	[thread overview]
Message-ID: <3A0E8B22.2A5CC132@mandrakesoft.com> (raw)
In-Reply-To: <07E6E3B8C072D211AC4100A0C9C5758302B2708D@hasmsx52.iil.intel.com>

"Hen, Shmulik" wrote:
> the thing is I need to prevent Tx/Rx when a topology change is initiated
> from the ioctl (registering a virtual adapter is just one example), so they
> all share a single lock and I must use spin_lock_bh from the ioctl.

I do not think that they all need to shared a single lock.  And we don't
have your code, but spin_lock_bh may be an incorrect choice too.

Note that when topology changes, that is an operation which might take
more than a few milliseconds.  Therefore, your solution should do
something OTHER than spinning on a lock, while topology is changing.

dev->open and dev->do_ioctl are called with rtnl_lock already held.  You
can sleep in them.  Use that to your advantage...

-- 
Jeff Garzik             |
Building 1024           | Would you like a Twinkie?
MandrakeSoft            |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-11-12 12:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-12 11:40 catch 22 - porting net driver from 2.2 to 2.4 Hen, Shmulik
2000-11-12 12:20 ` Jeff Garzik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-11-20 16:13 Hen, Shmulik
2000-11-13 17:09 Hen, Shmulik
2000-11-13  8:18 Hen, Shmulik
2000-11-12 11:48 Hen, Shmulik
2000-11-12 12:17 ` Jeff Garzik
2000-11-09 17:26 Hen, Shmulik
2000-11-09 17:37 ` Jeff Garzik
2000-11-10  0:09 ` Olaf Titz

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=3A0E8B22.2A5CC132@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=olaf@bigred.inka.de \
    --cc=shmulik.hen@intel.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