<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/ata/pata_pdc202xx_old.c, branch v4.1-rc1</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.1-rc1</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.1-rc1'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2014-05-10T02:37:49+00:00</updated>
<entry>
<title>ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host drivers</title>
<updated>2014-05-10T02:37:49+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2014-05-07T15:17:44+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=58eb8cd565af4a104395e3c10443951c1f73dafe'/>
<id>urn:sha1:58eb8cd565af4a104395e3c10443951c1f73dafe</id>
<content type='text'>
This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM
where applicable.  Benefits of this change:

* unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n
  and CONFIG_PM_RUNTIME=y configurations

* easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in
  the future

* more consistent code (there are host drivers which are using the correct
  CONFIG_PM_SLEEP checks already)

The patch leaves the core libata code and -&gt;port_[suspend,resume] support
in sata_[inic162x,nv,sil24].c alone for now.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ata: delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-02-13T21:40:56+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2014-01-21T21:22:51+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1bc18086231c130895b87ec049be8ddcdab552b8'/>
<id>urn:sha1:1bc18086231c130895b87ec049be8ddcdab552b8</id>
<content type='text'>
None of these files are actually using any __init type directives
and hence don't need to include &lt;linux/init.h&gt;.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Cc: linux-ide@vger.kernel.org
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ata: use module_pci_driver</title>
<updated>2012-07-25T19:12:11+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-04-19T05:43:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2fc75da0c59634b81223af497c4a037822f6e457'/>
<id>urn:sha1:2fc75da0c59634b81223af497c4a037822f6e457</id>
<content type='text'>
This patch converts the drivers in drivers/ata/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Jeff Garzik &lt;jgarzik@pobox.com&gt;
Cc: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Cc: Mark Lord &lt;kernel@teksavvy.com&gt;
Cc: Jeremy Higdon &lt;jeremy@sgi.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>pata_pdc202xx_old: implement sff_irq_check() method</title>
<updated>2010-10-22T00:21:06+00:00</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sshtylyov@ru.mvista.com</email>
</author>
<published>2010-10-08T14:57:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=606254e3c1faeb091203c58c2da8e3e4433aae6d'/>
<id>urn:sha1:606254e3c1faeb091203c58c2da8e3e4433aae6d</id>
<content type='text'>
Signed-off-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>libata-sff: separate out BMDMA init</title>
<updated>2010-05-25T23:40:30+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-05-19T20:10:22+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1c5afdf7a629d2e77de8dd043b97a33dcd7e6dfa'/>
<id>urn:sha1:1c5afdf7a629d2e77de8dd043b97a33dcd7e6dfa</id>
<content type='text'>
Separate out ata_pci_bmdma_prepare_host() and ata_pci_bmdma_init_one()
from their SFF counterparts.  SFF ones no longer try to initialize
BMDMA or set PCI master.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>libata-sff: clean up BMDMA initialization</title>
<updated>2010-05-19T17:32:19+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-05-10T19:41:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c7087652e1890a3feef35b30ee1d4be68e1932cd'/>
<id>urn:sha1:c7087652e1890a3feef35b30ee1d4be68e1932cd</id>
<content type='text'>
When BMDMA initialization failed or BMDMA was not available for
whatever reason, bmdma_addr was left at zero and used as an indication
that BMDMA shouldn't be used.  This leads to the following problems.

p1. For BMDMA drivers which don't use traditional BMDMA register,
    ata_bmdma_mode_filter() incorrectly inhibits DMA modes.  Those
    drivers either have to inherit from ata_sff_port_ops or clear
    -&gt;mode_filter explicitly.

p2. non-BMDMA drivers call into BMDMA PRD table allocation.  It
    doesn't actually allocate PRD table if bmdma_addr is not
    initialized but is still confusing.

p3. For BMDMA drivers which don't use traditional BMDMA register, some
    methods might not be invoked as expected (e.g. bmdma_stop from
    ata_sff_post_internal_cmd()).

p4. SFF drivers w/ custom DMA interface implement noop BMDMA ops
    worrying libata core might call into one of them.

These problems are caused by the muddy line between SFF and BMDMA and
the assumption that all BMDMA controllers initialize bmdma_addr.

This patch fixes p1 and p2 by removing the bmdma_addr assumption and
moving prd allocation to BMDMA port start.  Later patches will fix the
remaining issues.

This patch improves BMDMA initialization such that

* When BMDMA register initialization fails, falls back to PIO instead
  of failing.  ata_pci_bmdma_init() never fails now.

* When ata_pci_bmdma_init() falls back to PIO, it clears
  ap-&gt;mwdma_mask and udma_mask instead of depending on
  ata_bmdma_mode_filter().  This makes ata_bmdma_mode_filter()
  unnecessary thus resolving p1.

* ata_port_start() which actually is BMDMA specific is moved to
  ata_bmdma_port_start().  ata_port_start() and ata_sff_port_start()
  are killed.

* ata_sff_port_start32() is moved and renamed to
  ata_bmdma_port_start32().

Drivers which no longer call into PRD table allocation are...

  pdc_adma, sata_inic162x, sata_qstor, sata_sx4, pata_cmd640 and all
  drivers which inherit from ata_sff_port_ops.

pata_icside sets -&gt;port_start to ATA_OP_NULL as it doesn't need PRD
but is a BMDMA controller and doesn't have custom port_start like
other such controllers.

Note that with the previous patch which makes all and only BMDMA
drivers inherit from ata_bmdma_port_ops, this change doesn't break
drivers which need PRD table.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>libata: Pass host flags into the pci helper</title>
<updated>2010-03-01T19:58:46+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2010-02-23T07:26:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=16ea0fc98d53c72cb4e1a9edcb685a87e3a81430'/>
<id>urn:sha1:16ea0fc98d53c72cb4e1a9edcb685a87e3a81430</id>
<content type='text'>
This allows parallel scan and the like to be set without having to stop
using the existing full helper functions. This patch merely adds the argument
and fixes up the callers. It doesn't undo the special cases already in the
tree or add any new parallel callers.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>pata_pdc202xx_old: fix UDMA mode for PDC2026x chipsets</title>
<updated>2010-03-01T19:58:46+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2010-02-13T22:43:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=750e519da7b3f470fe1b5b55c8d8f52d6d6371e4'/>
<id>urn:sha1:750e519da7b3f470fe1b5b55c8d8f52d6d6371e4</id>
<content type='text'>
PDC2026x chipsets need the same treatment as PDC20246 one.

This is completely untested but will hopefully fix UDMA issues
that people have been reporting against pata_pdc202xx_old for
the last couple of years.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>pata_pdc202xx_old: fix UDMA mode for Promise UDMA33 cards</title>
<updated>2010-03-01T19:58:46+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2010-02-13T13:35:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a75032e8772d13dab5e3501413d7e14a148281b4'/>
<id>urn:sha1:a75032e8772d13dab5e3501413d7e14a148281b4</id>
<content type='text'>
On Monday 04 January 2010 02:30:24 pm Russell King wrote:

&gt; Found the problem - getting rid of the read of the alt status register
&gt; after the command has been written fixes the UDMA CRC errors on write:
&gt;
&gt; @@ -676,7 +676,8 @@ void ata_sff_exec_command(struct ata_port *ap, const struct
&gt; ata_taskfile *tf)
&gt;         DPRINTK("ata%u: cmd 0x%X\n", ap-&gt;print_id, tf-&gt;command);
&gt;
&gt;         iowrite8(tf-&gt;command, ap-&gt;ioaddr.command_addr);
&gt; -       ata_sff_pause(ap);
&gt; +       ndelay(400);
&gt; +//     ata_sff_pause(ap);
&gt;  }
&gt;  EXPORT_SYMBOL_GPL(ata_sff_exec_command);
&gt;
&gt;
&gt; This rather makes sense.  The PDC20247 handles the UDMA part of the
&gt; protocol.  It has no way to tell the PDC20246 to wait while it suspends
&gt; UDMA, so that a normal register access can take place - the 246 ploughs
&gt; on with the register access without any regard to the state of the 247.
&gt;
&gt; If the drive immediately starts the UDMA protocol after a write to the
&gt; command register (as it probably will for the DMA WRITE command), then
&gt; we'll be accessing the taskfile in the middle of the UDMA setup, which
&gt; can't be good.  It's certainly a violation of the ATA specs.

Fix it by adding custom -&gt;sff_exec_command method for UDMA33 chipsets.

Debugged-by: Russell King &lt;rmk@arm.linux.org.uk&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>pata_pdc202xx_old: fix UDMA33 handling</title>
<updated>2009-05-11T18:30:07+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-04-20T20:31:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6ad58b245a543461bd55d51b8303f555419687b2'/>
<id>urn:sha1:6ad58b245a543461bd55d51b8303f555419687b2</id>
<content type='text'>
The original driver doesn't use 66 MHz clock for UDMA33.

[ The alternative solution would be to adjust UDMA33 timings
  for 66 MHz clock but I think that it is safer to stick with
  old &amp; tested behavior for now. ]

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
</feed>
