1. 15 7月, 2008 10 次提交
    • Z
      AHCI: speed up resume · 24920c8a
      Zhang Rui 提交于
      During resume, sleep 1 second to wait for the HBA reset
      to finish is a waste of time.
      
      According to the AHCI 1.2 spec,
      We should poll the HOST_CTL register,
      and return error if the host reset is not
      finished within 1 second.
      
      Test results show that the HBA reset can be done quickly(in usecs).
      And this patch may save nearly 1 second during resume.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      24920c8a
    • M
      [libata] Add support for VPD page b1 · 1e9dbc92
      Matthew Wilcox 提交于
      SCSI VPD page b1 reports the nominal rotation speed and physical size
      of the device.  Devices that conform to ATA-8 can return this information
      in words 217 and 168 of the identify data.
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1e9dbc92
    • H
      ata: endianness annotations in pata drivers · 6ad67403
      Harvey Harrison 提交于
      drivers/ata/pata_qdi.c:142:9: warning: incorrect type in assignment (different base types)
      drivers/ata/pata_qdi.c:142:9:    expected unsigned int [unsigned] [usertype] pad
      drivers/ata/pata_qdi.c:142:9:    got restricted __le32 [usertype] <noident>
      drivers/ata/pata_qdi.c:146:15: warning: cast to restricted __le32
      
      drivers/ata/pata_winbond.c:110:9: warning: incorrect type in assignment (different base types)
      drivers/ata/pata_winbond.c:110:9:    expected unsigned int [unsigned] [usertype] pad
      drivers/ata/pata_winbond.c:110:9:    got restricted __le32 [usertype] <noident>
      drivers/ata/pata_winbond.c:114:15: warning: cast to restricted __le32
      
      drivers/ata/pata_legacy.c:310:9: warning: incorrect type in assignment (different base types)
      drivers/ata/pata_legacy.c:310:9:    expected unsigned int [unsigned] [usertype] pad
      drivers/ata/pata_legacy.c:310:9:    got restricted __le32 [usertype] <noident>
      drivers/ata/pata_legacy.c:314:15: warning: cast to restricted __le32
      drivers/ata/pata_legacy.c:752:11: warning: cast to restricted __le32
      drivers/ata/pata_legacy.c:756:9: warning: incorrect type in assignment (different base types)
      drivers/ata/pata_legacy.c:756:9:    expected unsigned int [unsigned] [addressable] [assigned] [usertype] pad
      drivers/ata/pata_legacy.c:756:9:    got restricted __le32 [usertype] <noident>
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6ad67403
    • T
      libata-eh: update atapi_eh_request_sense() to take @dev instead of @qc · 3eabddb8
      Tejun Heo 提交于
      Update atapi_eh_request_sense() to take @dev, @sense_buf and
      @dfl_sense_key instead of taking @qc and extracting information from
      it.  This change is to make the function more generic and allow it to
      be called from other places.
      
      While at it, make cdb initialization use initializer.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      3eabddb8
    • P
      ec6add99
    • K
      libata/ahci: enclosure management support · 18f7ba4c
      Kristen Carlson Accardi 提交于
      Add Enclosure Management support to libata and ahci.
      Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      18f7ba4c
    • T
      libata: improve EH internal command timeout handling · 87fbc5a0
      Tejun Heo 提交于
      ATA_TMOUT_INTERNAL which was 30secs were used for all internal
      commands which is way too long when something goes wrong.  This patch
      implements command type based stepped timeouts.  Different command
      types can use different timeouts and each command type can use
      different timeout values after timeouts.
      
      ie. the initial timeout is set to a value which should cover most of
      the cases but not too long so that run away cases don't delay things
      too much.  After the first try times out, the second try can use
      longer timeout and if that one times out too, it can go for full 30sec
      timeout.
      
      IDENTIFYs use 5s - 10s - 30s timeout and all other commands use 5s -
      10s timeouts.
      
      This patch significantly cuts down the needed time to handle failure
      cases while still allowing libata to work with nut job devices through
      retries.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      87fbc5a0
    • T
      libata: use ULONG_MAX to terminate reset timeout table · d8af0eb6
      Tejun Heo 提交于
      This doesn't introduce any functional changes.  This is to make reset
      timeout table consistent with to-be-added command timeout tables.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      d8af0eb6
    • T
      libata: improve EH retry delay handling · 0a2c0f56
      Tejun Heo 提交于
      EH retries were delayed by 5 seconds to ensure that resets don't occur
      back-to-back.  However, this 5 second delay is superflous or excessive
      in many cases.  For example, after IDENTIFY times out, there's no
      reason to wait five more seconds before retrying.
      
      This patch adds ehc->last_reset timestamp and record the timestamp for
      the last reset trial or success and uses it to space resets by
      ATA_EH_RESET_COOL_DOWN which is 5 secs and removes unconditional 5 sec
      sleeps.
      
      As this change makes inter-try waits often shorter and they're
      redundant in nature, this patch also removes the "retrying..."
      messages.
      
      While at it, convert explicit rounding up division to DIV_ROUND_UP().
      
      This change speeds up EH in many cases w/o sacrificing robustness.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      0a2c0f56
    • T
      libata: consistently use msecs for time durations · 341c2c95
      Tejun Heo 提交于
      libata has been using mix of jiffies and msecs for time druations.
      This is getting confusing.  As writing sub HZ values in jiffies is
      PITA and msecs_to_jiffies() can't be used as initializer, unify unit
      for all time durations to msecs.  So, durations are in msecs and
      deadlines are in jiffies.  ata_deadline() is added to compute deadline
      from a start time and duration in msecs.
      
      While at it, drop now superflous _msec suffix from arguments and
      rename @timeout to @deadline if it represents a fixed point in time
      rather than duration.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      341c2c95
  2. 11 7月, 2008 3 次提交
  3. 06 7月, 2008 1 次提交
  4. 04 7月, 2008 4 次提交
  5. 27 6月, 2008 1 次提交
  6. 21 6月, 2008 2 次提交
  7. 19 6月, 2008 7 次提交
  8. 13 6月, 2008 2 次提交
  9. 05 6月, 2008 1 次提交
  10. 04 6月, 2008 4 次提交
    • A
      libata-sff: Fix oops reported in kerneloops.org for pnp devices with no ctl · a57c1bad
      Alan Cox 提交于
      - Make ata_sff_altstatus private so nobody uses it by mistake
      - Drop the 400nS delay from it
      
      Add
      
      ata_sff_irq_status	-	encapsulates the IRQ check logic
      
      This function keeps the existing behaviour for altstatus using devices. I
      actually suspect the logic was wrong before the changes but -rc isn't the
      time to play with that
      
      ata_sff_sync		-	ensure writes hit the device
      
      Really we want an io* operation for 'is posted' eg ioisposted(ioaddr) so
      that we can fix the nasty delay this causes on most systems.
      
      - ata_sff_pause		-	400nS delay
      
      Ensure the command hit the device and delay 400nS
      
      - ata_sff_dma_pause
      
      Ensure the I/O hit the device and enforce an HDMA1:0 transition delay.
      Requires altstatus register exists, BUG if not so we don't risk
      corruption in MWDMA modes. (UDMA the checksum will save your backside in
      theory)
      
      The only other complication then is devices with their own handlers.
      rb532 can use dma_pause but scc needs to access its own altstatus
      register for internal errata workarounds so directly call the drivers own
      altstatus function.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      a57c1bad
    • M
      sata_mv: PHY_MODE4 cleanups · ba069e37
      Mark Lord 提交于
      The handling for PHY_MODE4 was originally just cloned from the
      Marvell proprietary driver (with their blessing).
      But we can do better than that.
      
      Tidy things up with some judicious mask definitions, to improve maintainability.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ba069e37
    • C
      [libata] ata_piix: more acer short cable quirks · e1fefea9
      Colin Ian King 提交于
      Add ICH6 on ACER Aspire 1694WLMi to list of laptops that use short cables
      rather than 80 wire
      
      OriginalAuthor: Tiago Sousa
      OriginalLocation: http://launchpadlibrarian.net/11627664/new.ich_laptop.short.cables.diff
      Bug: #187121
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: Nmaximilian attems <max@stro.at>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      e1fefea9
    • H
      [libata] ACPI: Properly handle bay devices in dock stations · 664d080c
      Holger Macht 提交于
      * Differentiate between bay devices in dock stations and others:
      
       - When an ACPI_NOTIFY_EJECT_REQUEST appears, just signal uevent to
         userspace (that is when the optional eject button on a bay device is
         pressed/pulled) giving the possibility to unmount file systems and to
         clean up. Also, only send uevent in case we get an EJECT_REQUEST
         without doing anything else. In other cases, you'll get an add/remove
         event because libata attaches/detaches the device.
      
       - In case of a dock event, which in turn signals an
         ACPI_NOTIFY_EJECT_REQUEST, immediately detach the device, because it
         may already have been gone
      
      * In case of an ACPI_NOTIFY_DEVICE/BUS_CHECK, evaluate _STA to check if
        the device has been plugged or unplugged. If plugged, hotplug it, if
        unplugged, just signal event to userspace
        (initial patch by Matthew Garrett <mjg59@srcf.ucam.org>)
      
      * Call ACPI _EJ0 for detached devices
      Signed-off-by: NHolger Macht <hmacht@suse.de>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      664d080c
  11. 31 5月, 2008 5 次提交