1. 13 1月, 2010 1 次提交
  2. 05 12月, 2009 1 次提交
    • M
      [SCSI] modify change_queue_depth to take in reason why it is being called · e881a172
      Mike Christie 提交于
      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: NMike 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: NVasu Dev <vasu.dev@intel.com>
      [jejb: fixed up 53c700]
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      e881a172
  3. 04 12月, 2009 1 次提交
  4. 03 12月, 2009 1 次提交
    • T
      libata: retry failed FLUSH if device didn't fail it · 6013efd8
      Tejun Heo 提交于
      If ATA device failed FLUSH, it means that the device failed to write
      out some amount of data and the error needs to be reported to upper
      layers. As retries can't recover the lost data, FLUSH failures need to
      be reported immediately in general.
      
      However, if FLUSH fails due to transmission errors, the FLUSH needs to
      be retried; otherwise, filesystems may switch to RO mode and/or raid
      array may drop a drive for a random transmission glitch.
      
      This condition can be rather easily reproduced on certain ahci
      controllers which go through a PHY event after powersave mode switch +
      ext4 combination.  Powersave mode switch is often closely followed by
      flush from the filesystem failing the FLUSH with ATA bus error which
      makes the filesystem code believe that data is lost and drop to RO
      mode.  This was reported in the following bugzilla bug.
      
        http://bugzilla.kernel.org/show_bug.cgi?id=14543
      
      This patch makes libata EH retry FLUSH if it wasn't failed by the
      device.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NAndrey Vihrov <andrey.vihrov@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6013efd8
  5. 06 10月, 2009 3 次提交
  6. 02 9月, 2009 2 次提交
  7. 29 7月, 2009 1 次提交
  8. 15 7月, 2009 1 次提交
  9. 17 4月, 2009 1 次提交
    • A
      ata: Report 16/32bit PIO as best we can · e3cf95dd
      Alan Cox 提交于
      The legacy old IDE ioctl API for this is a bit primitive so we try
      and map stuff sensibly onto it.
      
      - Set PIO over DMA devices to report 32bit
      - Add ability to change the PIO32 settings if the controller permits it
      - Add that functionality into the sff drivers
      - Add that functionality into the VLB legacy driver
      - Turn on the 32bit PIO on the ninja32 and add support there
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      e3cf95dd
  10. 30 3月, 2009 1 次提交
  11. 25 3月, 2009 3 次提交
  12. 05 3月, 2009 3 次提交
  13. 03 2月, 2009 2 次提交
    • T
      libata: implement HORKAGE_1_5_GBPS and apply it to WD My Book · 9062712f
      Tejun Heo 提交于
      3Gbps is often much more prone to transmission failures.  It's usually
      okay to let EH handle speed down after transmission failures but some
      WD My Book drives completely shutdown after certain transmission
      failures and after it only power cycling can revive them.  Combined
      with the fact that external drives often end up with cable assembly
      which is longer than usual and more likely to have intervening gender,
      this makes these drives very likely to shutdown under certain
      configurations virtually rendering them unusable.
      
      This patch implements HOARKGE_1_5_GBPS and applies it to WD My Book
      such that 1.5Gbps is forced once the device is identified.
      
      Please take a look at the following bz for related reports.
      
        http://bugzilla.kernel.org/show_bug.cgi?id=9913Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      9062712f
    • T
      libata: clear dev->ering in smarter way · 99cf610a
      Tejun Heo 提交于
      dev->ering used to be cleared together with the rest of ata_device in
      ata_dev_init() which is called whenever a probing event occurs.
      dev->ering is about to be used to track probing failures so it needs
      to remain persistent over multiple porbing events.  This patch
      achieves this by doing the following.
      
      * Instead of CLEAR_OFFSET, define CLEAR_BEGIN and CLEAR_END and only
        clear between BEGIN and END.  ering is moved after END.  The split
        of persistent area is to allow hotter items remain at the head.
      
      * ering is explicitly cleared on ata_dev_disable() and when device
        attach succeeds.  So, ering is persistent throug a device's life
        time (unless explicitly cleared of course) and also through periods
        inbetween disablement of an attached device and successful detection
        of the next one.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      99cf610a
  14. 27 1月, 2009 1 次提交
  15. 16 1月, 2009 2 次提交
  16. 11 1月, 2009 1 次提交
  17. 09 1月, 2009 1 次提交
  18. 29 12月, 2008 2 次提交
    • T
      libata: perform port detach in EH · ece180d1
      Tejun Heo 提交于
      ata_port_detach() first made sure EH saw ATA_PFLAG_UNLOADING and then
      assumed EH context belongs to it and performed detach operation
      itself.  However, UNLOADING doesn't disable all of EH and this could
      lead to problems including triggering WARN_ON()'s in EH path.
      
      This patch makes port detach behave more like other EH actions such
      that ata_port_detach() requests EH to detach and waits for completion.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ece180d1
    • T
      libata: beef up iterators · 1eca4365
      Tejun Heo 提交于
      There currently are the following looping constructs.
      
      * __ata_port_for_each_link() for all available links
      * ata_port_for_each_link() for edge links
      * ata_link_for_each_dev() for all devices
      * ata_link_for_each_dev_reverse() for all devices in reverse order
      
      Now there's a need for looping construct which is similar to
      __ata_port_for_each_link() but iterates over PMP links before the host
      link.  Instead of adding another one with long name, do the following
      cleanup.
      
      * Implement and export ata_link_next() and ata_dev_next() which take
        @mode parameter and can be used to build custom loop.
      * Implement ata_for_each_link() and ata_for_each_dev() which take
        looping mode explicitly.
      
      The following iteration modes are implemented.
      
      * ATA_LITER_EDGE		: loop over edge links
      * ATA_LITER_HOST_FIRST		: loop over all links, host link first
      * ATA_LITER_PMP_FIRST		: loop over all links, PMP links first
      
      * ATA_DITER_ENABLED		: loop over enabled devices
      * ATA_DITER_ENABLED_REVERSE	: loop over enabled devices in reverse order
      * ATA_DITER_ALL			: loop over all devices
      * ATA_DITER_ALL_REVERSE		: loop over all devices in reverse order
      
      This change removes exlicit device enabledness checks from many loops
      and makes it clear which ones are iterated over in which direction.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1eca4365
  19. 02 12月, 2008 1 次提交
  20. 11 11月, 2008 1 次提交
    • T
      libata: revert convert-to-block-tagging patches · 8a8bc223
      Tejun Heo 提交于
      This patch reverts the following three commits which convert libata to
      use block layer tagging.
      
       43a49cbd
       e013e13b
       2fca5ccf
      
      Although using block layer tagging is the right direction, due to the
      tight coupling among tag number, data structure allocation and
      hardware command slot allocation, libata doesn't work correctly with
      the current conversion.
      
      The biggest problem is guaranteeing that tag 0 is always used for
      non-NCQ commands.  Due to the way blk-tag is implemented and how SCSI
      starts and finishes requests, such guarantee can't be made.  I'm not
      sure whether this would actually break any low level driver but it
      doesn't look like a good idea to break such assumption given the
      frailty of ATA controllers.
      
      So, for the time being, keep using the old dumb in-libata qc
      allocation.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jens Axobe <jens.axboe@oracle.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8a8bc223
  21. 04 11月, 2008 1 次提交
  22. 31 10月, 2008 1 次提交
    • J
      libata: add whitelist for devices with known good pata-sata bridges · 9ce8e307
      Jens Axboe 提交于
      libata currently imposes a UDMA5 max transfer rate and 200 sector max
      transfer size for SATA devices that sit behind a pata-sata bridge. Lots
      of devices have known good bridges that don't need this limit applied.
      The MTRON SSD disks are such devices. Transfer rates are increased by
      20-30% with the restriction removed.
      
      So add a "blacklist" entry for the MTRON devices, with a flag indicating
      that the bridge is known good.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      9ce8e307
  23. 24 10月, 2008 1 次提交
  24. 23 10月, 2008 1 次提交
    • T
      libata: transfer EHI control flags to slave ehc.i · 848e4c68
      Tejun Heo 提交于
      ATA_EHI_NO_AUTOPSY and ATA_EHI_QUIET are used to control the behavior
      of EH.  As only the master link is visible outside EH, these flags are
      set only for the master link although they should also apply to the
      slave link, which causes spurious EH messages during probe and
      suspend/resume.
      
      This patch transfers those two flags to slave ehc.i before performing
      slave autopsy and reporting.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      848e4c68
  25. 29 9月, 2008 6 次提交
    • R
      libata: reorder ata_device to remove 8 bytes of padding on 64 bits · 6866e7bc
      Richard Kennedy 提交于
      reduce size by 8 bytes from 1160 to 1152 allowing it to fit in 1 fewer
      cachelines.
      Signed-off-by: NRichard Kennedy <richard@rsk.demon.co.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6866e7bc
    • E
      libata: Implement disk shock protection support · 45fabbb7
      Elias Oltmanns 提交于
      On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD
      FEATURE as specified in ATA-7 is issued to the device and processing of
      the request queue is stopped thereafter until the specified timeout
      expires or user space asks to resume normal operation. This is supposed
      to prevent the heads of a hard drive from accidentally crashing onto the
      platter when a heavy shock is anticipated (like a falling laptop
      expected to hit the floor). In fact, the whole port stops processing
      commands until the timeout has expired in order to avoid any resets due
      to failed commands on another device.
      Signed-off-by: NElias Oltmanns <eo@nebensachen.de>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      45fabbb7
    • T
      libata: implement slave_link · b1c72916
      Tejun Heo 提交于
      Explanation taken from the comment of ata_slave_link_init().
      
       In libata, a port contains links and a link contains devices.  There
       is single host link but if a PMP is attached to it, there can be
       multiple fan-out links.  On SATA, there's usually a single device
       connected to a link but PATA and SATA controllers emulating TF based
       interface can have two - master and slave.
      
       However, there are a few controllers which don't fit into this
       abstraction too well - SATA controllers which emulate TF interface
       with both master and slave devices but also have separate SCR
       register sets for each device.  These controllers need separate links
       for physical link handling (e.g. onlineness, link speed) but should
       be treated like a traditional M/S controller for everything else
       (e.g. command issue, softreset).
      
       slave_link is libata's way of handling this class of controllers
       without impacting core layer too much.  For anything other than
       physical link handling, the default host link is used for both master
       and slave.  For physical link handling, separate @ap->slave_link is
       used.  All dirty details are implemented inside libata core layer.
       From LLD's POV, the only difference is that prereset, hardreset and
       postreset are called once more for the slave link, so the reset
       sequence looks like the following.
      
       prereset(M) -> prereset(S) -> hardreset(M) -> hardreset(S) ->
       softreset(M) -> postreset(M) -> postreset(S)
      
       Note that softreset is called only for the master.  Softreset resets
       both M/S by definition, so SRST on master should handle both (the
       standard method will work just fine).
      
      As slave_link excludes PMP support and only code paths which deal with
      the attributes of physical link are affected, all the changes are
      localized to libata.h, libata-core.c and libata-eh.c.
      
       * ata_is_host_link() updated so that slave_link is considered as host
         link too.
      
       * iterator extended to iterate over the slave_link when using the
         underbarred version.
      
       * force param handling updated such that devno 16 is mapped to the
         slave link/device.
      
       * ata_link_on/offline() updated to return the combined result from
         master and slave link.  ata_phys_link_on/offline() are the direct
         versions.
      
       * EH autopsy and report are performed separately for master slave
         links.  Reset is udpated to implement the above described reset
         sequence.
      
      Except for reset update, most changes are minor, many of them just
      modifying dev->link to ata_dev_phys_link(dev) or using phys online
      test instead.
      
      After this update, LLDs can take full advantage of per-dev SCR
      registers by simply turning on slave link.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      b1c72916
    • T
      libata: misc updates to prepare for slave link · b5b3fa38
      Tejun Heo 提交于
      * Add ATA_EH_ALL_ACTIONS.
      
      * Make sata_link_{on|off}_line() return bool instead of int.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      b5b3fa38
    • T
      libata: reimplement link iterator · aadffb68
      Tejun Heo 提交于
      Implement __ata_port_next_link() and reimplement
      __ata_port_for_each_link() and ata_port_for_each_link() using it.
      This removes relatively large inlined code and makes iteration easier
      to extend.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      aadffb68
    • T
      libata: make SCR access ops per-link · 82ef04fb
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      82ef04fb