1. 29 4月, 2007 7 次提交
    • T
      ahci: consolidate common port flags · 1188c0d8
      Tejun Heo 提交于
      Consolidate common port flags into AHCI_FLAG_COMMON.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      1188c0d8
    • T
      libata: convert the remaining SATA drivers to new init model · 4447d351
      Tejun Heo 提交于
      Convert ahci, sata_sil, sata_sil24, sata_svw, sata_qstor, sata_mv,
      sata_sx4, sata_vsc and sata_inic162x to new init model.
      
      Now that host and ap are available during intialization, functions are
      converted to take either host or ap instead of low level parameters
      which were inevitable for functions shared between init and other
      paths.  This simplifies code quite a bit.
      
      * init_one()'s now follow more consistent init order
      
      * ahci_setup_port() and ahci_host_init() collapsed into
        ahci_init_one() for init order consistency
      
      * sata_vsc uses port_info instead of setting fields manually
      
      * in sata_svw, k2_board_info converted to port_info (info is now in
        port flags).  port number is honored now.
      
      Tested on ICH7/8 AHCI, jmb360, sil3112, 3114, 3124 and 3132.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4447d351
    • T
      ahci: add PCI ID for new VIA chip · bf335542
      Tejun Heo 提交于
      Add PCI ID for new VIA chip.  Original patch is from Maarten Vanraes.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Maarten Vanraes <maarten.vanraes@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      bf335542
    • C
      ahci.c: remove non-existing SB600 raid id (re-send) · c65ec1c2
      Conke Hu 提交于
          SB600 RAID and SB600 SATA is the same controller and share the
      same PCI ID 0x4380. There is no such PCI ID 0x4381.
      Signed-off-by: NConke Hu <conke.hu@gmail.com>
       ---------
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c65ec1c2
    • T
      libata: improve AC_ERR_DEV handling for ->post_internal_cmd · a51d644a
      Tejun Heo 提交于
      ->post_internal_cmd is simplified EH for internal commands.  Its
      primary mission is to stop the controller such that no rogue memory
      access or other activities occur after the internal command is
      released.  It may provide error diagnostics by setting qc->err_mask
      but this hasn't been a requirement.
      
      To ignore SETXFER failure for CFA devices, libata needs to know
      whether a command was failed by the device or for any other reason.
      ie. internal command needs to get AC_ERR_DEV right.
      
      This patch makes the following changes to AC_ERR_DEV handling and
      ->post_internal_cmd semantics to accomodate this need and simplify
      callback implementation.
      
      1. As long as the correct bits in the result TF registers are set,
         there is no need to set AC_ERR_DEV explicitly.  libata EH core
         takes care of that for both normal and internal commands.
      
      2. The only requirement for ->post_internal_cmd() is to put the
         controller into quiescent state.  It needs not to set any err_mask.
      
      3. ata_exec_internal_sg() performs minimal error analysis such that
         AC_ERR_DEV is automatically set as long as result_tf is filled
         correctly.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      a51d644a
    • T
      ahci: move port_map handling to ahci_save_initial_config() · 17199b18
      Tejun Heo 提交于
      Move cross checking between port_map and cap.n_ports into
      ahci_save_initial_config().  After save_initial_config is done,
      hpriv->port_map is always setup properly.
      
      Tested on JMB363, ICH7 and ICH8 (with dummy ports).
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      17199b18
    • T
      ahci: implement ata_save/restore_initial_config() · d447df14
      Tejun Heo 提交于
      There are several registers which describe how the controller is
      configured.  These registers are sometimes implemented as r/w
      registers which are configured by firmware and get cleared on
      controller reset or after suspend/resume cycle.  ahci saved and
      restored those values inside ahci_reset_controller() which is a bit
      messy and doesn't work over suspend/resume cycle.
      
      This patch implements ahci_save/restore_initial_config().  The save
      function is called during driver initialization and saves cap and
      port_map to hpriv.  The restore function is called after the
      controller is reset to restore the initial values.
      
      Sometimes the initial firmware values are inconsistent and need to be
      fixed up.  This is handled by ahci_save_initial_config().  For this,
      there are two versions of saved registers.  One to write back to the
      hardware register, the other to use during driver operation.  This is
      necessary to keep ahci's behavior unchanged (write back fixed up
      port_map while keeping cap as-is).
      
      This patch makes ahci save the register values once before the first
      controller reset, not after it's been reset.  Also, the same stored
      values are used written back after each reset, so the register values
      are properly recovered after suspend/resume cycle.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d447df14
  2. 28 3月, 2007 1 次提交
    • C
      ahci.c: walkaround for SB600 SATA internal error issue · 55a61604
      Conke Hu 提交于
         There is a HW issue in ATI SB600 SATA that PxSERR.E should not be
      set on some conditions, for example, when there is no media in SATA
      CD/DVD drive or media is not ready, AHCI controller fails to execute
      ATAPI commands and reports PORT_IRQ_TF_ERR, but ATI SB600 SATA
      controller sets PxSERR.E at the
      same time, which is not necessary.
          This patch is just to ignore the INTERNAL ERROR in such case.
      Without this patch, ahci error handler will report many errors as
      below:
          ----------- cut from dmesg -----------
      ata9: soft resetting port
      ata9: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
      ata9.00: configured for UDMA/33
      ata9: EH complete
      ata9.00: exception Emask 0x40 SAct 0x0 SErr 0x800 action 0x2
      ata9.00: (irq_stat 0x40000001)
      ata9.00: cmd a0/00:00:00:00:20/00:00:00:00:00/a0 tag 0 cdb 0x0 data 0
              res 51/24:03:00:00:20/00:00:00:00:00/a0 Emask 0x40 (internal error)
      ata9: soft resetting port
      ata9: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
      ata9.00: configured for UDMA/33
      ata9: EH complete
      ata9.00: exception Emask 0x40 SAct 0x0 SErr 0x800 action 0x2
      ata9.00: (irq_stat 0x40000001)
      ata9.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x43 data 12 in
              res 51/24:03:00:00:00/00:00:00:00:00/a0 Emask 0x40 (internal error)
          -------- end cut ---------
      Signed-off-by: NConke Hu <conke.hu@amd.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      55a61604
  3. 06 3月, 2007 1 次提交
  4. 03 3月, 2007 1 次提交
  5. 02 3月, 2007 2 次提交
  6. 26 2月, 2007 1 次提交
  7. 23 2月, 2007 1 次提交
  8. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  9. 10 2月, 2007 9 次提交
  10. 27 1月, 2007 3 次提交
  11. 26 1月, 2007 1 次提交
  12. 24 1月, 2007 2 次提交
    • T
      ahci: don't enter slumber on power down · 07c53dac
      Tejun Heo 提交于
      Some ATA/ATAPI devices act weirdly after the link is put into slumber
      mode.  Some hang completely requiring physical power removal while
      others fail to wake up till the link is hardreset a couple of times.
      
      The addition of slumber on power down was never driven by real need.
      It just followed what ahci spec said literally.  The spec itself seems
      faulty in that it doesn't consider devices (not controllers) which
      don't support link powersaving mode.
      
      Theory never matches reality when it comes to dark allys of cheap
      ATA/ATAPI world.  It's just unrealistic to expect vendors to test
      rarely used link powersaving feature rigorously.  This patch makes
      ahci more friendly to the coldness of reality.
      
      This shouldn't have any negative effect - when suspend operation
      succeeds, we power off the whole machine; otherwise, we wake up
      everything.  I can't see any reason to be so elaborate with powering
      down the link in the first place.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      07c53dac
    • T
      ahci: make ULi M5288 ignore interface fatal error bit · 82490c09
      Tejun Heo 提交于
      As with JMicron controllers, ULi M5288 sets interface fatal error bit
      on device error including ATAPI CC.  This makes libata hardreset the
      port on ATAPI CC thus making it impossible to use.  Ignore interface
      fatal error bit on ULi M5288.  This fixes bugzilla bug #7837.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      82490c09
  13. 21 12月, 2006 1 次提交
  14. 16 12月, 2006 1 次提交
  15. 03 12月, 2006 1 次提交
    • 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
  16. 02 12月, 2006 5 次提交
  17. 29 11月, 2006 1 次提交
    • T
      [PATCH] ahci: ignore PORT_IRQ_IF_ERR on JMB controllers · 41669553
      Tejun Heo 提交于
      JMicron AHCI controllers set PORT_IRQ_IF_ERR on device errors.  The
      IRQ status bit indicates interface error or protocol mismatch and ahci
      driver interprets it into AC_ERR_ATA_BUS.  So, whenever an ATAPI
      device raises check condition, ahci interprets it as ATA bus error and
      thus resets it which, in turn, raises check condition thus creating a
      reset loop and rendering the device unuseable.
      
      This patch makes JMB controllers ignore PORT_IRQ_IF_ERR when
      interpreting error condition.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Justin Tsai <justin@jmicron.com>
      41669553
  18. 28 11月, 2006 1 次提交