1. 28 4月, 2007 3 次提交
    • O
      usbfs micro optimitation · 527660a8
      Oliver Neukum 提交于
      the memory barrier is needed only with smp.
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      527660a8
    • K
      USB: make usbdevices export their device nodes instead of using a separate class · 9f8b17e6
      Kay Sievers 提交于
      o The "real" usb-devices export now a device node which can
        populate /dev/bus/usb.
      
      o The usb_device class is optional now and can be disabled in the
        kernel config. Major/minor of the "real" devices and class devices
        are the same.
      
      o The environment of the usb-device event contains DEVNUM and BUSNUM to
        help udev and get rid of the ugly udev rule we need for the class
        devices.
      
      o The usb-devices and usb-interfaces share the same bus, so I used
        the new "struct device_type" to let these devices identify
        themselves. This also removes the current logic of using a magic
        platform-pointer.
        The name of the device_type is also added to the environment
        which makes it easier to distinguish the different kinds of devices
        on the same subsystem.
      
        It looks like this:
          add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1
          ACTION=add
          DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
          SUBSYSTEM=usb
          SEQNUM=1533
          MAJOR=189
          MINOR=131
          DEVTYPE=usb_device
          PRODUCT=46d/c03e/2000
          TYPE=0/0/0
          BUSNUM=002
          DEVNUM=004
      
      This udev rule works as a replacement for usb_device class devices:
        SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
          NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
      
      Updated patch, which needs the device_type patches in Greg's tree.
      
      I also got a bugzilla assigned for this. :)
        https://bugzilla.novell.com/show_bug.cgi?id=250659Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      9f8b17e6
    • G
      USB: remove use of the bus rwsem, as it doesn't really protect anything. · 341487a8
      Greg Kroah-Hartman 提交于
      The driver core stopped using the rwsem a long time ago, yet the USB
      core still grabbed the lock, thinking it protected something.  This
      patch removes that useless use.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Oliver Neukum <oneukum@suse.de>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: linux-usb-devel <linux-usb-devel@lists.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      341487a8
  2. 10 3月, 2007 1 次提交
  3. 17 2月, 2007 1 次提交
    • A
      USB: unconfigure devices which have config 0 · 3f141e2a
      Alan Stern 提交于
      Some USB devices do have a configuration 0, in contravention of the
      USB spec.  Normally 0 is supposed to indicate that a device is
      unconfigured.
      
      While we can't change what the device is doing, we can change usbcore.
      This patch (as852) allows usb_set_configuration() to accept a config
      value of -1 as indicating that the device should be unconfigured.  The
      request actually sent to the device will still contain 0 as the value.
      But even if the device does have a configuration 0, dev->actconfig
      will be set to NULL and dev->state will be set to USB_STATE_ADDRESS.
      
      Without some sort of special-case handling like this, there is no way
      to unconfigure these non-compliant devices.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3f141e2a
  4. 08 2月, 2007 2 次提交
  5. 21 12月, 2006 1 次提交
    • C
      USB: fix to usbfs_snoop logging of user defined control urbs · df251b8b
      Chris Frey 提交于
      When sending CONTROL URB's using the usual CONTROL ioctl, logging works
      fine, but when sending them via SUBMITURB, like VMWare does, the
      control fields are not logged.  This patch fixes that.
      
      I didn't see any major changes to devio.c recently, so this patch should apply
      cleanly to even the latest kernel.  I can resubmit if it doesn't.
      
      From: Chris Frey <cdfrey@foursquare.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      df251b8b
  6. 02 12月, 2006 1 次提交
  7. 18 10月, 2006 1 次提交
  8. 11 10月, 2006 1 次提交
  9. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  10. 02 10月, 2006 1 次提交
  11. 28 9月, 2006 6 次提交
  12. 27 9月, 2006 1 次提交
    • T
      [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private · 8e18e294
      Theodore Ts'o 提交于
      The following patches reduce the size of the VFS inode structure by 28 bytes
      on a UP x86.  (It would be more on an x86_64 system).  This is a 10% reduction
      in the inode size on a UP kernel that is configured in a production mode
      (i.e., with no spinlock or other debugging functions enabled; if you want to
      save memory taken up by in-core inodes, the first thing you should do is
      disable the debugging options; they are responsible for a huge amount of bloat
      in the VFS inode structure).
      
      This patch:
      
      The filesystem or device-specific pointer in the inode is inside a union,
      which is pretty pointless given that all 30+ users of this field have been
      using the void pointer.  Get rid of the union and rename it to i_private, with
      a comment to explain who is allowed to use the void pointer.  This is just a
      cleanup, but it allows us to reuse the union 'u' for something something where
      the union will actually be used.
      
      [judith@osdl.org: powerpc build fix]
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NJudith Lebzelter <judith@osdl.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8e18e294
  13. 03 8月, 2006 1 次提交
  14. 01 7月, 2006 1 次提交
  15. 25 6月, 2006 1 次提交
  16. 22 6月, 2006 5 次提交
  17. 21 3月, 2006 3 次提交
  18. 05 1月, 2006 2 次提交
    • A
      [PATCH] USB: Remove USB private semaphore · 9ad3d6cc
      Alan Stern 提交于
      This patch (as605) removes the private udev->serialize semaphore,
      relying instead on the locking provided by the embedded struct device's
      semaphore.  The changes are confined to the core, except that the
      usb_trylock_device routine now uses the return convention of
      down_trylock rather than down_read_trylock (they return opposite values
      for no good reason).
      
      A couple of other associated changes are included as well:
      
      	Now that we aren't concerned about HCDs that avoid using the
      	hcd glue layer, usb_disconnect no longer needs to acquire the
      	usb_bus_lock -- that can be done by usb_remove_hcd where it
      	belongs.
      
      	Devices aren't locked over the same scope of code in
      	usb_new_device and hub_port_connect_change as they used to be.
      	This shouldn't cause any trouble.
      
      Along with the preceding driver core patch, this needs a lot of testing.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9ad3d6cc
    • G
      [PATCH] USB: remove .owner field from struct usb_driver · 75318d2d
      Greg Kroah-Hartman 提交于
      It is no longer needed, so let's remove it, saving a bit of memory.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      75318d2d
  19. 18 11月, 2005 2 次提交
  20. 29 10月, 2005 5 次提交