1. 17 5月, 2013 1 次提交
  2. 16 5月, 2013 1 次提交
  3. 18 4月, 2013 1 次提交
  4. 12 4月, 2013 1 次提交
  5. 10 4月, 2013 1 次提交
  6. 08 4月, 2013 1 次提交
    • K
      driver core: add uid and gid to devtmpfs · 3c2670e6
      Kay Sievers 提交于
      Some drivers want to tell userspace what uid and gid should be used for
      their device nodes, so allow that information to percolate through the
      driver core to userspace in order to make this happen.  This means that
      some systems (i.e.  Android and friends) will not need to even run a
      udev-like daemon for their device node manager and can just rely in
      devtmpfs fully, reducing their footprint even more.
      Signed-off-by: NKay Sievers <kay@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3c2670e6
  7. 02 4月, 2013 2 次提交
  8. 30 3月, 2013 1 次提交
    • J
      usb: Make USB persist default configurable · 4f482038
      Julius Werner 提交于
      Commit 9214d1d8 set the USB persist flag as a default for all devices.
      This might be desirable for some distributions, but it certainly has its
      trade-offs... most importantly, it can significantly increase system
      resume time, because the kernel blocks on resuming (and sometimes
      resetting) USB devices before it unfreezes userspace.
      
      This patch introduces a new config option CONFIG_USB_DEFAULT_PERSIST,
      which allows distributions to make this decision on their own without
      the need to carry a custom patch or revert the kernel's setting in
      userspace.
      
      [edited the Kconfig help text a bit - gregkh]
      Signed-off-by: NJulius Werner <jwerner@chromium.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4f482038
  9. 29 3月, 2013 4 次提交
    • A
      USB: improve port transitions when EHCI starts up · 05768918
      Alan Stern 提交于
      It seems to be getting more common recently for EHCI host controllers
      to be probed after their companion UHCI or OHCI controllers.  This may
      be caused partly by splitting the ehci-pci driver out from ehci-hcd,
      or it may be caused by changes in the way the kernel does driver
      probing.
      
      Regardless, it has a tendency to cause problems.  When an EHCI
      controller is initialized, it takes ownership of all the ports away
      from the companions.  In effect, it forcefully disconnects all the USB
      devices that may already be using a companion controller.
      
      This patch (as1672b) tries to make the transition more orderly by
      deconfiguring the root hubs for all the companion controllers before
      initializing the EHCI controller, and reconfiguring them afterward.
      The result is a soft disconnect rather than a hard one.
      
      Internally, the patch refactors the code involved in associating EHCI
      controllers with their companions.  The old approach, in which a
      single function is called with an argument telling it what to do (the
      companion_action enum), has been replaced with a scheme using multiple
      callback functions, each performing a single task.
      
      This patch won't solve all the problems people encounter when their
      EHCI controllers start up, but it will at least reduce the number of
      error messages generated by the unexpected disconnections.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NJenya Y <jy.gerstmaier@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05768918
    • A
      USB: remove CONFIG_USB_SUSPEND option · 84ebc102
      Alan Stern 提交于
      This patch (as1675) removes the CONFIG_USB_SUSPEND option, essentially
      replacing it everywhere with CONFIG_PM_RUNTIME (except for one place
      in hub.c, where it is replaced with CONFIG_PM because the code needs
      to be used in both runtime and system PM).  The net result is code
      shrinkage and simplification.
      
      There's very little point in keeping CONFIG_USB_SUSPEND because almost
      everybody enables it.  The few that don't will find that the usbcore
      module has gotten somewhat bigger and they will have to take active
      measures if they want to prevent hubs from being runtime suspended.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Peter Chen <peter.chen@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      84ebc102
    • A
      USB: use "global suspend" for system sleep on USB-2 buses · 0aa2832d
      Alan Stern 提交于
      This patch (as1674) speeds up system sleep transitions by not
      suspending each individual device on a USB-1.1 or USB-2 bus.  The
      devices will automatically go into suspend when their root hubs are
      suspended (i.e., stop sending out Start-Of-Frame packets) -- this is
      what the USB spec calls "global suspend".
      
      Since this is what we do already when CONFIG_USB_SUSPEND isn't
      enabled, it shouldn't cause any problems.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Peter Chen <peter.chen@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0aa2832d
    • A
      USB: avoid error messages when a device is disconnected · e9e88fb7
      Alan Stern 提交于
      This patch (as1673) reduces the amount of log spew from the hub driver
      by removing a bunch of error messages in the case where the device in
      question is already known to have been disconnected.  Since the
      disconnect event itself appears in the log, there's no need for other
      error messages.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NJenya Y <jy.gerstmaier@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e9e88fb7
  10. 26 3月, 2013 5 次提交
    • J
      USB: fix urb-poison imbalance · 68a2bed1
      Johan Hovold 提交于
      The calls to usb_poison_urb and usb_unpoison_urb are expected to be
      balanced. However, if an urb that has not yet been submitted is
      poisoned, its reject counter will not be increased as its ep-field is
      NULL. A consecutive call to unpoison will thus in fact poison the urb
      as its reject counter will be decremented to a negative value,
      effectively preventing the urb from being submitted.
      
      Note that there are currently no in-kernel drivers affected by this.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      68a2bed1
    • D
      USB: hub: Avoid NULL pointer dereference when hub doesn't have any ports · 769d7368
      David Linares 提交于
      Return an error if hub->descriptor->bNbrPorts==0. Without this additional
      check, we can end up doing a "hub->ports = kzalloc(0, GFP_KERNEL)".
      This hub->ports pointer will therefore be non-NULL and will be used.
      Example of dmesg:
         INIT: usb 1-1: New USB device found, idVendor=0424, idProduct=2512
         usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
         hub 1-1:1.0: USB hub found
         version 2.86 bootinghub 1-1:1.0: 0 ports detected
         Unable to handle kernel NULL pointer dereference at virtual address 00000010
      Signed-off-by: NDavid Linares <dlinares.linux@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      769d7368
    • M
      USB: adds comment on suspend callback · 303f0847
      Ming Lei 提交于
      This patch adds comments on interface driver suspend callback
      to emphasize that the failure return value is ignored by
      USB core in system sleep context, so do not try to recover
      device for this case and let resume/reset_resume callback
      handle the suspend failure if needed.
      
      Also kerneldoc for usb_suspend_both() is updated with the
      fact.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      303f0847
    • L
      usb/acpi: binding xhci root hub usb port with ACPI · bafcaf6d
      Lan Tianyu 提交于
      This patch is to bind xhci root hub usb port with its acpi node.
      The port num in the acpi table matches with the sequence in the xhci
      extended capabilities table. So call usb_hcd_find_raw_port_number() to
      transfer hub port num into raw port number which associates with
      the sequence in the xhci extended capabilities table before binding.
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      bafcaf6d
    • L
      usb: add find_raw_port_number callback to struct hc_driver() · 3f5eb141
      Lan Tianyu 提交于
      xhci driver divides the root hub into two logical hubs which work
      respectively for usb 2.0 and usb 3.0 devices. They are independent
      devices in the usb core. But in the ACPI table, it's one device node
      and all usb2.0 and usb3.0 ports are under it. Binding usb port with
      its acpi node needs the raw port number which is reflected in the xhci
      extended capabilities table. This patch is to add find_raw_port_number
      callback to struct hc_driver(), fill it with xhci_find_raw_port_number()
      which will return raw port number and add a wrap usb_hcd_find_raw_port_number().
      
      Otherwise, refactor xhci_find_real_port_number(). Using
      xhci_find_raw_port_number() to get real index in the HW port status
      registers instead of scanning through the xHCI roothub port array.
      This can help to speed up.
      
      All addresses in xhci->usb2_ports and xhci->usb3_ports array are
      kown good ports and don't include following bad ports in the extended
      capabilities talbe.
           (1) root port that doesn't have an entry
           (2) root port with unknown speed
           (3) root port that is listed twice and with different speeds.
      
      So xhci_find_raw_port_number() will only return port num of good ones
      and never touch bad ports above.
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      3f5eb141
  11. 16 3月, 2013 1 次提交
  12. 04 3月, 2013 1 次提交
    • R
      ACPI / glue: Add .match() callback to struct acpi_bus_type · 53540098
      Rafael J. Wysocki 提交于
      USB uses the .find_bridge() callback from struct acpi_bus_type
      incorrectly, because as a result of the way it is used by USB every
      device in the system that doesn't have a bus type or parent is
      passed to usb_acpi_find_device() for inspection.
      
      What USB actually needs, though, is to call usb_acpi_find_device()
      for USB ports that don't have a bus type defined, but have
      usb_port_device_type as their device type, as well as for USB
      devices.
      
      To fix that replace the struct bus_type pointer in struct
      acpi_bus_type used for matching devices to specific subsystems
      with a .match() callback to be used for this purpose and update
      the users of struct acpi_bus_type, including USB, accordingly.
      Define the .match() callback routine for USB, usb_acpi_bus_match(),
      in such a way that it will cover both USB devices and USB ports
      and remove the now redundant .find_bridge() callback pointer from
      usb_acpi_bus.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NYinghai Lu <yinghai@kernel.org>
      Acked-by: NJeff Garzik <jgarzik@pobox.com>
      53540098
  13. 24 2月, 2013 1 次提交
    • M
      usb: forbid memory allocation with I/O during bus reset · 4d769def
      Ming Lei 提交于
      If one storage interface or usb network interface(iSCSI case) exists in
      current configuration, memory allocation with GFP_KERNEL during
      usb_device_reset() might trigger I/O transfer on the storage interface
      itself and cause deadlock because the 'us->dev_mutex' is held in
      .pre_reset() and the storage interface can't do I/O transfer when the
      reset is triggered by other interface, or the error handling can't be
      completed if the reset is triggered by the storage itself (error
      handling path).
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: David Decotigny <david.decotigny@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Oliver Neukum <oneukum@suse.de>
      Reviewed-by: NJiri Kosina <jkosina@suse.cz>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4d769def
  14. 23 2月, 2013 1 次提交
  15. 07 2月, 2013 1 次提交
  16. 29 1月, 2013 1 次提交
  17. 26 1月, 2013 6 次提交
  18. 25 1月, 2013 2 次提交
    • A
      USB: fix sign-extension bug in the hub driver · bdb6bc06
      Alan Stern 提交于
      This patch (as1646) fixes a long-standing bug in the USB hub driver.
      Upon conversion from char to unsigned long, the bytes in the status
      buffer are subject to unwanted sign extension.  The bytes should be
      declared as u8 rather than char, to prevent this.
      
      This effects of this bug are minimal.  The hub driver may end up doing
      a little unnecessary extra work because it thinks events have occurred
      on some ports when they really haven't.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bdb6bc06
    • L
      usb: Using correct way to clear usb3.0 device's remote wakeup feature. · 54a3ac0c
      Lan Tianyu 提交于
      Usb3.0 device defines function remote wakeup which is only for interface
      recipient rather than device recipient. This is different with usb2.0 device's
      remote wakeup feature which is defined for device recipient. According usb3.0
      spec 9.4.5, the function remote wakeup can be modified by the SetFeature()
      requests using the FUNCTION_SUSPEND feature selector. This patch is to use
      correct way to disable usb3.0 device's function remote wakeup after suspend
      error and resuming.
      
      This should be backported to kernels as old as 3.4, that contain the
      commit 623bef9e "USB/xhci: Enable remote
      wakeup for USB3 devices."
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      54a3ac0c
  19. 22 1月, 2013 1 次提交
    • L
      USB: Set usb port's DeviceRemovable according acpi information · d2123fd9
      Lan Tianyu 提交于
      ACPI provide "_PLD" and "_UPC" aml methods to describe usb port
      visibility and connectability. This patch is to add usb_hub_adjust_DeviceRemovable()
      to adjust usb hub port's DeviceRemovable according ACPI information and invoke it in
      the rh_call_control(). When hub descriptor request is issued at first time,
      usb port device isn't created and usb port is not bound with acpi. So first
      hub descriptor request is not changed based on ACPI information. After usb
      port devices being created, call usb_hub_adjust_DeviceRemovable in the hub_configure()
      and then set hub port's DeviceRemovable according ACPI information and this also works
      for non-root hub.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d2123fd9
  20. 21 1月, 2013 3 次提交
  21. 19 1月, 2013 1 次提交
  22. 12 1月, 2013 3 次提交