1. 17 2月, 2007 3 次提交
  2. 16 2月, 2007 1 次提交
    • T
      libata: clear TF before IDENTIFYing · 81afe893
      Tejun Heo 提交于
      Some devices chock if Feature is not clear when IDENTIFY is issued.
      Set ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE for IDENTIFY such that whole
      TF is cleared when reading ID data.
      
      Kudos to Art Haas for testing various futile patches over several
      months and Mark Lord for pointing out the fix.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Art Haas <ahaas@airmail.net>
      Cc: Mark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      81afe893
  3. 10 2月, 2007 17 次提交
  4. 03 2月, 2007 1 次提交
  5. 30 1月, 2007 1 次提交
  6. 25 1月, 2007 1 次提交
  7. 16 12月, 2006 1 次提交
  8. 07 12月, 2006 2 次提交
  9. 03 12月, 2006 7 次提交
    • T
      [PATCH] libata: always use polling IDENTIFY · 800b3996
      Tejun Heo 提交于
      libata switched to IRQ-driven IDENTIFY when IRQ-driven PIO was
      introduced.  This has caused a lot of problems including device
      misdetection and phantom device.
      
      ATA_FLAG_DETECT_POLLING was added recently to selectively use polling
      IDENTIFY on problemetic drivers but many controllers and devices are
      affected by this problem and trying to adding ATA_FLAG_DETECT_POLLING
      for each such case is diffcult and not very rewarding.
      
      This patch makes libata always use polling IDENTIFY.  This is
      consistent with libata's original behavior and drivers/ide's behavior.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      800b3996
    • T
      [PATCH] libata: prepare ata_sg_clean() for invocation from EH · 70e6ad0c
      Tejun Heo 提交于
      Make ata_sg_clean() global and don't allow NCQ for internal commands.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      70e6ad0c
    • T
      [PATCH] libata: separate out rw ATA taskfile building into ata_build_rw_tf() · bd056d7e
      Tejun Heo 提交于
      Separate out rw ATA taskfile building from ata_scsi_rw_xlat() into
      ata_build_rw_tf().  This will be used to improve media error handling.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      bd056d7e
    • T
      [PATCH] libata: implement ata_exec_internal_sg() · 2432697b
      Tejun Heo 提交于
      Sg'ify ata_exec_internal() and call it ata_exec_internal_sg().
      Wrapper function around ata_exec_internal_sg() is implemented to
      provide ata_exec_internal() interface.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      2432697b
    • T
      [PATCH] libata: make sure IRQ is cleared after ata_bmdma_freeze() · 0f0a3ad3
      Tejun Heo 提交于
      Now that BMDMA status is recorded in irq handler.  ata_bmdma_freeze()
      is free to manipulate host status.  Under certain circumstances, some
      controllers (ICH7 in enhanced mode w/ IRQ shared) raise IRQ when CTL
      register is written to and ATA_NIEN doesn't mask it.
      
      This patch makes ata_bmdma_freeze() clear all pending IRQs after
      freezing a port.  This change makes explicit clearing in
      ata_device_add() unnecessary and thus kills it.  The removed code was
      SFF-specific and was in the wrong place.
      
      Note that ->freeze() handler is always called under ap->lock held and
      irq disabled.  Even if CTL manipulation causes stuck IRQ, it's cleared
      immediately.  This should be safe (enough) even in SMP environment.
      More correct solution is to mask the IRQ from IRQ controller but that
      would be an overkill.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      0f0a3ad3
    • T
      [PATCH] libata: move BMDMA host status recording from EH to interrupt handler · ea54763f
      Tejun Heo 提交于
      For certain errors, interrupt handler alter BMDMA host status before
      entering EH (clears active and intr).  Thus altered BMDMA host status
      value is recorded by BMDMA EH and reported to user.  Move BMDMA host
      status recording from EH to interrupt handler.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      ea54763f
    • T
      [PATCH] libata: implement ATA_FLAG_SETXFER_POLLING and use it in pata_via, take #2 · 3d3cca37
      Tejun Heo 提交于
      This patch implements ATA_FLAG_SETXFER_POLLING and use in pata_via.
      If this flag is set, transfer mode setting performed by polling not by
      interrupt.  This should help those controllers which raise interrupt
      before the command is actually complete on SETXFER.
      
      Rationale for this approach.
      
      * uses existing facility and relatively simple
      * no busy sleep in the interrupt handler
      * updating drivers is easy
      
      While at it, kill now unused flag ATA_FLAG_SRST in pata_via.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      3d3cca37
  10. 02 12月, 2006 6 次提交
    • T
      [PATCH] libata: implement ata_tf_read_block() · 35b649fe
      Tejun Heo 提交于
      Implement ata_tf_read_block().
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      35b649fe
    • T
      [PATCH] libata: sync result_tf.flags w/ command tf.flags · 39599a53
      Tejun Heo 提交于
      libata didn't initialize result_tf.flags which indicates transfer type
      (RW/FUA) and address type (CHS/LBA/LBA48).  ata_gen_fixed_sense()
      assumed result_tf.flags equals command tf.flags and failed to report
      the first failed block to SCSI layer because zero tf flags indicates
      CHS and bad block reporting for CHS is not implemented.
      
      Implement fill_result_tf() which sets result_tf.flags to command
      tf.flags and use it to fill result_tf.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      39599a53
    • T
      [PATCH] libata: trivial updates to ata_sg_init_one() · 61c0596c
      Tejun Heo 提交于
      There's no need to memset &qc->sgent manually, sg_init_one() clears
      sgent inside it.  Also, kill not-so-necessary sg local variable.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      61c0596c
    • T
      [PATCH] libata: implement presence detection via polling IDENTIFY · 55a8e2c8
      Tejun Heo 提交于
      On some controllers (ICHs in piix mode), there is *NO* reliable way to
      determine device presence other than issuing IDENTIFY and see how the
      transaction proceeds by watching the TF status register.
      
      libata acted this way before irq-pio and phantom devices caused very
      little problem but now that IDENTIFY is performed using IRQ drive PIO,
      such phantom devices now result in multiple 30sec timeouts during
      boot.
      
      This patch implements ATA_FLAG_DETECT_POLLING.  If a LLD sets this
      flag, libata core issues the initial IDENTIFY in polling mode and if
      the initial data transfer fails w/ HSM violation, the port is
      considered to be empty thus replicating the old libata and IDE
      behavior.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      55a8e2c8
    • T
      [PATCH] libata: convert @post_reset to @flags in ata_dev_read_id() · bff04647
      Tejun Heo 提交于
      Make ata_dev_read_id() take @flags instead of @post_reset.  Currently
      there is only one flag defined - ATA_READID_POSTRESET, which is
      equivalent to @post_reset.  This is preparation for polling presence
      detection.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      bff04647
    • T
      [PATCH] libata: use FLUSH_EXT only when driver is larger than LBA28 limit · 6fc49adb
      Tejun Heo 提交于
      Many drives support LBA48 even when its capacity is smaller than
      1<<28, as LBA48 is required for many functionalities.  FLUSH_EXT is
      mandatory for drives w/ LBA48 support.
      
      Interestingly, at least one of such drives (ST960812A) has problems
      dealing with FLUSH_EXT.  It eventually completes the command but takes
      around 7 seconds to finish in many cases thus drastically slowing down
      IO transactions.  This seems to be a firmware bug which sneaked into
      production probably because no other ATA driver including linux IDE
      issues FLUSH_EXT to drives which report support for LBA48 & FLUSH_EXT
      but is smaller than 1<<28 blocks.
      
      This patch adds ATA_DFLAG_FLUSH_EXT which is set iff the drive
      supports LBA48 & FLUSH_EXT and is larger than LBA28 limit.  Both cache
      flush paths are updated to issue FLUSH_EXT only when the flag is set.
      Note that the changed behavior is more inline with the rest of libata.
      libata prefers shorter commands whenever possible.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Danny Kukawka <dkukawka@novell.com>
      Cc: Stefan Seyfried <seife@novell.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6fc49adb