1. 09 Oct, 2013 2 commits
  2. 03 Oct, 2013 7 commits
    • Nicholas Bellinger's avatar
      iscsi-target; Allow an extra tag_num / 2 number of percpu_ida tags · 9e20ae33
      Nicholas Bellinger authored
      This patch bumps the default number of tags allocated per session by
      iscsi-target via transport_alloc_session_tags() -> percpu_ida_init()
      by another (tag_num / 2).
      
      This is done to take into account the tags waiting to be acknowledged
      and released in iscsit_ack_from_expstatsn(), but who's number are not
      directly limited by the CmdSN Window queue_depth being enforced by
      the target.
      
      Using a larger value here is also useful to prevent percpu_ida_alloc()
      from having to steal tags from other CPUs when no tags are available
      on the local CPU, while waiting for unacknowledged tags to be released.
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      9e20ae33
    • Nicholas Bellinger's avatar
      iscsi-target: Perform release of acknowledged tags from RX context · f56cbbb4
      Nicholas Bellinger authored
      This patch converts iscsit_ack_from_expstatsn() to populate a local
      ack_list of commands, and call iscsit_free_cmd() directly from RX
      thread context, instead of using iscsit_add_cmd_to_immediate_queue()
      to queue the acknowledged commands to be released from TX thread
      context.
      
      It is helpful to release the acknowledge commands as quickly as
      possible, along with the associated percpu_ida tags, in order to
      prevent percpu_ida_alloc() from having to steal tags from other
      CPUs while waiting for iscsit_free_cmd() to happen from TX thread
      context.
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      f56cbbb4
    • Nicholas Bellinger's avatar
      iscsi-target: Only perform wait_for_tasks when performing shutdown · e255a285
      Nicholas Bellinger authored
      This patch changes transport_generic_free_cmd() to only wait_for_tasks
      when shutdown=true is passed to iscsit_free_cmd().
      
      With the advent of >= v3.10 iscsi-target code using se_cmd->cmd_kref,
      the extra wait_for_tasks with shutdown=false is unnecessary, and may
      end up causing an extra context switch when releasing WRITEs.
      
      Cc: stable@vger.kernel.org # 3.10+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      e255a285
    • Nicholas Bellinger's avatar
      target: Fail on non zero scsi_status in compare_and_write_callback · db60df88
      Nicholas Bellinger authored
      This patch addresses a bug for backends such as IBLOCK that perform
      asynchronous completion via transport_complete_cmd(), that will call
      target_complete_failure_work() -> transport_generic_request_failure(),
      upon exception status and invoke cmd->transport_complete_callback()
      -> compare_and_write_callback() incorrectly during the failure case.
      
      It adds a check for a non zero se_cmd->scsi_status within the first
      invocation of compare_and_write_callback(), and will jump to out plus
      up se_device->caw_sem before exiting the callback.
      Reported-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
      Tested-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      db60df88
    • Nicholas Bellinger's avatar
      target: Fix recursive COMPARE_AND_WRITE callback failure · d8855c15
      Nicholas Bellinger authored
      This patch addresses a bug when compare_and_write_callback() invoked from
      target_complete_ok_work() hits an failure from __target_execute_cmd() ->
      cmd->execute_cmd(), that ends up calling transport_generic_request_failure()
      -> compare_and_write_post(), thus causing SCF_COMPARE_AND_WRITE_POST to
      incorrectly be set.
      
      The result of this bug is that target_complete_ok_work() no longer hits
      the if (!rc && !(cmd->se_cmd_flags & SCF_COMPARE_AND_WRITE_POST) check
      that forces an immediate return, and instead double completes the se_cmd
      in question, triggering an OOPs in the process.
      
      This patch changes compare_and_write_post() to only set this bit when a
      failure has not already occured to ensure the immediate return from within
      target_complete_ok_work(), and thus allow transport_generic_request_failure()
      to handle the sending of the CHECK_CONDITION exception status.
      Reported-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
      Tested-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      d8855c15
    • Nicholas Bellinger's avatar
      target: Reset data_length for COMPARE_AND_WRITE to NoLB * block_size · b7191253
      Nicholas Bellinger authored
      This patch resets se_cmd->data_length for COMPARE_AND_WRITE emulation
      within sbc_compare_and_write() to NoLB * block_size in order to address
      a bug with FILEIO backends where a I/O failure will occur when data_length
      does not match the I/O size being actually dispatched for the individual
      per block READs + WRITEs.
      
      This is done late enough in sbc_compare_and_write() after the memory
      allocations have occured in transport_generic_new_cmd() to not cause
      any unwanted side-effects.
      Reported-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
      Tested-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      b7191253
    • Jack Wang's avatar
      ib_srpt: always set response for task management · c807f643
      Jack Wang authored
      The SRP specification requires:
      
        "Response data shall be provided in any SRP_RSP response that is sent in
         response to an SRP_TSK_MGMT request (see 6.7). The information in the
         RSP_CODE field (see table 24) shall indicate the completion status of
         the task management function."
      
      So fix this to avoid the SRP initiator interprets task management functions
      that succeeded as failed.
      Signed-off-by: default avatarJack Wang <jinpu.wang@profitbricks.com>
      Cc: stable@vger.kernel.org # 3.3+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      c807f643
  3. 02 Oct, 2013 4 commits
    • Nicholas Bellinger's avatar
      target: Fall back to vzalloc upon ->sess_cmd_map kzalloc failure · 8c7f6e9b
      Nicholas Bellinger authored
      This patch changes transport_alloc_session_tags() to fall back to
      use vzalloc when kzalloc fails for big tag_num that end up generating
      larger order allocations.
      
      Also use is_vmalloc_addr() in transport_alloc_session_tags() failure
      path, and normal transport_free_session() path to determine when
      vfree() needs to be called instead of kfree().
      
      v2 changes:
        - Use  __GFP_NOWARN | __GFP_REPEAT for sess_cmd_map kzalloc (mst)
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Asias He <asias@redhat.com>
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      8c7f6e9b
    • Nicholas Bellinger's avatar
      vhost/scsi: Use GFP_ATOMIC with percpu_ida_alloc for obtaining tag · 4a47d3a1
      Nicholas Bellinger authored
      Fix GFP_KERNEL -> GFP_ATOMIC usage of percpu_ida_alloc() within
      vhost_scsi_get_tag(), as this code is expected to be called directly
      from interrupt context.
      
      v2 changes:
      
        - Handle possible tag < 0 failure with GFP_ATOMIC
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarAsias He <asias@redhat.com>
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      4a47d3a1
    • Nicholas Bellinger's avatar
      ib_srpt: Destroy cm_id before destroying QP. · 0b41d6ca
      Nicholas Bellinger authored
      This patch fixes a bug where ib_destroy_cm_id() was incorrectly being called
      after srpt_destroy_ch_ib() had destroyed the active QP.
      
      This would result in the following failed SRP_LOGIN_REQ messages:
      
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff1762bd, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c903009f8f41)
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff1758f9, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 2 (guid=0xfe80000000000000:0x2c903009f8f42)
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff175941, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 2 (guid=0xfe80000000000000:0x2c90300a3cfb2)
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)
      mlx4_core 0000:84:00.0: command 0x19 failed: fw status = 0x9
      rejected SRP_LOGIN_REQ because creating a new RDMA channel failed.
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)
      mlx4_core 0000:84:00.0: command 0x19 failed: fw status = 0x9
      rejected SRP_LOGIN_REQ because creating a new RDMA channel failed.
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)
      Reported-by: default avatarNavin Ahuja <navin.ahuja@saratoga-speed.com>
      Cc: stable@vger.kernel.org # 3.3+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      0b41d6ca
    • Nicholas Bellinger's avatar
      target: Fix xop->dbl assignment in target_xcopy_parse_segdesc_02 · 3e9e01de
      Nicholas Bellinger authored
      This patch fixes up an incorrect assignment for xop->dbl within
      target_xcopy_parse_segdesc_02() code, as reported by Coverity here:
      
      http://marc.info/?l=linux-kernel&m=137936416618490&w=2Reported-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      3e9e01de
  4. 29 Sep, 2013 10 commits
    • Linus Torvalds's avatar
      Linux 3.12-rc3 · 15c03dd4
      Linus Torvalds authored
      15c03dd4
    • Linus Torvalds's avatar
      Merge tag 'usb-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 30ceb4ec
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a number of USB driver fixes for 3.12-rc3.
      
        These are all for host controller issues that have been reported, and
        there's a fix for an annoying error message that gets printed every
        time you remove a USB 3 device from the system that's been bugging me
        for a while"
      
      * tag 'usb-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: dwc3: add support for Merrifield
        USB: fsl/ehci: fix failure of checking PHY_CLK_VALID during reinitialization
        USB: Fix breakage in ffs_fs_mount()
        fsl/usb: Resolve PHY_CLK_VLD instability issue for ULPI phy
        usb/core/devio.c: Don't reject control message to endpoint with wrong direction bit
        usb: chipidea: USB_CHIPIDEA should depend on HAS_DMA
        usb: chipidea: udc: free pending TD at removal procedure
        usb: chipidea: imx: Add usb_phy_shutdown at probe's error path
        usb: chipidea: Fix memleak for ci->hw_bank.regmap when removal
        usb: chipidea: udc: fix the oops after rmmod gadget
        USB: fix PM config symbol in uhci-hcd, ehci-hcd, and xhci-hcd
        USB: OHCI: accept very late isochronous URBs
        USB: UHCI: accept very late isochronous URBs
        USB: iMX21: accept very late isochronous URBs
        usbcore: check usb device's state before sending a Set SEL control transfer
        xhci: Fix race between ep halt and URB cancellation
        usb: Fix xHCI host issues on remote wakeup.
        xhci: Ensure a command structure points to the correct trb on the command ring
        xhci: Fix oops happening after address device timeout
      30ceb4ec
    • Linus Torvalds's avatar
      Merge tag 'tty-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 26c019fc
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are some serial at tty driver fixes for 3.12-rc3
      
        The serial driver fixes some kref leaks, documentation is moved to the
        proper places, and the tty and n_tty fixes resolve some reported
        regressions.  There is still one outstanding tty regression fix that
        isn't in here yet, as I want to test it out some more, it will be sent
        for 3.12-rc4 if it checks out"
      
      * tag 'tty-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: ar933x_uart: move devicetree binding documentation
        tty: Fix SIGTTOU not sent with tcflush()
        n_tty: Fix EOF push index when termios changes
        serial: pch_uart: remove unnecessary tty_port_tty_get
        serial: pch_uart: fix tty-kref leak in dma-rx path
        serial: pch_uart: fix tty-kref leak in rx-error path
        serial: tegra: fix tty-kref leak
      26c019fc
    • Linus Torvalds's avatar
      Merge tag 'staging-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 31795c40
      Linus Torvalds authored
      Pull staging fixes from Greg KH:
       "Here are some staging driver fixes, MAINTAINER updates, and a new
        device id.  All of these have been in the linux-next tree, and are
        pretty simple patches"
      
      * tag 'staging-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: r8188eu: Add new device ID
        staging: imx-drm: Fix probe failure
        staging: vt6656: [BUG] iwctl_siwencodeext return if device not open
        staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier.
        staging: vt6656: rxtx.c [BUG] s_vGetFreeContext dead lock on null apTD.
        Staging: rtl8192u: r819xU_cmdpkt: checking NULL value after doing dev_alloc_skb
        staging: usbip: Orphan usbip
        staging: r8188eu: Add files for new drive: Cocci spatch "noderef"
        staging: r8188eu: Cocci spatch "noderef"
        staging: octeon-usb: Cocci spatch "noderef"
        staging: r8188eu: Add files for new drive: Cocci spatch "noderef"
        MAINTAINERS: staging: dgnc and dgap drivers: add maintainer
        staging: lustre: Cocci spatch "noderef"
      31795c40
    • Linus Torvalds's avatar
      Merge tag 'driver-core-3.12-rc3' of... · 434ac47d
      Linus Torvalds authored
      Merge tag 'driver-core-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core / sysfs fixes from Greg KH:
       "Here are 2 fixes for 3.12-rc3.  One fixes a sysfs problem with
        mounting caused by 3.12-rc1, and the other is a bug reported by the
        chromeos developers with the driver core.
      
        Both have been in linux-next for a bit"
      
      * tag 'driver-core-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        driver core : Fix use after free of dev->parent in device_shutdown
        sysfs: Allow mounting without CONFIG_NET
      434ac47d
    • Linus Torvalds's avatar
      Merge tag 'char-misc-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · c23c2234
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some HyperV and MEI driver fixes for 3.12-rc3.  They resolve
        some issues that people have been reporting for them"
      
      * tag 'char-misc-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        Drivers: hv: vmbus: Terminate vmbus version negotiation on timeout
        Drivers: hv: util: Correctly support ws2008R2 and earlier
        mei: cancel stall timers in mei_reset
        mei: bus: stop wait for read during cl state transition
        mei: make me client counters less error prone
      c23c2234
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cac66535
      Linus Torvalds authored
      Pull perf revert from Ingo Molnar:
       "This fixes the 'perf top' regression Markus Trippelsdorf reported"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Revert "perf symbols: Demangle cloned functions"
      cac66535
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · b97b869a
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Nothing too major, radeon still has some dpm changes for off by
        default.
      
        Radeon, intel, msm:
         - radeon: a few more dpm fixes (still off by default), uvd fixes
         - i915: runtime warn backtrace and regression fix
         - msm: iommu changes fallout"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (27 commits)
        drm/msm: use drm_gem_dumb_destroy helper
        drm/msm: deal with mach/iommu.h removal
        drm/msm: Remove iommu include from mdp4_kms.c
        drm/msm: Odd PTR_ERR usage
        drm/i915: Fix up usage of SHRINK_STOP
        drm/radeon: fix hdmi audio on DCE3.0/3.1 asics
        drm/i915: preserve pipe A quirk in i9xx_set_pipeconf
        drm/i915/tv: clear adjusted_mode.flags
        drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
        drm/radeon/cik: fix overflow in vram fetch
        drm/radeon: add missing hdmi callbacks for rv6xx
        drm/i915: Use a temporary va_list for two-pass string handling
        drm/radeon/uvd: lower msg&fb buffer requirements on UVD3
        drm/radeon: disable tests/benchmarks if accel is disabled
        drm/radeon: don't set default clocks for SI when DPM is disabled
        drm/radeon/dpm/ci: filter clocks based on voltage/clk dep tables
        drm/radeon/dpm/si: filter clocks based on voltage/clk dep tables
        drm/radeon/dpm/ni: filter clocks based on voltage/clk dep tables
        drm/radeon/dpm/btc: filter clocks based on voltage/clk dep tables
        drm/radeon/dpm: fetch the max clk from voltage dep tables helper
        ...
      b97b869a
    • Ingo Molnar's avatar
      Revert "perf symbols: Demangle cloned functions" · 14951f22
      Ingo Molnar authored
      This reverts commit de95ab53.
      
      Markus Trippelsdorf reported that this commit broke 'perf top':
      
       > I just see a gray screen with no text at all. Sometimes the
       > following error messages are printed:
       >
       >  *** Error in `perf': invalid fastbin entry (free): 0x00000000029b18c0
       >  ***
       >  *** Error in `perf': malloc(): memory corruption (fast): 0x0000000000ee0b10 ***
      
      While this code is fixable, the commit itself fails on several levels:
      
       - it should have been a separate helper function
       - why the heck does it do strchr() twice
       - it casts a const char * over into char *
       - sloppy style
       - it's not even a regression fix!
      
      So lets revert it and re-try the patch in v3.13.
      Reported-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      14951f22
    • Dave Airlie's avatar
      Merge branch 'msm-fixes-3.12-rc2' of git://people.freedesktop.org/~robclark/linux into drm-fixes · 66544179
      Dave Airlie authored
      A small fix + deal with fallout of iommu changes + use new
      drm_gem_dumb_destroy helper.
      
      * 'msm-fixes-3.12-rc2' of git://people.freedesktop.org/~robclark/linux:
        drm/msm: use drm_gem_dumb_destroy helper
        drm/msm: deal with mach/iommu.h removal
        drm/msm: Remove iommu include from mdp4_kms.c
        drm/msm: Odd PTR_ERR usage
      66544179
  5. 28 Sep, 2013 17 commits