1. 24 7月, 2011 1 次提交
    • J
      ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>( · a44fec1f
      Joe Perches 提交于
      Saves a bit of text as the call takes fewer args.
      
      Coalesce a few formats.
      Convert a few bare printks to pr_cont.
      
      $ size drivers/ata/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       558429	  73893	 117864	 750186	  b726a	drivers/ata/built-in.o.allyesconfig.new
       559574	  73893	 117888	 751355	  b76fb	drivers/ata/built-in.o.allyesconfig.old
       149567	  14689	   4220	 168476	  2921c	drivers/ata/built-in.o.defconfig.new
       149851	  14689	   4220	 168760	  29338	drivers/ata/built-in.o.defconfig.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      a44fec1f
  2. 30 6月, 2011 1 次提交
    • L
      ahci: change 'masking port_map' printk to KERN_WARNING level · 49743170
      Linus Torvalds 提交于
      It's not so much an error as a warning about normal Marvell crazines.
      So don't use KERN_ERR that ends up spamming the console even in quiet
      mode, it's not _that_ critical.
      
      Explained by Jeff:
      
       "Long explanation, it's a mess:
      
        Marvell took standard AHCI, and bastardized it to include a weird mode
        whereby PATA devices appear inside the AHCI DMA and interrupt
        infrastructure you're familiar with.
      
        So, PATA devices appear via pata_marvell driver, using basic legacy
        IDE programming interface.  But SATA devices, which might also be
        attached to this chip, either work in under-performing mode or
        simply don't work at all (e.g.  newer 6 Gbps devices or port
        multiplier attachments, NCQ, ...)
      
        On the other hand, 'ahci' driver loads and works with the chip's
        attached SATA devices quite beautifully, but is completely unable to
        drive any attached PATA devices, due to the Marvell-specific
        PATA-under-AHCI interface.
      
        The "masking port_map 0x7 -> 0x3" message is the ahci driver "hiding"
        the PATA port(s) from itself, making sure it will only drive the SATA
        ports it knows how to drive."
      Acked-by: NJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      49743170
  3. 15 5月, 2011 1 次提交
  4. 24 4月, 2011 3 次提交
  5. 06 1月, 2011 1 次提交
  6. 22 10月, 2010 4 次提交
    • T
      libahci: fix result_tf handling after an ATA PIO data-in command · 6ad60195
      Tejun Heo 提交于
      ATA devices don't send D2H Reg FIS after an successful ATA PIO data-in
      command.  The host is supposed to take the TF and E_Status of the
      preceding PIO Setup FIS.  Update ahci_qc_fill_rtf() such that it takes
      TF + E_Status from PIO Setup FIS after a successful ATA PIO data-in
      command.
      
      Without this patch, result_tf for such a command is filled with the
      content of the previous D2H Reg FIS which belongs to a previous
      command, which can make the command incorrectly seen as failed.
      
      * Patch updated to grab the whole TF + E_Status from PIO Setup FIS
        instead of just E_Status as suggested by Robert Hancock.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NMark Lord <kernel@teksavvy.com>
      Cc: Robert Hancock <hancockrwd@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6ad60195
    • T
      libata: add @ap to ata_wait_register() and introduce ata_msleep() · 97750ceb
      Tejun Heo 提交于
      Add optional @ap argument to ata_wait_register() and replace msleep()
      calls with ata_msleep() which take optional @ap in addition to the
      duration.  These will be used to implement EH exclusion.
      
      This patch doesn't cause any behavior difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      97750ceb
    • T
      libata: reimplement link power management · 6b7ae954
      Tejun Heo 提交于
      The current LPM implementation has the following issues.
      
      * Operation order isn't well thought-out.  e.g. HIPM should be
        configured after IPM in SControl is properly configured.  Not the
        other way around.
      
      * Suspend/resume paths call ata_lpm_enable/disable() which must only
        be called from EH context directly.  Also, ata_lpm_enable/disable()
        were called whether LPM was in use or not.
      
      * Implementation is per-port when it should be per-link.  As a result,
        it can't be used for controllers with slave links or PMP.
      
      * LPM state isn't managed consistently.  After a link reset for
        whatever reason including suspend/resume the actual LPM state would
        be reset leaving ap->lpm_policy inconsistent.
      
      * Generic/driver-specific logic boundary isn't clear.  Currently,
        libahci has to mangle stuff which libata EH proper should be
        handling.  This makes the implementation unnecessarily complex and
        fragile.
      
      * Tied to ALPM.  Doesn't consider DIPM only cases and doesn't check
        whether the device allows HIPM.
      
      * Error handling isn't implemented.
      
      Given the extent of mismatch with the rest of libata, I don't think
      trying to fix it piecewise makes much sense.  This patch reimplements
      LPM support.
      
      * The new implementation is per-link.  The target policy is still
        port-wide (ap->target_lpm_policy) but all the mechanisms and states
        are per-link and integrate well with the rest of link abstraction
        and can work with slave and PMP links.
      
      * Core EH has proper control of LPM state.  LPM state is reconfigured
        when and only when reconfiguration is necessary.  It makes sure that
        LPM state is reset when probing for new device on the link.
        Controller agnostic logic is now implemented in libata EH proper and
        driver implementation only has to deal with controller specifics.
      
      * Proper error handling.  LPM config failure is attributed to the
        device on the link and LPM is disabled for the link if it fails
        repeatedly.
      
      * ops->enable/disable_pm() are replaced with single ops->set_lpm()
        which takes @policy and @hints.  This simplifies driver specific
        implementation.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6b7ae954
    • T
      libata: clean up lpm related symbols and sysfs show/store functions · c93b263e
      Tejun Heo 提交于
      Link power management related symbols are in confusing state w/ mixed
      usages of lpm, ipm and pm.  This patch cleans up lpm related symbols
      and sysfs show/store functions as follows.
      
      * lpm states - NOT_AVAILABLE, MIN_POWER, MAX_PERFORMANCE and
        MEDIUM_POWER are renamed to ATA_LPM_UNKNOWN and
        ATA_LPM_{MIN|MAX|MED}_POWER.
      
      * Pre/postfixes are unified to lpm.
      
      * sysfs show/store functions for link_power_management_policy were
        curiously named get/put and unnecessarily complex.  Renamed to
        show/store and simplified.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c93b263e
  7. 29 9月, 2010 1 次提交
  8. 10 9月, 2010 1 次提交
  9. 26 8月, 2010 1 次提交
  10. 02 7月, 2010 1 次提交
  11. 08 6月, 2010 1 次提交
  12. 15 5月, 2010 13 次提交
  13. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  14. 18 3月, 2010 3 次提交
  15. 02 3月, 2010 3 次提交
  16. 25 2月, 2010 1 次提交
  17. 04 2月, 2010 1 次提交
  18. 04 12月, 2009 1 次提交
  19. 03 12月, 2009 1 次提交
    • S
      ahci: disable SNotification capability for ich8 · 1b677afd
      Shaohua Li 提交于
      I obseved there is a sata_async_notification() for every ahci
      interrupt. But the async notification does nothing (this is hard
      disk drive and no pmp). This cause cpu wastes some time on sntf
      register access.
      
      It appears ICH AHCI doesn't support SNotification register, but the
      controller reports it does. After quirking it, the async notification
      disappears.
      
      PS. it appears all ICH don't support SNotification register from ICH
      manual, don't know if we need quirk all ICH. I don't have machines
      with all kinds of ICH.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1b677afd