1. 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
  2. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  3. 03 1月, 2009 1 次提交
  4. 27 7月, 2008 1 次提交
  5. 08 4月, 2008 1 次提交
  6. 24 2月, 2008 2 次提交
    • J
      [SCSI] aic94xx: fix TMF ascb handling to prevent sequencer panic · e2396f1e
      James Bottomley 提交于
      This is a particularly nasty bug.  The problem is that if any internal
      ascb times out, currently we free it even though it's pending at the
      sequencer.  This results in the sequencer getting terminally confused
      and the error message:
      
      BUG:sequencer:dl:no ascb
      
      Being returned when it comes back.  The way to fix this is to manage
      freeing the ascb from the tasklet completion routine, so that we only
      free it when the sequencer actually returns it.  The code is also
      altered to use on stack completions and transfer variables.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      e2396f1e
    • J
      [SCSI] aic94xx: plumb in I_T_nexus_reset task management function · 63edf49e
      James Bottomley 提交于
      Currently aic94xx has no exported I_T_nexus_reset function.  This is a
      bit of a huge problem, since sas_ata relies on this function to
      perform an ATA phy reset and also it means that if abort fails, we
      really have no bigger hammer to hit everything with.
      
      Plumb in the I_T_nexus_reset by quiescing the sequencer, sending the
      correct phy reset (link for ATA and hard for SAS) and then carefully
      resuming the sequencer again.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      63edf49e
  7. 23 2月, 2008 1 次提交
    • J
      [SCSI] aic94xx: fix sequencer hang on error recovery · 91b55060
      James Bottomley 提交于
      The clear nexus I_T and clear nexus I_T_L functions in the aic94xx
      specify the SUSPEND_TX flag which causes the sequencer to be suspended
      until it receives a RESUME_TX.  Unfortunately, nothing ever sends the
      resume, so the sequencer on the link is stopped forever, leading to
      eventual timeouts and I/O errors.
      
      Since clear nexus commands are only executed as part of error recovery,
      it's perfectly fine to keep the sequencer running on the link ... as
      soon as the recovery function is completed, we'll send it the commands
      to retry.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      91b55060
  8. 12 2月, 2008 1 次提交
  9. 12 1月, 2008 1 次提交
  10. 23 5月, 2007 1 次提交
    • D
      [SCSI] aic94xx: asd_clear_nexus should fail if the cleared task does not complete · 8fdcf86a
      Darrick J. Wong 提交于
      Every so often, the driver will call asd_clear_nexus to clean out a task.
      It is supposed to be the case that the CLEAR NEXUS does not go on the done
      list until after the task itself has been put on the done list, but for
      some reason this doesn't always happen.  Thus, the
      wait_for_completion_timeout call times out, and we return success.  This
      makes libsas free the task even though the task hasn't completed, leading
      to a BUG_ON message from aic94xx_hwi.c around line 341.  We should return
      failure from asd_clear_nexus so that libsas tries again; at a bare minimum
      it shouldn't be freeing active tasks.  I _think_ this will fix one of
      the SCB timeout crash problems (though I've not been able to reproduce
      it lately...)
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      8fdcf86a
  11. 03 2月, 2007 1 次提交
  12. 14 1月, 2007 1 次提交
  13. 29 8月, 2006 1 次提交
    • J
      [SCSI] aic94xx: new driver · 2908d778
      James Bottomley 提交于
      This is the end point of the separate aic94xx driver based on the
      original driver and transport class from Luben Tuikov
      <ltuikov@yahoo.com>
      
      The log of the separate development is:
      
      Alexis Bruemmer:
        o aic94xx: fix hotplug/unplug for expanderless systems
        o aic94xx: disable split completion timer/setting by default
        o aic94xx: wide port off expander support
        o aic94xx: remove various inline functions
        o aic94xx: use bitops
        o aic94xx: remove queue comment
        o aic94xx: remove sas_common.c
        o aic94xx: sas remove depot's
        o aic94xx: use available list_for_each_entry_safe_reverse()
        o aic94xx: sas header file merge
      
      James Bottomley:
        o aic94xx: fix TF_TMF_NO_CTX processing
        o aic94xx: convert to request_firmware interface
        o aic94xx: fix hotplug/unplug
        o aic94xx: add link error counts to the expander phys
        o aic94xx: add transport class phy reset capability
        o aic94xx: remove local_attached flag
        o Remove README
        o Fixup Makefile variable for libsas rename
        o Rename sas->libsas
        o aic94xx: correct return code for sas_discover_event
        o aic94xx: use parent backlink port
        o aic94xx: remove channel abstraction
        o aic94xx: fix routing algorithms
        o aic94xx: add backlink port
        o aic94xx: fix cascaded expander properties
        o aic94xx: fix sleep under lock
        o aic94xx: fix panic on module removal in complex topology
        o aic94xx: make use of the new sas_port
        o rename sas_port to asd_sas_port
        o Fix for eh_strategy_handler move
        o aic94xx: move entirely over to correct transport class formulation
        o remove last vestages of sas_rphy_alloc()
        o update for eh_timed_out move
        o Preliminary expander support for aic94xx
        o sas: remove event thread
        o minor warning cleanups
        o remove last vestiges of id mapping arrays
        o Further updates
        o Convert aic94xx over entirely to the transport class end device and
        o update aic94xx/sas to use the new sas transport class end device
        o [PATCH] aic94xx: attaching to the sas transport class
        o Add missing completion removal from prior patch
        o [PATCH] aic94xx: attaching to the sas transport class
        o Build fixes from akpm
      
      Jeff Garzik:
        o [scsi aic94xx] Remove ->owner from PCI info table
      
      Luben Tuikov:
        o initial aic94xx driver
      
      Mike Anderson:
        o aic94xx: fix panic on module insertion
        o aic94xx: stub out SATA_DEV case
        o aic94xx: compile warning cleanups
        o aic94xx: sas_alloc_task
        o aic94xx: ref count update
        o aic94xx nexus loss time value
        o [PATCH] aic94xx: driver assertion in non-x86 BIOS env
      
      Randy Dunlap:
        o libsas: externs not needed
      
      Robert Tarte:
        o aic94xx: sequence patch - fixes SATA support
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      2908d778