1. 23 4月, 2012 1 次提交
    • D
      [SCSI] libsas, libata: fix start of life for a sas ata_port · b2024459
      Dan Williams 提交于
      This changes the ordering of initialization and probing events from:
        1/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        2/ allocate ata_port and schedule port probe in DISCE_PROBE
      ...to:
        1/ allocate ata_port in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        2/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
        3/ schedule port probe in DISCE_PROBE
      
      This ordering prevents PHYE_SIGNAL_LOSS_EVENTS from sneaking in to
      destrory ata devices before they have been fully initialized:
      
        BUG: unable to handle kernel paging request at 0000000000003b10
        IP: [<ffffffffa0053d7e>] sas_ata_end_eh+0x12/0x5e [libsas]
        ...
        [<ffffffffa004d1af>] sas_unregister_common_dev+0x78/0xc9 [libsas]
        [<ffffffffa004d4d4>] sas_unregister_dev+0x4f/0xad [libsas]
        [<ffffffffa004d5b1>] sas_unregister_domain_devices+0x7f/0xbf [libsas]
        [<ffffffffa004c487>] sas_deform_port+0x61/0x1b8 [libsas]
        [<ffffffffa004bed0>] sas_phye_loss_of_signal+0x29/0x2b [libsas]
      
      ...and kills the awkward "sata domain_device briefly existing in the
      domain without an ata_port" state.
      Reported-by: NMichal Kosciowski <michal.kosciowski@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Acked-by: NJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      b2024459
  2. 28 3月, 2012 5 次提交
  3. 01 3月, 2012 1 次提交
  4. 18 2月, 2012 1 次提交
    • K
      [SCSI] ipr: fix eeh recovery for 64-bit adapters · a92fa25c
      Kleber Sacilotto de Souza 提交于
      In some scenarios, an EEH error can take a long time to be detected, since the
      driver issues an MMIO read only after a device reset command times out and we
      try to reset the adapter. This patch adds some code in ipr_cancel_op() to read
      a hardware register so we detect the error earlier in case the op is being
      aborted because of a timeout caused by a frozen adapter slot.
      
      Another problem in such scenarios is that in __ipr_eh_host_reset() we change the
      dump state flag from WAIT_FOR_DUMP to GET_DUMP, and the flag is later changed
      from GET_DUMP to READ_DUMP in ipr_reset_restore_cfg_space(). However, if when
      __ipr_eh_host_reset() is called by the SCSI error handling the function
      ipr_reset_restore_cfg_space() has already been called by the PCI EEH code, we
      end up with the flag in an inconsistent state. This patch also prevents this
      problem.
      Signed-off-by: NKleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
      Acked-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      a92fa25c
  5. 07 1月, 2012 1 次提交
    • J
      PCI: Rework config space blocking services · fb51ccbf
      Jan Kiszka 提交于
      pci_block_user_cfg_access was designed for the use case that a single
      context, the IPR driver, temporarily delays user space accesses to the
      config space via sysfs. This assumption became invalid by the time
      pci_dev_reset was added as locking instance. Today, if you run two loops
      in parallel that reset the same device via sysfs, you end up with a
      kernel BUG as pci_block_user_cfg_access detect the broken assumption.
      
      This reworks the pci_block_user_cfg_access to a sleeping service
      pci_cfg_access_lock and an atomic-compatible variant called
      pci_cfg_access_trylock. The former not only blocks user space access as
      before but also waits if access was already locked. The latter service
      just returns false in this case, allowing the caller to resolve the
      conflict instead of raising a BUG.
      
      Adaptions of the ipr driver were originally written by Brian King.
      Acked-by: NBrian King <brking@linux.vnet.ibm.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      fb51ccbf
  6. 31 10月, 2011 1 次提交
  7. 20 10月, 2011 1 次提交
    • B
      [SCSI] ipr: Fix BUG on adapter dump timeout · 4c647e90
      Brian King 提交于
      If an adapter dump times out, the ipr driver will abort the
      dump and proceed to reset and recover the adapter. When an
      adapter dump completes, the work thread which is reading the
      adapter dump will initiate an adapter reset to recover the
      adapter. However, when the adapter dump gets aborted, the
      work thread should not initiate an adapter reset, since an
      adapter reset is already in progress. This fixes a case of
      calling pci_block_user_cfg_access overlapped, which results
      in a BUG.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      4c647e90
  8. 16 10月, 2011 1 次提交
  9. 22 9月, 2011 1 次提交
    • B
      [SCSI] ipr: Stop reading adapter dump prematurely · 41e9a696
      Brian King 提交于
      When the ipr driver decides to dump the adapter, it changes the
      sdt_state to GET_DUMP, then prepares the adapter so that the dump
      can be read. However, if the ipr worker thread wakes up for some
      reason before the driver has put the adapter in a state where it
      can succesfully dump the adapter, the driver will start dumping
      the adapter too early, which can potentially trigger a BUG check
      in the pci config blocking API. Fix this by adding a new
      sdt_state to differentiate between the ipr driver wanting to dump
      the adapter in the near future and wanting to dump the adapter now.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      41e9a696
  10. 27 8月, 2011 1 次提交
  11. 27 7月, 2011 1 次提交
  12. 25 5月, 2011 1 次提交
  13. 17 5月, 2011 1 次提交
  14. 02 5月, 2011 1 次提交
  15. 01 5月, 2011 3 次提交
  16. 02 3月, 2011 4 次提交
  17. 19 2月, 2011 1 次提交
  18. 13 2月, 2011 1 次提交
    • T
      [SCSI] remove flush_scheduled_work() usages · a684b8da
      Tejun Heo 提交于
      Simple conversions to drop flush_scheduled_work() usages in
      drivers/scsi.  More involved ones will be done in separate patches.
      
      * NCR5380, megaraid_sas: cancel_delayed_work() +
        flush_scheduled_work() -> cancel_delayed_work_sync().
      
      * mpt2sas_scsih: drop unnecessary flush_scheduled_work().
      
      * arcmsr_hba, ipr, pmcraid: flush the used work explicitly instead of
        using flush_scheduled_work().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      a684b8da
  19. 06 1月, 2011 1 次提交
  20. 24 12月, 2010 1 次提交
  21. 22 12月, 2010 2 次提交
  22. 17 11月, 2010 1 次提交
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  23. 26 10月, 2010 1 次提交
  24. 08 10月, 2010 1 次提交
  25. 10 9月, 2010 1 次提交
  26. 06 9月, 2010 1 次提交
  27. 28 7月, 2010 4 次提交