1. 15 8月, 2016 22 次提交
  2. 10 8月, 2016 1 次提交
    • R
      cdc-wdm: Clear read pipeline in case of error · c1da59da
      Robert Foss 提交于
      Implemented queued response handling. This queue is processed every time the
      WDM_READ flag is cleared.
      
      In case of a read error, userspace may not actually read the data, since the
      driver returns an error through wdm_poll. After this, the underlying device may
      attempt to send us more data, but the queue is not processed. While userspace is
      also blocked, because the read error is never cleared.
      
      After this patch, we proactively process the queue on a read error. If there was
      an outstanding response to handle, that will clear the error (or go through the
      same logic again, if another read error occurs). If there was no outstanding
      response, this will bring the queue size back to 0, unblocking a future response
      from the underlying device.
      Signed-off-by: NRobert Foss <robert.foss@collabora.com>
      Tested-by: NRobert Foss <robert.foss@collabora.com>
      Acked-by: NOliver Neukum <oneukum@suse.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c1da59da
  3. 09 8月, 2016 13 次提交
    • N
      usbip: vhci extension: modifications to vhci driver · 0775a9cb
      Nobuo Iwata 提交于
      Modification to Kconfig, vhci_hc.c, vhci.h and vhci_sysfs.c.
      
      1. kernel config
      
      Followings are added.
      
      USBIP_VHCI_HC_PORTS: Number of ports per USB/IP virtual host
      controller. The default is 8 - same as current VHCI_NPORTS.
      USBIP_VHCI_NR_HCS: Number of USB/IP virtual host controllers. The
      default is 1. This paratmeter is replaced with USBIP_VHCI_INIT_HCS and
      USBIP_VHCI_MAX_HCS included in succeeding dynamic extension patch.
      
      2. the_controller to controllers
      
      the_controller is changed to vhci_pdevs: array of struct
      platform_device.
      
      3. vhci_sysfs.c
      
      Sysfs structure is changed as following.
      
      BEFORE:
          /sys/devices/platform
              +-- vhci
                  +-- status
                  +-- attach
                  +-- detach
                  +-- usbip_debug
      
      AFTER: example for CONFIG_USBIP_NR_HCS=4
          /sys/devices/platform
              +-- vhci
              |   +-- nports
              |   +-- status
              |   +-- status.1
              |   +-- status.2
              |   +-- status.3
              |   +-- attach
              |   +-- detach
              |   +-- usbip_debug
              +-- vhci.1
              +-- vhci.2
              +-- vhci.3
      
      vhci[.N] is shown for each host controller kobj. vhch.1, vhci.2, ...
      are shown only when CONFIG_USBIP_NR_HCS is more than 1. Only 'vhci'
      (without number) has user space interfaces. 'nports' is newly added to
      give ports-per-controller and number of controlles. Before that, number
      of ports is acquired by reading status lines. Status is divided for
      each controller to avoid page size (4KB) limitation.
      
      Old userspace tool binaries work with the first status within the first
      controller.
      
      Inconsistency between status header and content is fixed.
      4th and 5th column are
      header:          "dev bus"
      content(unused): "000 000"
      content(used):   "%08x", devid
      Only 1st and 2nd column are used by program. In old version, sscanf()
      in parse_status expect no bus column. And bus_id string is shown in the
      last column. Then bus in the header is removed and unused content is
      replaced with 8 zeros. The sscanf() expects more than 5 columns and new
      has 6 columns so there's no compatibility issue in this change.
      Signed-off-by: NNobuo Iwata <nobuo.iwata@fujixerox.co.jp>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0775a9cb
    • P
      usb: core: of.c: fix defined but not declare warning · 0573f2c5
      Peter Chen 提交于
      The helper usb_of_get_child_node is defined at of.c, but missing its
      declare as a global function. Fix it by adding related header file
      as well as compile it on conditional of CONFIG_OF.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: linux-usb@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Ben Dooks <ben.dooks@codethink.co.uk>
      Cc: linux-kernel@lists.codethink.co.uk
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      Reported-by: NBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0573f2c5
    • M
      usb: remove redundant dependency on USB_SUPPORT · a26a1422
      Masahiro Yamada 提交于
      The whole Kconfig entries of the USB subsystem are surrounded with
      "if USB_SUPPORT" ... "endif", so CONFIG_USB_SUPPORT=y is surely met
      when these two Kconfig options are visible.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a26a1422
    • S
      usb: ulpi: Automatically set driver::owner with ulpi_driver_register() · 1ebe88d3
      Stephen Boyd 提交于
      Let's follow other driver registration functions and
      automatically set the driver's owner member to THIS_MODULE when
      ulpi_driver_register() is called. This allows ulpi driver writers
      to forget about this boiler plate detail and avoids common bugs
      in the process.
      Signed-off-by: NStephen Boyd <stephen.boyd@linaro.org>
      Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1ebe88d3
    • R
      USB: bcma: initialize Northstar USB 3.0 controller · 3cc7e7b7
      Rafał Miłecki 提交于
      It's a rather simple controller, we just need to make sure USB is
      powered (using GPIO pin) and reset bus core. Once this is done it's
      safe to register XHCI controller and let it init PHY and do its magic.
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3cc7e7b7
    • H
      usb: storage: fix runtime pm issue in usb_stor_probe2 · a094760b
      Heiner Kallweit 提交于
      Since commit 71723f95 "PM / runtime: print error when activating a
      child to unactive parent" I see the following error message:
      
      scsi host2: usb-storage 1-3:1.0
      scsi host2: runtime PM trying to activate child device host2 but parent
      	    (1-3:1.0) is not active
      
      Digging into it it seems to be related to the problem described in the
      commit message for cd998ded "i2c: designware: Prevent runtime
      suspend during adapter registration" as scsi_add_host also calls
      device_add and after the call to device_add the parent device is
      suspended.
      
      Fix this by using the approach from the mentioned commit and getting
      the runtime pm reference before calling scsi_add_host.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a094760b
    • B
      cdc-wdm: fix "out-of-sync" due to missing notifications · 833415a3
      Bjørn Mork 提交于
      The driver enforces a strict one-to-one relationship between the
      received RESPONSE_AVAILABLE notifications and messages read from
      the device. At the same time, it will cancel the interrupt URB
      when there is no client holding the character device open.
      
      Many devices do not cope well with this behaviour.  They maintain
      a FIFO queue of messages, and send notifications on a best effort
      basis.  Messages are queued regardless of whether the notification
      is successful or not. So if the driver loses a single notification,
      which can easily happen when the interrupt URB is cancelled, then
      the device and driver becomes out-of-sync. New messages end up
      at the end of the queue, while the associated notification makes
      the driver read only the first message from the queue.
      
      This state is permanent from a user point of view. There is no
      no way to flush the device queue without resetting the device or
      using another driver.
      
      The problem is easy to hit with current QMI and MBIM command line
      tools, which typically close the character device after seeing
      the reply they expect. Any pending unsolicited messages from the
      device will then trigger the driver bug.
      
      Fix by always reading all queued messages from the device when
      the notification URB is first submitted.  This is expected to
      end with an -EPIPE status when there are no more pending
      messages, so demote the printk associated with -EPIPE to debug
      level.
      
      The workaround has been tested on a large number of different MBIM
      and QMI devices, as well as the Ericsson F5521gw and H5321gw modems
      with real Device Management functions.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Acked-by: NOliver Neukum <oneukum@suse.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      833415a3
    • B
      usb: dwc2: Remove deprecated create_singlethread_workqueue · ec7b1268
      Bhaktipriya Shridhar 提交于
      alloc_ordered_workqueue replaces the deprecated
      create_singlethread_workqueue.
      
      There are multiple work items on the work queue, which require
      ordering. Hence, an ordered workqueue has been used.
      
      The workqueue "wq_otg" is not being used on a memory reclaim path.
      Hence, WQ_MEM_RECLAIM has not been set.
      Signed-off-by: NBhaktipriya Shridhar <bhaktipriya96@gmail.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Acked-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ec7b1268
    • B
      usb: ftdi-elan: Remove deprecated create_singlethread_workqueue · c936f45f
      Bhaktipriya Shridhar 提交于
      The status workqueue is involved in initializing the Uxxx and polling
      the Uxxx until a supported PCMCIA CardBus device is detected.
      It then starts the command and respond workqueues and then loads the
      module that handles the device, after which it just polls the Uxxx
      looking for card ejects.
      
      The command and respond workqueues are involved in implementing a command
      sequencer for communicating with the firmware on the other side of
      the FTDI chip in the Uxxx.
      
      These workqueues have only a single work item each and hence they do not
      require ordering. Also, none of the above workqueues are being used on a
      memory recliam path. Hence, the singlethreaded workqueues have been
      replaced with the use of system_wq.
      
      System workqueues have been able to handle high level of concurrency
      for a long time now and hence it's not required to have a singlethreaded
      workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
      created with create_singlethread_workqueue(), system_wq allows multiple
      work items to overlap executions even on the same CPU; however, a
      per-cpu workqueue doesn't have any CPU locality or global ordering
      guarantee unless the target CPU is explicitly specified and thus the
      increase of local concurrency shouldn't make any difference.
      
      The work items have been sync cancelled because they are self-requeueing
      and need to wait for the in-flight work item to finish before proceeding
      with destruction. Hence, they have been sync cancelled in
      ftdi_status_cancel_work(), ftdi_command_cancel_work() and
      ftdi_response_cancel_work(). These functions are called in
      ftdi_elan_exit() to ensure that there are no pending work items while
      disconnecting the driver.
      Signed-off-by: NBhaktipriya Shridhar <bhaktipriya96@gmail.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c936f45f
    • B
      USB: appledisplay: Remove deprecated create_singlethread_workqueue · 6a0bb434
      Bhaktipriya Shridhar 提交于
      The workqueue "wq" is involved in controlling the brightness of an
      Apple Cinema Display over USB.
      
      It has a single work item(&pdata->work) per appledisplay and hence
      doesn't require ordering. Also, it is not being used on a memory
      reclaim path.
      
      Hence, the singlethreaded workqueue has been replaced with the use of
      system_wq.
      
      System workqueues have been able to handle high level of concurrency
      for a long time now and hence it's not required to have a singlethreaded
      workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
      created with create_singlethread_workqueue(), system_wq allows multiple
      work items to overlap executions even on the same CPU; however, a
      per-cpu workqueue doesn't have any CPU locality or global ordering
      guarantee unless the target CPU is explicitly specified and thus the
      increase of local concurrency shouldn't make any difference.
      
      The work item is self-requeueing and needs to wait for the in-flight
      work item to finish before proceeding with destruction.
      Hence, it has been sync cancelled in appledisplay_disconnect().
      This also ensures that there are no pending tasks while disconnecting
      the driver.
      Signed-off-by: NBhaktipriya Shridhar <bhaktipriya96@gmail.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6a0bb434
    • B
      usb: lvstest: Remove deprecated create_singlethread_workqueue · bd783108
      Bhaktipriya Shridhar 提交于
      The workqueue has a single work item(&lvs->rh_work) and hence
      doesn't require ordering. Also, it is not being used on a memory
      reclaim path. Hence, the singlethreaded workqueue has been replaced
      with the use of system_wq.
      
      System workqueues have been able to handle high level of concurrency
      for a long time now and hence it's not required to have a singlethreaded
      workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
      created with create_singlethread_workqueue(), system_wq allows multiple
      work items to overlap executions even on the same CPU; however, a
      per-cpu workqueue doesn't have any CPU locality or global ordering
      guarantee unless the target CPU is explicitly specified and thus the
      increase of local concurrency shouldn't make any difference.
      
      The work item has been flushed in lvs_rh_disconnect() to ensure that
      there are no pending tasks while disconnecting the driver.
      Signed-off-by: NBhaktipriya Shridhar <bhaktipriya96@gmail.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bd783108
    • J
      usb: host: fsl-mph-dr-of: use of_property_read_bool · 72cd194f
      Julia Lawall 提交于
      Use of_property_read_bool to check for the existence of a property.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression e1,e2,x;
      @@
      -	if (of_get_property(e1,e2,NULL))
      -		x = true;
      -	else
      -		x = false;
      +	x = of_property_read_bool(e1,e2);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      72cd194f
    • S
      usb: misc: Add driver for usb4604 · 740a6a17
      Stephen Boyd 提交于
      This is a minimal driver to support bringing a usb4604 device
      from microchip out of reset and into hub mode. The usb4604 device
      is related to the usb3503 device, but it didn't seem close enough
      to warrant putting both into the same file. This patch borrows
      some of the usb3503 structure and trims it down to just handle
      the optional reset gpio and adds the i2c command to put the
      device into hub mode.
      
      Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/00001716A.pdf
      Cc: <devicetree@vger.kernel.org>
      Signed-off-by: NStephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      740a6a17
  4. 08 8月, 2016 4 次提交
    • L
      Linux 4.8-rc1 · 29b4817d
      Linus Torvalds 提交于
      29b4817d
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 857953d7
      Linus Torvalds 提交于
      Pull more block fixes from Jens Axboe:
       "As mentioned in the pull the other day, a few more fixes for this
        round, all related to the bio op changes in this series.
      
        Two fixes, and then a cleanup, renaming bio->bi_rw to bio->bi_opf.  I
        wanted to do that change right after or right before -rc1, so that
        risk of conflict was reduced.  I just rebased the series on top of
        current master, and no new ->bi_rw usage has snuck in"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: rename bio bi_rw to bi_opf
        target: iblock_execute_sync_cache() should use bio_set_op_attrs()
        mm: make __swap_writepage() use bio_set_op_attrs()
        block/mm: make bdev_ops->rw_page() take a bool for read/write
      857953d7
    • L
      Merge tag 'drm-for-v4.8-zpos' of git://people.freedesktop.org/~airlied/linux · 635a4ba1
      Linus Torvalds 提交于
      Pull drm zpos property support from Dave Airlie:
       "This tree was waiting on some media stuff I hadn't had time to get a
        stable branchpoint off, so I just waited until it was all in your tree
        first.
      
        It's been around a bit on the list and shouldn't affect anything
        outside adding the generic API and moving some ARM drivers to using
        it"
      
      * tag 'drm-for-v4.8-zpos' of git://people.freedesktop.org/~airlied/linux:
        drm: rcar: use generic code for managing zpos plane property
        drm/exynos: use generic code for managing zpos plane property
        drm: sti: use generic zpos for plane
        drm: add generic zpos property
      635a4ba1
    • J
      block: rename bio bi_rw to bi_opf · 1eff9d32
      Jens Axboe 提交于
      Since commit 63a4cc24, bio->bi_rw contains flags in the lower
      portion and the op code in the higher portions. This means that
      old code that relies on manually setting bi_rw is most likely
      going to be broken. Instead of letting that brokeness linger,
      rename the member, to force old and out-of-tree code to break
      at compile time instead of at runtime.
      
      No intended functional changes in this commit.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      1eff9d32