1. 25 Jul, 2012 1 commit
    • Axel Lin's avatar
      ata: use module_pci_driver · 2fc75da0
      Axel Lin authored
      This patch converts the drivers in drivers/ata/* to use module_pci_driver()
      macro which makes the code smaller and a bit simpler.
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Mikael Pettersson <mikpe@it.uu.se>
      Cc: Mark Lord <kernel@teksavvy.com>
      Cc: Jeremy Higdon <jeremy@sgi.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  2. 12 Jan, 2012 1 commit
  3. 23 Jul, 2011 3 commits
    • Joe Perches's avatar
      ata: Add and use ata_print_version_once · 06296a1e
      Joe Perches authored
      Use a single mechanism to show driver version.
      Reduces text a tiny bit too.
      Remove uses of static int printed_version
      Add and use ata_print_version(const struct device *, const char *ver)
      and ata_print_version_once.
      $ size drivers/ata/built-in.*
         text	   data	    bss	    dec	    hex	filename
       544969	  73893	 116584	 735446	  b38d6	drivers/ata/built-in.allyesconfig.ata.o
       543870	  73893	 116592	 734355	  b34ad	drivers/ata/built-in.allyesconfig.print_once.o
       141328	  14689	   4220	 160237	  271ed	drivers/ata/built-in.defconfig.ata.o
       141212	  14689	   4220	 160121	  27179	drivers/ata/built-in.defconfig.print_once.o
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
    • Joe Perches's avatar
      ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level> · a9a79dfe
      Joe Perches authored
      Saves text by removing nearly duplicated text format strings by
      creating ata_<foo>_printk functions and printf extension %pV.
      ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)
      Format string duplication comes from:
       #define ata_link_printk(link, lv, fmt, args...) do { \
             if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link)    \
                     printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id,   \
                            (link)->pmp , ##args); \
             else \
                     printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
             } while(0)
      Coalesce long formats.
      $ size drivers/ata/built-in.*
         text	   data	    bss	    dec	    hex	filename
       544969	  73893	 116584	 735446	  b38d6	drivers/ata/built-in.allyesconfig.ata.o
       558429	  73893	 117864	 750186	  b726a	drivers/ata/built-in.allyesconfig.dev_level.o
       141328	  14689	   4220	 160237	  271ed	drivers/ata/built-in.defconfig.ata.o
       149567	  14689	   4220	 168476	  2921c	drivers/ata/built-in.defconfig.dev_level.o
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
    • Joe Perches's avatar
      ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>( · a44fec1f
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
  4. 31 Mar, 2011 1 commit
  5. 02 Mar, 2011 2 commits
  6. 22 Oct, 2010 1 commit
    • Tejun Heo's avatar
      libata: always use ata_qc_complete_multiple() for NCQ command completions · 1aadf5c3
      Tejun Heo authored
      Currently, sata_fsl, mv and nv call ata_qc_complete() multiple times
      from their interrupt handlers to indicate completion of NCQ commands.
      This limits the visibility the libata core layer has into how commands
      are being executed and completed, which is necessary to support IRQ
      expecting in generic way.  libata already has an interface to complete
      multiple commands at once - ata_qc_complete_multiple() which ahci and
      sata_sil24 already use.
      This patch updates the three drivers to use ata_qc_complete_multiple()
      too and updates comments on ata_qc_complete[_multiple]() regarding
      their usages with NCQ completions.  This change not only provides
      better visibility into command execution to the core layer but also
      simplifies low level drivers.
      * sata_fsl: It already builds done_mask.  Conversion is straight
      * sata_mv: mv_process_crpb_response() no longer checks for illegal
        completions, it just returns whether the tag is completed or not.
        mv_process_crpb_entries() builds done_mask from it and passes it to
        ata_qc_complete_multiple() which will check for illegal completions.
      * sata_nv adma: Similar to sata_mv.  nv_adma_check_cpb() now just
        returns the tag status and nv_adma_interrupt() builds done_mask from
        it and passes it to ata_qc_complete_multiple().
      * sata_nv swncq: It already builds done_mask.  Drop unnecessary
        illegal transition checks and call ata_qc_complete_multiple().
      In the long run, it might be a good idea to make ata_qc_complete()
      whine if called when multiple NCQ commands are in flight.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Ashish Kalra <ashish.kalra@freescale.com>
      Cc: Saeed Bishara <saeed@marvell.com>
      Cc: Mark Lord <liml@rtr.ca>
      Cc: Robert Hancock <hancockr@shaw.ca>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  7. 01 Aug, 2010 1 commit
    • Tejun Heo's avatar
      sata_fsl,mv,nv: prepare for NCQ command completion update · 752e386c
      Tejun Heo authored
      Make the following changes to prepare for NCQ command completion
      update.  Changes made by this patch don't cause any functional
      * sata_fsl_host_intr(): rename the local variable qc_active to
        done_mask as that's what it is.
      * mv_process_crpb_response(): restructure if clause for easier update.
      * nv_adma_interrupt(): drop unnecessary error variable.
      * nv_swncq_sdbfis(): drop unnecessary nr_done and return 0 on success.
        Typo fix.
      * nv_swncq_dmafis(): drop unused return value and return void.
      * nv_swncq_host_interrupt(): drop unnecessary return value handling.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Ashish Kalra <ashish.kalra@freescale.com>
      Cc: Saeed Bishara <saeed@marvell.com>
      Cc: Mark Lord <liml@rtr.ca>
      Cc: Robert Hancock <hancockr@shaw.ca>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  8. 02 Jun, 2010 1 commit
    • Tejun Heo's avatar
      sata_nv: don't diddle with nIEN on mcp55 · f3faf8fc
      Tejun Heo authored
      On mcp55, nIEN gets stuck once set and liteon blueray rom iHOS104-08
      violates ATA specification and fails to set I on D2H Reg FIS if nIEN
      is set when the command was issued.  When the other party is following
      the spec, both devices can work fine but when the two flaws are put
      together, they can't talk to each other.
      mcp55 has its own IRQ masking mechanism and there's no reason to mess
      with nIEN in the first place.  Fix it by dropping nIEN diddling from
      This was originally reported by Cengiz.  Although Cengiz hasn't
      verified the fix yet, I could reproduce this problem and verfiy the
      fix.  Even if Cengiz is experiencing different or additional problems,
      this patch is needed.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarCengiz Günay <cgunay@emory.edu>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  9. 25 May, 2010 3 commits
    • Tejun Heo's avatar
      libata-sff: separate out BMDMA init · 1c5afdf7
      Tejun Heo authored
      Separate out ata_pci_bmdma_prepare_host() and ata_pci_bmdma_init_one()
      from their SFF counterparts.  SFF ones no longer try to initialize
      BMDMA or set PCI master.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    • Tejun Heo's avatar
      libata-sff: separate out BMDMA irq handler · c3b28894
      Tejun Heo authored
      Separate out BMDMA irq handler from SFF irq handler.  The misnamed
      host_intr() functions are renamed to ata_sff_port_intr() and
      ata_bmdma_port_intr().  Common parts are factored into
      __ata_sff_port_intr() and __ata_sff_interrupt() and used by sff and
      bmdma interrupt routines.
      All BMDMA drivers now use ata_bmdma_interrupt() or
      ata_bmdma_port_intr() while all non-BMDMA SFF ones use
      ata_sff_interrupt() or ata_sff_port_intr().
      For now, ata_pci_sff_init_one() uses ata_bmdma_interrupt() as it's
      used by both SFF and BMDMA drivers.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    • Tejun Heo's avatar
      libata-sff: ata_sff_irq_clear() is BMDMA specific · 37f65b8b
      Tejun Heo authored
      ata_sff_irq_clear() is BMDMA specific.  Rename it to
      ata_bmdma_irq_clear(), move it to ata_bmdma_port_ops and make
      ->sff_irq_clear() optional.
      Note: ata_bmdma_irq_clear() is actually only needed by ata_piix and
            possibly by sata_sil.  This should be moved to respective low
            level drivers later.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  10. 19 May, 2010 5 commits
    • Tejun Heo's avatar
      libata-sff: separate out BMDMA qc_issue · 360ff783
      Tejun Heo authored
      Separate out ata_bmdma_qc_issue() from ata_sff_qc_issue() such that
      ata_sff_qc_issue() only deals with non-BMDMA SFF protocols (PIO and
      nodata) while ata_bmdma_qc_issue() deals with the BMDMA protocols and
      uses ata_sff_qc_issue() for non-DMA commands.  All the users are
      updated accordingly.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    • Tejun Heo's avatar
      libata-sff: prd is BMDMA specific · f60d7011
      Tejun Heo authored
      struct ata_prd and ap->prd are BMDMA specific.  Add bmdma_ prefix to
      them and move them inside CONFIG_ATA_SFF.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    • Tejun Heo's avatar
      libata-sff: ata_sff_[dumb_]qc_prep are BMDMA specific · f47451c4
      Tejun Heo authored
      Both qc_prep functions deal only with BMDMA PRD setup and PIO only SFF
      drivers don't need them.  Rename to ata_bmdma_[dumb_]qc_prep() and
      All usages are renamed except for pdc_adma and sata_qstor.  Those two
      drivers are not BMDMA drivers and don't need to call BMDMA qc_prep
      functions.  Calls to ata_sff_qc_prep() in the two drivers are removed.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    • Tejun Heo's avatar
      libata-sff: separate out BMDMA EH · fe06e5f9
      Tejun Heo authored
      Some of error handling logic in ata_sff_error_handler() and all of
      ata_sff_post_internal_cmd() are for BMDMA.  Create
      ata_bmdma_error_handler() and ata_bmdma_post_internal_cmd() and move
      BMDMA part into those.
      While at it, change DMA protocol check to ata_is_dma(), fix
      post_internal_cmd to call ap->ops->bmdma_stop instead of directly
      calling ata_bmdma_stop() and open code hardreset selection so that
      ata_std_error_handler() doesn't have to know about sff hardreset.
      As these two functions are BMDMA specific, there's no reason to check
      for bmdma_addr before calling bmdma methods if the protocol of the
      failed command is DMA.  sata_mv and pata_mpc52xx now don't need to set
      .post_internal_cmd to ATA_OP_NULL and pata_icside and sata_qstor don't
      need to set it to their bmdma_stop routines.
      ata_sff_post_internal_cmd() becomes noop and is removed.
      This fixes p3 described in clean-up-BMDMA-initialization patch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    • Tejun Heo's avatar
      libata-sff: clean up BMDMA initialization · c7087652
      Tejun Heo authored
      When BMDMA initialization failed or BMDMA was not available for
      whatever reason, bmdma_addr was left at zero and used as an indication
      that BMDMA shouldn't be used.  This leads to the following problems.
      p1. For BMDMA drivers which don't use traditional BMDMA register,
          ata_bmdma_mode_filter() incorrectly inhibits DMA modes.  Those
          drivers either have to inherit from ata_sff_port_ops or clear
          ->mode_filter explicitly.
      p2. non-BMDMA drivers call into BMDMA PRD table allocation.  It
          doesn't actually allocate PRD table if bmdma_addr is not
          initialized but is still confusing.
      p3. For BMDMA drivers which don't use traditional BMDMA register, some
          methods might not be invoked as expected (e.g. bmdma_stop from
      p4. SFF drivers w/ custom DMA interface implement noop BMDMA ops
          worrying libata core might call into one of them.
      These problems are caused by the muddy line between SFF and BMDMA and
      the assumption that all BMDMA controllers initialize bmdma_addr.
      This patch fixes p1 and p2 by removing the bmdma_addr assumption and
      moving prd allocation to BMDMA port start.  Later patches will fix the
      remaining issues.
      This patch improves BMDMA initialization such that
      * When BMDMA register initialization fails, falls back to PIO instead
        of failing.  ata_pci_bmdma_init() never fails now.
      * When ata_pci_bmdma_init() falls back to PIO, it clears
        ap->mwdma_mask and udma_mask instead of depending on
        ata_bmdma_mode_filter().  This makes ata_bmdma_mode_filter()
        unnecessary thus resolving p1.
      * ata_port_start() which actually is BMDMA specific is moved to
        ata_bmdma_port_start().  ata_port_start() and ata_sff_port_start()
        are killed.
      * ata_sff_port_start32() is moved and renamed to
      Drivers which no longer call into PRD table allocation are...
        pdc_adma, sata_inic162x, sata_qstor, sata_sx4, pata_cmd640 and all
        drivers which inherit from ata_sff_port_ops.
      pata_icside sets ->port_start to ATA_OP_NULL as it doesn't need PRD
      but is a BMDMA controller and doesn't have custom port_start like
      other such controllers.
      Note that with the previous patch which makes all and only BMDMA
      drivers inherit from ata_bmdma_port_ops, this change doesn't break
      drivers which need PRD table.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  11. 18 May, 2010 1 commit
    • Tejun Heo's avatar
      libata: kill ATA_FLAG_DISABLED · 3e4ec344
      Tejun Heo authored
      ATA_FLAG_DISABLED is only used by drivers which don't use
      ->error_handler framework and is largely broken.  Its only meaningful
      function is to make irq handlers skip processing if the flag is set,
      which is largely useless and even harmful as it makes those ports more
      likely to cause IRQ storms.
      Kill ATA_FLAG_DISABLED and makes the callers disable attached devices
      instead.  ata_port_probe() and ata_port_disable() which manipulate the
      flag are also killed.
      This simplifies condition check in IRQ handlers.  While updating IRQ
      handlers, remove ap NULL check as libata guarantees consecutive port
      allocation (unoccupied ports are initialized with dummies) and
      long-obsolete ATA_QCFLAG_ACTIVE check (checked by ata_qc_from_tag()).
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  12. 15 May, 2010 1 commit
  13. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      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.
      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
      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
      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
      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: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  14. 26 Feb, 2010 1 commit
  15. 04 Dec, 2009 1 commit
    • Mike Christie's avatar
      [SCSI] modify change_queue_depth to take in reason why it is being called · e881a172
      Mike Christie authored
      This patch modifies scsi_host_template->change_queue_depth so that
      it takes an argument indicating why it is being called. This will be
      used so that if a LLD needs to do some extra processing when
      handling queue fulls or later ramp ups, it can do so.
      This is a simple port of the drivers setting a change_queue_depth
      callback. In the patch I just have these LLDs adjust the queue depth
      if the user was requesting it.
      Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      [Vasu.Dev: v2
      	Also converted pmcraid_change_queue_depth and then verified
      all modules compile  using "make allmodconfig" for any new build
      warnings on X86_64.
      	Updated original description after combing two original
      patches from Mike to make this patch git bisectable.]
      Signed-off-by: default avatarVasu Dev <vasu.dev@intel.com>
      [jejb: fixed up 53c700]
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
  16. 16 Oct, 2009 1 commit
  17. 12 Aug, 2009 1 commit
    • Tony Vroon's avatar
      sata_nv: MSI support, disabled by default · 51c89499
      Tony Vroon authored
      At least the nVidia MCP55 controller quite happily supports MSI.
      This adds an option to use it. It is disabled by default.
      As per feedback by Robert Hancock, it will honour the user
      request as the kernel will not enable MSI where the controller
      or the specific system configuration do not support it.
      Signed-off-by: default avatarTony Vroon <tony@linx.net>
      Cc: Robert Hancock <hancockrwd@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  18. 10 Jun, 2009 1 commit
    • Tejun Heo's avatar
      sata_nv: use hardreset only for post-boot probing · 7f4774b3
      Tejun Heo authored
      When I thought it was finally defeated, it came back with vengeance.
      The failure cases are ever more convoluted.  Now there is a single
      combination which fails boot probing - MCP5x + Intel SSD and there are
      two hotplug failure reports on different flavors where softreset fails
      to bring up the device.
      Through the many bug reports after the switch to hardreset, the
      following patterns emerged.
      - Softreset during boot always works.
      - Hardreset during boot sometimes fails to bring up the link on
        certain comibnations and device signature acquisition is unreliable.
      - Hardreset is often necessary after hotplug.
      It looks like the old behavior of preferring softreset was somehow
      pretty close to the working reset protocol although it could have lost
      a device during phy error handling by issuing hardreset.
      This patch implements nv_hardreset() which kicks in only for post-boot
      (!LOADING) device probing resets.  This should be able to work around
      all known problem cases.  This isn't perfect but given the various
      hardreset quirks on these controllers, I think this is as good as it
      can get.
      Tested on mcp5x (swncq), nf3 and ck804 for all both boot, warm and
      hot probing cases.
      Kudos to all the bug reporters and their painful hours with these damn
      controllers.  ;-)
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Robert Hancock <hancockr@shaw.ca>
      Reported-by: default avatarDavid Lang <david@lang.hm>
      Reported-by: default avatarSamo Vodopivec <lament.email.si@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  19. 25 Mar, 2009 2 commits
  20. 05 Mar, 2009 1 commit
  21. 16 Feb, 2009 1 commit
  22. 03 Feb, 2009 1 commit
  23. 26 Jan, 2009 2 commits
  24. 04 Nov, 2008 1 commit
    • Tejun Heo's avatar
      sata_nv: fix generic, nf2/3 detection regression · 3c324283
      Tejun Heo authored
      All three flavors of sata_nv's are different in how their hardreset
      * generic: Hardreset is not reliable.  Link often doesn't come online
        after hardreset.
      * nf2/3: A little bit better - link comes online with longer debounce
        timing.  However, nf2/3 can't reliable wait for the first D2H
        Register FIS, so it can't wait for device readiness or classify the
        device after hardreset.  Follow-up SRST required.
      * ck804: Hardreset finally works.
      The core layer change to prefer hardreset and follow up changes
      exposed the above issues and caused various detection regressions for
      all three flavors.  This patch, hopefully, fixes all the known issues
      and should make sata_nv error handling more reliable.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  25. 29 Sep, 2008 2 commits
    • Tejun Heo's avatar
      libata: make SCR access ops per-link · 82ef04fb
      Tejun Heo authored
      Logically, SCR access ops should take @link; however, there was no
      compelling reason to convert all SCR access ops when adding @link
      abstraction as there's one-to-one mapping between a port and a non-PMP
      link.  However, that assumption won't hold anymore with the scheduled
      addition of slave link.
      Make SCR access ops per-link.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    • Tejun Heo's avatar
      sata_nv: reinstate nv_hardreset() for non generic controllers · 4c1eb90a
      Tejun Heo authored
      Commit 2fd673ec which tried to remove
      hardreset for generic accidentally removed it for all flavors as all
      others were inheriting from nv_generic_ops.  This patch reinstates
      nv_hardreset() and puts it into nv_common_ops which all flavors
      inherit from.  nv_generic_ops now inherits from nv_common_ops and
      overrides .hardreset to ATA_OP_NULL.
      While at it, explain why nv_hardreset and ATA_OP_NULL override are
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  26. 08 Sep, 2008 1 commit
    • Tejun Heo's avatar
      sata_nv: disable hardreset for generic · 2fd673ec
      Tejun Heo authored
      of them being unifying probing, hotplug and EH reset paths uniform.
      Previously, broken hardreset could go unnoticed as it wasn't used
      during probing but when something goes wrong or after hotplug the
      problem will surface and bite hard.
      OSDL bug 11195 reports that sata_nv generic flavor falls into this
      category.  Hardreset itself succeeds but PHY stays offline after
      hardreset.  I tried longer debounce timing but the result was the
      So, it seems we'll have to drop hardreset from the generic flavor.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Peer Chen <pchen@nvidia.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
  27. 25 Apr, 2008 1 commit
  28. 17 Apr, 2008 1 commit
    • Tejun Heo's avatar
      libata: rename SFF port ops · 5682ed33
      Tejun Heo authored
      Add sff_ prefix to SFF specific port ops.
      This rename is in preparation of separating SFF support out of libata
      core layer.  This patch strictly renames ops and doesn't introduce any
      behavior difference.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>