1. 15 5月, 2006 9 次提交
    • T
      [PATCH] libata-ncq: update EH to handle NCQ · e8ee8451
      Tejun Heo 提交于
      Update EH to handle NCQ.  ata_eh_autopsy() is updated to call
      ata_eh_analyze_ncq_error() which reads log page 10h on NCQ device
      error and updates eh_context accordingly.  ata_eh_report() is updated
      to report SActive.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      e8ee8451
    • T
      [PATCH] libata-eh: implement new EH · 022bdb07
      Tejun Heo 提交于
      Implement new EH.  The exported interface is ata_do_eh() which is to
      be called from ->error_handler and performs the following steps to
      recover the failed port.
      
      ata_eh_autopsy() : analyze SError/TF, determine the cause of failure
      		   and required recovery actions and record it in
      		   ap->eh_context
      ata_eh_report()	 : report the failure to user
      ata_eh_recover() : perform recovery actions described in ap->eh_context
      ata_eh_finish()	 : finish failed qcs
      
      LLDDs can customize error handling by modifying eh_context before
      calling ata_do_eh() or, if necessary, doing so inbetween each major
      steps by calling each step explicitly.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      022bdb07
    • T
      [PATCH] libata-eh: implement ata_eh_info and ata_eh_context · f3e81b19
      Tejun Heo 提交于
      struct ata_eh_info serves as the communication channel between
      execution path and EH.  Execution path describes detected error
      condition in ap->eh_info and EH recovers the port using it.  To avoid
      missing error conditions detected during EH, EH makes its own copy of
      eh_info and clears it on entry allowing error info to accumulate
      during EH.
      
      Most EH states including EH's copy of eh_info are stored in
      ap->eh_context (struct ata_eh_context) which is owned by EH and thus
      doesn't require any synchronization to access and alter.  This
      standardized context makes it easy to integrate various parts of EH
      and extend EH to handle multiple links (for PM).
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      f3e81b19
    • T
      [PATCH] libata-eh: implement dev->ering · 0c247c55
      Tejun Heo 提交于
      This patch implements ata_ering and uses it to define dev->ering.
      
      ata_ering is a ring buffer which records libata errors - whether a
      command was for normar IO request, err_mask and timestamp.  Errors are
      recorded per-device in dev->ering.  This will be used by EH to
      determine recovery actions.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      0c247c55
    • T
      [PATCH] libata-eh-fw: update ata_scsi_error() for new EH · ad9e2762
      Tejun Heo 提交于
      Update ata_scsi_error() for new EH.  ata_scsi_error() is responsible
      for claiming timed out qcs and invoking ->error_handler in safe and
      synchronized manner.  As the state of the controller is unknown if a
      qc has timed out, the port is frozen in such cases.
      
      Note that ata_scsi_timed_out() isn't used for new EH.  This is because
      a timed out qc cannot be claimed by EH without freezing the port and
      freezing the port in ata_scsi_timed_out() results in unnecessary
      abortion of other active qcs.  ata_scsi_timed_out() can be removed
      once all drivers are converted to new EH.
      
      While at it, add 'TODO: kill' comments to old EH functions.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      ad9e2762
    • T
      [PATCH] libata-eh-fw: implement freeze/thaw · e3180499
      Tejun Heo 提交于
      Freezing is performed atomic w.r.t. host_set->lock and once frozen
      LLDD is not allowed to access the port or any qc on it.  Also, libata
      makes sure that no new qc gets issued to a frozen port.
      
      A frozen port is thawed after a reset operation completes
      successfully, so reset methods must do its job while the port is
      frozen.  During initialization all ports get frozen before requesting
      IRQ, so reset methods are always invoked on a frozen port.
      
      Optional ->freeze and ->thaw operations notify LLDD that the port is
      being frozen and thawed, respectively.  LLDD can disable/enable
      hardware interrupt in these callbacks if the controller's IRQ mask can
      be changed dynamically.  If the controller doesn't allow such
      operation, LLDD can check for frozen state in the interrupt handler
      and ack/clear interrupts unconditionally while frozen.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      e3180499
    • T
      [PATCH] libata-eh-fw: implement ata_port_schedule_eh() and ata_port_abort() · 7b70fc03
      Tejun Heo 提交于
      ata_port_schedule_eh() directly schedules EH for @ap without
      associated qc.  Once EH scheduled, no further qc is allowed and EH
      kicks in as soon as all currently active qc's are drained.
      
      ata_port_abort() schedules all currently active commands for EH by
      qc_completing them with ATA_QCFLAG_FAILED set.  If ata_port_abort()
      doesn't find any qc to abort, it directly schedule EH using
      ata_port_schedule_eh().
      
      These two functions provide ways to invoke EH for conditions which
      aren't directly related to any specfic qc.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      7b70fc03
    • T
      [PATCH] libata-eh-fw: implement new EH scheduling via error completion · f686bcb8
      Tejun Heo 提交于
      There are several ways a qc can get schedule for EH in new EH.  This
      patch implements one of them - completing a qc with ATA_QCFLAG_FAILED
      set or with non-zero qc->err_mask.  ALL such qc's are examined by EH.
      
      New EH schedules a qc for EH from completion iff ->error_handler is
      implemented, qc is marked as failed or qc->err_mask is non-zero and
      the command is not an internal command (internal cmd is handled via
      ->post_internal_cmd).  The EH scheduling itself is performed by asking
      SCSI midlayer to schedule EH for the specified scmd.
      
      For drivers implementing old-EH, nothing changes.  As this change
      makes ata_qc_complete() rather large, it's not inlined anymore and
      __ata_qc_complete() is exported to other parts of libata for later
      use.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      f686bcb8
    • T
      [PATCH] libata: use ATA printk helpers · f15a1daf
      Tejun Heo 提交于
      Use ATA printk helpers.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      f15a1daf
  2. 12 4月, 2006 2 次提交
  3. 04 4月, 2006 1 次提交
  4. 02 4月, 2006 2 次提交