1. 02 3月, 2010 1 次提交
  2. 13 1月, 2010 1 次提交
  3. 04 12月, 2009 2 次提交
  4. 01 9月, 2009 1 次提交
    • B
      ata_piix: parallel scanning on PATA needs an extra locking · 60c3be38
      Bartlomiej Zolnierkiewicz 提交于
      Commit log for commit 517d3cc1
      ("[libata] ata_piix: Enable parallel scan") says:
      
          This patch turns on parallel scanning for the ata_piix driver.
          This driver is used on most netbooks (no AHCI for cheap storage it seems).
          The scan is the dominating time factor in the kernel boot for these
          devices; with this flag it gets cut in half for the device I used
          for testing (eeepc).
          Alan took a look at the driver source and concluded that it ought to be safe
          to do for this driver.  Alan has also checked with the hardware team.
      
      and it is all true but once we put all things together additional
      constraints for PATA controllers show up (some hardware registers
      have per-host not per-port atomicity) and we risk misprogramming
      the controller.
      
      I used the following test to check whether the issue is real:
      
        @@ -736,8 +736,20 @@ static void piix_set_piomode(struct ata_
         			(timings[pio][1] << 8);
         	}
         	pci_write_config_word(dev, master_port, master_data);
        -	if (is_slave)
        +	if (is_slave) {
        +		if (ap->port_no == 0) {
        +			u8 tmp = slave_data;
        +
        +			while (slave_data == tmp) {
        +				pci_read_config_byte(dev, slave_port, &tmp);
        +				msleep(50);
        +			}
        +
        +			dev_printk(KERN_ERR, &dev->dev, "PATA parallel scan "
        +				   "race detected\n");
        +		}
         		pci_write_config_byte(dev, slave_port, slave_data);
        +	}
      
         	/* Ensure the UDMA bit is off - it will be turned back on if
         	   UDMA is selected */
      
      and it indeed triggered the error message.
      
      Lets fix all such races by adding an extra locking to ->set_piomode
      and ->set_dmamode methods for PATA controllers.
      
      [ Alan: would be better to take the host lock in libata-core for these
        cases so that we fix all the adapters in one swoop.  "Looks fine as a
        temproary quickfix tho" ]
      
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Cc: Jeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      60c3be38
  5. 29 7月, 2009 2 次提交
  6. 10 6月, 2009 3 次提交
  7. 06 6月, 2009 1 次提交
  8. 12 5月, 2009 2 次提交
  9. 07 4月, 2009 1 次提交
  10. 25 3月, 2009 1 次提交
  11. 14 3月, 2009 1 次提交
    • T
      ata_piix: add workaround for Samsung DB-P70 · e9c1670c
      Tejun Heo 提交于
      Samsung DB-P70 somehow botched the first ICH9 SATA port.  The board
      doesn't expose the first port but somehow SStatus reports link online
      while failing SRST protocol leading to repeated probe failures and
      thus long boot delay.
      
      Because the BIOS doesn't carry any identifying DMI information, the
      port can't be blacklisted safely.  Fortunately, the controller does
      have subsystem vendor and ID set.  It's unclear whether the subsystem
      IDs are used only for the board but it can be safely worked around by
      disabling SIDPR access and just using SRST works around the problem.
      Even when the workaround is triggered on an unaffected board the only
      side effect will be missing SCR access.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NJoseph Jang <josephjang@gmail.com>
      Reported-by: NJonghyon Sohn <mrsohn@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      e9c1670c
  12. 27 1月, 2009 1 次提交
    • R
      SATA PIIX: Blacklist system that spins off disks during ACPI power off · 5f451fe1
      Rafael J. Wysocki 提交于
      Some notebooks from HP have the problem that their BIOSes attempt to
      spin down hard drives before entering ACPI system states S4 and S5.
      This leads to a yo-yo effect during system power-off shutdown and the
      last phase of hibernation when the disk is first spun down by the
      kernel and then almost immediately turned on and off by the BIOS.
      This, in turn, may result in shortening the disk's life times.
      
      To prevent this from happening we can blacklist the affected systems
      using DMI information.
      
      Blacklist HP 2510p that uses the ata_piix driver.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      5f451fe1
  13. 09 1月, 2009 2 次提交
    • A
      libata: Add 32bit PIO support · 871af121
      Alan Cox 提交于
      This matters for some controllers and in one or two cases almost doubles
      PIO performance. Add a bmdma32 operations set we can inherit and activate
      it for some controllers
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      871af121
    • T
      ata_piix: save, use saved and restore IOCFG · 2852bcf7
      Tejun Heo 提交于
      Certain ACPI implementations mess up IOCFG on _STM making libata
      detect cable type incorrectly after a suspend/resume cycle.  This
      patch makes ata_piix save IOCFG on attach, use the saved value for
      things which aren't dynamic and restore it on detach so that the next
      driver also gets the BIOS initialized value.
      
      This patch contains the following changes.
      
      * makes ich_pata_cable_detect() use saved_iocfg.
      
      * make piix_iocfg_bit18_quirk() take @host and use saved_iocfg.
      
      * hpriv allocation moved upwards to save iocfg before doing anything
        else.
      
      This fixes bz#11879.  Andreas Mohr reported and diagnosed the problem.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Andreas Mohr <andi@lisas.de>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      2852bcf7
  14. 29 12月, 2008 1 次提交
  15. 09 12月, 2008 1 次提交
    • J
      ATA: piix, fix pointer deref on suspend · 9ac62126
      Jiri Slaby 提交于
      Hi,
      
      I've found this issue in the mmotm 2008-12-02-17-08.
      
      --
      
      Commit
      ata_piix: add borked Tecra M4 to broken suspend list
      introduced DMI variables checking, but they can be null, so that
      we possibly dereference null.
      
      Check if they are null and avoid checks in that case.
      
      Solves:
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
      IP: [<ffffffff8043da97>] piix_pci_device_suspend+0x117/0x230
      Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
      Cc: Jeff Garzik <jgarzik@redhat.com>
      Cc: Alexandru Romanescu <a_romanescu@yahoo.co.uk>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      9ac62126
  16. 02 12月, 2008 1 次提交
    • T
      ata_piix: add borked Tecra M4 to broken suspend list · 1eedb4a9
      Tejun Heo 提交于
      Tecra M4 sometimes forget what it is and reports bogus data via DMI
      which makes the machine evade broken suspend matching and thus fail
      suspend/resume.  This patch updates piix_broken_suspend() such that it
      can match such case.  As the borked DMI data is a bit generic,
      matching many entries to make the match more specific is necessary.
      As the usual DMI matching is limited to four entries, this patch uses
      hard coded manual matching.
      
      This is reported by Alexandru Romanescu.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Alexandru Romanescu <a_romanescu@yahoo.co.uk>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1eedb4a9
  17. 31 10月, 2008 1 次提交
    • R
      ATA: remove excess kernel-doc notation · 5b97fbd0
      Randy Dunlap 提交于
      Remove excess kernel-doc function parameter notation from drivers/ata/:
      
      Warning(drivers/ata/libata-core.c:1622): Excess function parameter or struct member 'fn' description in 'ata_pio_queue_task'
      Warning(drivers/ata/libata-core.c:4655): Excess function parameter or struct member 'err_mask' description in 'ata_qc_complete'
      Warning(drivers/ata/ata_piix.c:751): Excess function parameter or struct member 'udma' description in 'do_pata_set_dmamode'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      5b97fbd0
  18. 28 10月, 2008 1 次提交
  19. 29 9月, 2008 4 次提交
  20. 14 9月, 2008 1 次提交
  21. 22 8月, 2008 1 次提交
  22. 31 7月, 2008 1 次提交
  23. 19 6月, 2008 1 次提交
  24. 04 6月, 2008 1 次提交
  25. 31 5月, 2008 1 次提交
    • T
      ata_piix: fix macbook ich8m problems · 23cf296e
      Tejun Heo 提交于
      ICH8M on macbooks are peculiar in that some of them lock up when the
      second port is enabled, some return bogus values on SIDPR access while
      yet others hang on SIDPR access.  Also, the ich8m_apple_sata entry was
      wrongly added below generic ich8m entry making it virtually useless.
      
      This patch works around macbook ich8m problems by
      
      * moving ich8m_apple_sata entry above generic ich8m entry
      * dropping PIIX_FLAG_SIDPR from ich8m_apple_sata
      * adding subsystem 106b:00a1 as ich8m_apple_sata
      
      Reported and tested by MATSUBAYASHI.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      23cf296e
  26. 06 5月, 2008 1 次提交
  27. 25 4月, 2008 1 次提交
  28. 18 4月, 2008 4 次提交
    • T
      libata: implement and use sata_std_hardreset() · 57c9efdf
      Tejun Heo 提交于
      Implement sata_std_hardreset(), which simply wraps around
      sata_link_hardreset().  sata_std_hardreset() becomes new standard
      hardreset method for sata_port_ops and sata_sff_hardreset() moves from
      ata_base_port_ops to ata_sff_port_ops, which is where it really
      belongs.
      
      ata_is_builtin_hardreset() is added so that both
      ata_std_error_handler() and ata_sff_error_handler() skip both builtin
      hardresets if SCR isn't accessible.
      
      piix_sidpr_hardreset() in ata_piix.c is identical to
      sata_std_hardreset() in functionality and got replaced with the
      standard function.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      57c9efdf
    • T
      libata: move generic hardreset code from sata_sff_hardreset() to sata_link_hardreset() · 9dadd45b
      Tejun Heo 提交于
      sata_sff_hardreset() contains link readiness wait logic which isn't
      SFF specific.  Move that part into sata_link_hardreset(), which now
      takes two more parameters - @online and @check_ready.  Both are
      optional.  The former is out parameter for link onlineness after
      reset.  The latter is used to wait for link readiness after hardreset.
      
      Users of sata_link_hardreset() is updated to use new funtionality and
      ahci_hardreset() is updated to use sata_link_hardreset() instead of
      sata_sff_hardreset().  This doesn't really cause any behavior change.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      9dadd45b
    • T
      libata: rename SFF functions · 9363c382
      Tejun Heo 提交于
      SFF functions have confusing names.  Some have sff prefix, some have
      bmdma, some std, some pci and some none.  Unify the naming by...
      
      * SFF functions which are common to both BMDMA and non-BMDMA are
        prefixed with ata_sff_.
      
      * SFF functions which are specific to BMDMA are prefixed with
        ata_bmdma_.
      
      * SFF functions which are specific to PCI but apply to both BMDMA and
        non-BMDMA are prefixed with ata_pci_sff_.
      
      * SFF functions which are specific to PCI and BMDMA are prefixed with
        ata_pci_bmdma_.
      
      * Drop generic prefixes from LLD specific routines.  For example,
        bfin_std_dev_select -> bfin_dev_select.
      
      The following renames are noteworthy.
      
        ata_qc_issue_prot() -> ata_sff_qc_issue()
        ata_pci_default_filter() -> ata_bmdma_mode_filter()
        ata_dev_try_classify() -> ata_sff_dev_classify()
      
      This rename is in preparation of separating SFF support out of libata
      core layer.  This patch strictly renames functions and doesn't
      introduce any behavior difference.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      9363c382
    • T
      ata_piix: kill ich6_sata_ahci and clean up · 9c0bf675
      Tejun Heo 提交于
      ich6_sata_ahci and ich6_sata are identical.  Kill ich6_sata_ahci and
      drop _ahci postfixes from controller ids, which doesn't really mean
      anything at this point.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9c0bf675