1. 30 3月, 2013 1 次提交
    • A
      rbd: don't zero-fill non-image object requests · 6e2a4505
      Alex Elder 提交于
      A result of ENOENT from a read request for an object that's part of
      an rbd image indicates that there is a hole in that portion of the
      image.  Similarly, a short read for such an object indicates that
      the remainder of the read should be interpreted a full read with
      zeros filling out the end of the request.
      
      This behavior is not correct for objects that are not backing rbd
      image data.  Currently rbd_img_obj_request_callback() assumes it
      should be done for all objects.
      
      Change rbd_img_obj_request_callback() so it only does this zeroing
      for image objects.  Encapsulate that special handling in its own
      function.  Add an assertion that the image object request is a bio
      request, since we assume that (and we currently don't support any
      other types).
      
      This resolves a problem identified here:
          http://tracker.ceph.com/issues/4559
      
      The regression was introduced by bf0d5f50.
      Reported-by: NDan van der Ster <dan@vanderster.com>
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-off-by: NSage Weil <sage@inktank.com>
      6e2a4505
  2. 28 3月, 2013 3 次提交
  3. 27 3月, 2013 10 次提交
  4. 26 3月, 2013 17 次提交
    • W
      x86, io_apic: remove duplicated include from irq_remapping.c · 4fdc7824
      Wei Yongjun 提交于
      Remove duplicated include.
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      4fdc7824
    • J
      igb: fix PHC stopping on max freq · 75517d92
      Jiri Benc 提交于
      For 82576 MAC type, max_adj is reported as 1000000000 ppb. However, if
      this value is passed to igb_ptp_adjfreq_82576, incvalue overflows out of
      INCVALUE_82576_MASK, resulting in setting of zero TIMINCA.incvalue, stopping
      the PHC (instead of going at twice the nominal speed).
      
      Fix the advertised max_adj value to the largest value hardware can handle.
      As there is no min_adj value available (-max_adj is used instead), this will
      also prevent stopping the clock intentionally. It's probably not a big deal,
      other igb MAC types don't support stopping the clock, either.
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Acked-by: NMatthew Vick <matthew.vick@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      75517d92
    • S
      igb: make sensor info static · 05ec29e8
      Stephen Hemminger 提交于
      Trivial sparse warning.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      05ec29e8
    • A
      igb: SR-IOV init reordering · d5e51a10
      Alex Williamson 提交于
      igb is ineffective at setting a lower total VFs because:
      
      int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs)
      {
              ...
              /* Shouldn't change if VFs already enabled */
              if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE)
                      return -EBUSY;
      
      Swap init ordering.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Acked-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d5e51a10
    • A
      igb: Fix null pointer dereference · d0f63acc
      Alex Williamson 提交于
      The max_vfs= option has always been self limiting to the number of VFs
      supported by the device.  fa44f2f1 added SR-IOV configuration via
      sysfs, but in the process broke this self correction factor.  The
      failing path is:
      
      igb_probe
        igb_sw_init
          if (max_vfs > 7) {
              adapter->vfs_allocated_count = 7;
          ...
          igb_probe_vfs
          igb_enable_sriov(, max_vfs)
            if (num_vfs > 7) {
              err = -EPERM;
              ...
      
      This leaves vfs_allocated_count = 7 and vf_data = NULL, so we bomb out
      when igb_probe finally calls igb_reset.  It seems like a really bad
      idea, and somewhat pointless, to set vfs_allocated_count separate from
      vf_data, but limiting max_vfs is enough to avoid the null pointer.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Acked-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d0f63acc
    • L
      igb: fix i350 anti spoofing config · 22c12752
      Lior Levy 提交于
      Fix a problem in i350 where anti spoofing configuration was written into a
      wrong register.
      Signed-off-by: NLior Levy <lior.levy@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      22c12752
    • X
      ixgbevf: don't release the soft entries · a1f6c6b1
      xunleer 提交于
      When the ixgbevf driver is opened the request to allocate MSIX irq
      vectors may fail.  In that case the driver will call ixgbevf_down()
      which will call ixgbevf_irq_disable() to clear the HW interrupt
      registers and calls synchronize_irq() using the msix_entries pointer in
      the adapter structure.  However, when the function to request the MSIX
      irq vectors failed it had already freed the msix_entries which causes
      an OOPs from using the NULL pointer in synchronize_irq().
      
      The calls to pci_disable_msix() and to free the msix_entries memory
      should not occur if device open fails.  Instead they should be called
      during device driver removal to balance with the call to
      pci_enable_msix() and the call to allocate msix_entries memory
      during the device probe and driver load.
      Signed-off-by: NLi Xun <xunleer.li@huawei.com>
      Signed-off-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NSibai Li <sibai.li@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a1f6c6b1
    • J
      Xilinx: ARM: UART: clear pending irqs before enabling irqs · 855f6fd9
      John Linn 提交于
      The Boot ROM has an issue which will cause the driver to
      lock up as pending irqs are not being cleared. With them
      cleared it prevents that issue.
      
      This patch is needed for the current (3.9-rc3) mainline kernel. I guess
      it went unnoticed, because it was only tested with u-boot up until now.
      And u-boot maybe handles this.
      
      [s.trumtrar@pengutronix.de: cherry-picked from linux-xlnx.git]
      Signed-off-by: NSteffen Trumtrar <s.trumtrar@pengutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      855f6fd9
    • J
      TTY: 8250, deprecated 8250_core.* options · 9326b047
      Jiri Slaby 提交于
      They were introduced by mistake in 3.7. Let's deprecate them now. For
      the reasons, see the text in Kconfig below.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9326b047
    • J
      TTY: 8250, revert module name change · 9196d8ac
      Jiri Slaby 提交于
      In 3.7 the 8250 module name was changed unintentionally from 8250 to
      8250_core by commit 835d844d
      (8250_pnp: do pnp probe before legacy probe). We then had to
      re-introduce the old module options to ensure the old good
      8250.nr_uart & co. still work. This can be done only by a very dirty
      hack and we did it in f2b8dfd9
      (serial: 8250: Keep 8250.<xxxx> module options functional after driver
      rename).
      
      That is so damn ugly so that I decided to revert to the old module
      name and deprecate the new 8250_core options present in 3.7 and 3.8
      only. The deprecation will happen in the following patch.
      
      Note that this patch changes the hack above to support "8250_core.*",
      because we now have "8250.*" natively.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9196d8ac
    • S
      USB: EHCI: fix bug in iTD/siTD DMA pool allocation · 85ecd032
      Soeren Moch 提交于
      [Description written by Alan Stern]
      
      Soeren tracked down a very difficult bug in ehci-hcd's DMA pool
      management of iTD and siTD structures.  Some background: ehci-hcd
      gives each isochronous endpoint its own set of active and free itd's
      (or sitd's for full-speed devices).  When a new itd is needed, it is
      taken from the head of the free list, if possible.  However, itd's
      must not be used twice in a single frame because the hardware
      continues to access the data structure for the entire duration of a
      frame.  Therefore if the itd at the head of the free list has its
      "frame" member equal to the current value of ehci->now_frame, it
      cannot be reused and instead a new itd is allocated from the DMA pool.
      The entries on the free list are not released back to the pool until
      the endpoint is no longer in use.
      
      The bug arises from the fact that sometimes an itd can be moved back
      onto the free list before itd->frame has been set properly.  In
      Soeren's case, this happened because ehci-hcd can allocate one more
      itd than it actually needs for an URB; the extra itd may or may not be
      required depending on how the transfer aligns with a frame boundary.
      For example, an URB with 8 isochronous packets will cause two itd's to
      be allocated.  If the URB is scheduled to start in microframe 3 of
      frame N then it will require both itds: one for microframes 3 - 7 of
      frame N and one for microframes 0 - 2 of frame N+1.  But if the URB
      had been scheduled to start in microframe 0 then it would require only
      the first itd, which could cover microframes 0 - 7 of frame N.  The
      second itd would be returned to the end of the free list.
      
      The itd allocation routine initializes the entire structure to 0, so
      the extra itd ends up on the free list with itd->frame set to 0
      instead of a meaningful value.  After a while the itd reaches the head
      of the list, and occasionally this happens when ehci->now_frame is
      equal to 0.  Then, even though it would be okay to reuse this itd, the
      driver thinks it must get another itd from the DMA pool.
      
      For as long as the isochronous endpoint remains in use, this flaw in
      the mechanism causes more and more itd's to be taken slowly from the
      DMA pool.  Since none are released back, the pool eventually becomes
      exhausted.
      
      This reuslts in memory allocation failures, which typically show up
      during a long-running audio stream.  Video might suffer the same
      effect.
      
      The fix is very simple.  To prevent allocations from the pool when
      they aren't needed, make sure that itd's sent back to the free list
      prematurely have itd->frame set to an invalid value which can never be
      equal to ehci->now_frame.
      
      This should be applied to -stable kernels going back to 3.6.
      Signed-off-by: NSoeren Moch <smoch@web.de>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      85ecd032
    • I
      staging: comedi: s626: fix continuous acquisition · e4317ce8
      Ian Abbott 提交于
      For the s626 driver, there is a bug in the handling of asynchronous
      commands on the AI subdevice when the stop source is `TRIG_NONE`.  The
      command should run continuously until cancelled, but the interrupt
      handler stops the command running after the first scan.
      
      The command set-up function `s626_ai_cmd()` contains this code:
      
      	switch (cmd->stop_src) {
      	case TRIG_COUNT:
      		/*  data arrives as one packet */
      		devpriv->ai_sample_count = cmd->stop_arg;
      		devpriv->ai_continous = 0;
      		break;
      	case TRIG_NONE:
      		/*  continous acquisition */
      		devpriv->ai_continous = 1;
      		devpriv->ai_sample_count = 0;
      		break;
      	}
      
      The interrupt handler `s626_irq_handler()` contains this code:
      
      		if (!(devpriv->ai_continous))
      			devpriv->ai_sample_count--;
      		if (devpriv->ai_sample_count <= 0) {
      			devpriv->ai_cmd_running = 0;
      			/* ... */
      		}
      
      So `devpriv->ai_sample_count` is only decremented for the `TRIG_COUNT`
      case, but `devpriv->ai_cmd_running` is set to 0 (and the command
      stopped) regardless.
      
      Fix this in `s626_ai_cmd()` by setting `devpriv->ai_sample_count = 1`
      for the `TRIG_NONE` case.  The interrupt handler will not decrement it
      so it will remain greater than 0 and the check for stopping the
      acquisition will fail.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4317ce8
    • S
      xhci: Don't warn on empty ring for suspended devices. · a83d6755
      Sarah Sharp 提交于
      When a device attached to the roothub is suspended, the endpoint rings
      are stopped.  The host may generate a completion event with the
      completion code set to 'Stopped' or 'Stopped Invalid' when the ring is
      halted.  The current xHCI code prints a warning in that case, which can
      be really annoying if the USB device is coming into and out of suspend.
      
      Remove the unnecessary warning.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: NStephen Hemminger <stephen@networkplumber.org>
      a83d6755
    • V
      usb: xhci: Fix TRB transfer length macro used for Event TRB. · 1c11a172
      Vivek Gautam 提交于
      Use proper macro while extracting TRB transfer length from
      Transfer event TRBs. Adding a macro EVENT_TRB_LEN (bits 0:23)
      for the same, and use it instead of TRB_LEN (bits 0:16) in
      case of event TRBs.
      
      This patch should be backported to kernels as old as 2.6.31, that
      contain the commit b10de142 "USB: xhci:
      Bulk transfer support".  This patch will have issues applying to older
      kernels.
      Signed-off-by: NVivek gautam <gautam.vivek@samsung.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      1c11a172
    • 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
    • P
      usb: xhci: fix build warning · 09ce0c0c
      Peter Chen 提交于
      /home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c: In function ‘handle_port_status’:
      /home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c:1580: warning: ‘hcd’ may be used uninitialized in this function
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      09ce0c0c
  5. 25 3月, 2013 6 次提交
  6. 24 3月, 2013 3 次提交
    • D
      Revert "drm/i915: write backlight harder" · b1289371
      Daniel Vetter 提交于
      This reverts commit cf0a6584.
      
      Turns out that cargo-culting breaks systems. Note that we can't revert
      further, since
      
      commit 770c1231
      Author: Takashi Iwai <tiwai@suse.de>
      Date:   Sat Aug 11 08:56:42 2012 +0200
      
          drm/i915: Fix blank panel at reopening lid
      
      fixed a regression in 3.6-rc kernels for which we've never figured out
      the exact root cause. But some further inspection of the backlight
      code reveals that it's seriously lacking locking. And especially the
      asle backlight update is know to get fired (through some smm magic)
      when writing specific backlight control registers. So the possibility
      of suffering from races is rather real.
      
      Until those races are fixed I don't think it makes sense to try
      further hacks. Which sucks a bit, but sometimes that's how it is :(
      
      References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg18788.html
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47941Tested-by: NTakashi Iwai <tiwai@suse.de>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: stable@vger.kernel.org (the reverted commit was cc: stable, too)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b1289371
    • P
      drm/i915: don't disable the power well yet · 2124b72e
      Paulo Zanoni 提交于
      We're still not 100% ready to disable the power well, so don't disable
      it for now. When we disable it we break the audio driver (because some
      of the audio registers are on the power well) and machines with eDP on
      port D (because it doesn't use TRANSCODER_EDP).
      
      Also, instead of just reverting the code, add a Kernel option to let
      us disable it if we want. This will allow us to keep developing and
      testing the feature while it's not enabled.
      
      This fixes problems caused by the following commit:
        commit d6dd9eb1
        Author: Daniel Vetter <daniel.vetter@ffwll.ch>
        Date:   Tue Jan 29 16:35:20 2013 -0200
             drm/i915: dynamic Haswell display power well support
      
      References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg18788.html
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Mengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2124b72e
    • D
      Revert "drm/i915: set TRANSCODER_EDP even earlier" · bba2181c
      Daniel Vetter 提交于
      This reverts commit cc464b2a.
      
      The reason is that Takashi Iwai reported a regression bisected to this
      commit:
      
      http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg18788.html
      
      His machine has eDP on port D (usual desktop all-in-on setup), which
      intel_dp.c identifies as an eDP panel, but the hsw ddi code
      mishandles.
      
      Closer inspection of the code reveals that haswell_crtc_mode_set also
      checks intel_encoder_is_pch_edp when setting is_cpu_edp. On haswell
      that doesn't make much sense (since there's no edp on the pch), but
      what this function _really_ checks is whether that edp connector is on
      port A or port D. It's just that on ilk-ivb port D was on the pch ...
      
      So that explains why this seemingly innocent change killed eDP on port
      D. Furthermore it looks like everything else accidentally works, since
      we've never enabled eDP on port D support for hsw intentionally (e.g.
      we still register the HDMI output for port D in that case).
      
      But in retrospective I also don't like that this leaks highly platform
      specific details into common code, and the reason is that the drm
      vblank layer sucks. So instead I think we should:
      - move the cpu_transcoder into the dynamic pipe_config tracking (once
        that's merged).
      - fix up the drm vblank layer to finally deal with kms crtc objects
        instead of int pipes.
      
      v2: Pimp commit message with the better diagnosis as discussed with
      Paulo on irc.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bba2181c