Skip to content
  1. Mar 19, 2014
  2. Mar 18, 2014
  3. Mar 14, 2014
    • Sam Bradshaw's avatar
      mtip32xx: mtip_async_complete() bug fixes · 5eb9291c
      Sam Bradshaw authored
      
      
      This patch fixes 2 issues in the fast completion path:
      1) Possible double completions / double dma_unmap_sg() calls due to lack
      of atomicity in the check and subsequent dereference of the upper layer
      callback function. Fixed with cmpxchg before unmap and callback.
      2) Regression in unaligned IO constraining workaround for p420m devices.
      Fixed by checking if IO is unaligned and using proper semaphore if so.
      
      Signed-off-by: default avatarSam Bradshaw <sbradshaw@micron.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      5eb9291c
    • Felipe Franciosi's avatar
      mtip32xx: Unmap the DMA segments before completing the IO request · 368c89d7
      Felipe Franciosi authored
      
      
      If the buffers are unmapped after completing a request, then stale data
      might be in the request.
      
      Signed-off-by: default avatarFelipe Franciosi <felipe@paradoxo.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      368c89d7
    • Felipe Franciosi's avatar
      mtip32xx: Set queue bounce limit · 1044b1bb
      Felipe Franciosi authored
      
      
      We need to set the queue bounce limit during the device initialization to
      prevent excessive bouncing on 32 bit architectures.
      
      Signed-off-by: default avatarFelipe Franciosi <felipe@paradoxo.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      1044b1bb
    • Alexander Gordeev's avatar
      nvme: Use pci_enable_msi_range() and pci_enable_msix_range() · be577fab
      Alexander Gordeev authored
      
      
      As result of deprecation of MSI-X/MSI enablement functions
      pci_enable_msix() and pci_enable_msi_block() all drivers
      using these two interfaces need to be updated to use the
      new pci_enable_msi_range()  or pci_enable_msi_exact()
      and pci_enable_msix_range() or pci_enable_msix_exact()
      interfaces.
      
      Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: linux-nvme@lists.infradead.org
      Cc: linux-pci@vger.kernel.org
      Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      be577fab
    • Alexander Gordeev's avatar
      cciss: Fallback to MSI rather than to INTx if MSI-X failed · 371ff93a
      Alexander Gordeev authored
      
      
      Currently the driver falls back to INTx mode when MSI-X
      initialization failed. This is a suboptimal behaviour
      for chips that also support MSI. This update changes that
      behaviour and falls back to MSI mode in case MSI-X mode
      initialization failed.
      
      Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: iss_storagedev@hp.com
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: linux-pci@vger.kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      371ff93a
    • Arnd Bergmann's avatar
      swim3: fix interruptible_sleep_on race · 106fd892
      Arnd Bergmann authored
      
      
      interruptible_sleep_on is racy and going away. This replaces the one
      caller in the swim3 driver with the equivalent race-free
      wait_event_interruptible call. Since we're here already, this
      also fixes the case where we get interrupted from atomic context,
      which used to just spin in the loop.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      106fd892
    • Arnd Bergmann's avatar
      ataflop: fix sleep_on races · 7b8a3d22
      Arnd Bergmann authored
      
      
      sleep_on() is inherently racy, and has been deprecated for a long time.
      This fixes two instances in the atari floppy driver:
      
      * fdc_wait/fdc_busy becomes an open-coded mutex. We cannot use the
        regular mutex since it gets released in interrupt context. The
        open-coded version using wait_event() and cmpxchg() is equivalent
        to the existing code but does the checks atomically, and we can
        now safely check the condition with irqs enabled.
      
      * format_wait becomes a completion, which is the natural structure
        here. The format ioctl waits for the background task to either
        complete or abort.
      
      This does not attempt to fix the preexisting bug of calling schedule
      with local interrupts disabled.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      7b8a3d22
    • Arnd Bergmann's avatar
      DAC960: remove sleep_on usage · 9c552e1d
      Arnd Bergmann authored
      
      
      sleep_on and its variants are going away. The use of sleep_on() in
      DAC960_V2_ExecuteUserCommand seems to be bogus because the command
      by the time we get there, the command has completed already and
      we just enter the timeout. Based on this interpretation, I concluded
      that we can replace it with a simple msleep(1000) and rearrange the
      code around it slightly.
      
      The interruptible_sleep_on_timeout in DAC960_gam_ioctl seems equivalent
      to the race-free version using wait_event_interruptible_timeout.
      I left the driver to return -EINTR rather than -ERESTARTSYS to preserve
      the timeout behavior.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      9c552e1d
    • Alexander Gordeev's avatar
      mtip32xx: Use pci_enable_msi() instead of pci_enable_msi_range() · c94efe36
      Alexander Gordeev authored
      
      
      Commit "mtip32xx: Use pci_enable_msix_range() instead of
      pci_enable_msix()" was unnecessary, since pci_enable_msi()
      function is not deprecated and is still preferable for
      enabling the single MSI mode. This update reverts usage of
      pci_enable_msi() function.
      
      Besides, the changelog for that commit was bogus, since
      mtip32xx driver uses MSI interrupt, not MSI-X.
      
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Asai Thambi S P <asamymuthupa@micron.com>
      Cc: linux-pci@vger.kernel.org
      
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      c94efe36
  4. Feb 26, 2014
  5. Feb 22, 2014