1. 20 11月, 2014 1 次提交
  2. 10 11月, 2014 6 次提交
    • M
      bnx2fc: fix tgt spinlock locking · dc6311dd
      Maurizio Lombardi 提交于
      bnx2fc_queuecommand(): when allocating a new io_req, the tgt_lock
      spinlock must be locked before calling bnx2fc_cmd_alloc().
      
      The spinlock should also be kept locked until bnx2fc_post_io_req() has
      been completed.
      If not, a kernel thread may call bnx2fc_process_cq_compl() that extracts
      the newly allocated io_req from hba->cmd_mgr->cmds and destroys it while
      it is still being used by bnx2fc_post_io_req().
      
      BUG: unable to handle kernel NULL pointer dereference at 000000000000004c
      IP: [<ffffffffa03130da>] bnx2fc_init_task+0x6a/0x230 [bnx2fc]
      PGD 0
      Oops: 0000 [#1] SMP
      last sysfs file: /sys/devices/pci0000:00/0000:00:02.0/0000:04:00.3/net/eth3/type
      CPU 33
      Modules linked in: autofs4 target_core_iblock target_core_file target_core_pscsi target_core_mod configfs bnx2fc cnic uio fcoe libfcoe libfc scsi_transport_fc 8021q garp scsi_tgt stp llc cpufreq_ondemand freq_table pcc_cpufreq ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 power_meter microcode iTCO_wdt iTCO_vendor_support hpilo hpwdt sg bnx2x libcrc32c mdio serio_raw lpc_ich mfd_core shpchp ext4 jbd2 mbcache sd_mod crc_t10dif hpsa video output dm_mirror dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan]
      
      Pid: 7355, comm: bnx2fc_thread/3 Not tainted 2.6.32-431.el6.x86_64 #1 HP ProLiant BL460c Gen8
      RIP: 0010:[<ffffffffa03130da>]  [<ffffffffa03130da>] bnx2fc_init_task+0x6a/0x230 [bnx2fc]
      RSP: 0018:ffff8820b0da3b68  EFLAGS: 00010246
      RAX: 0000000000000000 RBX: ffff882003801080 RCX: 0000000000000000
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff882003801100
      RBP: ffff8820b0da3bc8 R08: ffffffff8160d4e8 R09: 0000000000000040
      R10: 0000000000000000 R11: 0000000000000000 R12: ffff88400e600e00
      R13: ffff8840108fbe40 R14: ffff88200ffe5400 R15: 0000000000000000
      FS:  0000000000000000(0000) GS:ffff8820b0da0000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: 000000000000004c CR3: 0000002010b67000 CR4: 00000000001407e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process bnx2fc_thread/3 (pid: 7355, threadinfo ffff88401f940000, task ffff884012f5f540)
      Stack:
       ffff8820b0da3bc8 ffffffff81527303 ffff884000000020 ffff8820b0da3bd8
      <d> ffff8820b0da3b98 000000028138931a ffff88400f506078 ffff88400e600e00
      <d> ffff88200ffe5400 ffff88200ffe5590 0000000000000021 0000000000000002
      Call Trace:
       <IRQ>
       [<ffffffff81527303>] ? printk+0x41/0x46
       [<ffffffffa03169bc>] bnx2fc_post_io_req+0x11c/0x440 [bnx2fc]
       [<ffffffff812825b9>] ? cpumask_next_and+0x29/0x50
       [<ffffffff8137ffd0>] ? scsi_done+0x0/0x60
       [<ffffffffa0316df7>] bnx2fc_queuecommand+0x117/0x140 [bnx2fc]
       [<ffffffff81380245>] scsi_dispatch_cmd+0xe5/0x310
       [<ffffffff81388b9e>] scsi_request_fn+0x5ee/0x7a0
       [<ffffffff812658f1>] __blk_run_queue+0x31/0x40
       [<ffffffff81265a40>] blk_run_queue+0x30/0x50
       [<ffffffff81387da6>] scsi_run_queue+0xc6/0x270
       [<ffffffff81260f92>] ? elv_requeue_request+0x52/0xa0
       [<ffffffff813897a0>] scsi_requeue_command+0x90/0xb0
       [<ffffffff81389b84>] scsi_io_completion+0x154/0x6c0
       [<ffffffff8137ff62>] scsi_finish_command+0xc2/0x130
       [<ffffffff8138a255>] scsi_softirq_done+0x145/0x170
       [<ffffffff8126e865>] blk_done_softirq+0x85/0xa0
       [<ffffffff8107a8e1>] __do_softirq+0xc1/0x1e0
       [<ffffffff8100c30c>] ? call_softirq+0x1c/0x30
       [<ffffffff8100c30c>] call_softirq+0x1c/0x30
       <EOI>
       [<ffffffff8100fa75>] ? do_softirq+0x65/0xa0
       [<ffffffff8107a40a>] local_bh_enable_ip+0x9a/0xb0
       [<ffffffff8152a4eb>] _spin_unlock_bh+0x1b/0x20
       [<ffffffffa0313937>] bnx2fc_process_cq_compl+0x257/0x2b0 [bnx2fc]
       [<ffffffffa03114ea>] bnx2fc_percpu_io_thread+0xea/0x160 [bnx2fc]
       [<ffffffffa0311400>] ? bnx2fc_percpu_io_thread+0x0/0x160 [bnx2fc]
       [<ffffffff8109aef6>] kthread+0x96/0xa0
       [<ffffffff8100c20a>] child_rip+0xa/0x20
       [<ffffffff8109ae60>] ? kthread+0x0/0xa0
       [<ffffffff8100c200>] ? child_rip+0x0/0x20
      Code: 89 df 45 8b 7e 30 0f 85 75 01 00 00 89 d1 31 c0 c1 e9 03 83 e2 04 89 c9 f3 48 ab 74 06 c7 07 00 00 00 00 49 89 9c 24 88 01 00 00 <83> 7e 4c 01 b8 01 00 00 00 0f 84 e7 00 00 00 89 c2 0a 53 38 41
      RIP  [<ffffffffa03130da>] bnx2fc_init_task+0x6a/0x230 [bnx2fc]
       RSP <ffff8820b0da3b68>
      CR2: 000000000000004c
      Signed-off-by: NMaurizio Lombardi <mlombard@redhat.com>
      Acked-by: NChad Dupuis <chad.dupuis@qlogic.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      dc6311dd
    • J
      megaraid_sas: fix bug in handling return value of pci_enable_msix_range() · c12de882
      Jiang Liu 提交于
      Function pci_enable_msix_range() may return negative values for error
      conditions. So it's a bug by checking (pci_enable_msix_range() != 0)
      for success and causes failure to megaraid driver when MSI is disabled.
      [   16.487267] megaraid_sas 0000:02:00.0: Controller type: iMR
      [   16.487275] genirq: Flags mismatch irq 0. 00000000 (megasas) vs. 00015a00 (tii
      mer)
      [   16.487347] megasas: Failed to register IRQ for vector 0.
      
      Fixes: 8ae80ed1 "megaraid: Use pci_enable_msix_range() instead of pci_enable_msix()"
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Acked-by: NSumit Saxena <sumit.saxena@avagotech.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: <stable@vger.kernel.org> # 3.17
      c12de882
    • A
      cxgb4i: send abort_rpl correctly · 7b07bf24
      Anish Bhatt 提交于
      Connection retries were not being cleaned up correctly if they failed as a
      result of link down. Applies on top of drivers-for-3.18.
      Signed-off-by: NAnish Bhatt <anish@chelsio.com>
      Signed-off-by: NKaren Xie <kxie@chelsio.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      7b07bf24
    • W
      scsi: TUR path is down after adapter gets reset with multipath · 333b2448
      wenxiong@linux.vnet.ibm.com 提交于
      This patch fixes an issue with multipath ipr SAS devices which require a
      start unit command to be issued following an adapter reset. Without this
      patch, paths get marked failed following an adapter reset and since the
      error handler never gets invoked to issue the start unit, the paths are
      never recovered. Returning FAILED for this case ensures the error
      handler wakes up to issue the start unit.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Tested-by: NWen Xiong <wenxiong@linux.vnet.ibm.com>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      333b2448
    • C
      scsi: call device handler for failed TUR command · e925cc43
      Christoph Hellwig 提交于
      Multipath devices using the TUR path checker need to see the sense
      code for a failed TUR command in their device handler.  Since commit
      14216561 we always return success for mid
      layer issued TUR commands before calling the device handler, which
      stopped the TUR path checker from working.
      
      Move the call to the device handler check sense method before the early
      return for TUR commands to give the device handler a chance to intercept
      them.
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Tested-by: NWen Xiong <wenxiong@linux.vnet.ibm.com>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      e925cc43
    • C
      scsi: only re-lock door after EH on devices that were reset · 48379270
      Christoph Hellwig 提交于
      Setups that use the blk-mq I/O path can lock up if a host with a single
      device that has its door locked enters EH.  Make sure to only send the
      command to re-lock the door to devices that actually were reset and thus
      might have lost their state.  Otherwise the EH code might be get blocked
      on blk_get_request as all requests for non-reset devices might be in use.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reported-by: NMeelis Roos <meelis.roos@ut.ee>
      Tested-by: NMeelis Roos <meelis.roos@ut.ee>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      48379270
  3. 29 10月, 2014 2 次提交
  4. 28 10月, 2014 2 次提交
  5. 20 10月, 2014 1 次提交
  6. 16 10月, 2014 1 次提交
  7. 15 10月, 2014 8 次提交
  8. 14 10月, 2014 1 次提交
  9. 06 10月, 2014 1 次提交
  10. 05 10月, 2014 1 次提交
    • M
      block: disable entropy contributions for nonrot devices · b277da0a
      Mike Snitzer 提交于
      Clear QUEUE_FLAG_ADD_RANDOM in all block drivers that set
      QUEUE_FLAG_NONROT.
      
      Historically, all block devices have automatically made entropy
      contributions.  But as previously stated in commit e2e1a148 ("block: add
      sysfs knob for turning off disk entropy contributions"):
          - On SSD disks, the completion times aren't as random as they
            are for rotational drives. So it's questionable whether they
            should contribute to the random pool in the first place.
          - Calling add_disk_randomness() has a lot of overhead.
      
      There are more reliable sources for randomness than non-rotational block
      devices.  From a security perspective it is better to err on the side of
      caution than to allow entropy contributions from unreliable "random"
      sources.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      b277da0a
  11. 04 10月, 2014 1 次提交
  12. 03 10月, 2014 2 次提交
  13. 02 10月, 2014 5 次提交
  14. 01 10月, 2014 8 次提交
    • C
      scsi: add a CONFIG_SCSI_MQ_DEFAULT option · 24c20f10
      Christoph Hellwig 提交于
      Add a Kconfig option to enable the blk-mq path for SCSI by default
      to ease testing and deployment in setups that know they benefit
      from blk-mq.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: NRobert Elliott <elliott@hp.com>
      Tested-by: NRobert Elliott <elliott@hp.com>
      24c20f10
    • D
      ufs: definitions for phy interface · e785060e
      Dolev Raviv 提交于
      - Adding some of the definitions missing in unipro.h, including power
        enumeration.
      - Read Modify Write Line helper function
      - Indication for the type of suspend
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org>
      Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      e785060e
    • S
      ufs: tune bkops while power managment events · 374a246e
      Subhash Jadavani 提交于
      Add capability to control the auto bkops during suspend.
      If host explicitly enables the auto bkops (background operation) on device
      then only device would perform the bkops on its own. If auto bkops is not
      enabled explicitly and if the device reaches to state where it must do
      background operation, device would raise the urgent bkops exception event
      to host and then host will enable the auto bkops on device. This patch
      adds the option to choose whether auto bkops should be enabled during
      runtime suspend or not. Since we don't want to keep the device active to
      perform the non critical bkops, host will enable urgent bkops only.
      
      Keep auto-bkops enabled after resume if urgent bkops needed.
      If device bkops status shows that its in critical need of executing
      background operations, host should allow the device to continue doing
      background operations.
      Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      374a246e
    • S
      ufs: Add support for clock scaling using devfreq framework · 856b3483
      Sahitya Tummala 提交于
      The clocks for UFS device will be managed by generic DVFS (Dynamic
      Voltage and Frequency Scaling) framework within kernel. This devfreq
      framework works with different governors to scale the clocks. By default,
      UFS devices uses simple_ondemand governor which scales the clocks up if
      the load is more than upthreshold and scales down if the load is less than
      downthreshold.
      Signed-off-by: NSahitya Tummala <stummala@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      856b3483
    • S
      ufs: Add freq-table-hz property for UFS device · 4cff6d99
      Sahitya Tummala 提交于
      Add freq-table-hz propery for UFS device to keep track of
      <min max> frequencies supported by UFS clocks.
      Signed-off-by: NSahitya Tummala <stummala@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      4cff6d99
    • S
      ufs: Add support for clock gating · 1ab27c9c
      Sahitya Tummala 提交于
      The UFS controller clocks can be gated after certain period of
      inactivity, which is typically less than runtime suspend timeout.
      In addition to clocks the link will also be put into Hibern8 mode
      to save more power.
      
      The clock gating can be turned on by enabling the capability
      UFSHCD_CAP_CLK_GATING. To enable entering into Hibern8 mode as part of
      clock gating, set the capability UFSHCD_CAP_HIBERN8_WITH_CLK_GATING.
      
      The tracing events for clock gating can be enabled through debugfs as:
      echo 1 > /sys/kernel/debug/tracing/events/ufs/ufshcd_clk_gating/enable
      cat /sys/kernel/debug/tracing/trace_pipe
      Signed-off-by: NSahitya Tummala <stummala@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      1ab27c9c
    • D
      ufs: refactor configuring power mode · 7eb584db
      Dolev Raviv 提交于
      Sometimes, the device shall report its maximum power and speed
      capabilities, but we might not wish to configure it to use those
      maximum capabilities.
      This change adds support for the vendor specific host driver to
      implement power change notify callback.
      
      To enable configuring different power modes (number of lanes,
      gear number and fast/slow modes) it is necessary to split the
      configuration stage from the stage that reads the device max power mode.
      In addition, it is not required to read the configuration more than
      once, thus the configuration is stored after reading it once.
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      7eb584db
    • S
      ufs: add UFS power management support · 57d104c1
      Subhash Jadavani 提交于
      This patch adds support for UFS device and UniPro link power management
      during runtime/system PM.
      
      Main idea is to define multiple UFS low power levels based on UFS device
      and UFS link power states. This would allow any specific platform or pci
      driver to choose the best suited low power level during runtime and
      system suspend based on their power goals.
      
      bkops handlig:
      To put the UFS device in sleep state when bkops is disabled, first query
      the bkops status from the device and enable bkops on device only if
      device needs time to perform the bkops.
      
      START_STOP handling:
      Before sending START_STOP_UNIT to the device well-known logical unit
      (w-lun) to make sure that the device w-lun unit attention condition is
      cleared.
      
      Write protection:
      UFS device specification allows LUs to be write protected, either
      permanently or power on write protected. If any LU is power on write
      protected and if the card is power cycled (by powering off VCCQ and/or
      VCC rails), LU's write protect status would be lost. So this means those
      LUs can be written now. To ensures that UFS device is power cycled only
      if the power on protect is not set for any of the LUs, check if power on
      write protect is set and if device is in sleep/power-off state & link in
      inactive state (Hibern8 or OFF state).
      If none of the Logical Units on UFS device is power on write protected
      then all UFS device power rails (VCC, VCCQ & VCCQ2) can be turned off if
      UFS device is in power-off state and UFS link is in OFF state. But current
      implementation would disable all device power rails even if UFS link is
      not in OFF state.
      
      Low power mode:
      If UFS link is in OFF state then UFS host controller can be power collapsed
      to avoid leakage current from it. Note that if UFS host controller is power
      collapsed, full UFS reinitialization will be required on resume to
      re-establish the link between host and device.
      Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      57d104c1