1. 07 Nov, 2013 10 commits
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines · 7b98118a
      Rafael J. Wysocki authored
      There are two different interfaces for queuing up work items on the
      ACPI hotplug workqueue, alloc_acpi_hp_work() used by PCI and PCI host
      bridge hotplug code and acpi_os_hotplug_execute() used by the common
      ACPI hotplug code and docking stations.  They both are somewhat
      cumbersome to use and work slightly differently.
      
      The users of alloc_acpi_hp_work() have to submit a work function that
      will extract the necessary data items from a struct acpi_hp_work
      object allocated by alloc_acpi_hp_work() and then will free that
      object, while it would be more straightforward to simply use a work
      function with one more argument and let the interface take care of
      the execution details.
      
      The users of acpi_os_hotplug_execute() also have to deal with the
      fact that it takes only one argument in addition to the work function
      pointer, although acpi_os_execute_deferred() actually takes care of
      the allocation and freeing of memory, so it would have been able to
      pass more arguments to the work function if it hadn't been
      constrained by the connection with acpi_os_execute().
      
      Moreover, while alloc_acpi_hp_work() makes GFP_KERNEL memory
      allocations, which is correct, because hotplug work items are
      always queued up from process context, acpi_os_hotplug_execute()
      uses GFP_ATOMIC, as that is needed by acpi_os_execute().  Also,
      acpi_os_execute_deferred() queued up by it waits for the ACPI event
      workqueues to flush before executing the work function, whereas
      alloc_acpi_hp_work() can't do anything similar.  That leads to
      somewhat arbitrary differences in behavior between various ACPI
      hotplug code paths and has to be straightened up.
      
      For this reason, replace both alloc_acpi_hp_work() and
      acpi_os_hotplug_execute() with a single interface,
      acpi_hotplug_execute(), combining their behavior and being more
      friendly to its users than any of the two.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      7b98118a
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Do not execute "insert in progress" _OST · 176a88d7
      Rafael J. Wysocki authored
      According to the ACPI spec (5.0, Section 6.3.5), the "Device
      insertion in progress (pending)" (0x80) _OST status code is
      reserved for the "Insertion Processing" (0x200) source event
      which is "a result of an OSPM action".  Specifically, it is not
      a notification, so that status code should not be used during
      notification processing, which unfortunately is done by
      acpi_scan_bus_device_check().
      
      For this reason, drop the ACPI_OST_SC_INSERT_IN_PROGRESS _OST
      status evaluation from there (it was a mistake to put it in there
      in the first place).
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: All applicable <stable@vger.kernel.org>
      176a88d7
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Carry out PCI root eject directly · 43d38883
      Rafael J. Wysocki authored
      Since _handle_hotplug_event_root() is run from the ACPI hotplug
      workqueue, it doesn't need to queue up a work item to eject a PCI
      host bridge on the same workqueue.  Instead, it can just carry out
      the eject by calling acpi_bus_device_eject() directly, so make that
      happen.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      43d38883
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Merge device hot-removal routines · a3b1b1ef
      Rafael J. Wysocki authored
      There is no real reasn why acpi_bus_device_eject() and
      acpi_bus_hot_remove_device() should work differently, so rework
      acpi_bus_device_eject() so that it can be called internally by
      both acpi_bus_hot_remove_device() and acpi_eject_store_work().
      Accordingly, rework acpi_hotplug_notify_cb() to queue up the
      execution of acpi_bus_hot_remove_device() through
      acpi_os_hotplug_execute() on eject request notifications.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
      a3b1b1ef
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Make acpi_bus_hot_remove_device() internal · ace8238b
      Rafael J. Wysocki authored
      Notice that handle_root_bridge_removal() is the only user of
      acpi_bus_hot_remove_device(), so it doesn't have to be exported
      any more and can be made internal to the ACPI core.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
      ace8238b
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Simplify device ejection routines · 5add99cf
      Rafael J. Wysocki authored
      Simplify handle_root_bridge_removal() and acpi_eject_store() by
      getting rid of struct acpi_eject_event and passing device objects
      directly to async routines executed via acpi_os_hotplug_execute().
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
      5add99cf
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Fix handle_root_bridge_removal() · 2441191a
      Rafael J. Wysocki authored
      It is required to do get_device() on the struct acpi_device in
      question before passing it to acpi_bus_hot_remove_device() through
      acpi_os_hotplug_execute(), because acpi_bus_hot_remove_device()
      calls acpi_scan_hot_remove() that does put_device() on that
      object.
      
      The ACPI PCI root removal routine, handle_root_bridge_removal(),
      doesn't do that, which may lead to premature freeing of the
      device object or to executing put_device() on an object that
      has been freed already.
      
      Fix this problem by making handle_root_bridge_removal() use
      get_device() as appropriate.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
      Cc: All applicable <stable@vger.kernel.org>
      2441191a
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug · 7f28ddec
      Rafael J. Wysocki authored
      In theory, an ACPI device object may be the parent of another
      device object whose hotplug is disabled by user space through its
      scan handler.  In that case, the eject operation targeting the
      parent should fail as though the parent's own hotplug was disabled,
      but currently this is not the case, because acpi_scan_hot_remove()
      doesn't check the disable/enable hotplug status of the children
      of the top-most object passed to it.
      
      To fix this, modify acpi_bus_offline_companions() to return an
      error code if hotplug is disabled for the given device object.
      [Also change the name of the function to acpi_bus_offline(),
      because it is not only about companions any more, and change
      the name of acpi_bus_online_companions() accordingly.]  Make
      acpi_scan_hot_remove() propagate that error to its callers.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
      7f28ddec
    • Rafael J. Wysocki's avatar
      ACPI / scan: Start matching drivers after trying scan handlers · 6931007c
      Rafael J. Wysocki authored
      ACPI scan handlers should always be attached to struct acpi_device
      objects before any ACPI drivers, but there is a window during which
      a driver may be attached to a struct acpi_device before checking if
      there is a matching scan handler.  Namely, that will happen if an
      ACPI driver module is loaded during acpi_bus_scan() right after
      the first namespace walk is complete and before the given device
      is processed by the second namespace walk.
      
      To prevent that from happening, set the match_driver flags of
      struct acpi_device objects right before running device_attach()
      for them in acpi_bus_device_attach().
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
      6931007c
    • Rafael J. Wysocki's avatar
      ACPI: Remove acpi_pci_slot_init() headers from internal.h · 71bba8fa
      Rafael J. Wysocki authored
      Since acpi_pci_slot_init() is now called from acpi_pci_init()
      and pci-acpi.h contains its header, remove that header (and the
      empty definition of that function for CONFIG_ACPI_PCI_SLOT unset)
      from internal.h as it doesn't have to be there any more.  That also
      avoids a build warning about duplicate function definitions for
      CONFIG_ACPI_PCI_SLOT unset.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      71bba8fa
  2. 10 Oct, 2013 1 commit
  3. 30 Sep, 2013 4 commits
  4. 25 Sep, 2013 3 commits
  5. 23 Sep, 2013 4 commits
    • Linus Torvalds's avatar
      Linux 3.12-rc2 · 4a10c2ac
      Linus Torvalds authored
      4a10c2ac
    • Linus Torvalds's avatar
      Merge tag 'staging-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 9d23108d
      Linus Torvalds authored
      Pull staging fixes from Greg KH:
       "Here are a number of small staging tree and iio driver fixes.  Nothing
        major, just lots of little things"
      
      * tag 'staging-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (34 commits)
        iio:buffer_cb: Add missing iio_buffer_init()
        iio: Prevent race between IIO chardev opening and IIO device free
        iio: fix: Keep a reference to the IIO device for open file descriptors
        iio: Stop sampling when the device is removed
        iio: Fix crash when scan_bytes is computed with active_scan_mask == NULL
        iio: Fix mcp4725 dev-to-indio_dev conversion in suspend/resume
        iio: Fix bma180 dev-to-indio_dev conversion in suspend/resume
        iio: Fix tmp006 dev-to-indio_dev conversion in suspend/resume
        iio: iio_device_add_event_sysfs() bugfix
        staging: iio: ade7854-spi: Fix return value
        staging:iio:hmc5843: Fix measurement conversion
        iio: isl29018: Fix uninitialized value
        staging:iio:dummy fix kfifo_buf kconfig dependency issue if kfifo modular and buffer enabled for built in dummy driver.
        iio: at91: fix adc_clk overflow
        staging: line6: add bounds check in snd_toneport_source_put()
        Staging: comedi: Fix dependencies for drivers misclassified as PCI
        staging: r8188eu: Adjust RX gain
        staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.
        staging: r8188eu: Fix smatch error in core/rtw_mlme_ext.c
        staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c
        ...
      9d23108d
    • Linus Torvalds's avatar
      Merge tag 'usb-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · e04a0a5a
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a number of small USB fixes for 3.12-rc2.
      
        One is a revert of a EHCI change that isn't quite ready for 3.12.
        Others are minor things, gadget fixes, Kconfig fixes, and some quirks
        and documentation updates.
      
        All have been in linux-next for a bit"
      
      * tag 'usb-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: pl2303: distinguish between original and cloned HX chips
        USB: Faraday fotg210: fix email addresses
        USB: fix typo in usb serial simple driver Kconfig
        Revert "USB: EHCI: support running URB giveback in tasklet context"
        usb: s3c-hsotg: do not disconnect gadget when receiving ErlySusp intr
        usb: s3c-hsotg: fix unregistration function
        usb: gadget: f_mass_storage: reset endpoint driver data when disabled
        usb: host: fsl-mph-dr-of: Staticize local symbols
        usb: gadget: f_eem: Staticize eem_alloc
        usb: gadget: f_ecm: Staticize ecm_alloc
        usb: phy: omap-usb3: Fix return value
        usb: dwc3: gadget: avoid memory leak when failing to allocate all eps
        usb: dwc3: remove extcon dependency
        usb: gadget: add '__ref' for rndis_config_register() and cdc_config_register()
        usb: dwc3: pci: add support for BayTrail
        usb: gadget: cdc2: fix conversion to new interface of f_ecm
        usb: gadget: fix a bug and a WARN_ON in dummy-hcd
        usb: gadget: mv_u3d_core: fix violation of locking discipline in mv_u3d_ep_disable()
      e04a0a5a
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · d8524ae9
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       - some small fixes for msm and exynos
       - a regression revert affecting nouveau users with old userspace
       - intel pageflip deadlock and gpu hang fixes, hsw modesetting hangs
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (22 commits)
        Revert "drm: mark context support as a legacy subsystem"
        drm/i915: Don't enable the cursor on a disable pipe
        drm/i915: do not update cursor in crtc mode set
        drm/exynos: fix return value check in lowlevel_buffer_allocate()
        drm/exynos: Fix address space warnings in exynos_drm_fbdev.c
        drm/exynos: Fix address space warning in exynos_drm_buf.c
        drm/exynos: Remove redundant OF dependency
        drm/msm: drop unnecessary set_need_resched()
        drm/i915: kill set_need_resched
        drm/msm: fix potential NULL pointer dereference
        drm/i915/dvo: set crtc timings again for panel fixed modes
        drm/i915/sdvo: Robustify the dtd<->drm_mode conversions
        drm/msm: workaround for missing irq
        drm/msm: return -EBUSY if bo still active
        drm/msm: fix return value check in ERR_PTR()
        drm/msm: fix cmdstream size check
        drm/msm: hangcheck harder
        drm/msm: handle read vs write fences
        drm/i915/sdvo: Fully translate sync flags in the dtd->mode conversion
        drm/i915: Use proper print format for debug prints
        ...
      d8524ae9
  6. 22 Sep, 2013 3 commits
    • Linus Torvalds's avatar
      Merge branch 'for-3.12/core' of git://git.kernel.dk/linux-block · 68cf8d0c
      Linus Torvalds authored
      Pull block IO fixes from Jens Axboe:
       "After merge window, no new stuff this time only a collection of neatly
        confined and simple fixes"
      
      * 'for-3.12/core' of git://git.kernel.dk/linux-block:
        cfq: explicitly use 64bit divide operation for 64bit arguments
        block: Add nr_bios to block_rq_remap tracepoint
        If the queue is dying then we only call the rq->end_io callout. This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq->bios have been cleaned up.
        bio-integrity: Fix use of bs->bio_integrity_pool after free
        blkcg: relocate root_blkg setting and clearing
        block: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
        block: trace all devices plug operation
      68cf8d0c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 0fbf2cc9
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "These are mostly bug fixes and a two small performance fixes.  The
        most important of the bunch are Josef's fix for a snapshotting
        regression and Mark's update to fix compile problems on arm"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (25 commits)
        Btrfs: create the uuid tree on remount rw
        btrfs: change extent-same to copy entire argument struct
        Btrfs: dir_inode_operations should use btrfs_update_time also
        btrfs: Add btrfs: prefix to kernel log output
        btrfs: refuse to remount read-write after abort
        Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0
        Btrfs: don't leak transaction in btrfs_sync_file()
        Btrfs: add the missing mutex unlock in write_all_supers()
        Btrfs: iput inode on allocation failure
        Btrfs: remove space_info->reservation_progress
        Btrfs: kill delay_iput arg to the wait_ordered functions
        Btrfs: fix worst case calculator for space usage
        Revert "Btrfs: rework the overcommit logic to be based on the total size"
        Btrfs: improve replacing nocow extents
        Btrfs: drop dir i_size when adding new names on replay
        Btrfs: replay dir_index items before other items
        Btrfs: check roots last log commit when checking if an inode has been logged
        Btrfs: actually log directory we are fsync()'ing
        Btrfs: actually limit the size of delalloc range
        Btrfs: allocate the free space by the existed max extent size when ENOSPC
        ...
      0fbf2cc9
    • Anatol Pomozov's avatar
      cfq: explicitly use 64bit divide operation for 64bit arguments · f3cff25f
      Anatol Pomozov authored
      'samples' is 64bit operant, but do_div() second parameter is 32.
      do_div silently truncates high 32 bits and calculated result
      is invalid.
      
      In case if low 32bit of 'samples' are zeros then do_div() produces
      kernel crash.
      Signed-off-by: default avatarAnatol Pomozov <anatol.pomozov@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f3cff25f
  7. 21 Sep, 2013 15 commits