<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/vme, branch linux-3.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>vme: Fix wrong pointer utilization in ca91cx42_slave_get</title>
<updated>2017-06-20T12:04:07+00:00</updated>
<author>
<name>Augusto Mecking Caringi</name>
<email>augustocaringi@gmail.com</email>
</author>
<published>2017-01-10T10:45:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=23913c7fb34cf707471d63311926ec6e68421ec7'/>
<id>23913c7fb34cf707471d63311926ec6e68421ec7</id>
<content type='text'>
commit c8a6a09c1c617402cc9254b2bc8da359a0347d75 upstream.

In ca91cx42_slave_get function, the value pointed by vme_base pointer is
set through:

*vme_base = ioread32(bridge-&gt;base + CA91CX42_VSI_BS[i]);

So it must be dereferenced to be used in calculation of pci_base:

*pci_base = (dma_addr_t)*vme_base + pci_offset;

This bug was caught thanks to the following gcc warning:

drivers/vme/bridges/vme_ca91cx42.c: In function ‘ca91cx42_slave_get’:
drivers/vme/bridges/vme_ca91cx42.c:467:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
*pci_base = (dma_addr_t)vme_base + pci_offset;

Signed-off-by: Augusto Mecking Caringi &lt;augustocaringi@gmail.com&gt;
Acked-By: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c8a6a09c1c617402cc9254b2bc8da359a0347d75 upstream.

In ca91cx42_slave_get function, the value pointed by vme_base pointer is
set through:

*vme_base = ioread32(bridge-&gt;base + CA91CX42_VSI_BS[i]);

So it must be dereferenced to be used in calculation of pci_base:

*pci_base = (dma_addr_t)*vme_base + pci_offset;

This bug was caught thanks to the following gcc warning:

drivers/vme/bridges/vme_ca91cx42.c: In function ‘ca91cx42_slave_get’:
drivers/vme/bridges/vme_ca91cx42.c:467:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
*pci_base = (dma_addr_t)vme_base + pci_offset;

Signed-off-by: Augusto Mecking Caringi &lt;augustocaringi@gmail.com&gt;
Acked-By: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>VME: Correct read/write alignment algorithm</title>
<updated>2014-02-22T20:41:28+00:00</updated>
<author>
<name>Martyn Welch</name>
<email>martyn.welch@ge.com</email>
</author>
<published>2014-02-07T15:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c7677684ab70aff2f5f514f8827d315833bc6ac3'/>
<id>c7677684ab70aff2f5f514f8827d315833bc6ac3</id>
<content type='text'>
commit f0342e66b397947ed8c3eef8c37b5ca2d5b1bb50 upstream.

In order to ensure the correct width cycles on the VME bus, the VME bridge
drivers implement an algorithm to utilise the largest possible width reads and
writes whilst maintaining natural alignment constraints. The algorithm
currently looks at the start address rather than the current read/write address
when determining whether a 16-bit width cycle is required to get to 32-bit
alignment.  This results in incorrect alignment,

Reported-by: Jim Strouth &lt;james.strouth@ge.com&gt;
Tested-by: Jim Strouth &lt;james.strouth@ge.com&gt;
Signed-off-by: Martyn Welch &lt;martyn.welch@ge.com&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 f0342e66b397947ed8c3eef8c37b5ca2d5b1bb50 upstream.

In order to ensure the correct width cycles on the VME bus, the VME bridge
drivers implement an algorithm to utilise the largest possible width reads and
writes whilst maintaining natural alignment constraints. The algorithm
currently looks at the start address rather than the current read/write address
when determining whether a 16-bit width cycle is required to get to 32-bit
alignment.  This results in incorrect alignment,

Reported-by: Jim Strouth &lt;james.strouth@ge.com&gt;
Tested-by: Jim Strouth &lt;james.strouth@ge.com&gt;
Signed-off-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>vme: add missing put_device() after device_register() fails</title>
<updated>2013-02-14T17:24:14+00:00</updated>
<author>
<name>Emilio G. Cota</name>
<email>cota@braap.org</email>
</author>
<published>2013-02-13T18:47:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=def1820d25fa93cf5fca10bf45f22cdb11be41f2'/>
<id>def1820d25fa93cf5fca10bf45f22cdb11be41f2</id>
<content type='text'>
put_device() must be called after device_register() fails,
since device_register() always initializes the refcount
on the device structure.

Signed-off-by: Emilio G. Cota &lt;cota@braap.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>
put_device() must be called after device_register() fails,
since device_register() always initializes the refcount
on the device structure.

Signed-off-by: Emilio G. Cota &lt;cota@braap.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vme: vme_tsi148.c: use module_pci_driver to simplify the code</title>
<updated>2012-10-25T19:02:11+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2012-10-18T15:12:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=01c071439730013cc110dd321852b44432cf496c'/>
<id>01c071439730013cc110dd321852b44432cf496c</id>
<content type='text'>
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&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>
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vme: vme_ca91cx42.c: use module_pci_driver to simplify the code</title>
<updated>2012-10-25T19:02:10+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2012-10-18T15:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c7b50a2a29451f9a6ec6bc7fd4c8ad836297ffc4'/>
<id>c7b50a2a29451f9a6ec6bc7fd4c8ad836297ffc4</id>
<content type='text'>
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&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>
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vme: vme_vmivme7805.c: use module_pci_driver to simplify the code</title>
<updated>2012-10-25T19:02:10+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2012-10-18T15:15:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5f1e7790963f03c5789070b3954f38d038ad528b'/>
<id>5f1e7790963f03c5789070b3954f38d038ad528b</id>
<content type='text'>
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&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>
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vme: vme_ca91cx42.c: use list_for_each_safe() when delete list items</title>
<updated>2012-09-06T20:29:11+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2012-08-21T04:17:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=43f5e46c8e74046a969a3811d7760d1988a8f4bf'/>
<id>43f5e46c8e74046a969a3811d7760d1988a8f4bf</id>
<content type='text'>
Since we will be removing items off the list using list_del() we need
to use a safer version of the list_for_each() macro aptly named
list_for_each_safe(). We should use the safe macro if the loop
involves deletions of items.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&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>
Since we will be removing items off the list using list_del() we need
to use a safer version of the list_for_each() macro aptly named
list_for_each_safe(). We should use the safe macro if the loop
involves deletions of items.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vme: vme_tsi148.c: fix to use list_for_each_safe() when delete list items</title>
<updated>2012-09-06T20:29:11+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2012-08-21T04:19:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b49c32ba2ca3b51ddbb863ff139adca6b85b7543'/>
<id>b49c32ba2ca3b51ddbb863ff139adca6b85b7543</id>
<content type='text'>
Since we will be removing items off the list using list_del() we need
to use a safer version of the list_for_each() macro aptly named
list_for_each_safe().

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&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>
Since we will be removing items off the list using list_del() we need
to use a safer version of the list_for_each() macro aptly named
list_for_each_safe().

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>VME: Prevent D16 cycles being split into 8-bit blocks</title>
<updated>2012-07-19T22:39:39+00:00</updated>
<author>
<name>Martyn Welch</name>
<email>martyn.welch@ge.com</email>
</author>
<published>2012-07-19T16:48:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=363e2e6f9e2d9ca53fb87e3988e2a225dc879aa4'/>
<id>363e2e6f9e2d9ca53fb87e3988e2a225dc879aa4</id>
<content type='text'>
The memcpy_fromio() and memcpy_toio() functions use the __memcpy() function,
at least on x86. This function carries out transfers smaller than 32 bits as
multiple 8 bit transfers, causing a single (aligned) 16 bit transfer to be
split into 2 8 bit transfers which may not be supported by the target VME
device.

The commit 53059aa05988761a738fa8bc082bbf3c5d4462d1 fixed this for the
ca91cx42, however this was not fixed for the tsi148 at the time. This patch
uses the same algorithm to fix the tsi148.

Reported-by: Daniel Lambert &lt;daniel.lambert@clermont.in2p3.fr&gt;
Signed-off-by: Martyn Welch &lt;martyn.welch@ge.com&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>
The memcpy_fromio() and memcpy_toio() functions use the __memcpy() function,
at least on x86. This function carries out transfers smaller than 32 bits as
multiple 8 bit transfers, causing a single (aligned) 16 bit transfer to be
split into 2 8 bit transfers which may not be supported by the target VME
device.

The commit 53059aa05988761a738fa8bc082bbf3c5d4462d1 fixed this for the
ca91cx42, however this was not fixed for the tsi148 at the time. This patch
uses the same algorithm to fix the tsi148.

Reported-by: Daniel Lambert &lt;daniel.lambert@clermont.in2p3.fr&gt;
Signed-off-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>VME: Move API documentation to Documentation folder</title>
<updated>2012-05-08T23:01:34+00:00</updated>
<author>
<name>Martyn Welch</name>
<email>martyn.welch@ge.com</email>
</author>
<published>2012-05-03T16:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cc4729826fd1a478f235fbcf58c0f97663f8d7e3'/>
<id>cc4729826fd1a478f235fbcf58c0f97663f8d7e3</id>
<content type='text'>
The documentation for the VME device driver API is currently in
drivers/vme/vme_api.txt, move this to Documentation/vme_api.txt

Signed-of-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Acked-by: Rob Landley &lt;rob@landley.net&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>
The documentation for the VME device driver API is currently in
drivers/vme/vme_api.txt, move this to Documentation/vme_api.txt

Signed-of-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Acked-by: Rob Landley &lt;rob@landley.net&gt;

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
