An error occurred fetching the project authors.
  1. 11 Sep, 2002 1 commit
  2. 26 Aug, 2002 1 commit
    • Patrick Mochel's avatar
      Introduce struct device_interface. · 59d6f107
      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.
      59d6f107
  3. 14 Aug, 2002 3 commits
  4. 13 Aug, 2002 3 commits
    • Patrick Mochel's avatar
      Remove do_driver_detach(), since device_detach does the same thing · 4446b906
      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)
      4446b906
    • Patrick Mochel's avatar
      Update device model locking · 789e39b0
      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.
      789e39b0
    • Patrick Mochel's avatar
      Fix and prevent bugs in device_register() · 266c24ad
      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.
      266c24ad
  5. 12 Aug, 2002 1 commit
    • Patrick Mochel's avatar
      Update device model locking · d8b2993c
      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..
      d8b2993c
  6. 06 Jun, 2002 2 commits
  7. 05 Jun, 2002 2 commits
    • Patrick Mochel's avatar
      Attempt to better locking in device model core: · b1d0e423
      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
      b1d0e423
    • Patrick Mochel's avatar
      device model update · 4b0e0af3
      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
      4b0e0af3
  8. 03 Jun, 2002 1 commit
  9. 30 May, 2002 2 commits
  10. 29 May, 2002 1 commit
    • Patrick Mochel's avatar
      Device Model: Implement centralized device/driver binding · 403892ab
      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)
      403892ab
  11. 28 May, 2002 1 commit
  12. 24 May, 2002 1 commit
    • Patrick Mochel's avatar
      Device Model: do better cleanup on device removal · 3747eb84
      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
      3747eb84
  13. 28 Apr, 2002 1 commit
  14. 26 Mar, 2002 1 commit
  15. 16 Mar, 2002 1 commit
  16. 15 Mar, 2002 2 commits
    • Linus Torvalds's avatar
      Fix up ACPI device breakage. · 1c4eba7f
      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.
      1c4eba7f
    • Andy Grover's avatar
      [PATCH] ACPI patch 9/9 · b4f305dd
      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.
      b4f305dd
  17. 09 Feb, 2002 1 commit
  18. 08 Feb, 2002 1 commit
  19. 05 Feb, 2002 5 commits
    • Patrick Mochel's avatar
      [PATCH] driver model updates (5/5) · 32d57b6c
      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.
      32d57b6c
    • Patrick Mochel's avatar
      [PATCH] driver model updates (1/5) · e03a933d
      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().
      e03a933d
    • David S. Miller's avatar
      [PATCH] malloc.h references · 37e66d92
      David S. Miller authored
      linux/malloc.h --> linux/slab.h
      37e66d92
    • Linus Torvalds's avatar
      v2.5.2.6 -> v2.5.3 · 1ea864f1
      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..)
      1ea864f1
    • Linus Torvalds's avatar
      v2.5.2.5 -> v2.5.2.6 · 2f886464
      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
      2f886464