1. 24 5月, 2006 4 次提交
  2. 22 5月, 2006 1 次提交
  3. 20 5月, 2006 13 次提交
  4. 15 5月, 2006 22 次提交
    • T
      [PATCH] sata_sil24: implement NCQ support · aee10a03
      Tejun Heo 提交于
      Implement NCQ support.  Sil24 has 31 command slots and all of them are
      used for NCQ command queueing.  libata guarantees that no other
      command is in progress when it issues an internal command, so always
      use tag 0 for internal commands.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      aee10a03
    • T
      [PATCH] ahci: implement NCQ suppport · 12fad3f9
      Tejun Heo 提交于
      Implement NCQ support.
      
      Original implementation is from Jens Axboe.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      12fad3f9
    • T
      [PATCH] ahci: kill pp->cmd_tbl_sg · a9764c2b
      Tejun Heo 提交于
      With NCQ, there are multiple sg tables, so pp->cmd_tbl_sg doesn't cut
      it.  Directly calculate sg table address from pp->cmd_tbl.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      a9764c2b
    • T
      [PATCH] ahci: add HOST_CAP_NCQ constant · 979db803
      Tejun Heo 提交于
      Add HOST_CAP_NCQ.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      979db803
    • T
      [PATCH] ahci: clean up AHCI constants in preparation for NCQ · dd410ff1
      Tejun Heo 提交于
      * Rename CMD_TBL_HDR to CMD_TBL_HDR_SZ as it's size not offset.
      
      * Define MAX_CMDS and CMD_SZ and use them in calculation of other
        constants.
      
      * Define CMD_TBL_AR_SZ as product of CMD_TBL_SZ and MAX_CMDS, and use
        it when calculating PRIV_DMA_SZ.
      
      * CMD_SLOT_SZ is also dependent on MAX_CMDS but hasn't been changed
        because I didn't want to change the value used by the original code
        (32 commands).  Later NCQ change will bump MAX_CMDS to 32 anyway and
        the hard coded 32 can be changed to MAX_CMDS then.
      
      * Reorder HOST_CAP_* flags.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      dd410ff1
    • T
      [PATCH] libata-ncq: implement NCQ device configuration · a6e6ce8e
      Tejun Heo 提交于
      Now that all NCQ related stuff are in place, implement NCQ device
      configuration and bump ATA_MAX_QUEUE to 32 thus activating NCQ
      support.
      
      Original implementation is from Jens Axboe.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      a6e6ce8e
    • 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-ncq: implement NCQ command translation and exclusion · 3dc1d881
      Tejun Heo 提交于
      This patch implements NCQ command translation and exclusion.  Note
      that NCQ commands don't use ata_rwcmd_protocol() to choose ATA
      command.  This is because, unlike non-NCQ RW commands, NCQ commands
      can only be used for NCQ protocol and FUA handling is done with a flag
      rather than separate command.
      
      NCQ enabled device will have queue depth larger than one but no two
      non-NCQ commands can be issued simultaneously, neither can a non-NCQ
      command and NCQ commands.  This patch makes ata_scsi_translate()
      return SCSI_MLQUEUE_DEVICE_BUSY if such exclusion is necessary.  SCSI
      midlayer will retry the command later.
      
      As SCSI midlayer always retries once a command completes, this doesn't
      incur unnecessary delays and as most commands will be NCQ ones for NCQ
      device, so the overhead should be negligible.
      
      Initial implementation is from Jens Axboe and using
      SCSI_MLQUEUE_DEVICE_BUSY for exclusion is suggested by Jeff Garzik.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      3dc1d881
    • T
      [PATCH] libata-ncq: implement ap->qc_active, ap->sactive and complete helper · dedaf2b0
      Tejun Heo 提交于
      Add ap->qc_active and ap->sactive, mask of all active qcs and libata's
      view of the SActive register, respectively.  Also, implement
      ata_qc_complete_multiple() which takes new qc_active mask and complete
      multiple qcs according to the mask.
      
      These will be used to track NCQ commands and complete them.  The
      distinction between ap->qc_active and ap->sactive is also useful for
      later PM implementation.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      dedaf2b0
    • T
      [PATCH] libata-ncq: rename ap->qactive to ap->qc_allocated · 6cec4a39
      Tejun Heo 提交于
      Rename ap->qactive to ap->qc_allocated.  This is to accomodate
      addition of ap->qc_active, mask of active qcs.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      6cec4a39
    • T
      [PATCH] libata-ncq: pass ata_scsi_translate() return value to SCSI midlayer · 2115ea94
      Tejun Heo 提交于
      ata_scsi_translate() will need to return SCSI_ML_QUEUE_DEVICE_BUSY to
      achieve exlusion between NCQ and non-NCQ commands or among non-NCQ
      commands.  Pass its return value upward to SCSI midlayer.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      2115ea94
    • T
      [PATCH] libata: fix irq-pio merge · c17ea20d
      Tejun Heo 提交于
      * kill ata_poll_qc_complete() and implement/use ata_hsm_qc_complete()
        which completes qcs in new EH compliant manner from HSM
      
      * don't print error message from ata_hsm_move().  it's responsibility
        of EH.
      
      * kill ATA_FLAG_NOINTR usage in bmdma EH
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      c17ea20d
    • T
      [PATCH] sata_sil24: convert to new EH · 88ce7550
      Tejun Heo 提交于
      Convert sata_sil24 to new EH.
      
      * When port is frozen, IRQ for the port is masked.
      
      * sil24_softreset() doesn't need to mangle with IRQ mask anymore.
        libata ensures that the port is frozen during reset.
      
      * Only turn on interrupts which are handled by interrupt handler and
        EH.  As we don't handle SDB notify yet, turn it off. DEV_XCHG and
        UNK_FIS are handled by EH and thus turned on.
      
      * sil24_softreset() usually fails to recover the port after DEV_XCHG.
        ATA_PORT_HARDRESET is used as recovery action for DEV_XCHG.
      
      * sil24 may be invoked without any active command.  e.g. DEV_XCHG irq
        occuring while no qc in progress still triggers EH and will reset
        the port and revalidate attached device.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      88ce7550
    • T
      [PATCH] ahci: add PIOS interim interrupt handling · 2a3917a8
      Tejun Heo 提交于
      During multiblock PIO, multiple PIOS interrupts are generated before
      qc compltion.  Current code prints unnecessary message for such cases.
      This is exposed when new EH slows down attached device into PIO mode.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      2a3917a8
    • T
      [PATCH] ahci: convert to new EH · 78cd52d0
      Tejun Heo 提交于
      Convert AHCI to new EH.  Unfortunately, ICH7 AHCI reacts badly if IRQ
      mask is diddled during operation.  So, freezing is implemented by
      unconditionally clearing interrupt conditions while frozen.
      
      * Interrupts are categorized according to required action.
        e.g. Connection status or unknown FIS error requires freezing the
        port while TF or HBUS_DATA don't.
      
      * Only CONNECT (reflects SErr.X) interrupt is taken into account not
        PHYRDY (SErr.N), as CONNECT is better cue for starting EH.
      
      * AHCI may be invoked without any active command.  e.g. CONNECT irq
        occuring while no qc in progress still triggers EH and will reset
        the port and revalidate attached device.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      78cd52d0
    • T
      [PATCH] sata_sil: convert to new EH · f6aae27e
      Tejun Heo 提交于
      Convert sata_sil to new EH.  As these controllers have hardware
      interrupt mask and are known to have screaming interrupts issues, use
      hardware IRQ masking for freezing.  sil_freeze() masks interrupts for
      the port and sil_thaw() unmasks them.  As ports are automatically
      frozen before probing reset, there is no need to initialize interrupt
      masks sil_init_onde().  Remove related code.
      
      Other than freezing, sata_sil uses stock BMDMA EH routines.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      f6aae27e
    • T
      [PATCH] ata_piix: convert to new EH · 3f037db0
      Tejun Heo 提交于
      ata_piix can use stock BMDMA EH routines.  Convert to new EH.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      3f037db0
    • T
      [PATCH] libata-eh: implement BMDMA EH · 6d97dbd7
      Tejun Heo 提交于
      Implement stock BMDMA error handling methods.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      6d97dbd7
    • 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 SCSI command completion path for new EH · 246619da
      Tejun Heo 提交于
      SCSI command completion path used to do some part of EH including
      printing messages and obtaining sense data.  With new EH, all these
      are responsibilities of the EH, update SCSI command completion path to
      reflect this.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      246619da