You need to sign in or sign up before continuing.
  1. 30 9月, 2006 2 次提交
  2. 28 9月, 2006 1 次提交
  3. 26 9月, 2006 1 次提交
  4. 19 9月, 2006 2 次提交
    • A
      [PATCH] libata: improve handling of diagostic fail (and hardware that misreports it) · 93590859
      Alan Cox 提交于
      Our ATA probe code checks that a device is not reporting a diagnostic
      failure during start up. Unfortunately at least one device seems to like
      doing this - the Gigabyte iRAM.
      
      This is only done for the master right now (which is fine for the iRAM
      as it is SATA), as with PATA some combinations of ATAPI device seem to
      fool the check into seeing a drive that isn't there if it is applied to
      the slave.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      93590859
    • T
      [PATCH] libata: fix non-uniform ports handling · fea63e38
      Tejun Heo 提交于
      Non-uniform ports handling got broken while updating libata to handle
      those in the same host.  Only separate irq for the non-uniform
      secondary port was implemented while all other fields (host flags,
      transfer mode...) of the secondary port simply shared those of the
      first.
      
      For ata_piix combined mode, which ATM is the only user of non-uniform
      ports, this causes the secondary port assume the wrong type.  This can
      cause PATA port to use SATA ops, which results in bogus check on PCS
      and detection failure.
      
      This patch adds ata_probe_ent->pinfo2 which points to optional
      port_info for the secondary port.  For the time being, this seems to
      be the simplest solution.  This workaround will be removed together
      with ata_probe_ent itself after init model is updated to allow more
      flexibility.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Nelson A. de Oliveira <naoliv@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      fea63e38
  5. 31 8月, 2006 1 次提交
  6. 30 8月, 2006 1 次提交
  7. 24 8月, 2006 1 次提交
    • J
      libata: Grand renaming. · cca3974e
      Jeff Garzik 提交于
      The biggest change is that ata_host_set is renamed to ata_host.
      
      * ata_host_set			=> ata_host
      * ata_probe_ent->host_flags	=> ata_probe_ent->port_flags
      * ata_probe_ent->host_set_flags	=> ata_probe_ent->_host_flags
      * ata_host_stats		=> ata_port_stats
      * ata_port->host		=> ata_port->scsi_host
      * ata_port->host_set		=> ata_port->host
      * ata_port_info->host_flags	=> ata_port_info->flags
      * ata_(.*)host_set(.*)\(\)	=> ata_\1host\2()
      
      The leading underscore in ata_probe_ent->_host_flags is to avoid
      reusing ->host_flags for different purpose.  Currently, the only user
      of the field is libata-bmdma.c and probe_ent itself is scheduled to be
      removed.
      
      ata_port->host is reused for different purpose but this field is used
      inside libata core proper and of different type.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      cca3974e
  8. 15 8月, 2006 1 次提交
  9. 10 8月, 2006 4 次提交
    • J
      [ATA] Increase lba48 max-sectors from 200 to 256. · 8b881b04
      Jeff Garzik 提交于
      Also, moved ATA_MAX_SECTORS and ATA_MAX_SECTORS_LBA48 from
      linux/libata.h to linux/ata.h, now that they truly reflect the standard
      (well... mostly; note TODO comment).
      
      This changes the performance profile (and potential bug profile)
      for a bunch of drivers, so be wary.
      8b881b04
    • T
      [PATCH] libata: kill unused hard_port_no and legacy_mode · 4852ba24
      Tejun Heo 提交于
      Kill unused probe_ent/ap->hard_port_no and probe_ent->legacy_mode.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      4852ba24
    • T
      [PATCH] libata: implement dummy port · dd5b06c4
      Tejun Heo 提交于
      Implement dummy port which can be requested by setting appropriate bit
      in probe_ent->dummy_port_mask.  The dummy port is used as placeholder
      for stolen legacy port.  This allows libata to guarantee that
      index_of(ap) == ap->port_no == actual_device_port_no, and thus to
      remove error-prone ap->hard_port_no.
      
      As it's used only when one port of a legacy controller is reserved by
      some other entity (e.g. IDE), the focus is on keeping the added *code*
      complexity at minimum, so dummy port allocates all libata core
      resources and acts as a normal port.  It just has all dummy port_ops.
      
      This patch only implements dummy port.  The following patch will make
      libata use it for stolen legacy ports.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      dd5b06c4
    • A
      [PATCH] libata: rework legacy handling to remove much of the cruft · 2ec7df04
      Alan Cox 提交于
      Kill host_set->next
      Fix simplex support
      Allow per platform setting of IDE legacy bases
      
      Some of this can be tidied further later on, in particular all the
      legacy port gunge belongs as a PCI quirk/PCI header decode to understand
      the special legacy IDE rules in the PCI spec.
      
      Longer term Jeff also wants to move the request_irq/free_irq out of core
      which will make this even cleaner.
      
      tj: folded in three followup patches - ata_piix-fix, broken-arch-fix
      and fix-new-legacy-handling, and separated per-dev xfermask into
      separate patch preceding this one.  Folded in fixes are...
      
      * ata_piix-fix: fix build failure due to host_set->next removal
      * broken-arch-fix: add missing include/asm-*/libata-portmap.h
      * fix-new-legacy-handling:
      	* In ata_pci_init_legacy_port(), probe_num was incorrectly
                incremented during initialization of the secondary port and
                probe_ent->n_ports was incorrectly fixed to 1.
      
      	* Both legacy ports ended up having the same hard_port_no.
      
      	* When printing port information, both legacy ports printed
      	  the first irq.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      2ec7df04
  10. 09 8月, 2006 2 次提交
    • B
      [PATCH] libata: Add support for SATA attachment to SAS adapters · 80289167
      Brian King 提交于
      The following patch enhances libata to allow SAS device drivers
      to utilize libata to talk to SATA devices. It introduces some
      new APIs which allow libata to be used without allocating a
      virtual scsi host.
      
      New APIs:
      
      ata_sas_port_alloc - Allocate an ata_port
      ata_sas_port_init - Initialize an ata_port (probe device, etc)
      ata_sas_port_destroy - Free an ata_port allocated by ata_sas_port_alloc
      ata_sas_slave_configure - configure scsi device
      ata_sas_queuecmd - queue a scsi command, similar to ata_scsi_queuecomand
      
      These new APIs can be used either directly by a SAS LLDD or could be used
      by the SAS transport class.
      
      Possible usage for a SAS LLDD would be:
      
      scsi_scan_host
      	target_alloc
      		ata_sas_port_alloc
      	slave_alloc
      		ata_sas_port_init
      	slave_configure
      		ata_sas_slave_configure
      
      Commands received by the LLDD for SATA devices would call ata_sas_queuecmd.
      
      Device teardown would occur with:
      
      slave_destroy
      	port_disable
      target_destroy
      	ata_sas_port_destroy
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      80289167
    • B
      [PATCH] libata: Add ata_host_set_init · b03732f0
      Brian King 提交于
      Add ata_host_set_init in preparation for SAS attached SATA.
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b03732f0
  11. 29 7月, 2006 1 次提交
  12. 20 7月, 2006 1 次提交
    • T
      [PATCH] libata: improve EH action and EHI flag handling · 13abf50d
      Tejun Heo 提交于
      Update ata_eh_about_to_do() and ata_eh_done() to improve EH action and
      EHI flag handling.
      
      * There are two types of EHI flags - one which expires on successful
        EH and the other which expires on a successful reset.  Make this
        distinction clear.
      
      * Unlike other EH actions, reset actions are represented by two EH
        action masks and a EHI modifier.  Implement correct about_to_do/done
        semantics for resets.  That is, prior to reset, related EH info is
        sucked in from ehi and cleared, and after reset is complete, related
        EH info in ehc is cleared.
      
      These changes improve consistency and remove unnecessary EH actions
      caused by stale EH action masks and EHI flags.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      13abf50d
  13. 06 7月, 2006 8 次提交
    • T
      [PATCH] libata: reimplement controller-wide PM · 500530f6
      Tejun Heo 提交于
      Reimplement controller-wide PM.  ata_host_set_suspend/resume() are
      defined to suspend and resume a host_set.  While suspended, EHs for
      all ports in the host_set are pegged using ATA_FLAG_SUSPENDED and
      frozen.
      
      Because SCSI device hotplug is done asynchronously against the rest of
      libata EH and the same mutex is used when adding new device, suspend
      cannot wait for hotplug to complete.  So, if SCSI device hotplug is in
      progress, suspend fails with -EBUSY.
      
      In most cases, host_set resume is followed by device resume.  As each
      resume operation requires a reset, a single host_set-wide resume
      operation may result in multiple resets.  To avoid this, resume waits
      upto 1 second giving PM to request resume for devices.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      500530f6
    • T
      [PATCH] libata: reimplement per-dev PM · d6f26d1f
      Tejun Heo 提交于
      Reimplement per-dev PM.  The original implementation directly put the
      device into suspended mode and didn't synchronize w/ EH operations
      including hotplug.  This patch reimplements ata_scsi_device_suspend()
      and ata_scsi_device_resume() such that they request EH to perform the
      respective operations.  Both functions synchronize with hotplug such
      that it doesn't operate on detached devices.
      
      Suspend waits for completion but resume just issues request and
      returns.  This allows parallel wake up of devices and thus speeds up
      system resume.
      
      Due to sdev detach synchronization, it's not feasible to separate out
      EH requesting from sdev handling; thus, ata_device_suspend/resume()
      are removed and everything is implemented in the respective
      libata-scsi functions.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d6f26d1f
    • T
      [PATCH] libata: implement PM EH actions · 02670bf3
      Tejun Heo 提交于
      Implement two PM per-dev EH actions - ATA_EH_SUSPEND and
      ATA_EH_RESUME.  Each action puts the target device into suspended mode
      and resumes from it respectively.
      
      Once a device is put to suspended mode, no EH operations other than
      RESUME is allowed on the device.  The device will stay suspended till
      it gets resumed and thus reset and revalidated.  To implement this, a
      new device state helper - ata_dev_ready() - is implemented and used in
      EH action implementations to make them operate only on attached &
      running devices.
      
      If all possible devices on a port are suspended, reset is skipped too.
      This prevents spurious events including hotplug events from disrupting
      suspended devices.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      02670bf3
    • T
      [PATCH] libata: separate out __ata_ehi_hotplugged() · c0b6c037
      Tejun Heo 提交于
      Separate out __ata_ehi_hotplugged() from ata_ehi_hotplugged().  The
      underscored version doesn't set AC_ERR_ATA_BUS.  This will be used for
      resume which is a hotplug event but not an ATA bus error.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c0b6c037
    • T
      [PATCH] libata: implement ATA_EHI_NO_AUTOPSY and QUIET · 1cdaf534
      Tejun Heo 提交于
      Implement ATA_EHI_NO_AUTOPSY and QUIET.  These used to be implied by
      ATA_PFLAG_LOADING, but new power management and PMP support need to
      use these separately.  e.g. Suspend/resume operations shouldn't print
      full EH messages and resume shouldn't be recorded as an error.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      1cdaf534
    • T
      [PATCH] libata: clean up debounce parameters and improve parameter selection · e9c83914
      Tejun Heo 提交于
      The names of predefined debounce timing parameters didn't exactly
      match their usages.  Rename to more generic names and implement param
      selection helper sata_ehc_deb_timing() which uses EHI_HOTPLUGGED to
      select params.
      
      Combined with the previous EHI_RESUME_LINK differentiation, this makes
      parameter selection accurate.  e.g. user scan resumes link but normal
      deb param is used instead of hotplug param.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      e9c83914
    • T
      [PATCH] libata: implement ATA_EHI_RESUME_LINK · 28324304
      Tejun Heo 提交于
      Implement ATA_EHI_RESUME_LINK, which indicates that the link needs to
      be resumed.  This used to be implied by ATA_EHI_HOTPLUGGED.  However,
      hotplug isn't the only event which requires link resume and separating
      this out allows other places to request link resume.  This
      differentiation also allows better debounce timing selection.
      
      This patch converts user scan to use ATA_EHI_RESUME_LINK.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      28324304
    • T
      [PATCH] libata: add ap->pflags and move core dynamic flags to it · b51e9e5d
      Tejun Heo 提交于
      ap->flags is way too clamped.  Separate out core dynamic flags to
      ap->pflags.  ATA_FLAG_DISABLED is a dynamic flag but left alone as
      it's referenced by a lot of LLDs and it's gonna be removed once all
      LLDs are converted to new EH.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b51e9e5d
  14. 27 6月, 2006 2 次提交
    • T
      [PATCH] libata: implement ata_port_max_devices() · 5806db22
      Tejun Heo 提交于
      Implement ata_port_max_devices().  This function returns the number of
      possible devices on a port.  This will be used by new PM
      implementation.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5806db22
    • A
      [PATCH] libata.h needs scatterlist.h · 41542dbe
      Andrew Morton 提交于
      From: Andrew Morton <akpm@osdl.org>
      
      s390:
      
      In file included from drivers/scsi/libata-bmdma.c:39:                           include/linux/libata.h:391: error: field 'sgent' has incomplete type
      include/linux/libata.h:392: error: field 'pad_sgent' has incomplete type
      include/linux/libata.h: In function 'ata_sg_is_last':                           include/linux/libata.h:849: error: arithmetic on pointer to an incomplete type
      include/linux/libata.h:849: error: arithmetic on pointer to an incomplete type
      include/linux/libata.h: In function 'ata_qc_next_sg':
      include/linux/libata.h:869: error: increment of pointer to unknown structure
      include/linux/libata.h:869: error: arithmetic on pointer to an incomplete type
      include/linux/libata.h:869: error: arithmetic on pointer to an incomplete type
      include/linux/libata.h:869: error: arithmetic on pointer to an incomplete type
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      41542dbe
  15. 23 6月, 2006 2 次提交
  16. 12 6月, 2006 2 次提交
    • T
      [PATCH] libata: add host_set->next for legacy two host_sets case, take #3 · f0eb62b8
      Tejun Heo 提交于
      For a legacy ATA controller, libata registers two separate host sets.
      There was no connection between the two hosts making it impossible to
      traverse all ports related to the controller.  This patch adds
      host_set->next which points to the second host_set and makes
      ata_pci_remove_one() remove all associated host_sets.
      
      * On device removal, all ports hanging off the device are properly
        detached.  Prior to this patch, ports on the first host_set weren't
        detached casuing oops on driver unloading.
      
      * On device removal, both host_sets are properly freed
      
      This will also be used by new power management code to suspend and
      resume all ports of a controller.  host_set/port representation will
      be improved to handle legacy controllers better and this host_set
      linking will go away with it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f0eb62b8
    • J
  17. 11 6月, 2006 1 次提交
  18. 31 5月, 2006 7 次提交
    • T
      [PATCH] libata-hp: killl ops->probe_reset · 52783c5d
      Tejun Heo 提交于
      Now that all drivers implementing new EH are converted to new probing
      mechanism, ops->probe_reset doesn't have any user.  Kill it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      52783c5d
    • T
      [PATCH] libata-hp: update unload-unplug · 720ba126
      Tejun Heo 提交于
      Update unload unplug - driver unloading / PCI removal.  This is done
      by ata_port_detach() which short-circuits EH, disables all devices and
      freezes the port.  With this patch, EH and unloading/unplugging are
      properly synchronized.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      720ba126
    • T
      [PATCH] libata-hp: implement warmplug · 83c47bcb
      Tejun Heo 提交于
      Implement warmplug.  User-initiated unplug can be detected by
      hostt->slave_destroy() and plug by transportt->user_scan().  This
      patch only implements the two callbacks.  The next function will hook
      them.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      83c47bcb
    • T
      [PATCH] libata-hp: implement SCSI part of hotplug · 580b2102
      Tejun Heo 提交于
      Implement SCSI part of hotplug.
      
      This must be done in a separate context as SCSI makes use of EH during
      probing.  SCSI scan fails silently if EH is in progress.  In such
      cases, libata pauses briefly and retries until every device is
      attached.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      580b2102
    • T
      [PATCH] libata-hp: implement hotplug · 084fe639
      Tejun Heo 提交于
      Implement ATA part of hotplug.  To avoid probing broken devices over
      and over again, disabled devices are not automatically detached.  They
      are detached only if probing is requested for the device or the
      associated port is offline.  Also, to avoid infinite probing loop,
      Each device is probed only once per EH run.
      
      As SATA PHY status is fragile, devices are detached only after it has
      used up its recovery chances unless explicitly requested by LLDD or
      user (LLDD may request direct detach if, for example, it supports cold
      presence detection).
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      084fe639
    • T
      [PATCH] libata: export ata_hsm_move() · 9a1004d0
      Tejun Heo 提交于
      ata_hsm_move() will be used by LLDDs which depend on standard PIO HSM
      but implement their own interrupt handlers.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      9a1004d0
    • 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