<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/spi, branch v3.12.25</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>spi: core: Ignore unsupported Dual/Quad Transfer Mode bits</title>
<updated>2014-06-09T13:53:57+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2014-04-14T17:39:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ee1108042b15955583703494965934c36b16c32'/>
<id>4ee1108042b15955583703494965934c36b16c32</id>
<content type='text'>
commit 83596fbeb5d28e8cb8878786133945d4dc7c0090 upstream.

The availability of SPI Dual or Quad Transfer Mode as indicated by the
"spi-tx-bus-width" and "spi-rx-bus-width" properties in the device tree is
a hardware property of the SPI master, SPI slave, and board wiring.  Hence
the SPI core should not reject an SPI slave because an SPI master driver
doesn't (yet) support Dual or Quad Transfer Mode.

Change the lack of Dual or Quad Transfer Mode support in the SPI master
driver from an error condition to a warning condition, and ignore the
unsupported mode bits, falling back to Single Transfer Mode, to avoid
breakages when running old kernels with new device trees.

Fixes: f477b7fb13df (spi: DUAL and QUAD support)
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 83596fbeb5d28e8cb8878786133945d4dc7c0090 upstream.

The availability of SPI Dual or Quad Transfer Mode as indicated by the
"spi-tx-bus-width" and "spi-rx-bus-width" properties in the device tree is
a hardware property of the SPI master, SPI slave, and board wiring.  Hence
the SPI core should not reject an SPI slave because an SPI master driver
doesn't (yet) support Dual or Quad Transfer Mode.

Change the lack of Dual or Quad Transfer Mode support in the SPI master
driver from an error condition to a warning condition, and ignore the
unsupported mode bits, falling back to Single Transfer Mode, to avoid
breakages when running old kernels with new device trees.

Fixes: f477b7fb13df (spi: DUAL and QUAD support)
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: efm32: use $vendor,$device scheme for compatible string</title>
<updated>2014-05-15T07:54:49+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2014-03-25T14:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e3f6483f71315d42e8b168226cf6a5757e9c7c0f'/>
<id>e3f6483f71315d42e8b168226cf6a5757e9c7c0f</id>
<content type='text'>
commit 12f6dd860cf8bf036c0bec38c00a53da71bcd43a upstream.

Wolfram Sang pointed out that "efm32,$device" is non-standard. So use the
common scheme and prefix device with "efm32-". The old compatible string
is left in place until arch/arm/boot/dts/efm32* is fixed.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 12f6dd860cf8bf036c0bec38c00a53da71bcd43a upstream.

Wolfram Sang pointed out that "efm32,$device" is non-standard. So use the
common scheme and prefix device with "efm32-". The old compatible string
is left in place until arch/arm/boot/dts/efm32* is fixed.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spi-ath79: fix initial GPIO CS line setup</title>
<updated>2014-03-22T21:01:58+00:00</updated>
<author>
<name>Gabor Juhos</name>
<email>juhosg@openwrt.org</email>
</author>
<published>2014-03-02T19:54:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a7bc8661cf5b00ed5d6db543e820972f813c442'/>
<id>0a7bc8661cf5b00ed5d6db543e820972f813c442</id>
<content type='text'>
commit 61d1cf163c8653934cc8cd5d0b2a562d0990c265 upstream.

The 'ath79_spi_setup_cs' function initializes the chip
select line of a given SPI device in order to make sure
that the device is inactive.

If the SPI_CS_HIGH bit is set for a given device, it
means that the CS line of that device is active HIGH
so it must be set to LOW initially. In case of GPIO
CS lines, the 'ath79_spi_setup_cs' function does the
opposite of that due to the wrong GPIO flags.

Fix the code to use the correct GPIO flags.

Reported-by: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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

The 'ath79_spi_setup_cs' function initializes the chip
select line of a given SPI device in order to make sure
that the device is inactive.

If the SPI_CS_HIGH bit is set for a given device, it
means that the CS line of that device is active HIGH
so it must be set to LOW initially. In case of GPIO
CS lines, the 'ath79_spi_setup_cs' function does the
opposite of that due to the wrong GPIO flags.

Fix the code to use the correct GPIO flags.

Reported-by: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spi-imx: spi_imx_remove: do not disable disabled clocks</title>
<updated>2014-03-22T21:01:58+00:00</updated>
<author>
<name>Philippe De Muyter</name>
<email>phdm@macqel.be</email>
</author>
<published>2014-02-27T09:16:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d8e172f3c0a5b1456071b1f4483393fcf3deb20b'/>
<id>d8e172f3c0a5b1456071b1f4483393fcf3deb20b</id>
<content type='text'>
commit fd40dccb1a170ba689664481a3de83617b7194d2 upstream.

Currently, at module removal, one gets the following warnings:
------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
Modules linked in: spi_imx(-) [last unloaded: ev76c560]
CPU: 1 PID: 16337 Comm: rmmod Tainted: G        W    3.10.17-80548-g90191eb-dirty #33
[&lt;80013b4c&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;800115dc&gt;] (show_stack+0x10/0x14)
[&lt;800115dc&gt;] (show_stack+0x10/0x14) from [&lt;800257b8&gt;] (warn_slowpath_common+0x4c/0x68)
[&lt;800257b8&gt;] (warn_slowpath_common+0x4c/0x68) from [&lt;800257f0&gt;] (warn_slowpath_null+0x1c/0x24)
[&lt;800257f0&gt;] (warn_slowpath_null+0x1c/0x24) from [&lt;803f60ec&gt;] (clk_disable+0x18/0x24)
[&lt;803f60ec&gt;] (clk_disable+0x18/0x24) from [&lt;7f02c9cc&gt;] (spi_imx_remove+0x54/0x9c [spi_imx])
[&lt;7f02c9cc&gt;] (spi_imx_remove+0x54/0x9c [spi_imx]) from [&lt;8025868c&gt;] (platform_drv_remove+0x18/0x1c)
[&lt;8025868c&gt;] (platform_drv_remove+0x18/0x1c) from [&lt;80256f60&gt;] (__device_release_driver+0x70/0xcc)
[&lt;80256f60&gt;] (__device_release_driver+0x70/0xcc) from [&lt;80257770&gt;] (driver_detach+0xcc/0xd0)
[&lt;80257770&gt;] (driver_detach+0xcc/0xd0) from [&lt;80256d90&gt;] (bus_remove_driver+0x7c/0xc0)
[&lt;80256d90&gt;] (bus_remove_driver+0x7c/0xc0) from [&lt;80068668&gt;] (SyS_delete_module+0x144/0x1f8)
[&lt;80068668&gt;] (SyS_delete_module+0x144/0x1f8) from [&lt;8000e080&gt;] (ret_fast_syscall+0x0/0x30)
---[ end trace 1f5df9ad54996300 ]---
------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
Modules linked in: spi_imx(-) [last unloaded: ev76c560]
CPU: 1 PID: 16337 Comm: rmmod Tainted: G        W    3.10.17-80548-g90191eb-dirty #33
[&lt;80013b4c&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;800115dc&gt;] (show_stack+0x10/0x14)
[&lt;800115dc&gt;] (show_stack+0x10/0x14) from [&lt;800257b8&gt;] (warn_slowpath_common+0x4c/0x68)
[&lt;800257b8&gt;] (warn_slowpath_common+0x4c/0x68) from [&lt;800257f0&gt;] (warn_slowpath_null+0x1c/0x24)
[&lt;800257f0&gt;] (warn_slowpath_null+0x1c/0x24) from [&lt;803f60ec&gt;] (clk_disable+0x18/0x24)
[&lt;803f60ec&gt;] (clk_disable+0x18/0x24) from [&lt;7f02c9e8&gt;] (spi_imx_remove+0x70/0x9c [spi_imx])
[&lt;7f02c9e8&gt;] (spi_imx_remove+0x70/0x9c [spi_imx]) from [&lt;8025868c&gt;] (platform_drv_remove+0x18/0x1c)
[&lt;8025868c&gt;] (platform_drv_remove+0x18/0x1c) from [&lt;80256f60&gt;] (__device_release_driver+0x70/0xcc)
[&lt;80256f60&gt;] (__device_release_driver+0x70/0xcc) from [&lt;80257770&gt;] (driver_detach+0xcc/0xd0)
[&lt;80257770&gt;] (driver_detach+0xcc/0xd0) from [&lt;80256d90&gt;] (bus_remove_driver+0x7c/0xc0)
[&lt;80256d90&gt;] (bus_remove_driver+0x7c/0xc0) from [&lt;80068668&gt;] (SyS_delete_module+0x144/0x1f8)
[&lt;80068668&gt;] (SyS_delete_module+0x144/0x1f8) from [&lt;8000e080&gt;] (ret_fast_syscall+0x0/0x30)
---[ end trace 1f5df9ad54996301 ]---

Since commit 9e556dcc55774c9a1032f32baa0e5cfafede8b70, "spi: spi-imx: only
enable the clocks when we start to transfer a message", clocks are always
disabled except when transmitting messages.  There is thus no need to
disable them at module removal.

Fixes: 9e556dcc55774 (spi: spi-imx: only enable the clocks when we start to transfer a message)
Signed-off-by: Philippe De Muyter &lt;phdm@macqel.be&gt;
Acked-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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

Currently, at module removal, one gets the following warnings:
------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
Modules linked in: spi_imx(-) [last unloaded: ev76c560]
CPU: 1 PID: 16337 Comm: rmmod Tainted: G        W    3.10.17-80548-g90191eb-dirty #33
[&lt;80013b4c&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;800115dc&gt;] (show_stack+0x10/0x14)
[&lt;800115dc&gt;] (show_stack+0x10/0x14) from [&lt;800257b8&gt;] (warn_slowpath_common+0x4c/0x68)
[&lt;800257b8&gt;] (warn_slowpath_common+0x4c/0x68) from [&lt;800257f0&gt;] (warn_slowpath_null+0x1c/0x24)
[&lt;800257f0&gt;] (warn_slowpath_null+0x1c/0x24) from [&lt;803f60ec&gt;] (clk_disable+0x18/0x24)
[&lt;803f60ec&gt;] (clk_disable+0x18/0x24) from [&lt;7f02c9cc&gt;] (spi_imx_remove+0x54/0x9c [spi_imx])
[&lt;7f02c9cc&gt;] (spi_imx_remove+0x54/0x9c [spi_imx]) from [&lt;8025868c&gt;] (platform_drv_remove+0x18/0x1c)
[&lt;8025868c&gt;] (platform_drv_remove+0x18/0x1c) from [&lt;80256f60&gt;] (__device_release_driver+0x70/0xcc)
[&lt;80256f60&gt;] (__device_release_driver+0x70/0xcc) from [&lt;80257770&gt;] (driver_detach+0xcc/0xd0)
[&lt;80257770&gt;] (driver_detach+0xcc/0xd0) from [&lt;80256d90&gt;] (bus_remove_driver+0x7c/0xc0)
[&lt;80256d90&gt;] (bus_remove_driver+0x7c/0xc0) from [&lt;80068668&gt;] (SyS_delete_module+0x144/0x1f8)
[&lt;80068668&gt;] (SyS_delete_module+0x144/0x1f8) from [&lt;8000e080&gt;] (ret_fast_syscall+0x0/0x30)
---[ end trace 1f5df9ad54996300 ]---
------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
Modules linked in: spi_imx(-) [last unloaded: ev76c560]
CPU: 1 PID: 16337 Comm: rmmod Tainted: G        W    3.10.17-80548-g90191eb-dirty #33
[&lt;80013b4c&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;800115dc&gt;] (show_stack+0x10/0x14)
[&lt;800115dc&gt;] (show_stack+0x10/0x14) from [&lt;800257b8&gt;] (warn_slowpath_common+0x4c/0x68)
[&lt;800257b8&gt;] (warn_slowpath_common+0x4c/0x68) from [&lt;800257f0&gt;] (warn_slowpath_null+0x1c/0x24)
[&lt;800257f0&gt;] (warn_slowpath_null+0x1c/0x24) from [&lt;803f60ec&gt;] (clk_disable+0x18/0x24)
[&lt;803f60ec&gt;] (clk_disable+0x18/0x24) from [&lt;7f02c9e8&gt;] (spi_imx_remove+0x70/0x9c [spi_imx])
[&lt;7f02c9e8&gt;] (spi_imx_remove+0x70/0x9c [spi_imx]) from [&lt;8025868c&gt;] (platform_drv_remove+0x18/0x1c)
[&lt;8025868c&gt;] (platform_drv_remove+0x18/0x1c) from [&lt;80256f60&gt;] (__device_release_driver+0x70/0xcc)
[&lt;80256f60&gt;] (__device_release_driver+0x70/0xcc) from [&lt;80257770&gt;] (driver_detach+0xcc/0xd0)
[&lt;80257770&gt;] (driver_detach+0xcc/0xd0) from [&lt;80256d90&gt;] (bus_remove_driver+0x7c/0xc0)
[&lt;80256d90&gt;] (bus_remove_driver+0x7c/0xc0) from [&lt;80068668&gt;] (SyS_delete_module+0x144/0x1f8)
[&lt;80068668&gt;] (SyS_delete_module+0x144/0x1f8) from [&lt;8000e080&gt;] (ret_fast_syscall+0x0/0x30)
---[ end trace 1f5df9ad54996301 ]---

Since commit 9e556dcc55774c9a1032f32baa0e5cfafede8b70, "spi: spi-imx: only
enable the clocks when we start to transfer a message", clocks are always
disabled except when transmitting messages.  There is thus no need to
disable them at module removal.

Fixes: 9e556dcc55774 (spi: spi-imx: only enable the clocks when we start to transfer a message)
Signed-off-by: Philippe De Muyter &lt;phdm@macqel.be&gt;
Acked-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi: fsl-dspi: Fix getting correct address for master</title>
<updated>2014-03-22T21:01:58+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2014-02-14T04:49:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c9381cae8a2072c53bea7cd87c5ec517a1545121'/>
<id>c9381cae8a2072c53bea7cd87c5ec517a1545121</id>
<content type='text'>
commit 017145fef567430789e40f6a22a90ce2a766370b upstream.

Current code set platform drvdata to dspi. However, the code in dspi_suspend()
and dspi_resume() assumes the drvdata is the address of master.
Fix it by setting platform drvdata to master.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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

Current code set platform drvdata to dspi. However, the code in dspi_suspend()
and dspi_resume() assumes the drvdata is the address of master.
Fix it by setting platform drvdata to master.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi: coldfire-qspi: Fix getting correct address for *mcfqspi</title>
<updated>2014-03-22T21:01:57+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2014-02-14T01:53:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a0e004916ab80a3608e54f895af21d08ab36d08'/>
<id>4a0e004916ab80a3608e54f895af21d08ab36d08</id>
<content type='text'>
commit ee73b4c6e3fc0755a91752ab8eebc8e070038b53 upstream.

dev_get_drvdata() returns the address of master rather than mcfqspi.

Fixes: af361079 (spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions)
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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

dev_get_drvdata() returns the address of master rather than mcfqspi.

Fixes: af361079 (spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions)
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi: nuc900: Set SPI_LSB_FIRST for master-&gt;mode_bits if hw-&gt;pdata-&gt;lsb is true</title>
<updated>2014-02-22T21:32:26+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2014-01-20T15:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2376a9891b6658971bcc5c467acf3772f8a33eda'/>
<id>2376a9891b6658971bcc5c467acf3772f8a33eda</id>
<content type='text'>
commit f7db1588d6028c97c098bb6445eaabc56a25fed8 upstream.

Otherwise, spi_setup() fails with unsupported mode bits message.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

Otherwise, spi_setup() fails with unsupported mode bits message.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi: Fix crash with double message finalisation on error handling</title>
<updated>2014-02-22T21:32:25+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@linux-m68k.org</email>
</author>
<published>2014-01-28T09:33:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a446020f5ee8dd8d7b6522ac42933275f99d991'/>
<id>9a446020f5ee8dd8d7b6522ac42933275f99d991</id>
<content type='text'>
commit 1f802f8249a0da536877842c43c7204064c4de8b upstream.

This reverts commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d.

It causes a NULL pointer dereference with drivers using the generic
spi_transfer_one_message(), which always calls
spi_finalize_current_message(), which zeroes master-&gt;cur_msg.

Drivers implementing transfer_one_message() theirselves must always call
spi_finalize_current_message(), even if the transfer failed:

 * @transfer_one_message: the subsystem calls the driver to transfer a single
 *      message while queuing transfers that arrive in the meantime. When the
 *      driver is finished with this message, it must call
 *      spi_finalize_current_message() so the subsystem can issue the next
 *      transfer

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@linux-m68k.org&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

This reverts commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d.

It causes a NULL pointer dereference with drivers using the generic
spi_transfer_one_message(), which always calls
spi_finalize_current_message(), which zeroes master-&gt;cur_msg.

Drivers implementing transfer_one_message() theirselves must always call
spi_finalize_current_message(), even if the transfer failed:

 * @transfer_one_message: the subsystem calls the driver to transfer a single
 *      message while queuing transfers that arrive in the meantime. When the
 *      driver is finished with this message, it must call
 *      spi_finalize_current_message() so the subsystem can issue the next
 *      transfer

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@linux-m68k.org&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi/pxa2xx: initialize DMA channels to -1 to prevent inadvertent match</title>
<updated>2014-02-13T21:50:15+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2014-01-13T09:17:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b1d74b1836ecf6d1a4f19c7b2bd89b7c11ce101b'/>
<id>b1d74b1836ecf6d1a4f19c7b2bd89b7c11ce101b</id>
<content type='text'>
commit 483c319188c74e82b29a0ed7a7fa7065570f2193 upstream.

Commit cddb339badb0 (spi/pxa2xx: convert to dma_request_slave_channel_compat())
converted the driver to use ACPI provided DMA helpers but it forgot to
initialize the platform data for the channels to -1. Failing to do so will
result inadvertent match in the filter function because 0 is a valid
channel number.

Prevent this from happening by initializing both platform data channels
correctly to -1.

Fixes: cddb339badb0 (spi/pxa2xx: convert to dma_request_slave_channel_compat())
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

Commit cddb339badb0 (spi/pxa2xx: convert to dma_request_slave_channel_compat())
converted the driver to use ACPI provided DMA helpers but it forgot to
initialize the platform data for the channels to -1. Failing to do so will
result inadvertent match in the filter function because 0 is a valid
channel number.

Prevent this from happening by initializing both platform data channels
correctly to -1.

Fixes: cddb339badb0 (spi/pxa2xx: convert to dma_request_slave_channel_compat())
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spidev: fix hang when transfer_one_message fails</title>
<updated>2014-02-13T21:50:15+00:00</updated>
<author>
<name>Daniel Santos</name>
<email>daniel.santos@pobox.com</email>
</author>
<published>2014-01-05T23:39:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=24175707cb728921b5ad1cf1095d1600a07dda2e'/>
<id>24175707cb728921b5ad1cf1095d1600a07dda2e</id>
<content type='text'>
commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d upstream.

This corrects a problem in spi_pump_messages() that leads to an spi
message hanging forever when a call to transfer_one_message() fails.
This failure occurs in my MCP2210 driver when the cs_change bit is set
on the last transfer in a message, an operation which the hardware does
not support.

Rationale
Since the transfer_one_message() returns an int, we must presume that it
may fail.  If transfer_one_message() should never fail, it should return
void.  Thus, calls to transfer_one_message() should properly manage a
failure.

Fixes: ffbbdd21329f3 (spi: create a message queueing infrastructure)
Signed-off-by: Daniel Santos &lt;daniel.santos@pobox.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

This corrects a problem in spi_pump_messages() that leads to an spi
message hanging forever when a call to transfer_one_message() fails.
This failure occurs in my MCP2210 driver when the cs_change bit is set
on the last transfer in a message, an operation which the hardware does
not support.

Rationale
Since the transfer_one_message() returns an int, we must presume that it
may fail.  If transfer_one_message() should never fail, it should return
void.  Thus, calls to transfer_one_message() should properly manage a
failure.

Fixes: ffbbdd21329f3 (spi: create a message queueing infrastructure)
Signed-off-by: Daniel Santos &lt;daniel.santos@pobox.com&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
