1. 23 1月, 2008 6 次提交
    • A
      pata_ninja32: Cardbus ATA initial support · 51dbd490
      Alan Cox 提交于
      Lots of work needed to bring it up to scratch but it does work so you can
      now use the card. That makes it at least useful, especially as the other
      cardbus cards are usually INIC162x which aren't yet supported well.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      51dbd490
    • A
      libata-sff: tf_load · 76548eda
      Alan Cox 提交于
      Jeff said he preferred that the SFF tf_load followed the spec and we
      documented that anyone who needed different overrode it, rather than it
      using the ->check_status methods. No driver relies on the current behaviour.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      76548eda
    • A
      libata: IORDY handling · b9f8ab2d
      Alan Cox 提交于
      I believe this version meets all Sergei's objections
      
      Correct the logic for when we issue a set features for transfer mode
      
      - If the device has IORDY and the controller has IORDY - set the mode
      - If the device has IORDY and the controller does not - turn IORDY off
      - If neither has IORDY do nothing
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b9f8ab2d
    • S
      libata-acpi: add ACPI _PSx method · bd3adca5
      Shaohua Li 提交于
      ACPI spec (ver 3.0a, p289) requires IDE power on/off executes ACPI _PSx
      methods. As recently most PATA drivers use libata, this patch adds _PSx
      method support in libata. ACPI spec doesn't mention if SATA requires the
      same _PSx method.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Acked-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      bd3adca5
    • A
      libata: Disable ATA8-ACS proposed Trusted Computing features by default · ae8d4ee7
      Alan Cox 提交于
      Historically word 48 in the identify data was used to mean 32bit I/O
      was supported for VLB IDE etc. ATA8 reassigns this word to the Trusted
      Computing Group, where it is used for TCG features. This means that
      an ATA8 TCG drive is going to trigger 32bit I/O on some systems which
      will be funny.
      
      Anyway we need to sort this out ready for ATA8 so:
      - Reorder the ata.h header a bit so the ata_version function occurs early
        in it
      - Make dword_io check the ATA version
      - Add an ATA8 version checking TCG presence test
      
      While we are at it the current drafts have a flaw where it may not be
      possible to disable TCG features at boot (and opt out of the trusted
      model) as TCG intends because it relies on presence of a different
      optional feature (DCS). Handle this in software by refusing the TCG
      commands if libata.allow_tpm is not set. (We must make it possible
      as some environments such as proprietary VDR devices will doubtless
      want to use it to lock up content)
      
      Finally as with CPRM print a warning so that the user knows they may
      not be able to full access and use the device.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      ae8d4ee7
    • P
      ata_piix: Add Toshiba Satellite R20 and Tecra M6 to broken suspend list. · ffe188dd
      Peter Schwenke 提交于
      Add Toshiba Satellite R20 and Tecra M6 to broken suspend list.  Matt
      Piermarini reported and provided the M6 patch.  This is from OSDL bug 7780.
      Signed-off-by: NPeter Schwenke <peter@bluetoad.com.au>
      Cc: Matt Piermarini <mattpiermarini@yahoo.com>
      Acked-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ffe188dd
  2. 20 1月, 2008 1 次提交
  3. 16 1月, 2008 3 次提交
    • A
      [libata] core checkpatch fix · 0f757743
      Andrew Morton 提交于
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0f757743
    • A
      [libata] pata_bf54x: checkpatch fixes · ed722d3d
      Andrew Morton 提交于
      WARNING: line over 80 characters
      #36: FILE: drivers/ata/pata_bf54x.c:1512:
      +	while (bfin_port_info[board_idx].udma_mask>0 && udma_fsclk[udma_mode] > fsclk) {
      
      ERROR: need spaces around that '>' (ctx:VxV)
      #36: FILE: drivers/ata/pata_bf54x.c:1512:
      +	while (bfin_port_info[board_idx].udma_mask>0 && udma_fsclk[udma_mode] > fsclk) {
       	                                          ^
      
      total: 1 errors, 1 warnings, 19 lines checked
      
      Your patch has style problems, please review.  If any of these errors
      are false positives report them to the maintainer, see
      CHECKPATCH in MAINTAINERS.
      
      Please run checkpatch prior to sending patches
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Sonic Zhang <sonic.zhang@analog.com>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: sonic zhang <sonic.adi@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ed722d3d
    • A
      libata fixes for sparse-found problems · b50e56d8
      Al Viro 提交于
      In pata_legacy and pata_winbond we've got bugs - cpu_to_le16() instead
      of cpu_to_le32().  Fortunately, both affected suckers are VLB, thus
      l-e-only, so we might get away with that unless we hit it with slop == 3
      (hadn't checked if playing with badly aligned sg could trigger that).
      Still buggy...  Moreover, pata_legacy, pata_winbond and pata_qdi forgot to
      initialize pad on the write side of 32bit case in their ->data_xfer().
      Hopefully the hardware does't care, but still, sending uninitialized
      data to it...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b50e56d8
  4. 15 1月, 2008 4 次提交
  5. 11 1月, 2008 9 次提交
  6. 20 12月, 2007 1 次提交
  7. 18 12月, 2007 14 次提交
    • T
      libata: fix ATAPI draining · 140b5e59
      Tejun Heo 提交于
      With ATAPI transfer chunk size properly programmed, libata PIO HSM
      should be able to handle full spurious data chunks.  Also, it's a good
      idea to suppress trailing data warning for misc ATAPI commands as
      there can be many of them per command - for example, if the chunk size
      is 16 and the drive tries to transfer 510 bytes, there can be 31
      trailing data messages.
      
      This patch makes the following updates to libata ATAPI PIO HSM
      implementation.
      
      * Make it drain full spurious chunks.
      
      * Suppress trailing data warning message for misc commands.
      
      * Put limit on how many bytes can be drained.
      
      * If odd, round up consumed bytes and the number of bytes to be
        drained.  This gets the number of bytes to drain right for drivers
        which do 16bit PIO.
      
      This patch is partial backport of improve-ATAPI-data-xfer patchset
      pending for #upstream.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      140b5e59
    • T
      libata: update atapi_eh_request_sense() such that lbam/lbah contains buffer size · f2dfc1a1
      Tejun Heo 提交于
      While updating lbam/h for ATAPI commands, atapi_eh_request_sense() was
      left out.  Update it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f2dfc1a1
    • T
      libata-acpi: implement _GTF command filtering · 3264a8d8
      Tejun Heo 提交于
      Implement _GTF command filtering which can be controlled by
      libata.acpi_filter kernel parameter.  Currently SETXFER and LOCK
      commands are filtered.
      
      libata configures transfer mode by itself and _GTF SETXFER commands
      can potentially disrupt device configuration.  _GTM/_STM mechanism
      can't handle hotplugging too well and when _GTF is executed,
      controller is in PIO0 rather than the mode _STM configured.
      
      Note that detecting SET MAX LOCK requires looking at the previous
      command.  This adds a bit to code complexity.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3264a8d8
    • T
      libata-acpi: improve _GTF execution error handling and reporting · 0e8634bf
      Tejun Heo 提交于
      As _GTF commands can't transfer data, device error never signals
      transfer error.  It indicates that the device vetoed the operation, so
      it's meaningless to retry.
      
      This patch makes libata-acpi to report and continue on device errors
      when executing _GTF commands.  Also commands rejected by device don't
      contribute to the number of _GTF commands executed.
      
      While at it, update _GTF execution reporting such that all successful
      commands are logged at KERN_DEBUG and rename taskfile_load_raw() to
      ata_acpi_run_tf() for consistency.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0e8634bf
    • T
      libata-acpi: improve ACPI disabling · 66fa7f21
      Tejun Heo 提交于
      * If _GTF evalution fails, it's pointless to retry.  If nothing else
        is wrong, just ignore the error.
      
      * After disabling ACPI, return success iff the number of executed _GTF
        command equals zero.  Otherwise, tell EH to retry.  This change
        fixes bogus 1 return bug where ata_acpi_on_devcfg() expects the
        caller to reload IDENTIFY data and continue but the caller
        interprets it as an error.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      66fa7f21
    • T
      libata-acpi: implement dev->gtf_cache and evaluate _GTF right after _STM during resume · 398e0782
      Tejun Heo 提交于
      On certain implementations, _GTF evaluation depends on preceding _STM
      and both can be pretty picky about the configuration.  Using _GTM
      result cached during controller initialization satisfies the most
      neurotic _STM implementation.  However, libata evaluates _GTF after
      reset during device configuration and the hardware state can be
      different from what _GTF expects and can cause evaluation failure.
      
      This patch adds dev->gtf_cache and updates ata_dev_get_GTF() such that
      it uses the cached value if available.  Cache is cleared with a call
      to ata_acpi_clear_gtf().
      
      Because for SATA ACPI nodes _GTF must be evaluated after _SDD which
      can't be done till IDENTIFY is complete, _GTF caching from
      ata_acpi_on_resume() is used only for IDE ACPI nodes.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      398e0782
    • T
      libata-acpi: implement and use ata_acpi_init_gtm() · c05e6ff0
      Tejun Heo 提交于
      _GTM fetches currently configured transfer mode while _STM configures
      controller according to _GTM parameter and prepares transfer mode
      configuration TFs for _GTF.  In many cases _GTM and _STM
      implementations are quite brittle and can't cope with configuration
      changed by libata.
      
      libata does not depend on ATA ACPI to configure devices.  The only
      reason libata performs _GTM and _STM are to make _GTF evaluation
      succeed and libata also doesn't care about how _GTF TFs configure
      transfer mode.  It overrides that configuration anyway, so from
      libata's POV, it doesn't matter what value is feeded to _STM as long
      as evaluation succeeds for _STM and following _GTF.
      
      This patch adds dev->__acpi_init_gtm and store initial _GTM values on
      host initialization before modified by reset and mode configuration.
      If the field is valid, ata_acpi_init_gtm() returns pointer to the
      saved _GTM structure; otherwise, NULL.
      
      This saved value is used for _STM during resume and peek at
      BIOS/firmware programmed initial timing for later use.  The accessor
      is there to make building w/o ACPI easy as dev->__acpi_init doesn't
      exist if ACPI is not enabled.
      
      On driver detach, the initial BIOS configuration is restored by
      executing _STM with the initial _GTM values such that the next driver
      can also use the initial BIOS configured values.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c05e6ff0
    • T
      libata-acpi: add new hooks ata_acpi_dissociate() and ata_acpi_on_disable() · 562f0c2d
      Tejun Heo 提交于
      Add two hooks - ata_acpi_dissociate() which is called during driver
      detach after the whole host is shutdown and ata_acpi_on_disable()
      which is called when a device is disabled.
      Signed-off-by: NTejun heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      562f0c2d
    • T
      libata: ata_dev_disable() should be called from EH context · 7f9ad9b8
      Tejun Heo 提交于
      ata_port_detach() calls ata_dev_disable() with host lock held but
      ata_dev_disable() should be called from EH context.  ata_port_detach()
      steals EH context by setting ATA_PFLAG_UNLOADAING and flushing EH.
      Drop locking around ata_dev_disable() and note that ata_port_detach()
      owns EH context at that point.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      7f9ad9b8
    • T
      libata-acpi: adjust constness in ata_acpi_gtm/stm() parameters · 0d02f0b2
      Tejun Heo 提交于
      * No internal function uses const ata_port.  Drop const from @ap.
      
      * Make ata_acpi_stm() copy @stm before using it and change @stm to
        const.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0d02f0b2
    • M
      sata_mv: improve warnings about Highpoint RocketRAID 23xx cards · 4e520033
      Mark Lord 提交于
      Improve the existing boot/load time warnings from sata_mv
      for Highpoint RocketRAID 23xx cards, based on new knowledge
      about where the BIOS likes to overwrite sectors with metadata.
      
      Harmless to us, but very useful for end users.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4e520033
    • T
      libata: add ST3160023AS / 3.42 to NCQ blacklist · e41bd3e8
      Tejun Heo 提交于
      Like ST380817AS / 3.42, ST3160023AS / 3.42 times out commands if NCQ
      is used.  Blacklist it.  This is reported by Matheus Izvekov in the
      following thread.
      
        http://thread.gmane.org/gmane.linux.ide/24202Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Matheus Izvekov <mizvekov@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      e41bd3e8
    • T
      libata: clear link->eh_info.serror from ata_std_postreset() · f7fe7ad4
      Tejun Heo 提交于
      link->eh_info.serror is used to cache SError for controllers which
      need it cleared from interrupt handler to clear IRQ.  It also should
      be cleared after reset just like SError itself.
      
      Make ata_std_postreset() clear link->eh_info.serror too and update
      sata_sil such that it doesn't care about bookkeeping the value.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f7fe7ad4
    • T
      sata_sil: fix spurious IRQ handling · 8cf32ac6
      Tejun Heo 提交于
      Interestingly, sata_sil raises spurious interrupts if it's coupled
      with Sil SATA_PATA bridge.  Currently, sata_sil interrupt handler is
      strict about spurious interrupts and freezes the port when it occurs.
      This patch makes it more forgiving.
      
      * On SATA PHY event interrupt, serror value is checked to see whether
        it really is PHYRDY CHG event.  If not, SATA PHY event interrupt is
        ignored.
      
      * If ATA interrupt occurs while no command is in progress, it's
        cleared and ignored.
      
      This fixes bugzilla bug 9505.
      
        http://bugzilla.kernel.org/show_bug.cgi?id=9505Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      8cf32ac6
  8. 08 12月, 2007 2 次提交
    • T
      libata: kill spurious NCQ completion detection · 459ad688
      Tejun Heo 提交于
      Spurious NCQ completion detection implemented in ahci was incorrect.
      On AHCI receving and processing FISes and raising interrupts are not
      interlocked and spurious interrupts are expected.
      
      For example, if an interrupt occurs while interrupt handler is running
      and the running interrupt handler handles the event the new IRQ
      indicated, after IRQ handler finishes, it will be executed again
      because IRQ pending bit is set by the new interrupt but there won't be
      anything to process.
      
      Please read the following message for more information.
      
        http://article.gmane.org/gmane.linux.ide/26012
      
      This patch...
      
      * Removes all spurious IRQ whining from ahci.  Spurious NCQ completion
        detection was completely wrong.  Spurious D2H Register FIS taught us
        that some early drives send spurious D2H Register FIS with I bit set
        while NCQ commands are in progress but none of recent drives does
        that and even the ones which show such behavior can do NCQ fine.
      
      * Kills all NCQ blacklist entries which were added because of spurious
        NCQ completions.  I tracked down each commit and verified all
        removed ones are actually added because of spurious completions.
      
        WD740ADFD-00NLR1 wasn't deleted but moved upward because the drive
        not only had spurious NCQ completions but also is slow on sequential
        data transfers if NCQ is enabled.
      
        Maxtor 7V300F0 was added by 0e3dbc01
        from Alan Cox.  I can only find evidences that the drive only had
        troubles with spuruious completions by searching the mailing list.
        This entry needs to be verified and removed if it doesn't have other
        NCQ related problems.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      459ad688
    • T
      ahci: don't attach if ICH6 is in combined mode · c4f7792c
      Tejun Heo 提交于
      ICH6 R/Ms share PCI ID between piix and ahci modes and we've been
      allowing ahci to attach regardless of how BIOS configured it.
      However, enabling AHCI mode when the controller is in combined mode
      can result in unexpected behavior.  Don't attach if the controller is
      in combined mode.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Bill Nottingham <notting@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c4f7792c