1. 03 4月, 2014 4 次提交
  2. 30 3月, 2014 3 次提交
    • D
      Input: mousedev - fix race when creating mixed device · e4dbedc7
      Dmitry Torokhov 提交于
      We should not be using static variable mousedev_mix in methods that can be
      called before that singleton gets assigned. While at it let's add open and
      close methods to mousedev structure so that we do not need to test if we
      are dealing with multiplexor or normal device and simply call appropriate
      method directly.
      
      This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=71551Reported-by: NGiulioDP <depasquale.giulio@gmail.com>
      Tested-by: NGiulioDP <depasquale.giulio@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      e4dbedc7
    • E
      Input: don't modify the id of ioctl-provided ff effect on upload failure · fc7392aa
      Elias Vanderstuyft 提交于
      If a new (id == -1) ff effect was uploaded from userspace,
      ff-core.c::input_ff_upload() will have assigned a positive number to the
      new effect id.  Currently, evdev.c::evdev_do_ioctl() will save this new id
      to userspace, regardless of whether the upload succeeded or not.
      
      On upload failure, this can be confusing because the dev->ff->effects[]
      array will not contain an element at the index of that new effect id.
      
      This patch fixes this by leaving the id unchanged after upload fails.
      
      Note: Unfortunately applications should still expect changed effect id for
      quite some time.
      
      This has been discussed on:
      http://www.mail-archive.com/linux-input@vger.kernel.org/msg08513.html
      ("ff-core effect id handling in case of a failed effect upload")
      Suggested-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NElias Vanderstuyft <elias.vds@gmail.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      fc7392aa
    • A
      rbd: drop an unsafe assertion · 638c323c
      Alex Elder 提交于
      Olivier Bonvalet reported having repeated crashes due to a failed
      assertion he was hitting in rbd_img_obj_callback():
      
          Assertion failure in rbd_img_obj_callback() at line 2165:
      	rbd_assert(which >= img_request->next_completion);
      
      With a lot of help from Olivier with reproducing the problem
      we were able to determine the object and image requests had
      already been completed (and often freed) at the point the
      assertion failed.
      
      There was a great deal of discussion on the ceph-devel mailing list
      about this.  The problem only arose when there were two (or more)
      object requests in an image request, and the problem was always
      seen when the second request was being completed.
      
      The problem is due to a race in the window between setting the
      "done" flag on an object request and checking the image request's
      next completion value.  When the first object request completes, it
      checks to see if its successor request is marked "done", and if
      so, that request is also completed.  In the process, the image
      request's next_completion value is updated to reflect that both
      the first and second requests are completed.  By the time the
      second request is able to check the next_completion value, it
      has been set to a value *greater* than its own "which" value,
      which caused an assertion to fail.
      
      Fix this problem by skipping over any completion processing
      unless the completing object request is the next one expected.
      Test only for inequality (not >=), and eliminate the bad
      assertion.
      Tested-by: NOlivier Bonvalet <ob@daevel.fr>
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Reviewed-by: NSage Weil <sage@inktank.com>
      Reviewed-by: NIlya Dryomov <ilya.dryomov@inktank.com>
      638c323c
  3. 29 3月, 2014 7 次提交
  4. 28 3月, 2014 5 次提交
  5. 27 3月, 2014 7 次提交
    • D
      drm/nouveau: fail runtime pm properly. · adbbdbac
      Dave Airlie 提交于
      If we were on a non-optimus device, we'd return -EINVAL, this would
      lead to the over engineered runtime pm system to go into an error
      state, subsequent get_sync's would fail, so we'd never be able
      to open the device again.
      
      (like really get_sync shouldn't fail if the device isn't powered
      down).
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      adbbdbac
    • D
      drm/udl: take reference to device struct for dma-bufs · 347cf10a
      Dave Airlie 提交于
      this stops the device from being deleted before all the dma-bufs
      on it are freed, this fixes an oops when you unplug a udl device while
      it has imported a buffer from another device.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      347cf10a
    • T
      net: mvneta: use devm_ioremap_resource() instead of of_iomap() · b5f3b75d
      Thomas Petazzoni 提交于
      The mvneta driver currently uses of_iomap(), which has two drawbacks:
      it doesn't request the resource, and it isn't devm-style so some error
      handling is needed.
      
      This commit switches to use devm_ioremap_resource() instead, which
      automatically requests the resource (so the I/O registers region shows
      up properly in /proc/iomem), and also is devm-style, which allows to
      get rid of some error handling to unmap the I/O registers region.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5f3b75d
    • T
      net: mvneta: fix usage as a module on RGMII configurations · e3a8786c
      Thomas Petazzoni 提交于
      Commit 5445eaf3 ('mvneta: Try to fix mvneta when compiled as
      module') fixed the mvneta driver to make it work properly when loaded
      as a module in SGMII configuration, which was tested successful by the
      author on the Armada XP OpenBlocks AX3, which uses SGMII.
      
      However, it turns out that the Armada XP GP, which uses RGMII, is
      affected by a similar problem: its SERDES configuration is lost when
      mvneta is loaded as a module, because this configuration is set by the
      bootloader, and then lost because the clock is gated by the clock
      framework until the mvneta driver is loaded again and the clock is
      re-enabled.
      
      However, it turns out that for the RGMII case, setting the SERDES
      configuration is not sufficient: the PCS enable bit in the
      MVNETA_GMAC_CTRL_2 register must also be set, like in the SGMII
      configuration.
      
      Therefore, this commit reworks the SGMII/RGMII initialization: the
      only difference between the two now is a different SERDES
      configuration, all the rest is identical.
      
      In detail, to achieve this, the commit:
      
       * Renames MVNETA_SGMII_SERDES_CFG to MVNETA_SERDES_CFG because it is
         not specific to SGMII, but also used on RGMII configurations.
      
       * Adds a MVNETA_RGMII_SERDES_PROTO definition, that must be used as
         the MVNETA_SERDES_CFG value in RGMII configurations.
      
       * Removes the mvneta_gmac_rgmii_set() and mvneta_port_sgmii_config()
         functions, and instead directly do the SGMII/RGMII configuration in
         mvneta_port_up(), from where those functions where called. It is
         worth mentioning that mvneta_gmac_rgmii_set() had an 'enable'
         parameter that was always passed as '1', so it was pretty useless.
      
       * Reworks the mvneta_port_up() function to set the MVNETA_SERDES_CFG
         register to the appropriate value depending on the RGMII vs. SGMII
         configuration. It also unconditionally set the PCS_ENABLE bit (was
         already done for SGMII, but is now also needed for RGMII), and sets
         the PORT_RGMII bit (which was already done for both SGMII and
         RGMII).
      
      This commit was successfully tested with mvneta compiled as a module,
      on both the OpenBlocks AX3 (SGMII configuration) and the Armada XP GP
      (RGMII configuration).
      Reported-by: NSteve McIntyre <steve@einval.com>
      Cc: stable@vger.kernel.org # 3.11.x: 5445eaf3 mvneta: Try to fix mvneta when compiled as module
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3a8786c
    • T
      net: mvneta: rename MVNETA_GMAC2_PSC_ENABLE to MVNETA_GMAC2_PCS_ENABLE · a79121d3
      Thomas Petazzoni 提交于
      Bit 3 of the MVNETA_GMAC_CTRL_2 is actually used to enable the PCS,
      not the PSC: there was a typo in the name of the define, which this
      commit fixes.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a79121d3
    • H
      Input: cypress_ps2 - don't report as a button pads · 6797b39e
      Hans de Goede 提交于
      The cypress PS/2 trackpad models supported by the cypress_ps2 driver
      emulate BTN_RIGHT events in firmware based on the finger position, as part
      of this no motion events are sent when the finger is in the button area.
      
      The INPUT_PROP_BUTTONPAD property is there to indicate to userspace that
      BTN_RIGHT events should be emulated in userspace, which is not necessary
      in this case.
      
      When INPUT_PROP_BUTTONPAD is advertised userspace will wait for a motion
      event before propagating the button event higher up the stack, as it needs
      current abs x + y data for its BTN_RIGHT emulation. Since in the
      cypress_ps2 pads don't report motion events in the button area, this means
      that clicks in the button area end up being ignored, so
      INPUT_PROP_BUTTONPAD actually causes problems for these touchpads, and
      removing it fixes:
      
      https://bugs.freedesktop.org/show_bug.cgi?id=76341Reported-by: NAdam Williamson <awilliam@redhat.com>
      Tested-by: NAdam Williamson <awilliam@redhat.com>
      Reviewed-by: NPeter Hutterer <peter.hutterer@who-t.net>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      6797b39e
    • V
      tg3: Do not include vlan acceleration features in vlan_features · 51dfe7b9
      Vlad Yasevich 提交于
      Including hardware acceleration features in vlan_features breaks
      stacked vlans (Q-in-Q) by marking the bottom vlan interface as
      capable of acceleration.  This causes one of the tags to be lost
      and the packets are sent with a sing vlan header.
      
      CC: Nithin Nayak Sujir <nsujir@broadcom.com>
      CC: Michael Chan <mchan@broadcom.com>
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51dfe7b9
  6. 25 3月, 2014 4 次提交
    • W
      xen/balloon: flush persistent kmaps in correct position · 09ed3d5b
      Wei Liu 提交于
      Xen balloon driver will update ballooned out pages' P2M entries to point
      to scratch page for PV guests. In 24f69373 ("xen/balloon: don't alloc
      page while non-preemptible", kmap_flush_unused was moved after updating
      P2M table. In that case for 32 bit PV guest we might end up with
      
        P2M    X -----> S  (S is mfn of balloon scratch page)
        M2P    Y -----> X  (Y is mfn in persistent kmap entry)
      
      kmap_flush_unused() iterates through all the PTEs in the kmap address
      space, using pte_to_page() to obtain the page. If the p2m and the m2p
      are inconsistent the incorrect page is returned.  This will clear
      page->address on the wrong page which may cause subsequent oopses if
      that page is currently kmap'ed.
      
      Move the flush back between get_page and __set_phys_to_machine to fix
      this.
      Signed-off-by: NWei Liu <wei.liu2@citrix.com>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Cc: stable@vger.kernel.org # 3.12+
      09ed3d5b
    • D
      vxlan: fix nonfunctional neigh_reduce() · 4b29dba9
      David Stevens 提交于
      The VXLAN neigh_reduce() code is completely non-functional since
      check-in. Specific errors:
      
      1) The original code drops all packets with a multicast destination address,
      	even though neighbor solicitations are sent to the solicited-node
      	address, a multicast address. The code after this check was never run.
      2) The neighbor table lookup used the IPv6 header destination, which is the
      	solicited node address, rather than the target address from the
      	neighbor solicitation. So neighbor lookups would always fail if it
      	got this far. Also for L3MISSes.
      3) The code calls ndisc_send_na(), which does a send on the tunnel device.
      	The context for neigh_reduce() is the transmit path, vxlan_xmit(),
      	where the host or a bridge-attached neighbor is trying to transmit
      	a neighbor solicitation. To respond to it, the tunnel endpoint needs
      	to do a *receive* of the appropriate neighbor advertisement. Doing a
      	send, would only try to send the advertisement, encapsulated, to the
      	remote destinations in the fdb -- hosts that definitely did not do the
      	corresponding solicitation.
      4) The code uses the tunnel endpoint IPv6 forwarding flag to determine the
      	isrouter flag in the advertisement. This has nothing to do with whether
      	or not the target is a router, and generally won't be set since the
      	tunnel endpoint is bridging, not routing, traffic.
      
      	The patch below creates a proxy neighbor advertisement to respond to
      neighbor solicitions as intended, providing proper IPv6 support for neighbor
      reduction.
      Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b29dba9
    • C
      net: davinci_emac: Fix rollback of emac_dev_open() · cd11cf50
      Christian Riesch 提交于
      If an error occurs during the initialization in emac_dev_open() (the
      driver's ndo_open function), interrupts, DMA descriptors etc. must be freed.
      The current rollback code is buggy in several ways.
      
        1) Freeing the interrupts. The current code will not free all interrupts
           that were requested by the driver. Furthermore,  the code tries to do a
           platform_get_resource(priv->pdev, IORESOURCE_IRQ, -1) in its last
           iteration.
      
           This patch fixes these bugs.
      
        2) Wrong order of err: and rollback: labels. If the setup of the PHY in
           the code fails, the interrupts that have been requested before are
           not freed:
      
              request irq
                      if requesting irqs fails, goto rollback
              setup phy
                      if phy setup fails, goto err
              return 0
      
           rollback:
              free irqs
           err:
      
           This patch brings the code into the correct order.
      
        3) The code calls napi_enable() and emac_int_enable(), but does not
           undo both in case of an error.
      
           This patch adds calls of emac_int_disable() and napi_disable() to the
           rollback code.
      
        4) RX DMA descriptors are not freed in case of an error: Right before
           requesting the irqs, the function creates DMA descriptors for the
           RX channel. These RX descriptors are never freed when we jump to either
           rollback or err.
      
           This patch adds code for freeing the DMA descriptors in the case of
           an initialization error. This required a modification of
           cpdma_ctrl_stop() in davinci_cpdma.c: We must be able to call this
           function to free the DMA descriptors while the DMA channels are
           in IDLE state (before cpdma_ctlr_start() was called).
      
      Tested on a custom board with the Texas Instruments AM1808.
      Signed-off-by: NChristian Riesch <christian.riesch@omicron.at>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd11cf50
    • C
      net: davinci_emac: Replace devm_request_irq with request_irq · 33b7107f
      Christian Riesch 提交于
      In commit 6892b41d
      
      Author: Lad, Prabhakar <prabhakar.csengg@gmail.com>
      Date:   Tue Jun 25 21:24:51 2013 +0530
      net: davinci: emac: Convert to devm_* api
      
      the call of request_irq is replaced by devm_request_irq and the call
      of free_irq is removed. But since interrupts are requested in
      emac_dev_open, doing ifconfig up/down on the board requests the
      interrupts again each time, causing devm_request_irq to fail. The
      interface is dead until the device is rebooted.
      
      This patch reverts said commit partially: It changes the driver back
      to use request_irq instead of devm_request_irq, puts free_irq back in
      place, but keeps the remaining changes of the original patch.
      Reported-by: NJon Ringle <jon@ringle.org>
      Signed-off-by: NChristian Riesch <christian.riesch@omicron.at>
      Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33b7107f
  7. 24 3月, 2014 2 次提交
  8. 20 3月, 2014 2 次提交
  9. 19 3月, 2014 6 次提交