<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/vme, branch v3.18.136</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>vme: ca91cx42: fix LM_CTL address mask</title>
<updated>2018-12-17T09:07:12+00:00</updated>
<author>
<name>Dmitry Kalinkin</name>
<email>dmitry.kalinkin@gmail.com</email>
</author>
<published>2015-05-28T12:07:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ecf8d2b259c29edfea037b55c02d76613f9dcb06'/>
<id>ecf8d2b259c29edfea037b55c02d76613f9dcb06</id>
<content type='text'>
commit 5a2f8831243337dd05df42174b4d7b1e01daacda upstream.

Universe II datasheet defines following address space values
for LM_CTL[16:18]

000=A16
001=A24
010=A32
011,100,101=Reserved
110=User1
111=User2

Mask 5&lt;&lt;16 is not the right one for matching [16:18], instead we should
use 7&lt;&lt;16.

Signed-off-by: Dmitry Kalinkin &lt;dmitry.kalinkin@gmail.com&gt;
Cc: Igor Alekseev &lt;igor.alekseev@itep.ru&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.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 5a2f8831243337dd05df42174b4d7b1e01daacda upstream.

Universe II datasheet defines following address space values
for LM_CTL[16:18]

000=A16
001=A24
010=A32
011,100,101=Reserved
110=User1
111=User2

Mask 5&lt;&lt;16 is not the right one for matching [16:18], instead we should
use 7&lt;&lt;16.

Signed-off-by: Dmitry Kalinkin &lt;dmitry.kalinkin@gmail.com&gt;
Cc: Igor Alekseev &lt;igor.alekseev@itep.ru&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>vme: Fix wrong pointer utilization in ca91cx42_slave_get</title>
<updated>2018-12-17T09:07:12+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=4d94d6b2d7284fb3894fd0164f22ffb5ba7b725d'/>
<id>4d94d6b2d7284fb3894fd0164f22ffb5ba7b725d</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;
Cc: stable &lt;stable@vger.kernel.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 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;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>vme: bridges: use pci_zalloc_consistent</title>
<updated>2014-08-08T22:57:30+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-08T21:24:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=88b2608c49b7fe3d9131d5a1d4a03438a589997c'/>
<id>88b2608c49b7fe3d9131d5a1d4a03438a589997c</id>
<content type='text'>
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Cc: Manohar Vanga &lt;manohar.vanga@gmail.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Cc: Manohar Vanga &lt;manohar.vanga@gmail.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>VME: remove duplicate CA91CX42_DCTL_VDW_M define</title>
<updated>2014-07-09T23:33:42+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-06-09T15:12:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3915fc87dee83947f219f9347d47674f48c8c022'/>
<id>3915fc87dee83947f219f9347d47674f48c8c022</id>
<content type='text'>
The CA91CX42_DCTL_VDW_M define is cut and pasted twice so we can delete
the second instance.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.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 CA91CX42_DCTL_VDW_M define is cut and pasted twice so we can delete
the second instance.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vme_tsi148: Utilize to_pci_dev() macro</title>
<updated>2014-04-16T21:08:37+00:00</updated>
<author>
<name>Aaron Sierra</name>
<email>asierra@xes-inc.com</email>
</author>
<published>2014-04-03T19:48:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=177581faf2a5aa71898d223bc47dbc882eeb1488'/>
<id>177581faf2a5aa71898d223bc47dbc882eeb1488</id>
<content type='text'>
Save some characters by using to_pci_dev() instead of container_of().

Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.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>
Save some characters by using to_pci_dev() instead of container_of().

Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vme_tsi148: Fix PCI address mapping assumption</title>
<updated>2014-04-16T21:08:37+00:00</updated>
<author>
<name>Joe Schultz</name>
<email>jschultz@xes-inc.com</email>
</author>
<published>2014-04-03T19:48:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=226572b110ab6083cb8c1d6afb191166b4178179'/>
<id>226572b110ab6083cb8c1d6afb191166b4178179</id>
<content type='text'>
Previously, tsi148_master_set() assumed the address contained in its
PCI bus resource represented the actual PCI bus address. This is a fine
assumption on some platforms. However, on platforms that don't use a
1:1 (CPU:PCI) mapping this results in the tsi148 driver configuring an
invalid master window translation.

This patch updates the vme_tsi148 driver to first convert the address
contained in the PCI bus resource into a PCI bus address before using
it.

[asierra: account for pcibios_resource_to_bus() prototype change]
Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.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>
Previously, tsi148_master_set() assumed the address contained in its
PCI bus resource represented the actual PCI bus address. This is a fine
assumption on some platforms. However, on platforms that don't use a
1:1 (CPU:PCI) mapping this results in the tsi148 driver configuring an
invalid master window translation.

This patch updates the vme_tsi148 driver to first convert the address
contained in the PCI bus resource into a PCI bus address before using
it.

[asierra: account for pcibios_resource_to_bus() prototype change]
Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vme_tsi148: Fix typo in tsi148_slave_get()</title>
<updated>2014-04-16T21:08:37+00:00</updated>
<author>
<name>Joe Schultz</name>
<email>jschultz@xes-inc.com</email>
</author>
<published>2014-04-03T19:47:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=098ced8fefe4a4e4240fa47b1ed9b00d65b6cd21'/>
<id>098ced8fefe4a4e4240fa47b1ed9b00d65b6cd21</id>
<content type='text'>
This patch corrects a typo where "vme_base" was used instead of
"*vme_base". The typo resulted in an incorrect value being returned
to userspace (via vme_user).

It also removes the following compile warning on some platforms:

warning: cast from pointer to integer of different size

[asierra: commit title/log rewording]
Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.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>
This patch corrects a typo where "vme_base" was used instead of
"*vme_base". The typo resulted in an incorrect value being returned
to userspace (via vme_user).

It also removes the following compile warning on some platforms:

warning: cast from pointer to integer of different size

[asierra: commit title/log rewording]
Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 3.14-rc3 into char-misc-next</title>
<updated>2014-02-18T16:09:40+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2014-02-18T16:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ba4b60e85d6c5fc2242fd24e131a47fb922e5d89'/>
<id>ba4b60e85d6c5fc2242fd24e131a47fb922e5d89</id>
<content type='text'>
We need the fixes here for future mei and other patches.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need the fixes here for future mei and other patches.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>VME: Stop using memcpy_[to|from]io() due to unwanted behaviour</title>
<updated>2014-02-15T19:53:39+00:00</updated>
<author>
<name>Martyn Welch</name>
<email>martyn.welch@ge.com</email>
</author>
<published>2014-02-06T13:35:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a2a720e15f59be60c7ae1c58b5b4ac1003dd5078'/>
<id>a2a720e15f59be60c7ae1c58b5b4ac1003dd5078</id>
<content type='text'>
The ca91cx42 and tsi148 VME bridges use the width of reads and writes on the
PCI bus in part to control the width of the cycles on the VME bus. It is
important that we can control the width of cycles on the VME bus as some VME
hardware requires cycles of a specific width. The memcpy_toio() and
memcpy_fromio() functions do not provide sufficient control, so instead loop
using ioread functions.

Reported-by: Michael Kenney &lt;mfkenney@gmail.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>
The ca91cx42 and tsi148 VME bridges use the width of reads and writes on the
PCI bus in part to control the width of the cycles on the VME bus. It is
important that we can control the width of cycles on the VME bus as some VME
hardware requires cycles of a specific width. The memcpy_toio() and
memcpy_fromio() functions do not provide sufficient control, so instead loop
using ioread functions.

Reported-by: Michael Kenney &lt;mfkenney@gmail.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: Correct read/write alignment algorithm</title>
<updated>2014-02-07T16:16:14+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=f0342e66b397947ed8c3eef8c37b5ca2d5b1bb50'/>
<id>f0342e66b397947ed8c3eef8c37b5ca2d5b1bb50</id>
<content type='text'>
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;
Cc: stable &lt;stable@vger.kernel.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>
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;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
