1. 23 7月, 2013 27 次提交
  2. 19 7月, 2013 4 次提交
  3. 18 7月, 2013 9 次提交
    • N
      md/raid1: fix bio handling problems in process_checks() · 30bc9b53
      NeilBrown 提交于
      Recent change to use bio_copy_data() in raid1 when repairing
      an array is faulty.
      
      The underlying may have changed the bio in various ways using
      bio_advance and these need to be undone not just for the 'sbio' which
      is being copied to, but also the 'pbio' (primary) which is being
      copied from.
      
      So perform the reset on all bios that were read from and do it early.
      
      This also ensure that the sbio->bi_io_vec[j].bv_len passed to
      memcmp is correct.
      
      This fixes a crash during a 'check' of a RAID1 array.  The crash was
      introduced in 3.10 so this is suitable for 3.10-stable.
      
      Cc: stable@vger.kernel.org (3.10)
      Reported-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      30bc9b53
    • N
      md: Remove recent change which allows devices to skip recovery. · 5024c298
      NeilBrown 提交于
      commit 7ceb17e8
          md: Allow devices to be re-added to a read-only array.
      
      allowed a bit more than just that.  It also allows devices to be added
      to a read-write array and to end up skipping recovery.
      
      This patch removes the offending piece of code pending a rewrite for a
      subsequent release.
      
      More specifically:
       If the array has a bitmap, then the device will still need a bitmap
       based resync ('saved_raid_disk' is set under different conditions
       is a bitmap is present).
       If the array doesn't have a bitmap, then this is correct as long as
       nothing has been written to the array since the metadata was checked
       by ->validate_super.  However there is no locking to ensure that there
       was no write.
      
      Bug was introduced in 3.10 and causes data corruption so
      patch is suitable for 3.10-stable.
      
      Cc: stable@vger.kernel.org (3.10)
      Reported-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      5024c298
    • N
      md/raid10: fix two problems with RAID10 resync. · 7bb23c49
      NeilBrown 提交于
      1/ When an different between blocks is found, data is copied from
         one bio to the other.  However bv_len is used as the length to
         copy and this could be zero.  So use r10_bio->sectors to calculate
         length instead.
         Using bv_len was probably always a bit dubious, but the introduction
         of bio_advance made it much more likely to be a problem.
      
      2/ When preparing some blocks for sync, we don't set BIO_UPTODATE
         except on bios that we schedule for a read.  This ensures that
         missing/failed devices don't confuse the loop at the top of
         sync_request write.
         Commit 8be185f2 "raid10: Use bio_reset()"
         removed a loop which set BIO_UPTDATE on all appropriate bios.
         So we need to re-add that flag.
      
      These bugs were introduced in 3.10, so this patch is suitable for
      3.10-stable, and can remove a potential for data corruption.
      
      Cc: stable@vger.kernel.org (3.10)
      Reported-by: NBrassow Jonathan <jbrassow@redhat.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      7bb23c49
    • A
      ACPI / video: no automatic brightness changes by win8-compatible firmware · efaa14c7
      Aaron Lu 提交于
      Starting from win8, MS backlight control driver will set bit 2 of the
      parameter of control method _DOS, to inform firmware it should not
      perform any automatic brightness changes. This mostly affects hotkey
      notification deliver - if we do not set this bit, on hotkey press,
      firmware may choose to adjust brightness level instead of sending out
      notification and doing nothing.
      
      So this patch sets bit 2 when calling _DOS so that GUIs can show the
      notification window on hotkey press.  This behavior change is only
      necessary for win8 systems.
      
      The MS document on win8 backlight control is here:
      http://msdn.microsoft.com/en-US/library/windows/hardware/jj159305
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=52951
      References: https://bugzilla.kernel.org/show_bug.cgi?id=56711Reported-by: NMicael Dias <kam1kaz3@gmail.com>
      Reported-by: NDan Garton <dan.garton@gmail.com>
      Reported-by: NBob Ziuchkovski <bob.ziuchkovski@gmail.com>
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      efaa14c7
    • R
      ACPI / video / i915: No ACPI backlight if firmware expects Windows 8 · 8c5bd7ad
      Rafael J. Wysocki 提交于
      According to Matthew Garrett, "Windows 8 leaves backlight control up
      to individual graphics drivers rather than making ACPI calls itself.
      There's plenty of evidence to suggest that the Intel driver for
      Windows [8] doesn't use the ACPI interface, including the fact that
      it's broken on a bunch of machines when the OS claims to support
      Windows 8.  The simplest thing to do appears to be to disable the
      ACPI backlight interface on these systems".
      
      There's a problem with that approach, however, because simply
      avoiding to register the ACPI backlight interface if the firmware
      calls _OSI for Windows 8 may not work in the following situations:
       (1) The ACPI backlight interface actually works on the given system
           and the i915 driver is not loaded (e.g. another graphics driver
           is used).
       (2) The ACPI backlight interface doesn't work on the given system,
           but there is a vendor platform driver that will register its
           own, equally broken, backlight interface if not prevented from
           doing so by the ACPI subsystem.
      Therefore we need to allow the ACPI backlight interface to be
      registered until the i915 driver is loaded which then will unregister
      it if the firmware has called _OSI for Windows 8 (or will register
      the ACPI video driver without backlight support if not already
      present).
      
      For this reason, introduce an alternative function for registering
      ACPI video, acpi_video_register_with_quirks(), that will check
      whether or not the ACPI video driver has already been registered
      and whether or not the backlight Windows 8 quirk has to be applied.
      If the quirk has to be applied, it will block the ACPI backlight
      support and either unregister the backlight interface if the ACPI
      video driver has already been registered, or register the ACPI
      video driver without the backlight interface otherwise.  Make
      the i915 driver use acpi_video_register_with_quirks() instead of
      acpi_video_register() in i915_driver_load().
      
      This change is based on earlier patches from Matthew Garrett,
      Chun-Yi Lee and Seth Forshee and includes a fix from Aaron Lu's.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=51231Tested-by: NAaron Lu <aaron.lu@intel.com>
      Tested-by: NIgor Gnatenko <i.gnatenko.brain@gmail.com>
      Tested-by: NYves-Alexis Perez <corsac@debian.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: NMatthew Garrett <matthew.garrett@nebula.com>
      8c5bd7ad
    • L
      PNP / ACPI: avoid garbage in resource name · 3c0fc071
      Liu ShuoX 提交于
      Set temporary variable as 0 to avoid garbage string output from
      /proc/iomem after register resources and reset to PNP dev name
      later.
      Signed-off-by: NLiu ShuoX <shuox.liu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3c0fc071
    • M
      ACPI / video: Always call acpi_video_init_brightness() on init · c04c697c
      Matthew Garrett 提交于
      We have to call acpi_video_init_brightness() even if we're not going
      to initialise the backlight - Thinkpads seem to use this as the
      trigger for enabling ACPI notifications rather than handling it in
      firmware.
      
      [rjw: Drop the brightness object created by
       acpi_video_init_brightness() if we are not going to use it.]
      Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c04c697c
    • A
      ACPICA: expose OSI version · 242b2287
      Aaron Lu 提交于
      Expose acpi_gbl_osi_data so that code outside of ACPICA can check
      the value of the last successfull _OSI call.  The definitions for
      OSI versions are moved to actypes.h so that other components can
      access them too.
      
      Based on a patch from Matthew Garrett which in turn was based on
      an earlier patch from Seth Forshee.
      
      [rjw: Changelog]
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      242b2287
    • A
      drm/radeon/dpm: add debugfs support for RS780/RS880 (v3) · 444bddc4
      Alex Deucher 提交于
      This allows you to look at the current DPM state via
      debugfs.
      
      Due to the way the hardware works on these asics, there's
      no way to look up exactly what power state we are in, so
      we make the best guess we can based on the current sclk.
      
      v2: Anthoine's version
      v3: fix ref div
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      444bddc4