[lkml]   [2000]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: catch 22 - porting net driver from 2.2 to 2.4
"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
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:45    [W:0.026 / U:6.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site