<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/ata, branch v2.6.37.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>pata_mpc52xx: inherit from ata_bmdma_port_ops</title>
<updated>2011-02-17T23:14:54+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-01-09T22:48:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2fd59c6a20ef52c2e59b22a1fa7303ea4dfdc464'/>
<id>2fd59c6a20ef52c2e59b22a1fa7303ea4dfdc464</id>
<content type='text'>
commit 77c5fd19075d299fe820bb59bb21b0b113676e20 upstream.

pata_mpc52xx supports BMDMA but inherits ata_sff_port_ops which
triggers BUG_ON() when a DMA command is issued.  Fix it.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Roman Fietze &lt;roman.fietze@telemotive.de&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@mvista.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 77c5fd19075d299fe820bb59bb21b0b113676e20 upstream.

pata_mpc52xx supports BMDMA but inherits ata_sff_port_ops which
triggers BUG_ON() when a DMA command is issued.  Fix it.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Roman Fietze &lt;roman.fietze@telemotive.de&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@mvista.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>libata: set queue DMA alignment to sector size for ATAPI too</title>
<updated>2011-02-17T23:13:36+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2011-01-20T12:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dcdac09854fe0bd0b3ca92858b5346fdeef593b9'/>
<id>dcdac09854fe0bd0b3ca92858b5346fdeef593b9</id>
<content type='text'>
commit 729a6a300e628a48cf12bac93a964a535e83cd1d upstream.

ata_pio_sectors() expects buffer for each sector to be contained in a
single page; otherwise, it ends up overrunning the first page.  This
is achieved by setting queue DMA alignment.  If sector_size is smaller
than PAGE_SIZE and all buffers are sector_size aligned, buffer for
each sector is always contained in a single page.

This wasn't applied to ATAPI devices but IDENTIFY_PACKET is executed
as ATA_PROT_PIO and thus uses ata_pio_sectors().  Newer versions of
udev issue IDENTIFY_PACKET with unaligned buffer triggering the
problem and causing oops.

This patch fixes the problem by setting sdev-&gt;sector_size to
ATA_SECT_SIZE on ATATPI devices and always setting DMA alignment to
sector_size.  While at it, add a warning for the unlikely but still
possible scenario where sector_size is larger than PAGE_SIZE, in which
case the alignment wouldn't be enough.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: John Stanley &lt;jpsinthemix@verizon.net&gt;
Tested-by: John Stanley &lt;jpsinthemix@verizon.net&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 729a6a300e628a48cf12bac93a964a535e83cd1d upstream.

ata_pio_sectors() expects buffer for each sector to be contained in a
single page; otherwise, it ends up overrunning the first page.  This
is achieved by setting queue DMA alignment.  If sector_size is smaller
than PAGE_SIZE and all buffers are sector_size aligned, buffer for
each sector is always contained in a single page.

This wasn't applied to ATAPI devices but IDENTIFY_PACKET is executed
as ATA_PROT_PIO and thus uses ata_pio_sectors().  Newer versions of
udev issue IDENTIFY_PACKET with unaligned buffer triggering the
problem and causing oops.

This patch fixes the problem by setting sdev-&gt;sector_size to
ATA_SECT_SIZE on ATATPI devices and always setting DMA alignment to
sector_size.  While at it, add a warning for the unlikely but still
possible scenario where sector_size is larger than PAGE_SIZE, in which
case the alignment wouldn't be enough.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: John Stanley &lt;jpsinthemix@verizon.net&gt;
Tested-by: John Stanley &lt;jpsinthemix@verizon.net&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pata_cs5536: avoid implicit MSR API inclusion on x86-64</title>
<updated>2010-12-27T00:42:15+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jeff@garzik.org</email>
</author>
<published>2010-12-27T00:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff5dd32b997a5a5ce3f4256257991133d694da0b'/>
<id>ff5dd32b997a5a5ce3f4256257991133d694da0b</id>
<content type='text'>
We don't need or want MSR usage here, on x86-64.
x86-64 was disabled intentionally in Kconfig, but commit
9272dcc232b84ccb027d6861077934055d42764d changed that.

drivers/ata/pata_cs5536.c:47:1: warning: "rdmsr" redefined
In file included from arch/x86/include/asm/irqflags.h:60,
                 from include/linux/irqflags.h:15,
                 from arch/x86/include/asm/system.h:11,
                 from arch/x86/include/asm/processor.h:17,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:7,
                 from include/linux/module.h:9,
                 from drivers/ata/pata_cs5536.c:33:
arch/x86/include/asm/paravirt.h:146:1: warning: this is the location of the previous definition
drivers/ata/pata_cs5536.c:48:1: warning: "wrmsr" redefined
arch/x86/include/asm/paravirt.h:154:1: warning: this is the location of the previous definition

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need or want MSR usage here, on x86-64.
x86-64 was disabled intentionally in Kconfig, but commit
9272dcc232b84ccb027d6861077934055d42764d changed that.

drivers/ata/pata_cs5536.c:47:1: warning: "rdmsr" redefined
In file included from arch/x86/include/asm/irqflags.h:60,
                 from include/linux/irqflags.h:15,
                 from arch/x86/include/asm/system.h:11,
                 from arch/x86/include/asm/processor.h:17,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:7,
                 from include/linux/module.h:9,
                 from drivers/ata/pata_cs5536.c:33:
arch/x86/include/asm/paravirt.h:146:1: warning: this is the location of the previous definition
drivers/ata/pata_cs5536.c:48:1: warning: "wrmsr" redefined
arch/x86/include/asm/paravirt.h:154:1: warning: this is the location of the previous definition

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: issue DIPM enable commands with LPM state updated</title>
<updated>2010-12-24T18:34:34+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-12-09T15:13:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e5005b15c91f3362036067bde5210d5c78af2f0d'/>
<id>e5005b15c91f3362036067bde5210d5c78af2f0d</id>
<content type='text'>
Low level drivers may behave differently depending on the current
link-&gt;lpm_policy.  During ata_eh_set_lpm(), DIPM enable commands are
issued after the successful completion of ap-&gt;ops-&gt;set_lpm(), which
means that the controller is already in the target state.  This causes
DIPM enable commands to be processed with mismatching controller power
state and link-&gt;lpm_policy value.

In ahci, link-&gt;lpm_policy is used to ignore certain PHY events if LPM
is enabled; however, as DIPM commands are issued with stale
link-&gt;lpm_policy, they sometimes end up triggering these conditions
and get aborted leading to LPM configuration failure.

Fix it by updating link-&gt;lpm_policy before issuing DIPM enable
commands.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Low level drivers may behave differently depending on the current
link-&gt;lpm_policy.  During ata_eh_set_lpm(), DIPM enable commands are
issued after the successful completion of ap-&gt;ops-&gt;set_lpm(), which
means that the controller is already in the target state.  This causes
DIPM enable commands to be processed with mismatching controller power
state and link-&gt;lpm_policy value.

In ahci, link-&gt;lpm_policy is used to ignore certain PHY events if LPM
is enabled; however, as DIPM commands are issued with stale
link-&gt;lpm_policy, they sometimes end up triggering these conditions
and get aborted leading to LPM configuration failure.

Fix it by updating link-&gt;lpm_policy before issuing DIPM enable
commands.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: no special completion processing for EH commands</title>
<updated>2010-12-24T18:34:18+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-12-09T14:59:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f08dc1ac6b15c681f4643d8da1700e06c3855608'/>
<id>f08dc1ac6b15c681f4643d8da1700e06c3855608</id>
<content type='text'>
ata_qc_complete() contains special handling for certain commands.  For
example, it schedules EH for device revalidation after certain
configurations are changed.  These shouldn't be applied to EH
commands but they were.

In most cases, it doesn't cause an actual problem because EH doesn't
issue any command which would trigger special handling; however, ACPI
can issue such commands via _GTF which can cause weird interactions.

Restructure ata_qc_complete() such that EH commands are always passed
on to __ata_qc_complete().

stable: Please apply to -stable only after 2.6.38 is released.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ata_qc_complete() contains special handling for certain commands.  For
example, it schedules EH for device revalidation after certain
configurations are changed.  These shouldn't be applied to EH
commands but they were.

In most cases, it doesn't cause an actual problem because EH doesn't
issue any command which would trigger special handling; however, ACPI
can issue such commands via _GTF which can cause weird interactions.

Restructure ata_qc_complete() such that EH commands are always passed
on to __ata_qc_complete().

stable: Please apply to -stable only after 2.6.38 is released.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pata_mpc52xx: driver needs BMDMA</title>
<updated>2010-12-24T18:33:37+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2010-12-22T15:50:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=869934adfc8391ec2e198ed81260e1a42cd9c575'/>
<id>869934adfc8391ec2e198ed81260e1a42cd9c575</id>
<content type='text'>
Found by this build-error if BMDMA is disabled:

drivers/ata/pata_mpc52xx.c: In function 'mpc52xx_ata_init_one':
drivers/ata/pata_mpc52xx.c:662: error: 'ata_bmdma_interrupt' undeclared (first use in this function)
...

Move the Kconfig entry to the proper location as needed since
9a7780c9acb821fe1c2b6fc53f74cc2556ff5364 (libata-sff: make BMDMA optional)

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found by this build-error if BMDMA is disabled:

drivers/ata/pata_mpc52xx.c: In function 'mpc52xx_ata_init_one':
drivers/ata/pata_mpc52xx.c:662: error: 'ata_bmdma_interrupt' undeclared (first use in this function)
...

Move the Kconfig entry to the proper location as needed since
9a7780c9acb821fe1c2b6fc53f74cc2556ff5364 (libata-sff: make BMDMA optional)

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pata_cs5536: Add support for non-X86_32 platforms</title>
<updated>2010-12-24T18:33:23+00:00</updated>
<author>
<name>Wu Zhangjin</name>
<email>wuzhangjin@gmail.com</email>
</author>
<published>2010-12-24T13:39:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9272dcc232b84ccb027d6861077934055d42764d'/>
<id>9272dcc232b84ccb027d6861077934055d42764d</id>
<content type='text'>
pata_cs5536 does work on the other platforms(e.g. Loongson, a MIPS
variant), so, remove the dependency of X86_32 and fix the building
errors under the other platforms via only reserving the X86_32 specific
parts for X86_32.

pata_amd also supports cs5536 IDE controller, but this one saves about
33k for the compressed kernel image(vmlinuz for MIPS).

Signed-off-by: Zhang Le &lt;r0bertz@gentoo.org&gt;
Signed-off-by: Chen Jie &lt;chenj@lemote.com&gt;
Signed-off-by: Wu Zhangjin &lt;wuzhangjin@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pata_cs5536 does work on the other platforms(e.g. Loongson, a MIPS
variant), so, remove the dependency of X86_32 and fix the building
errors under the other platforms via only reserving the X86_32 specific
parts for X86_32.

pata_amd also supports cs5536 IDE controller, but this one saves about
33k for the compressed kernel image(vmlinuz for MIPS).

Signed-off-by: Zhang Le &lt;r0bertz@gentoo.org&gt;
Signed-off-by: Chen Jie &lt;chenj@lemote.com&gt;
Signed-off-by: Wu Zhangjin &lt;wuzhangjin@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata-sff: fix HSM_ST_ERR handling in __ata_sff_port_intr()</title>
<updated>2010-12-24T18:32:07+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-12-03T14:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=687a993339c4f3a63654746230da3aab8bbdbffd'/>
<id>687a993339c4f3a63654746230da3aab8bbdbffd</id>
<content type='text'>
While separating out BMDMA irq handler from SFF, commit c3b28894
(libata-sff: separate out BMDMA irq handler) incorrectly made
__ata_sff_port_intr() consider an IRQ to be an idle one if the host
state was transitioned to HSM_ST_ERR by ata_bmdma_port_intr().

This makes BMDMA drivers ignore IRQs reporting host bus error which
leads to timeouts instead of triggering EH immediately.  Fix it by
making __ata_sff_port_intr() consider the IRQ to be an idle one iff
the state is HSM_ST_IDLE.  This is equivalent to adding HSM_ST_ERR to
the "break"ing case but less error-prone.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Antonio Toma &lt;antonio.toma@gmail.com&gt;
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While separating out BMDMA irq handler from SFF, commit c3b28894
(libata-sff: separate out BMDMA irq handler) incorrectly made
__ata_sff_port_intr() consider an IRQ to be an idle one if the host
state was transitioned to HSM_ST_ERR by ata_bmdma_port_intr().

This makes BMDMA drivers ignore IRQs reporting host bus error which
leads to timeouts instead of triggering EH immediately.  Fix it by
making __ata_sff_port_intr() consider the IRQ to be an idle one iff
the state is HSM_ST_IDLE.  This is equivalent to adding HSM_ST_ERR to
the "break"ing case but less error-prone.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Antonio Toma &lt;antonio.toma@gmail.com&gt;
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sata_via: apply magic FIFO fix to vt6420 too</title>
<updated>2010-11-19T18:16:26+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-11-19T14:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b1353e4f40f6179ab26a3bb1b2e1fe29ffe534f5'/>
<id>b1353e4f40f6179ab26a3bb1b2e1fe29ffe534f5</id>
<content type='text'>
vt6420 has the same FIFO overflow problem as vt6421 when combined with
certain devices.  This patch applies the magic fix to vt6420 too.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Martin Qvist &lt;q@maq.dk&gt;
Reported-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Joseph Chan &lt;JosephChan@via.com.tw&gt;
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vt6420 has the same FIFO overflow problem as vt6421 when combined with
certain devices.  This patch applies the magic fix to vt6420 too.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Martin Qvist &lt;q@maq.dk&gt;
Reported-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Joseph Chan &lt;JosephChan@via.com.tw&gt;
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[libata] remove SCSI host lock and serial number usage from ata_scsi_queuecmd</title>
<updated>2010-11-17T17:03:58+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jeff@garzik.org</email>
</author>
<published>2010-11-17T17:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=23e701e6208191ad103517ae7a700f2dc59ab2ec'/>
<id>23e701e6208191ad103517ae7a700f2dc59ab2ec</id>
<content type='text'>
cmd-&gt;serial_number is never tested in any path we reach; therefore we may
remove the call to scsi_cmd_get_serial() inside DEF_SCSI_QCMD, the SCSI
host_lock acquisition surrounding it, and our own SCSI host_lock
unlock+relock cycle.

Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cmd-&gt;serial_number is never tested in any path we reach; therefore we may
remove the call to scsi_cmd_get_serial() inside DEF_SCSI_QCMD, the SCSI
host_lock acquisition surrounding it, and our own SCSI host_lock
unlock+relock cycle.

Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
