1. 23 2月, 2008 2 次提交
    • J
      [SCSI] libsas: correctly flush the LU queue on error recovery · 63e4563b
      James Bottomley 提交于
      The current sas_scsi_clear_queue_lu() is wrongly checking for commands
      which match the pointer to the one passed in.  It should be checking for
      commands which are on the same logical unit as the one passed in.  Fix
      this by checking target pointer and LUN for equality.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      63e4563b
    • J
      [SCSI] libsas: fix error handling · a8e14fec
      James Bottomley 提交于
      The libsas error handler has two fairly fatal bugs
      
      1. scsi_sas_task_done calls scsi_eh_finish_cmd() too early.  This
         happens if the task completes after it has been aborted but before
         the error handler starts up.  Because scsi_eh_finish_cmd()
         decrements host_failed and adds the task to the done list, the
         error handler start check (host_failed == host_busy) never passes
         and the eh never starts.
      
      2. The multiple task completion paths sas_scsi_clear_queue_... all
         simply delete the task from the error queue.  This causes it to
         disappear into the ether, since a command must be placed on the
         done queue to be finished off by the error handler.  This behaviour
         causes the HBA to hang on pending commands.
      
      Fix 1. by moving the SAS_TASK_STATE_ABORTED check to an exit clause at
      the top of the routine and calling ->scsi_done() unconditionally (it
      is a nop if the timer has fired).  This keeps the task in the error
      handling queue until the eh starts.
      
      Fix 2. by making sure every task goes through task complete followed
      by scsi_eh_finish_cmd().
      
      Tested this by firing resets across a disk running a hammer test (now
      it actually survives without hanging the system)
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      a8e14fec
  2. 26 1月, 2008 1 次提交
  3. 25 1月, 2008 1 次提交
  4. 24 1月, 2008 2 次提交
  5. 23 1月, 2008 3 次提交
    • T
      libata: convert to chained sg · ff2aeb1e
      Tejun Heo 提交于
      libata used private sg iterator to handle padding sg.  Now that sg can
      be chained, padding can be handled using standard sg ops.  Convert to
      chained sg.
      
      * s/qc->__sg/qc->sg/
      
      * s/qc->pad_sgent/qc->extra_sg[]/.  Because chaining consumes one sg
        entry.  There need to be two extra sg entries.  The renaming is also
        for future addition of other extra sg entries.
      
      * Padding setup is moved into ata_sg_setup_extra() which is organized
        in a way that future addition of other extra sg entries is easy.
      
      * qc->orig_n_elem is unused and removed.
      
      * qc->n_elem now contains the number of sg entries that LLDs should
        map.  qc->mapped_n_elem is added to carry the original number of
        mapped sgs for unmapping.
      
      * The last sg of the original sg list is used to chain to extra sg
        list.  The original last sg is pointed to by qc->last_sg and the
        content is stored in qc->saved_last_sg.  It's restored during
        ata_sg_clean().
      
      * All sg walking code has been updated.  Unnecessary assertions and
        checks for conditions the core layer already guarantees are removed.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ff2aeb1e
    • T
      libata: rename ATA_PROT_ATAPI_* to ATAPI_PROT_* · 0dc36888
      Tejun Heo 提交于
      ATA_PROT_ATAPI_* are ugly and naming schemes between ATA_PROT_* and
      ATA_PROT_ATAPI_* are inconsistent causing confusion.  Rename them to
      ATAPI_PROT_* and make them consistent with ATA counterpart.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      0dc36888
    • T
      libata: implement protocol tests · 405e66b3
      Tejun Heo 提交于
      Implement protocol tests - ata_is_atapi(), ata_is_nodata(),
      ata_is_pio(), ata_is_dma(), ata_is_ncq() and ata_is_data() and use
      them to replace is_atapi_taskfile() and hard coded protocol tests.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      405e66b3
  6. 12 1月, 2008 5 次提交
  7. 20 10月, 2007 1 次提交
  8. 13 10月, 2007 2 次提交
    • J
      [libata] Remove ->port_disable() hook · ac8869d5
      Jeff Garzik 提交于
      It was always set to ata_port_disable().  Removed the hook, and replaced
      the very few ap->ops->port_disable() callsites with direct calls to
      ata_port_disable().
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ac8869d5
    • T
      libata-link: introduce ata_link · 9af5c9c9
      Tejun Heo 提交于
      Introduce ata_link.  It abstracts PHY and sits between ata_port and
      ata_device.  This new level of abstraction is necessary to support
      SATA Port Multiplier, which basically adds a bunch of links (PHYs) to
      a ATA host port.  Fields related to command execution, spd_limit and
      EH are per-link and thus moved to ata_link.
      
      This patch only defines the host link.  Multiple link handling will be
      added later.  Also, a lot of ap->link derefences are added but many of
      them will be removed as each part is converted to deal directly with
      ata_link instead of ata_port.
      
      This patch introduces no behavior change.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: James Bottomley <James.Bottomley@SteelEye.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9af5c9c9
  9. 31 7月, 2007 1 次提交
  10. 28 7月, 2007 1 次提交
  11. 26 7月, 2007 1 次提交
  12. 25 7月, 2007 1 次提交
  13. 23 7月, 2007 1 次提交
  14. 21 7月, 2007 1 次提交
  15. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  16. 19 7月, 2007 16 次提交