<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/staging/vme, branch linux-3.2.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-03-16T02:18:42+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=8fe8b955047d49e82b82ddd3da52247b57c8404f'/>
<id>8fe8b955047d49e82b82ddd3da52247b57c8404f</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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: rename USER_BUS_MAX to VME_USER_BUS_MAX</title>
<updated>2011-10-17T22:43:13+00:00</updated>
<author>
<name>Manohar Vanga</name>
<email>manohar.vanga@cern.ch</email>
</author>
<published>2011-09-26T09:27:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0a4b6b0279d903df2d62aaf92edf360fb5312532'/>
<id>0a4b6b0279d903df2d62aaf92edf360fb5312532</id>
<content type='text'>
Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Reviewed-by: Emilio G. Cota &lt;cota@braap.org&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>
Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Reviewed-by: Emilio G. Cota &lt;cota@braap.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme: get rid of struct vme_device_id and slots</title>
<updated>2011-10-17T22:43:13+00:00</updated>
<author>
<name>Manohar Vanga</name>
<email>manohar.vanga@cern.ch</email>
</author>
<published>2011-09-26T09:27:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a916a391d3e19593a104a8c3c4779a3084f1ca5b'/>
<id>a916a391d3e19593a104a8c3c4779a3084f1ca5b</id>
<content type='text'>
Previously, the device-driver matching mechanism depended on the
vme_device_id structure due to the need for a bind table per driver.
This method of matching is no longer used so this patch merges the
fields of struct vme_device_id into struct vme_dev. Since this also
renders the slot field meaningless, it has also been removed in this
patch.

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Reviewed-by: Emilio G. Cota &lt;cota@braap.org&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>
Previously, the device-driver matching mechanism depended on the
vme_device_id structure due to the need for a bind table per driver.
This method of matching is no longer used so this patch merges the
fields of struct vme_device_id into struct vme_dev. Since this also
renders the slot field meaningless, it has also been removed in this
patch.

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Reviewed-by: Emilio G. Cota &lt;cota@braap.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme: make match() driver specific to improve non-VME64x support</title>
<updated>2011-10-17T22:43:13+00:00</updated>
<author>
<name>Manohar Vanga</name>
<email>manohar.vanga@cern.ch</email>
</author>
<published>2011-09-26T09:27:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5d6abf379d73efe390488e8edba972af4e93cb1c'/>
<id>5d6abf379d73efe390488e8edba972af4e93cb1c</id>
<content type='text'>
For jumper based boards (non VME64x), there is no mechanism
for detecting the card that is plugged into a specific slot. This
leads to issues in non-autodiscovery crates/cards when a card is
plugged into a slot that is "claimed" by a different driver. In
reality, there is no problem, but the driver rejects such a
configuration due to its dependence on the concept of slots.

This patch makes the concept of slots less critical and pushes the
driver match() to individual drivers (similar to what happens in the
ISA bus in driver/base/isa.c). This allows drivers to register the
number of devices that they expect without any restrictions. Devices
in this new model are now formatted as $driver_name-$bus_id.$device_id
(as compared to the earlier vme-$bus_id.$slot_number).

This model also makes the device model more logical as devices
are only registered when they actually exist whereas earlier,
a set of devices were being created automatically regardless of
them actually being there.

Another change introduced in this patch is that devices are now created
within the VME driver structure rather than in the VME bridge structure.
This way, things don't go haywire if the bridge driver is removed while
a driver is using it.

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Reviewed-by: Emilio G. Cota &lt;cota@braap.org&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>
For jumper based boards (non VME64x), there is no mechanism
for detecting the card that is plugged into a specific slot. This
leads to issues in non-autodiscovery crates/cards when a card is
plugged into a slot that is "claimed" by a different driver. In
reality, there is no problem, but the driver rejects such a
configuration due to its dependence on the concept of slots.

This patch makes the concept of slots less critical and pushes the
driver match() to individual drivers (similar to what happens in the
ISA bus in driver/base/isa.c). This allows drivers to register the
number of devices that they expect without any restrictions. Devices
in this new model are now formatted as $driver_name-$bus_id.$device_id
(as compared to the earlier vme-$bus_id.$slot_number).

This model also makes the device model more logical as devices
are only registered when they actually exist whereas earlier,
a set of devices were being created automatically regardless of
them actually being there.

Another change introduced in this patch is that devices are now created
within the VME driver structure rather than in the VME bridge structure.
This way, things don't go haywire if the bridge driver is removed while
a driver is using it.

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Reviewed-by: Emilio G. Cota &lt;cota@braap.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme: add struct vme_dev for VME devices</title>
<updated>2011-10-17T22:43:13+00:00</updated>
<author>
<name>Manohar Vanga</name>
<email>manohar.vanga@cern.ch</email>
</author>
<published>2011-09-26T09:27:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8f966dc444b11adff6011a1d1fce424abdd876d8'/>
<id>8f966dc444b11adff6011a1d1fce424abdd876d8</id>
<content type='text'>
Instead of using a vanilla 'struct device' for VME devices, add new
'struct vme_dev'. Modifications have been made to the VME framework
API as well as all in-tree VME drivers.

The new vme_dev structure has the following advantages from the
current model used by the driver:

    * Driver functions (probe, remove) now receive a VME device
      instead of a pointer to the bridge device (cleaner design)
    * It's easier to differenciate API calls as bridge-based or
      device-based (ie. cleaner interface).

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Reviewed-by: Emilio G. Cota &lt;cota@braap.org&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>
Instead of using a vanilla 'struct device' for VME devices, add new
'struct vme_dev'. Modifications have been made to the VME framework
API as well as all in-tree VME drivers.

The new vme_dev structure has the following advantages from the
current model used by the driver:

    * Driver functions (probe, remove) now receive a VME device
      instead of a pointer to the bridge device (cleaner design)
    * It's easier to differenciate API calls as bridge-based or
      device-based (ie. cleaner interface).

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Reviewed-by: Emilio G. Cota &lt;cota@braap.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme: change static device array to pointers</title>
<updated>2011-09-09T20:26:32+00:00</updated>
<author>
<name>Manohar Vanga</name>
<email>manohar.vanga@cern.ch</email>
</author>
<published>2011-09-01T09:15:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f6c39d4f2d350df049a844b658eb6b08c5833e51'/>
<id>f6c39d4f2d350df049a844b658eb6b08c5833e51</id>
<content type='text'>
Change the static array of 'struct device''s in struct vme_bridge
to instead use an array of pointers. This is in accordance with the
requirement that all kobjects be dynamically allocated (see
Documentation/kobject.txt) and never be statically allocated.

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.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>
Change the static array of 'struct device''s in struct vme_bridge
to instead use an array of pointers. This is in accordance with the
requirement that all kobjects be dynamically allocated (see
Documentation/kobject.txt) and never be statically allocated.

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme: keep track of registered buses</title>
<updated>2011-08-23T22:10:50+00:00</updated>
<author>
<name>Manohar Vanga</name>
<email>manohar.vanga@cern.ch</email>
</author>
<published>2011-08-12T10:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=733e3ef0d364b7e6757a897e7f1862a70c89305a'/>
<id>733e3ef0d364b7e6757a897e7f1862a70c89305a</id>
<content type='text'>
This patch adds a list which keeps track of all registered VME
buses. This is required for adding refcounting later to bridge
modules, something that is not currently implemented.

This is based on the changes introduced by Emilio G. Cota in the
patch:

    https://lkml.org/lkml/2010/10/25/486

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.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>
This patch adds a list which keeps track of all registered VME
buses. This is required for adding refcounting later to bridge
modules, something that is not currently implemented.

This is based on the changes introduced by Emilio G. Cota in the
patch:

    https://lkml.org/lkml/2010/10/25/486

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme: make [alloc|free]_consistent bridge specific</title>
<updated>2011-08-23T22:08:09+00:00</updated>
<author>
<name>Manohar Vanga</name>
<email>manohar.vanga@cern.ch</email>
</author>
<published>2011-08-10T09:33:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7f58f0255aec0b933e0b26ef64d3d533c362a3d3'/>
<id>7f58f0255aec0b933e0b26ef64d3d533c362a3d3</id>
<content type='text'>
Make PCI dependent functions ([alloc|free]_consistent() in
'vme.c') bridge specific. By removing the dependency of the
VME bridge framework on PCI, this patch allows for addition of
non-PCI based VME bridges.

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Acked-by: Dan Carpenter &lt;error27@gmail.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>
Make PCI dependent functions ([alloc|free]_consistent() in
'vme.c') bridge specific. By removing the dependency of the
VME bridge framework on PCI, this patch allows for addition of
non-PCI based VME bridges.

Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Acked-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: change kmalloc+memset to kzalloc</title>
<updated>2011-08-23T22:05:02+00:00</updated>
<author>
<name>Manohar Vanga</name>
<email>manohar.vanga@cern.ch</email>
</author>
<published>2011-08-01T10:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=34a678110ac5d2f1b694c8b9df5cccb1a2607721'/>
<id>34a678110ac5d2f1b694c8b9df5cccb1a2607721</id>
<content type='text'>
Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.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>
Signed-off-by: Manohar Vanga &lt;manohar.vanga@cern.ch&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: VME: Introduce IOCTL to generate VME interrupts.</title>
<updated>2011-06-28T21:13:05+00:00</updated>
<author>
<name>Vincent Bossier</name>
<email>vincent.bossier@gmail.com</email>
</author>
<published>2011-06-09T13:49:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dca22184262de0171bafdf613a8d3992a818b70f'/>
<id>dca22184262de0171bafdf613a8d3992a818b70f</id>
<content type='text'>
The vme_irq_set is oblviously not needed (a remnant from old tests) and the
IOCTL exchange types have been updated following Greg's comments.

Allow the IOCTL call to generate VME interrupts when called on the vme/ctl
device with the right arguments.

Signed-off-by: Vincent Bossier &lt;vincent.bossier@gmail.com&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.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>
The vme_irq_set is oblviously not needed (a remnant from old tests) and the
IOCTL exchange types have been updated following Greg's comments.

Allow the IOCTL call to generate VME interrupts when called on the vme/ctl
device with the right arguments.

Signed-off-by: Vincent Bossier &lt;vincent.bossier@gmail.com&gt;
Acked-by: Martyn Welch &lt;martyn.welch@ge.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
