1. 29 4月, 2007 2 次提交
  2. 04 4月, 2007 4 次提交
  3. 31 3月, 2007 1 次提交
  4. 28 3月, 2007 2 次提交
  5. 19 3月, 2007 1 次提交
  6. 09 3月, 2007 2 次提交
    • T
      libata: fix ata_host_release() free order · 1aa506e4
      Tejun Heo 提交于
      host->ops->host_stop() might access ports.  Free ports after
      host_stop.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      1aa506e4
    • P
      Fix simplex adapters with libata · 14d66ab7
      Petr Vandrovec 提交于
      Recently I got my hands on nVidia's MCP61 PM-AM board, and
      it contains IDE chip configured by BIOS with only primary
      channel enabled.  This confuses code which probes for
      device DMA capabilities - it gets 0x60 (happy duplex
      device) from primary channel BMDMA, but 0xFF (nobody here)
      from secondary channel BMDMA.  Due to this code then believes
      that chip is simplex.  I do not address this problem in
      my patch, as I'm not sure how to handle this.  Probably
      ata_pci_init_one should have bitmap of enabled/possible
      interfaces instead of their count, but it looks like
      quite intrusive change, and maybe we do not care - for device
      with only one channel simplex and regular DMA engines are
      same.
      
      But making device simplex pointed out that support for
      DMA on simplex devices is currently broken - ata_dev_xfermask
      tests whether device is simplex and if it is whether DMA
      engine was assigned to this port.  If not then it strips
      out DMA bits from device.  Problem is that code which assigns
      DMA engine to port in ata_set_mode first detect device
      mode and assigns DMA engine to channel only if some DMA
      capable device was found.
      
      And as xfermask stripped out DMA bits, host->simplex_claimed
      is always NULL with current implementation.
      
      By allowing DMA either if simplex_claimed is NULL or if it
      points to current port DMA can be finally used - it gets
      assigned to first port which contains any DMA capable
      device.
      
      Before:
      pata_amd 0000:00:06.0: version 0.2.8
      PCI: Setting latency timer of device 0000:00:06.0 to 64
      ata5: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001f000 irq 14
      ata6: PATA max UDMA/133 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001f008 irq 15
      scsi4 : pata_amd
      ata5.00: ATAPI, max UDMA/66
      ata5.00: simplex DMA is claimed by other device, disabling DMA
      ata5.00: configured for PIO4
      scsi5 : pata_amd
      ata6: port disabled. ignoring.
      ata6: reset failed, giving up
      scsi 4:0:0:0: CD-ROM            ATAPI    DVD W  DH16W1P   LG12 PQ: 0 ANSI: 5
      
      After:
      pata_amd 0000:00:06.0: version 0.2.8
      PCI: Setting latency timer of device 0000:00:06.0 to 64
      ata5: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001f000 irq 14
      ata6: PATA max UDMA/133 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001f008 irq 15
      scsi4 : pata_amd
      ata5.00: ATAPI, max UDMA/66
      ata5.00: configured for UDMA/33
      scsi5 : pata_amd
      ata6: port disabled. ignoring.
      ata6: reset failed, giving up
      scsi 4:0:0:0: CD-ROM            ATAPI    DVD W  DH16W1P   LG12 PQ: 0 ANSI: 5
      Signed-off-by: NPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      14d66ab7
  7. 03 3月, 2007 3 次提交
    • T
      libata: add CONFIG_PM to libata core layer · 6ffa01d8
      Tejun Heo 提交于
      Conditionalize all PM related stuff in libata core layer using
      CONFIG_PM.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6ffa01d8
    • J
      [libata] change master/slave IDENTIFY order · f31f0cc2
      Jeff Garzik 提交于
      2.6.21-rc has horrible problems with libata and PATA cable types (and
      thus speeds). This occurs because Tejun fixed a pile of other bugs and
      we now do cable detect enforcement for drive side detection properly.
      
      Unfortunately we don't do the process around cable detection right. Tejun
      identified the problem and pointed to the right Annex in the spec, this patch
      implements the needed changes.
      
      The basic requirement is that we have to identify the slave before the
      master.
      
      The patch switches the identify order so that we can do the drive side
      detection correctly.
      
      [NOTE: patch and description extracted from a larger work written
      and signed-off-by Alan Cox]
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f31f0cc2
    • A
      libata-core: Fix simplex handling · 032af1ce
      Alan 提交于
      The initial simplex handling code is fooled if you suspend and resume.
      This also causes problems with some single channel controllers which
      claim to be simplex.
      
      The fix is fairly simple, instead of keeping a flag to remember if we
      gave away the simplex channel we remember the actual owner. As the owner
      is always part of the host_set we don't even need a refcount.
      
      Knowing the owner also means we can reassign simplex DMA channels in
      future hotplug code etc if we need to
      Signed-off-by: NAlan Cox <alan@redhat.com>
      (and a signed-off for the patch I sent before while I remember)
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      032af1ce
  8. 02 3月, 2007 2 次提交
  9. 26 2月, 2007 3 次提交
  10. 21 2月, 2007 9 次提交
    • T
      libata: s/ap->id/ap->print_id/g · 44877b4e
      Tejun Heo 提交于
      ata_port has two different id fields - id and port_no.  id is
      system-wide 1-based unique id for the port while port_no is 0-based
      host-wide port number.  The former is primarily used to identify the
      ATA port to the user in printk messages while the latter is used in
      various places in libata core and LLDs to index the port inside the
      host.
      
      The two fields feel quite similar and sometimes ap->id is used in
      place of ap->port_no, which is very difficult to spot.  This patch
      renames ap->id to ap->print_id to reduce the possibility of such bugs.
      
      Some printk messages are adjusted such that id string (ata%u[.%u])
      isn't printed twice and/or to use ata_*_printk() instead of hardcoded
      id format.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      44877b4e
    • M
      libata: Remove duplicate dma blacklist entry · 9dd6fa32
      Magnus Damm 提交于
      libata: Remove duplicate dma blacklist entry
      
      The exact same entry is already present.
      Signed-off-by: NMagnus Damm <damm@opensource.se>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9dd6fa32
    • T
      libata: separate out ata_ncq_enabled() · 6d1245bf
      Tejun Heo 提交于
      Separate out ata_ncq_enabled().
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6d1245bf
    • T
      libata: disable pdev on all suspend events · 4c90d971
      Tejun Heo 提交于
      libata used disable pdev only on PM_EVENT_SUSPEND while re-enable pdev
      unconditionally.  This was okay before ref-counted pdev enable update
      but it now makes the pdev pinned after swsusp cycle (enabled twice but
      disabled only once) and devres sanity check whines about it.
      
      Fix it by unconditionally disabling pdev on all suspend events.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4c90d971
    • T
      libata: fix probe_ent alloc/free bugs · 4d05447e
      Tejun Heo 提交于
      ata_probe_ent_alloc() had a temporary hack such that devm_kzalloc()
      was used for allocation if devres had been previously initialized on
      the device; otherwise, plain kzalloc() was used.  This was to make the
      code useable from both the old and devres-aware libata drivers during
      transition.  This hack made ata_sas_port_alloc() unable to determine
      how the probe_ent is allocated, causing double free in some cases.
      
      Remove the now-unneeded hack and make ata_sas_port_alloc() use
      devm_kfree().
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: James Bottomley <James.Bottomley@SteelEye.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4d05447e
    • T
      libata: kill ATA_DNXFER_ANY · 909706a2
      Tejun Heo 提交于
      ATA_DNXFER_ANY isn't used anymore.  Kill it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      909706a2
    • T
      libata: improve probe failure handling · 4ae72a1e
      Tejun Heo 提交于
      * Move forcing device to PIO0 on device disable into
        ata_dev_disable().  This makes both old and new EHs act the same
        way.
      
      * Speed down only PIO mode on probe failure.  All commands used during
        probing are PIO commands.  There's no point in speeding down DMA.
      
      * Retry at least once after -ENODEV.  Some devices report garbled
        IDENTIFY data after certain events.  This shouldn't cause device
        detach and re-attach.
      
      * Rearrange EH failure path for simplicity.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4ae72a1e
    • T
      libata: improve ata_down_xfermask_limit() · 458337db
      Tejun Heo 提交于
      Make ata_down_xfermask_limit() accept @sel instead of @force_pio0.
      @sel selects how the xfermask limit will be adjusted.  The following
      selectors are defined.
      
      * ATA_DNXFER_PIO	: only speed down PIO
      * ATA_DNXFER_DMA	: only speed down DMA, don't cause transfer mode change
      * ATA_DNXFER_40C	: apply 40c cable limit
      * ATA_DNXFER_FORCE_PIO	: force PIO
      * ATA_DNXFER_FORCE_PIO0	: force PIO0 (same as original with @force_pio0 == 1)
      * ATA_DNXFER_ANY	: same as original with @force_pio0 == 0
      
      Currently, only ANY and FORCE_PIO0 are used to maintain the original
      behavior.  Other selectors will be used later to improve EH speed down
      sequence.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      458337db
    • A
      libata: PATA driver for Celleb · a619f981
      Akira Iguchi 提交于
      This is the patch for PATA controller of Celleb.
      
      This driver uses the managed iomap (devres).
      
      Because this driver needs special taskfile accesses, there is
      a copy of ata_std_softreset(). ata_dev_try_classify() is exported
      so that it can be used in this function.
      Signed-off-by: NKou Ishizaki <kou.ishizaki@toshiba.co.jp>
      Signed-off-by: NAkira Iguchi <akira2.iguchi@toshiba.co.jp>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      a619f981
  11. 17 2月, 2007 3 次提交
  12. 16 2月, 2007 1 次提交
    • T
      libata: clear TF before IDENTIFYing · 81afe893
      Tejun Heo 提交于
      Some devices chock if Feature is not clear when IDENTIFY is issued.
      Set ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE for IDENTIFY such that whole
      TF is cleared when reading ID data.
      
      Kudos to Art Haas for testing various futile patches over several
      months and Mark Lord for pointing out the fix.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Art Haas <ahaas@airmail.net>
      Cc: Mark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      81afe893
  13. 10 2月, 2007 7 次提交