- 16 Oct, 2002 36 commits
-
-
Patrick Mochel authored
This is similar to struct bus_type's rwsem, though classes aren't doing anything nearly as fancy with it. We just make sure to take it when ever we add or remove any devices or drivers.
-
Patrick Mochel authored
when removing system and platform devices.
-
Patrick Mochel authored
- move list walking and matching to bus.c (since it's a function of the bus driver) - do specialized walks of the bus's lists when binding; no more callbacks being passed to bus_for_each_*. - take rwsem when adding and removing both devices and drivers. lists of each are now fully protected by that rwsem. It's also taken before we walk each list. - move calls of device_{de,at}tach() to bus_{add,remove}_device() and calls of driver_{de,at}tach() to bus_{add,remove}_driver().
-
Patrick Mochel authored
There is a chance devclass_add_device() could get passed a device with no driver, so we need to check that.
-
Patrick Mochel authored
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core
-
Patrick Mochel authored
Synchronize all walks of the device and driver lists of a bus with an rwsem wrapped around the entire iterator, instead of using device_lock and dropping it after we grabbed each node. Note this also prevents deadlock when walking the list of drivers and calling get_driver(), since get_driver() tries to take device_lock while we already have it held.
-
http://linux-isdn.bkbits.net/linux-2.5.isdnLinus Torvalds authored
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
-
Kai Germaschewski authored
into tp1.ruhr-uni-bochum.de:/home/kai/src/kernel/v2.5/linux-2.5.make
-
Kai Germaschewski authored
into tp1.ruhr-uni-bochum.de:/home/kai/src/kernel/v2.5/linux-2.5.isdn
-
Kai Germaschewski authored
plus other small cleanups, in particular getting rid of isdn_ppp_{receive,send}_ccp() and calling into the CCP code directly.
-
Kai Germaschewski authored
No (well, hardly any ;) code changes, only moving all /dev/ipppX related code next to each other and some indenting changes.
-
Kai Germaschewski authored
o Now that all the infrastructure is in place, struct ipppd can easily be allocated when /dev/ipppX is opened and freed in the destructor. o Separate the mix of state and flags in struct ipppd::state. We only have three states, open, assigned and connected, and additionally two flags to jump out of poll(), returning POLLHUP / POLLIN.
-
Kai Germaschewski authored
Instead of just recording the slot number and then retrieving the ipppd via that, we can now just keep a pointer and get a reference which makes sure that it does not go away until we drop the reference.
-
Kai Germaschewski authored
We had introduced ipppd_get/put() earlier, so now add a real reference count.
-
Kai Germaschewski authored
Basically, all what was missing was a common way to xmit frames given the isdn_net_dev / isdn_net_local. We have this now by means of function pointers (still room for improvement there, though), so now let's do things from isdn_ppp_ccp.c.
-
Kai Germaschewski authored
Let isdn_ppp_ccp.c take care of keeping state / flags by itself.
-
Kai Germaschewski authored
Use a shared function for generating the PPP header, use the {put,get}_u{8,16,32} helpers for endian-safe access.
-
Kai Germaschewski authored
I cannot see now reason why ISDN PPP devices should have a fake ::header routine which reserves a couple of bytes just to reclaim them later during hard_start_xmit(), and since it works just as well without it...
-
Kai Germaschewski authored
Fix missed STAT_BSENT acks and don't use skb_clone() for the skb which is sent back, the network layer gets confused by that.
-
Kai Germaschewski authored
-
Kai Germaschewski authored
Create the new files isdn_ppp_ccp.[hc] which deal with PPP CCP (compression control protocol) related stuff. Move most of the CCP related stuff from isdn_ppp.c into isdn_ppp_ccp.c, putting CCP state into a new "struct ippp_ccp".
-
Kai Germaschewski authored
A lot of the state in struct ipppd actually belongs to isdn_net_dev or isdn_net_local, making it more easily accessible at a most places, and also removing the ambiguity whether it's link- or bundle-specific.
-
Kai Germaschewski authored
and move the declaration from include/linux/isdn_ppp.h into drivers/isdn/i4l/isdn_ppp.c
-
Kai Germaschewski authored
Make sync PPP compile with the latest changes to the ISDN net device layer - PPP negotiations work again after this patch.
-
Kai Germaschewski authored
Definitions which is only needed in one source file should go there and not in a common header.
-
Kai Germaschewski authored
Last step in separating generic / interface-type specific code, the former is now all in isdn_net_lib.c, the specific code in isdn_net.c / isdn_ppp.c / isdn_concap.c
-
Kai Germaschewski authored
Instead of using locking per-channel, just lock the entire ISDN net work interface as an entity, getting rid of weird locking. Basically, ::hard_start_xmit() is already serialized by the network core, so we could just rely on that. However, we want to send keep alive frames, PPP messages from ipppd and such things directly without going through the network stack, so we additionally lock isdn_net_local->xmit_lock in hard_start_xmit(), which is taken in the other paths dealing with transmitting frames as well.
-
Kai Germaschewski authored
into tp1.ruhr-uni-bochum.de:/home/kai/src/kernel/v2.5/linux-2.5.make
-
Patrick Mochel authored
device classes join the club of devices, buses, and drivers. They get a ->present flag, which is set on registration and cleared on unregistration. They also get get_devclass() and put_devclass(), which, you guessed it, bump the reference count. get_...() of course checks the present flag and returns NULL if clear.
-
Patrick Mochel authored
In the spirit of devices and buses, change driver refcounting model to match the way that devices and buses are done. struct device_driver gets a ->present field, which is set on registration and cleared in driver_unregister(). get_device() checks the state of this flag and returns NULL if cleared. Note that the horribly wrong remove_driver() is deprecated and simply BUG()s when called. Please convert callers to use driver_unregister(). Updates to callers will be coming soon. Note also that this still doesn't fix the race in which a driver module can be removed while the refcount on a driver > 1. Near future work should help to remedy it, but no solutions are guaranteed..
-
Patrick Mochel authored
Based on recent changes to device refcounting/unregistration. struct bus_type gets a ->present field, which is set when the bus is registered. bus_unregister() is added, which only clears ->present and calls put_bus(). get_bus() checks the ->present and returns NULL if clear. This allows all current references to buses to keep valid structures, while preventing any new references to the bus structure.
-
Patrick Mochel authored
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core
-
Patrick Mochel authored
-
Patrick Mochel authored
There are races WRT walking the lists of the buses and classes and the device being unregistered while it's the current node we're accessing. If the node was deleted, ->next would point to itself, and we'd sit in an inifinite loop (until that memory was freed from underneath us and we Oops'd). This changes device_unregister() to only mark the device as not present. put_device() deletes the device from all the lists it belongs to, while holding device_lock, then drops it to call device_del(). This should guarantee that everything in the device is valid until the last reference goes away, regardless of whether it's still physically present or not.
-
Matthew Wilcox authored
If you compile the kernel with -ffunction-sections, each function gets put in a section .text.function_name. This collides with our current use of .text.init. So here's a patch which converts x86 to use .init.text instead. I've tested it on x86 and it still frees 120k of ram, so it seems to work. Other architectures will need to change their vmlinux.lds appropriately, and may need other changes (arm, m68k seem to use .text.init verbatim).
-
http://ppc.bkbits.net/for-linus-ppc64Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
- 17 Oct, 2002 3 commits
-
-
Anton Blanchard authored
-
bk://linux.bkbits.net/linux-2.5Anton Blanchard authored
into samba.org:/scratch/anton/linux-2.5_ppc64_work
-
Anton Blanchard authored
into samba.org:/scratch/anton/linux-2.5_ppc64_work
-
- 16 Oct, 2002 1 commit
-
-
Neil Brown authored
[PATCH] md - 1 of 1 - Register mergeable function for linear so requests don't cross device boundries We abstract out "which_dev" which finds which device a sector is on and us it to make sure both ends of a to-be-merged request will be on the same device.
-