<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/vme, branch v4.11.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.11.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.11.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-01-25T10:41:44Z</updated>
<entry>
<title>VME: restore bus_remove function causing incomplete module unload</title>
<updated>2017-01-25T10:41:44Z</updated>
<author>
<name>Stefano Babic</name>
<email>sbabic@denx.de</email>
</author>
<published>2017-01-20T15:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9797484ba83d68f18fe1cbd964b7cd830f78f0f7'/>
<id>urn:sha1:9797484ba83d68f18fe1cbd964b7cd830f78f0f7</id>
<content type='text'>
Commit 050c3d52cc7810d9d17b8cd231708609af6876ae ("vme: make core
vme support explicitly non-modular") dropped the remove function
because it appeared as if it was for removal of the bus, which is
not supported.

However, vme_bus_remove() is called when a VME device is removed
from the bus and not when the bus is removed; as it calls the VME
device driver's cleanup function.  Without this function, the
remove() in the VME device driver is never called and VME device
drivers cannot be reloaded again.

Here we restore the remove function that was deleted in that
commit, and the reference to the function in the bus structure.

Fixes: 050c3d52cc78 ("vme: make core vme support explicitly non-modular")
Cc: Manohar Vanga &lt;manohar.vanga@gmail.com&gt;
Acked-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Cc: devel@driverdev.osuosl.org
Signed-off-by: Stefano Babic &lt;sbabic@denx.de&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 4.9
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vme: Fix wrong pointer utilization in ca91cx42_slave_get</title>
<updated>2017-01-11T09:42:16Z</updated>
<author>
<name>Augusto Mecking Caringi</name>
<email>augustocaringi@gmail.com</email>
</author>
<published>2017-01-10T10:45:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c8a6a09c1c617402cc9254b2bc8da359a0347d75'/>
<id>urn:sha1:c8a6a09c1c617402cc9254b2bc8da359a0347d75</id>
<content type='text'>
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>
</entry>
<entry>
<title>vme: vme_get_size potentially returning incorrect value on failure</title>
<updated>2016-10-28T12:25:18Z</updated>
<author>
<name>Martyn Welch</name>
<email>martyn@welchs.me.uk</email>
</author>
<published>2016-10-21T16:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6ad37567b6b886121e250036e489d82cde5e5e94'/>
<id>urn:sha1:6ad37567b6b886121e250036e489d82cde5e5e94</id>
<content type='text'>
The function vme_get_size returns the size of the window to the caller,
however it doesn't check the return value of the call to vme_master_get.

Return 0 on failure rather than anything else.

Suggested-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Martyn Welch &lt;martyn.welch@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vme: fake: remove unexpected unlock in fake_master_set()</title>
<updated>2016-09-27T10:43:35Z</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2016-09-17T01:57:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=db08948b97180a3c9f49ce91caf1fb643a8110be'/>
<id>urn:sha1:db08948b97180a3c9f49ce91caf1fb643a8110be</id>
<content type='text'>
image-&gt;lock is unlocked in some error handling path without take the
lock, so remove those unexpected unlock.

Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vme: fake: mark symbols static where possible</title>
<updated>2016-09-27T10:43:34Z</updated>
<author>
<name>Baoyou Xie</name>
<email>baoyou.xie@linaro.org</email>
</author>
<published>2016-09-23T13:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=58ccaae30322b13c587596adb39408fca2a5ef7f'/>
<id>urn:sha1:58ccaae30322b13c587596adb39408fca2a5ef7f</id>
<content type='text'>
We get 4 warnings when building kernel with W=1:
drivers/vme/bridges/vme_fake.c:384:6: warning: no previous prototype for 'fake_lm_check' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:619:6: warning: no previous prototype for 'fake_vmewrite8' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:649:6: warning: no previous prototype for 'fake_vmewrite16' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:679:6: warning: no previous prototype for 'fake_vmewrite32' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie &lt;baoyou.xie@linaro.org&gt;
Acked-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vme: fake: fix build for 64-bit dma_addr_t</title>
<updated>2016-09-13T15:30:17Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-09-06T12:59:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4b7b948b1fcde59d9a0085237be0060e825216fc'/>
<id>urn:sha1:4b7b948b1fcde59d9a0085237be0060e825216fc</id>
<content type='text'>
casting between dma_addr_t and a pointer is generally tricky,
as they might not be the same size and almost never point into
the same address space. With 32-bit ARM systems and LPAE, we
get this warning for the vme_fake driver that stores a pointer
in a dma_addr_t variable:

drivers/vme/bridges/vme_fake.c: In function 'fake_slave_set':
drivers/vme/bridges/vme_fake.c:204:29: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]

To make this clearer while fixing the warning, I'm adding
a set of helper functions for the type conversion.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vme: Adding Fake VME driver</title>
<updated>2016-08-31T11:21:12Z</updated>
<author>
<name>Martyn Welch</name>
<email>martyn@welchs.me.uk</email>
</author>
<published>2016-07-07T18:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=658bcdae9c6755806e66b33e29d56b33a3ff421a'/>
<id>urn:sha1:658bcdae9c6755806e66b33e29d56b33a3ff421a</id>
<content type='text'>
This patch introduces a fake VME bridge driver. This driver currently
emulates a subset of the VME bridge functionality. This allows some VME
subsystem development and even some VME device driver development to be
carried out in the absence of a proper VME bus.

Signed-off-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vme: make core vme support explicitly non-modular</title>
<updated>2016-08-31T11:20:16Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2016-07-03T18:05:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=050c3d52cc7810d9d17b8cd231708609af6876ae'/>
<id>urn:sha1:050c3d52cc7810d9d17b8cd231708609af6876ae</id>
<content type='text'>
The Kconfig currently controlling compilation of this code is:

drivers/vme/Kconfig:menuconfig VME_BUS
drivers/vme/Kconfig:    bool "VME bridge support"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

We replace module.h and moduleparam.h (unused) with init.h and also
export.h ; the latter since this file does export some syms.

Since this is a struct bus_type and not a platform_driver, we don't
have any ".suppress_bind_attrs" to be concerned about when we
drop the ".remove" code from this file.

Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.

Cc: Manohar Vanga &lt;manohar.vanga@gmail.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Acked-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vme: Fix module autoload</title>
<updated>2016-08-31T11:20:16Z</updated>
<author>
<name>Alessio Igor Bogani</name>
<email>alessio.bogani@elettra.eu</email>
</author>
<published>2016-06-14T14:36:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=553ebb8e40d5a9135be036cc6ebfdf40bdc1f710'/>
<id>urn:sha1:553ebb8e40d5a9135be036cc6ebfdf40bdc1f710</id>
<content type='text'>
These drivers have a PCI device ID table but the PCI module
alias information is not created so module autoloading won't work.

Signed-off-by: Alessio Igor Bogani &lt;alessio.bogani@elettra.eu&gt;
Acked-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vme: change LM callback argument to void pointer</title>
<updated>2016-08-31T11:20:15Z</updated>
<author>
<name>Aaron Sierra</name>
<email>asierra@xes-inc.com</email>
</author>
<published>2016-04-29T21:41:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fa54b326803d91b04705a6adf0ff963593a9fe5c'/>
<id>urn:sha1:fa54b326803d91b04705a6adf0ff963593a9fe5c</id>
<content type='text'>
Make the location monitor callback function prototype more useful by
changing the argument from an integer to a void pointer.

All VME bridge drivers were simply passing the location monitor index
(e.g. 0-3) as the argument to these callbacks. It is much more useful
to pass back a pointer to data that the callback-registering driver
cares about.

There appear to be no in-kernel callers of vme_lm_attach (or
vme_lme_request for that matter), so this change only affects the VME
subsystem and bridge drivers.

This has been tested with Tsi148 hardware, but the CA91Cx42 changes
have only been compiled.

Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Acked-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
