1. 12 10月, 2016 1 次提交
  2. 28 9月, 2016 2 次提交
  3. 27 9月, 2016 6 次提交
    • K
      USB: serial: cp210x: Add ID for a Juniper console · decc5360
      Kyle Jones 提交于
      Signed-off-by: NKyle Jones <kyle@kf5jwc.us>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      decc5360
    • P
      usb: Kconfig: using select for USB_COMMON dependency · cb9c1cfc
      Peter Chen 提交于
      According to (badf6d47 "usb: common: rework CONFIG_USB_COMMON logic")
      we should select USB_COMMON at Kconfig when usb common stuffs are needed,
      but some of Kconfig enties have not followed it, update them.
      
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cb9c1cfc
    • Y
      usb: hub: change CLEAR_FEATURE to SET_FEATURE · 4e248000
      Yonglong Wu 提交于
      In USB20 specification, describes in chapter 9.4.5: The Remote Wakeup
      field can be modified by the SetFeature() and ClearFeature() requests
      using the DEVICE_REMOTE_WAKEUP feature selector.
      
      In USB30 specification, also describes in chapter 9.4.5: The Function
      Remote Wakeup field can be modified by the SetFeature() requests
      using the FUNCTION_SUSPEND feature selector. In chapter 9.4.9 Set
      Feature reference, it describes Function Remote Wake Enabled/Disabled
      at suspend options by SET_FEATURE.
      
      In USB30 specification only mentioned SetFeature(), so we need use
      SET_FEATURE replace CLEAR_FEATURE to disable USB30 function remote
      wakeup in suspend options.
      Signed-off-by: NYonglong Wu <yonglong.wu@mediatek.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4e248000
    • R
      usb: core: Introduce a USB port LED trigger · 0f247626
      Rafał Miłecki 提交于
      This commit adds a new trigger responsible for turning on LED when USB
      device gets connected to the selected USB port. This can can useful for
      various home routers that have USB port(s) and a proper LED telling user
      a device is connected.
      
      The trigger gets its documentation file but basically it just requires
      enabling it and selecting USB ports (e.g. echo 1 > ports/usb1-1).
      
      There was a long discussion on design of this driver. Its current state
      is a result of picking them most adjustable solution as others couldn't
      handle all cases.
      
      1) It wasn't possible for the driver to register separated trigger for
         each USB port. Some physical USB ports are handled by more than one
         controller and so by more than one USB port. E.g. USB 2.0 physical
         port may be handled by OHCI's port and EHCI's port.
         It's also not possible to assign more than 1 trigger to a single LED
         and implementing such feature would be tricky due to syncing triggers
         and sysfs conflicts with old triggers.
      
      2) Another idea was to register trigger per USB hub. This wouldn't allow
         handling devices with multiple USB LEDs and controllers (hubs)
         controlling more than 1 physical port. It's common for hubs to have
         few ports and each may have its own LED.
      
      This final trigger is highly flexible. It allows selecting any USB ports
      for any LED. It was also modified (comparing to the initial version) to
      allow choosing ports rather than having user /guess/ proper names. It
      was successfully tested on SmartRG SR400ac which has 3 USB LEDs,
      2 physical ports and 3 controllers.
      
      It was noted USB subsystem already has usb-gadget and usb-host triggers
      but they are pretty trivial ones. They indicate activity only and can't
      have ports specified.
      
      In future it may be good idea to consider adding activity support to
      usbport as well. This should allow switching to this more generic driver
      and maybe marking old ones as obsolete.
      This can be implemented with another sysfs file for setting mode. The
      default mode wouldn't change so there won't be ABI breakage and so such
      feature can be safely implemented later.
      
      There was also an idea of supporting other devices (PCI, SDIO, etc.) but
      as this driver already contains some USB specific code (and will get
      more) these should be probably separated drivers (triggers).
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0f247626
    • R
      USB: bcma: drop Northstar PHY 2.0 initialization code · e8624859
      Rafał Miłecki 提交于
      This driver should initialize controller only, PHY initialization should
      be handled by separated PHY driver. We already have phy-bcm-ns-usb2 in
      place so let it makes its duty.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e8624859
    • B
      usb: core: hcd: add missing header dependencies · 35be784c
      Baoyou Xie 提交于
      We get 1 warning when building kernel with W=1:
      drivers/usb/core/hcd.c:2390:5: warning: no previous prototype for 'usb_bus_start_enum' [-Wmissing-prototypes]
      
      In fact, these functions are declared in linux/usb/otg.h, so this patch
      adds the missing header dependencies.
      Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      35be784c
  4. 23 9月, 2016 3 次提交
    • A
      usb: musb: da8xx: fix error handling message in probe · 984f3be5
      Arnd Bergmann 提交于
      We print an error message when platform_device_register_full()
      fails, but the initialization of the argument has been removed,
      as shown in this warning:
      
      drivers/usb/musb/da8xx.c: In function 'da8xx_probe':
      drivers/usb/musb/da8xx.c:521:3: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      This modifies the function to assign the return code before
      checking it, and does uses the same method in the check for
      usb_phy_generic_register() as well.
      
      Fixes: 947c49af ("usb: musb: da8xx: Remove mach code")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NBin Liu <b-liu@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      984f3be5
    • T
      usb: musb: Fix session based PM for first invalid VBUS · 2b9a8c40
      Tony Lindgren 提交于
      With the session bit based PM runtime working on musb, we've
      implemented few quirks to attempt to detect the current state of
      the hardware. One of the quirks is for invalid VBUS as peripheral,
      but it is not working in all cases.
      
      If we start musb on dm3730 as a peripheral with no cable connected,
      we will get the devctl 91 state once and will never idle as there
      are not further interrupts from musb. So we need to ignore the first
      devctl 91 state as there will be more interrupts if we're connected.
      
      The invalid VBUS state also can happen always when connected to
      certain USB hubs. Looks like musb on dm3730 can claim invalid VBUS
      with some hubs while 3717-evm and BeagleBone don't. This causes
      session as peripheral to fail for dm3730 with some hubs.
      
      This too is fixed by ignoring only the first invalid VBUS. When
      connected, we can just look at the session bit as that will clear
      automatically when the session ends.
      
      Fixes: 467d5c98 ("usb: musb: Implement session bit based runtime PM for musb-core")
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NBin Liu <b-liu@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2b9a8c40
    • T
      usb: musb: Fix PM runtime for disconnect after unconfigure · 4e719183
      Tony Lindgren 提交于
      If we unconfigure musb as a USB peripheral with cable connected,
      and then remove the cable, no interrupts will happen. And musb
      thinks we're still connected keeping the device active.
      
      Now with the session bit based PM runtime working for musb, we
      can fix this issue by calling musb irq_work. That rechecks the
      devctl register and reconfigures PM runtime based on the devctl.
      
      Fixes: 467d5c98 ("usb: musb: Implement session bit based runtime PM for musb-core")
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NBin Liu <b-liu@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4e719183
  5. 22 9月, 2016 2 次提交
    • H
      musb: Export musb_root_disconnect for use in modules · b36df090
      Hans de Goede 提交于
      Export musb_root_disconnect for use in modules, so that musb glue
      code build as module can use it.
      
      This fixes the buildbot errors for -next in arm64-allmodconfig
      and arm-allmodconfig.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Fixes: 7cba17ec ("musb: sunxi: Add support for platform_set_mode")
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b36df090
    • G
      usb: misc: legousbtower: Fix NULL pointer deference · 2fae9e5a
      Greg Kroah-Hartman 提交于
      This patch fixes a NULL pointer dereference caused by a race codition in
      the probe function of the legousbtower driver. It re-structures the
      probe function to only register the interface after successfully reading
      the board's firmware ID.
      
      The probe function does not deregister the usb interface after an error
      receiving the devices firmware ID. The device file registered
      (/dev/usb/legousbtower%d) may be read/written globally before the probe
      function returns. When tower_delete is called in the probe function
      (after an r/w has been initiated), core dev structures are deleted while
      the file operation functions are still running. If the 0 address is
      mappable on the machine, this vulnerability can be used to create a
      Local Priviege Escalation exploit via a write-what-where condition by
      remapping dev->interrupt_out_buffer in tower_write. A forged USB device
      and local program execution would be required for LPE. The USB device
      would have to delay the control message in tower_probe and accept
      the control urb in tower_open whilst guest code initiated a write to the
      device file as tower_delete is called from the error in tower_probe.
      
      This bug has existed since 2003. Patch tested by emulated device.
      Reported-by: NJames Patrick-Evans <james@jmp-e.com>
      Tested-by: NJames Patrick-Evans <james@jmp-e.com>
      Signed-off-by: NJames Patrick-Evans <james@jmp-e.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2fae9e5a
  6. 21 9月, 2016 1 次提交
  7. 20 9月, 2016 1 次提交
    • A
      [media] usb: gadget: uvc: add V4L2 dependency · d1463e52
      Arnd Bergmann 提交于
      Building the UVC gadget into the kernel fails to build when
      CONFIG_VIDEO_V4L2 is a loadable module:
      
      drivers/usb/gadget/function/usb_f_uvc.o: In function `uvc_function_ep0_complete':
      uvc_configfs.c:(.text.uvc_function_ep0_complete+0x84): undefined reference to `v4l2_event_queue'
      drivers/usb/gadget/function/usb_f_uvc.o: In function `uvc_function_disable':
      uvc_configfs.c:(.text.uvc_function_disable+0x34): undefined reference to `v4l2_event_queue'
      
      Adding a dependency in USB_CONFIGFS_F_UVC (which is a bool symbol)
      make the 'select USB_F_UVC' statement turn the USB_F_UVC into 'm'
      whenever CONFIG_VIDEO_V4L2=m too, avoiding the link failure.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      d1463e52
  8. 19 9月, 2016 1 次提交
  9. 16 9月, 2016 2 次提交
  10. 15 9月, 2016 1 次提交
  11. 14 9月, 2016 8 次提交
  12. 13 9月, 2016 12 次提交