1. 14 9月, 2012 1 次提交
    • J
      [SCSI] mvsas: Fix oops when ata commond timeout. · 95ab0003
      Jianpeng Ma 提交于
      Kernel message follows:
      
      [  511.712011] sd 11:0:0:0: [sdf] command ffff8800a4e81400 timed out
      [  511.712022] sas: Enter sas_scsi_recover_host busy: 1 failed: 1
      [  511.712024] sas: trying to find task 0xffff8800a4d24c80
      [  511.712026] sas: sas_scsi_find_task: aborting task 0xffff8800a4d24c80
      [  511.712029] drivers/scsi/mvsas/mv_sas.c 1631:mvs_abort_task()
      mvi=ffff8800b5300000 task=ffff8800a4d24c80 slot=ffff8800b5325038
      slot_idx=x0
      [  511.712035] BUG: unable to handle kernel NULL pointer dereference at
      0000000000000058
      [  511.712040] IP: [<ffffffff815f8c0c>] _raw_spin_lock_irqsave+0xc/0x30
      [  511.712047] PGD 0
      [  511.712049] Oops: 0002 [#1] SMP
      [  511.712052] Modules linked in: mvsas libsas scsi_transport_sas
      raid456 async_pq async_xor xor async_memcpy async_raid6_recov raid6_pq
      async_tx [last unloaded: mvsas]
      [  511.712062] CPU 3
      [  511.712066] Pid: 7322, comm: scsi_eh_11 Not tainted 3.5.0+ #106 To Be
      Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M.
      [  511.712068] RIP: 0010:[<ffffffff815f8c0c>]  [<ffffffff815f8c0c>]
      _raw_spin_lock_irqsave+0xc/0x30
      [  511.712073] RSP: 0018:ffff880098d3bcb0  EFLAGS: 00010086
      [  511.712074] RAX: 0000000000000286 RBX: 0000000000000058 RCX:
      00000000000000c3
      [  511.712076] RDX: 0000000000000100 RSI: 0000000000000046 RDI:
      0000000000000058
      [  511.712078] RBP: ffff880098d3bcb0 R08: 000000000000000a R09:
      0000000000000000
      [  511.712080] R10: 00000000000004e8 R11: 00000000000004e7 R12:
      ffff8800a4d24c80
      [  511.712082] R13: 0000000000000050 R14: ffff8800b5325038 R15:
      ffff8800a4eafe00
      [  511.712084] FS:  0000000000000000(0000) GS:ffff8800bdb80000(0000)
      knlGS:0000000000000000
      [  511.712086] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [  511.712088] CR2: 0000000000000058 CR3: 00000000a4ce6000 CR4:
      00000000000407e0
      [  511.712090] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
      0000000000000000
      [  511.712091] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
      0000000000000400
      [  511.712093] Process scsi_eh_11 (pid: 7322, threadinfo
      ffff880098d3a000, task ffff8800a61dde40)
      [  511.712095] Stack:
      [  511.712096]  ffff880098d3bce0 ffffffff81060683 ffff880000000000
      0000000000000000
      [  511.712099]  ffff8800a4d24c80 ffff8800b5300000 ffff880098d3bcf0
      ffffffffa0076a88
      [  511.712102]  ffff880098d3bd50 ffffffffa0079bb5 ffff880000000000
      ffff880000000018
      [  511.712106] Call Trace:
      [  511.712110]  [<ffffffff81060683>] complete+0x23/0x60
      [  511.712115]  [<ffffffffa0076a88>] mvs_tmf_timedout+0x18/0x20 [mvsas]
      [  511.712119]  [<ffffffffa0079bb5>] mvs_slot_complete+0x765/0x7d0
      [mvsas]
      [  511.712125]  [<ffffffffa005a17d>] sas_scsi_recover_host+0x55d/0xdb0
      [libsas]
      [  511.712128]  [<ffffffff8106d600>] ? idle_balance+0xe0/0x130
      [  511.712133]  [<ffffffff813b150c>] scsi_error_handler+0xcc/0x470
      [  511.712136]  [<ffffffff815f7ad0>] ? __schedule+0x370/0x730
      [  511.712139]  [<ffffffff8105f728>] ? __wake_up_common+0x58/0x90
      [  511.712142]  [<ffffffff813b1440>] ? scsi_eh_get_sense+0x110/0x110
      [  511.712146]  [<ffffffff810571be>] kthread+0x8e/0xa0
      [  511.712150]  [<ffffffff816015f4>] kernel_thread_helper+0x4/0x10
      [  511.712153]  [<ffffffff81057130>] ? flush_kthread_work+0x120/0x120
      [  511.712156]  [<ffffffff816015f0>] ? gs_change+0xb/0xb
      [  511.712157] Code: 8a 00 01 00 00 89 d0 f0 66 0f b1 0f 66 39 d0 0f 94
      c0 0f b6 c0 5d c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 9c 58 fa ba 00 01
      00 00 <f0> 66 0f c1 17 0f b6 ce 38 d1 74 11 0f 1f 84 00 00 00 00 00 f3
      [  511.712191] RIP  [<ffffffff815f8c0c>] _raw_spin_lock_irqsave+0xc/0x30
      [  511.712194]  RSP <ffff880098d3bcb0>
      [  511.712196] CR2: 0000000000000058
      [  511.712198] ---[ end trace a781c7b1e65db92c ]---
      Signed-off-by: NJianpeng Ma <majianpeng@gmail.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      95ab0003
  2. 20 7月, 2012 2 次提交
  3. 20 3月, 2012 1 次提交
  4. 01 3月, 2012 1 次提交
    • D
      [SCSI] libsas: fix sas_find_local_phy(), take phy references · f41a0c44
      Dan Williams 提交于
      In the direct-attached case this routine returns the phy on which this
      device was first discovered.  Which is broken if we want to support
      wide-targets, as this phy reference can become stale even though the
      port is still active.
      
      In the expander-attached case this routine tries to lookup the phy by
      scanning the attached sas addresses of the parent expander, and BUG_ONs
      if it can't find it.  However since eh and the libsas workqueue run
      independently we can still be attempting device recovery via eh after
      libsas has recorded the device as detached.  This is even easier to hit
      now that eh is blocked while device domain rediscovery takes place, and
      that libata is fed more timed out commands increasing the chances that
      it will try to recover the ata device.
      
      Arrange for dev->phy to always point to a last known good phy, it may be
      stale after the port is torn down, but it will catch up for wide port
      reconfigurations, and never be NULL.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      f41a0c44
  5. 20 2月, 2012 2 次提交
    • D
      [SCSI] libsas: remove ata_port.lock management duties from lldds · 312d3e56
      Dan Williams 提交于
      Each libsas driver (mvsas, pm8001, and isci) has invented a different
      method for managing the ap->lock.  The lock is held by the ata
      ->queuecommand() path.  mvsas drops it prior to acquiring any internal
      locks which allows it to hold its internal lock across calls to
      task->task_done().  This capability is important as it is the only way
      the driver can flush task->task_done() instances to guarantee that it no
      longer has any in-flight references to a domain_device at
      ->lldd_dev_gone() time.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      312d3e56
    • D
      [SCSI] libsas: introduce sas_drain_work() · b1124cd3
      Dan Williams 提交于
      When an lldd invokes ->notify_port_event() it can trigger a chain of libsas
      events to:
      
        1/ form the port and find the direct attached device
      
        2/ if the attached device is an expander perform domain discovery
      
      A call to flush_workqueue() will only flush the initial port formation work.
      Currently libsas users need to call scsi_flush_work() up to the max depth of
      chain (which will grow from 2 to 3 when ata discovery is moved to its own
      discovery event).  Instead of open coding multiple calls switch to use
      drain_workqueue() to flush sas work.
      
      drain_workqueue() does not handle new work submitted during the drain so
      libsas needs a bit of infrastructure to hold off unchained work submissions
      while a drain is in flight.  A lldd ->notify() event is considered 'unchained'
      while a sas_discover_event() is 'chained'.  As Tejun notes:
      
        "For now, I think it would be best to add private wrapper in libsas to
         support deferring unchained work items while draining."
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      b1124cd3
  6. 03 10月, 2011 4 次提交
  7. 27 8月, 2011 1 次提交
  8. 26 7月, 2011 6 次提交
  9. 02 5月, 2011 1 次提交
  10. 28 7月, 2010 2 次提交
  11. 12 4月, 2010 1 次提交
    • S
      [SCSI] mvsas: fix hot plug handling and IO issues · 9dc9fd94
      Srinivas 提交于
      This patch adds a bunch of fixes
      
      1. Reduce sg table size to 64 (SG_MX) instead of default SG_ALL
      2. clear task lists on phy down events
      3. release all tasks on port deformation
      4. release current task for device gone notification
      5. Add sata abort handing
      6. Add 10ms delay to each port reset (currently done serially and with
         interrupts disabled)
      
      [jejb: whitespace fixes and clean ups plus added description
             added dummy 94xx_clear_srs_irq function just to prevent the
             mismatch in the mvs_dispatch structure killing 94xx cards]
      Signed-off-by: NSrinivas <satyasrinivasp@hcl.in>
      Cc: Andy Yan <ayan@marvell.com>
      Cc: qswang@marvell.com
      Cc: jfeng@marvell.com
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      9dc9fd94
  12. 24 5月, 2009 5 次提交
  13. 21 5月, 2009 3 次提交
  14. 07 4月, 2009 2 次提交
  15. 03 1月, 2009 1 次提交
  16. 01 5月, 2008 1 次提交
  17. 29 3月, 2008 6 次提交