An error occurred fetching the project authors.
- 11 Sep, 2002 1 commit
-
-
Patrick Mochel authored
This fixes an Oops in the USB code that was using ->driver, both for checking what driver to use and calling into it. From Greg KH.
-
- 26 Aug, 2002 1 commit
-
-
Patrick Mochel authored
Device interfaces are the logical interfaces of device classes that correlate directly to userspace interfaces, like device nodes. Device interfaces are registered with the class they belong to. As devices are added to the class, they are added to each interface registered with the class. The interface is responsible for determining whether the device supports the interface or not. The interface is responsible for allocating and initializing a struct intf_data and calling interface_add_data() to add it to the device's list of interfaces it belongs to. This list will be iterated over when the device is removed from the class (instead of all possible interfaces for a class). This structure should probably be embedded in whatever per-device data structure the interface is allocating anyway. Devices are enumerated within the interface. This happens in interface_add_data() and the enumerated value is stored in the struct intf_data for that device. Interfaces get a directory in driverfs under their class's directory. Each time a device is added to the interface, a symlink is created in that directory that points to the device's directory in the physical hierarchy. The name of this symlink is the interface-enumerated value of the device.
-
- 14 Aug, 2002 3 commits
-
-
Patrick Mochel authored
-
Patrick Mochel authored
The device_root device was only a placeholder device that provided a head for the global device list, and a parent directory for root bridge devices. This removes the device and replaces with an explicit global_device_list and a separate root directory. We never used any of the other fields in device_root, and we special cased it. So, it's better off dead.
-
Patrick Mochel authored
-
- 13 Aug, 2002 3 commits
-
-
Patrick Mochel authored
Make sure we delete devices from the driver list the iteration after we detach them (so we can get a valid next pointer)
-
Patrick Mochel authored
Change all iterators of devices to: - use list_for_each - check return of get_device_locked - don't break until we hold the lock if we get an error When a device's reference count hits 0, remove it from all lists, including bus and driver lists. Between the iterator algorithm and the guaranteed removal from the lists, there should never be a device in a list with a reference count of 0. So, whenever we're iterating over the lists, we'll always have a valid device. We don't decrement the refcount until the next iteration of the loop, so we're also guaranteed to get the correct next item in the list.
-
Patrick Mochel authored
When adding to the global device list, we were adding devices just after their parent, while we wanted to add them just before. That way when we iterate over the list on suspend and shutdown, we'll hit all children before the parents. Make sure dev->driver_list and dev->bus_list are initialized when the device is registered Remove device from global and parent's list if registration failed.
-
- 12 Aug, 2002 1 commit
-
-
Patrick Mochel authored
This updates the device model locking to use device_lock when accessing all lists (the global list, the bus' lists and the drivers' lists). Before the latter two would use their own rwlocks. This also updates get_device() to return a pointer to the struct device if it can successfully increment the reference count. Between these two changes, this should prevent anything gaining an invalid reference to a device that is in the process of being removed: If a device is being removed, it's reference count is 0, but it hasn't necessarily hasn't been removed from its bus's list. If the bus list iterator attempts to access the device, it will take the lock, but will continue on to the next device because the refcount is 0 (and drop the lock). Well, theoretically; the bus iterators still need to be changed, but that's coming next..
-
- 06 Jun, 2002 2 commits
-
-
Patrick Mochel authored
device detach locking, one more time: get driver and reset it in struct device before calling remove()
-
Patrick Mochel authored
-
- 05 Jun, 2002 2 commits
-
-
Patrick Mochel authored
- remove device from driver's list on device_detach - set device's driver to NULL - decrement reference count on driver on device_detach - remove devices from driver's list in driver_detach - use a write_lock instead of read_lock - don't lock around initialization of device fields - assume we have a bus in __remove_driver (we enforce this in driver_register) - do put_bus last in __remove_driver - lock bus around atomic_set in remove_driver and atomic_dec_and_test in put_driver - remove from bus's list while we have it locked
-
Patrick Mochel authored
s/{driver,device}_bind/{driver,device}_attach/ and s/{driver,device}_unbind/{driver,device}_detach/ call bus's match callback instead of bind callback
-
- 03 Jun, 2002 1 commit
-
-
Patrick Mochel authored
driver_unbind was called when drv->refcount == 0. It would call driver_for_each_dev to do the unbinding The first thing that would do was get_device, which... BUG()'d if drv->refcount == 0. Duh.
-
- 30 May, 2002 2 commits
-
-
Patrick Mochel authored
device model: Use driver_for_each_dev to unbind drivers from its devices (now that it's implemented)
-
Patrick Mochel authored
-
- 29 May, 2002 1 commit
-
-
Patrick Mochel authored
- on device registration, all drivers of bus are iterated over - bus's bind callback is called to match device to driver - if successful, driver's probe callback is called - on device removal, driver's remove callback is called - on driver registration, list of devices is iterated over (and same thing happens)
-
- 28 May, 2002 1 commit
-
-
Patrick Mochel authored
-
- 24 May, 2002 1 commit
-
-
Patrick Mochel authored
- make sure driverfs directory is removed after driver is detached and platform is notified (since they might have added files to it) - Add release callback to struct device that is to be set by whoever allocated the device (e.g. the bus). This is the last thing called from put_device, so the owner of it can free the memory for the structure
-
- 28 Apr, 2002 1 commit
-
-
Dave Jones authored
Uses the error codes, but doesn't include err.h
-
- 26 Mar, 2002 1 commit
-
-
Patrick Mochel authored
Create global list in which all devices are inserted. Done by Kai Germaschewski.
-
- 16 Mar, 2002 1 commit
-
-
Linus Torvalds authored
make driverfs initialize early, so that ACPI can come alive in a world where you can register devices.
-
- 15 Mar, 2002 2 commits
-
-
Linus Torvalds authored
For some reason the ACPI people continue to make the mistake of thinking that they are the root of the system. Disabuse them of that notion.
-
Andy Grover authored
If you could only review one of the 9 patches, this would be the one. - removes acpitable.c vestiges - adds ACPI IRQ routing support to PCI (disableable via pci=noacpi option) - adds code to get a <1MB page for sleep, and ACPI boot to setup.c - allocates another page in the fixmap for ACPI - changes driverfs a little to work better with ACPI.
-
- 09 Feb, 2002 1 commit
-
-
Dave Jones authored
Big bits first, I'll redo the smaller bits tomorrow after some sleep. Same as last time, rediffed against pre5
-
- 08 Feb, 2002 1 commit
-
-
Patrick Mochel authored
-
- 05 Feb, 2002 5 commits
-
-
Patrick Mochel authored
Remove struct iobus. There is a lot of duplication between struct device and struct iobus, both in their members and the code in their interfaces. Waxing struct iobus removes this duplication and makes things a bit simpler.
-
Patrick Mochel authored
Patch 1: Make device_driver_init() an initcall. It declares it as subsys_initcall and removes the explicit call from init/main.c::do_basic_setup().
-
David S. Miller authored
linux/malloc.h --> linux/slab.h
-
Linus Torvalds authored
- Doug Ledford: i810 audio driver update - Evgeniy Polyakov: update various SCSI drivers to new locking - David Howells: syscall latency improvement, try 2 - Francois Romieu: dscc4 driver update - Patrick Mochel: driver model fixes - Andrew Morton: clean up a few details in ext3 inode initialization - Pete Wyckoff: make x86 machine check print out right address.. - Hans Reiser: reiserfs update - Richard Gooch: devfs update - Greg KH: USB updates - Dave Jones: PNPBIOS - Nathan Scott: extended attributes - Corey Minyard: clean up zlib duplication (triplication..)
-
Linus Torvalds authored
- Asit Mallick: mtrr update - Patrick Mochel: split up kernel/device.c into drivers/base - Mikael Pettersson/Al Viro: fix missing in-core inode initialization in ext2 introduced by Al's inode trimming - David Miller: sparc and network updates - Frank Davis: firewire video mmap page remapping fix - me: fix configure help scripts to fix breakage noticed by Dave Jones - Greg KH: USB updates - Kai Germaschewski: ISDN fixes, Config.help entries - Douglas Gilbert: SCSI doc update - Ingo Molnar: x86 taskswitch optimizations, scheduler updates - Mikael Pettersson: make APIC work on old external setups - Al Viro: more inode trimming
-