1. 21 12月, 2006 7 次提交
  2. 16 12月, 2006 10 次提交
  3. 14 12月, 2006 1 次提交
  4. 07 12月, 2006 4 次提交
    • A
      [PATCH] libata: Incorrect timing computation for PIO5/6 · fd3367af
      Alan 提交于
      The ata timing computation code makes some mistakes in PIO5/6 because a
      check was not updated correctly when I put this support into the kernel.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      fd3367af
    • M
      [PATCH] sata_promise: new EH conversion, take 2 · 25b93d81
      Mikael Pettersson 提交于
      This patch converts sata_promise to use new-style libata error
      handling on Promise SATA chips, for both SATA and PATA ports.
      
      * ATA_FLAG_SRST is no longer set
      * ->phy_reset is no longer set as it is unused when ->error_handler
         is present, and pdc_sata_phy_reset() has been removed
      * pdc_freeze() masks interrupts and halts DMA via PDC_CTLSTAT
      * pdc_thaw() clears interrupt status in PDC_INT_SEQMASK and then
        unmasks interrupts in PDC_CTLSTAT
      * pdc_error_handler() reinitialises the port if it isn't frozen,
        and then invokes ata_do_eh() with standard {s,}ata reset methods
      * pdc_post_internal_cmd() resets the port in case of errors
      * the PATA-only 20619 chip continues to use old-style EH:
        not by necessity but simply because I don't have documentation
        for it or any way to test it
      
      Since the previous version pdc_error_handler() has been rewritten
      and it now mostly matches ahci and sata_sil24. In case anyone
      wonders: the call to pdc_reset_port() isn't a heavy-duty reset,
      it's a light-weight reset to quickly put a port into a sane state.
      
      The discussion about the PCI flushes in pdc_freeze() and pdc_thaw()
      seemed to end with a consensus that the flushes are OK and not
      obviously redundant, so I decided to keep them for now.
      
      This patch was prepared against 2.6.19-git7, but it also applies
      to 2.6.19 + libata #upstream, with or without the revised sata_promise
      cleanup patch I recently submitted.
      
      This patch does conflict with the #promise-sata-pata patch:
      this patch removes pdc_sata_phy_reset() while #promise-sata-pata
      modifies it. The correct patch resolution is to remove the function.
      
      Tested on 2037x and 2057x chips, with PATA patches on top and disks
      on both SATA and PATA ports.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      25b93d81
    • A
      [PATCH] libata: let ATA_FLAG_PIO_POLLING use polling pio for ATA_PROT_NODATA · e3472cbe
      Albert Lee 提交于
      Even if ATA_FLAG_PIO_POLLING is set, libata uses irq pio for the ATA_PROT_NODATA protocol.
      This patch let ATA_FLAG_PIO_POLLING use polling pio for the ATA_PROT_NODATA protocol.
      Signed-off-by: NAlbert Lee <albertcc@tw.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      e3472cbe
    • M
      [PATCH] sata_promise: cleanups, take 2 · d324d462
      Mikael Pettersson 提交于
      This patch performs two simple cleanups of sata_promise.
      
      * Remove board_20771 and map device id 0x3577 to board_2057x.
        After the recent corrections for SATAII chips, board_20771 and
        board_2057x were equivalent in the driver.
      
      * Remove hp->hotplug_offset and use hp->flags & PDC_FLAG_GEN_II
        to compute hotplug_offset in pdc_host_init(). hp->hotplug_offset
        was used to distinguish 1st and 2nd generation chips in one
        particular case, but now we have that information in a more
        general form in hp->flags, so hp->hotplug_offset is redundant.
      
      Changes since previous submission: rebased on libata-dev #upstream,
      cleaned up hotplug_offset computation based on Tejun's comments,
      expanded hotplug_offset removal rationale.
      
      This patch does not depend on the pending new EH conversion patch.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d324d462
  5. 05 12月, 2006 7 次提交
  6. 03 12月, 2006 11 次提交
    • M
      [PATCH] sata_promise: PHYMODE4 fixup · 599b7202
      Mikael Pettersson 提交于
      This patch adds code to fix up the PHYMODE4 "align timing"
      register value on second-generation Promise SATA chips.
      Failure to correct this value on non-x86 machines makes
      drive detection prone to failure due to timeouts. (I've
      observed about 50% detection failure rates on SPARC64.)
      
      The HW boots with a bad value in this register, but on x86
      machines the Promise BIOS corrects it to the value recommended
      by the manual, so most people have been unaffected by this issue.
      
      After developing the patch I checked Promise's SATAII driver,
      and discovered that it also corrects PHYMODE4 just like this
      patch does.
      
      This patch depends on the sata_promise SATAII updates
      patch I sent recently.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      599b7202
    • 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
    • J
      [libata] pata_cs5535: fix build · 3ac551a6
      Jeff Garzik 提交于
      Noticed by Tejun and others.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3ac551a6
    • T
      [PATCH] ahci: do not powerdown during initialization · 8e16f941
      Tejun Heo 提交于
      ahci_init_controller() calls ahci_deinit_port() to make sure the
      controller is stopped before initializing the controller.  In turn,
      ahci_deinit_port() invokes ahci_power_down() to power down the port.
      If the controller supports slumber mode, the link is put into it.
      
      Unfortunately, some devices don't implement link powersaving mode
      properly and show erratic behavior after link is put into slumber
      mode.  For example, HL-DT-ST DVD-RAM GSA-H30N completely locks up on
      slumber transition and can only be recovered with the *REAL* hard
      reset - power removal and reapply.
      
      Note that this makes the first probing reset different from all
      others.  If the above dvd-ram is hotplugged after ahci is initialized,
      no problem occurs because ahci is already fully initialized with phy
      powered up.  So, this might also be the reason for other weird AHCI
      initial probing abnormalities.
      
      This patch moves power up/down out of port init/deinit and call them
      only when needed.
      
      Power down is now called only when suspending.  As system suspend
      usually involves powering down 12v for storage devices, this shouldn't
      cause problem even if the attached device doesn't support slumber
      mode.  However, in partial power management and suspend failure cases,
      devices might lock up after suspend attempt.  I thought about removing
      transition to slumber mode altogether but ahci spec mandates it before
      HBA D3 state transition.  Blacklisting such devices might be the
      solution.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      8e16f941
    • 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: make sure sdev doesn't go away while rescanning · f84e7e41
      Tejun Heo 提交于
      ata_scsi_dev_rescan() doesn't synchronize against SCSI device detach
      and the target sdev might go away in the middle.  Fix it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      f84e7e41
    • T
      [PATCH] libata: don't request sense if the port is frozen · a569a30d
      Tejun Heo 提交于
      If EH command is issued to a frozen port, it fails with AC_ERR_SYSTEM.
      libata used to request sense even when the port is frozen needlessly
      adding AC_ERR_SYSTEM to err_mask.  Don't do it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      a569a30d