1. 31 5月, 2006 14 次提交
    • T
      [PATCH] libata-hp-prep: add prereset() method and implement ata_std_prereset() · f5914a46
      Tejun Heo 提交于
      With hotplug, every reset might be a probing reset and thus something
      similar to probe_init() is needed.  prereset() method is called before
      a series of resets to a port and is the counterpart of postreset().
      prereset() can tell EH to use different type of reset or skip reset by
      modifying ehc->i.action.
      
      This patch also implements ata_std_prereset().  Most controllers
      should be able to use this function directly or with some wrapping.
      After hotplug, different controllers need different actions to resume
      the PHY and detect the newly attached device.  Controllers can be
      categorized as follows.
      
      * Controllers which can wait for the first D2H FIS after hotplug.
        Note that if the waiting is implemented by polling TF status, there
        needs to be a way to set BSY on PHY status change.  It can be
        implemented by hardware or with the help of the driver.
      
      * Controllers which can wait for the first D2H FIS after sending
        COMRESET.  These controllers need to issue COMRESET to wait for the
        first FIS.  Note that the received D2H FIS could be the first D2H
        FIS after POR (power-on-reset) or D2H FIS in response to the
        COMRESET.  Some controllers use COMRESET as TF status
        synchronization point and clear TF automatically (sata_sil).
      
      * Controllers which cannot wait for the first D2H FIS reliably.
        Blindly issuing SRST to spinning-up device often results in command
        issue failure or timeout, causing extended delay.  For these
        controllers, ata_std_prereset() explicitly waits ATA_SPINUP_WAIT
        (currently 8s) to give newly attached device time to spin up, then
        issues reset.  Note that failing to getting ready in ATA_SPINUP_WAIT
        is not critical.  libata will retry.  So, the timeout needs to be
        long enough to spin up most devices.
      
      LLDDs can tell ata_std_prereset() which of above action is needed with
      ATA_FLAG_HRST_TO_RESUME and ATA_FLAG_SKIP_D2H_BSY flags.  These flags
      are PHY-specific property and will be moved to ata_link later.
      
      While at it, this patch unifies function typedef's such that they all
      have named arguments.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      f5914a46
    • T
      [PATCH] libata-hp-prep: implement sata_phy_debounce() · d7bb4cc7
      Tejun Heo 提交于
      With hotplug, PHY always needs to be debounced before a reset as any
      reset might find new devices.  Extract PHY waiting code from
      sata_phy_resume() and extend it to include SStatus debouncing.  Note
      that sata_phy_debounce() is superset of what used to be done inside
      sata_phy_resume().
      
      Three default debounce timing parameters are defined to be used by
      hot/boot plug.  As resume failure during probing will be properly
      handled as errors, timeout doesn't have to be long as before.
      probeinit() uses the same timeout to retain the original behavior.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      d7bb4cc7
    • T
      [PATCH] libata-hp-prep: make probing related functions global · a9beec95
      Tejun Heo 提交于
      Hotplug will be implemented in libata-eh.c.  Make ata_dev_read_id()
      and ata_dev_configure() global.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      a9beec95
    • T
      [PATCH] libata-hp-prep: add ata_aux_wq · 453b07ac
      Tejun Heo 提交于
      It's best to run ATA hotplug from EH but attaching SCSI devices needs
      working EH.  ata_aux_wq is used to give SCSI hotplug operations a
      separate context.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      453b07ac
    • T
      [PATCH] libata-hp-prep: store attached SCSI device · 3edebac4
      Tejun Heo 提交于
      Add device persistent field dev->sdev and store the attached SCSI
      device.  With hotplug, libata needs to know the attached SCSI device
      to offline and detach it, but scsi_device_lookup() cannot be used
      because libata will reuse SCSI ID numbers - dead but not gone devices
      (due to zombie opens, etc...) interfere with the lookup.
      
      dev->sdev doesn't hold reference to the SCSI device.  It's cleared
      when the SCSI device goes away.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      3edebac4
    • T
      [PATCH] libata-hp-prep: implement ap->hw_sata_spd_limit · 5a04bf4b
      Tejun Heo 提交于
      Add ap->hw_sata_spd_limit and initialize it once during the boot
      initialization (or driver load initialization).  ap->sata_spd_limit is
      reset to ap->hw_sata_spd_limit on hotplug.  This prevents spd limits
      introduced by earlier devices from affecting new devices.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      5a04bf4b
    • T
      [PATCH] libata-hp-prep: use __ata_scsi_find_dev() · 31534363
      Tejun Heo 提交于
      Convert direct sdev -> dev lookup to __ata_scsi_find_dev().
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      31534363
    • T
      [PATCH] libata-hp-prep: update ata_scsi_find_dev() and friends · ab5b3a5b
      Tejun Heo 提交于
      Separate out ata_find_dev() and __ata_scsi_find_dev() from
      ata_scsi_find_dev().  These will be used by later hotplug
      implementation.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      ab5b3a5b
    • T
      [PATCH] libata-hp-prep: make some ata_device fields persistent · 72fa4b74
      Tejun Heo 提交于
      Lifetimes of some fields span over device plugging/unplugging.  This
      patch moves such persistent fields to the top of ata_device and
      separate them with ATA_DEVICE_CLEAR_OFFSET.  Fields above the offset
      are initialized once during host initializatino while all other fields
      are cleared before hotplugging.  Currently ->ap, devno and part of
      flags are persistent.
      
      Note that flags is partially cleared while holding host_set lock.
      This is to synchronize with later warm plug implementation which will
      record hotplug request in dev->flags.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      72fa4b74
    • T
      [PATCH] libata-hp-prep: implement ata_dev_init() · 3ef3b43d
      Tejun Heo 提交于
      Move initialization of struct ata_device into ata_dev_init() in
      preparation for hotplug.  This patch calls ata_dev_init() from
      ata_host_init() and thus makes no functional difference.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      3ef3b43d
    • T
      [PATCH] libata-hp-prep: add flags and eh_info/context fields for hotplug · abdda733
      Tejun Heo 提交于
      Add hotplug related flags and eh_info/context fields.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      abdda733
    • T
      [PATCH] libata: implement ata_eh_wait() · c6cf9e99
      Tejun Heo 提交于
      Implement ata_eh_wait().  On return from this function, it's
      guaranteed that the EH which was pending or in progress when the
      function was called is complete - including the tailing part of SCSI
      EH.  This will be used by hotplug and others to synchronize with EH.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      c6cf9e99
    • T
      [PATCH] libata: shift host flag constants · 7395acb2
      Tejun Heo 提交于
      Nudge host flag constants to make a room after ATA_FLAG_EH_PENDING.
      New EH flag will be added.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      7395acb2
    • T
      [PATCH] libata: set PIO-0 after successful EH reset · 20952b69
      Tejun Heo 提交于
      Set ata_device->pio_mode to XFER_PIO_0 after a successful reset.  This
      is to keep EH resets consistent with probe resets as updated by the
      commit b6079ca4.  Note that, with
      soon-to-follow hotplug update, EH resets will include probe resets.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      20952b69
  2. 29 5月, 2006 6 次提交
  3. 28 5月, 2006 1 次提交
  4. 27 5月, 2006 19 次提交