aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vme/vme.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-10-04vme: print unhandled VME access errorsDmitry Kalinkin1-0/+7
This will enable error messages for accesses done through mmap. Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Acked-by: Martyn Welch <martyn@welchs.me.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04vme: change bus error handling schemeDmitry Kalinkin1-58/+34
The current VME bus error handler adds errors to the bridge error list. vme_master_{read,write} then traverses that list to look for relevant errors. Such scheme didn't work well for accesses going through vme_master_mmap because they would also allocate a vme_bus_error, but have no way to do vme_clear_errors call to free that memory. This changes the error handling process to be other way around: now vme_master_{read,write} defines a window in VME address space that will catch possible errors. VME bus error interrupt only traverses these windows and marks those that had errors in them. Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Cc: Igor Alekseev <igor.alekseev@itep.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04vme: include address space in error filteringDmitry Kalinkin1-20/+41
Also changes vme_bus_error_handler to take generic address modifier code instead of raw contents of a device-specific attribute register. Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Cc: Igor Alekseev <igor.alekseev@itep.ru> Acked-by: Martyn Welch <martyn@welchs.me.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04vme: move tsi148 error handling into VME subsystemDmitry Kalinkin1-0/+86
Error handling code found in tsi148 is not device specific. In fact it already relies on shared vme_bus_error struct and vme_bridge.vme_errors field. The other bridge driver could reuse this code if it is shared. This introduces a slight behavior change: vme error message won't be triggered in a rare case when err_chk=1 and kmalloc fails. Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Cc: Igor Alekseev <igor.alekseev@itep.ru> Acked-by: Martyn Welch <martyn@welchs.me.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12vme: export vme_check_window()Dmitry Kalinkin1-2/+3
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Cc: Igor Alekseev <igor.alekseev@itep.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12vme: check for A64 overflow in vme_check_window()Dmitry Kalinkin1-4/+2
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Cc: Igor Alekseev <igor.alekseev@itep.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: vme: mmap() support for vme_userDmitry Kalinkin1-0/+26
We also make sure that user won't be able to reconfigure the window while it is mmap'ed. Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Cc: Martyn Welch <martyn.welch@ge.com> Cc: Igor Alekseev <igor.alekseev@itep.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12vme: fix misspelling of current function in stringJulia Lawall1-1/+1
Replace a misspelled function name by %s and then __func__. This is the get function, not the set function, as was indicated by the string. This was done using Coccinelle, including the use of Levenshtein distance, as proposed by Rasmus Villemoes. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17vme: Convert VME core to register as a subsystemAaron Sierra1-5/+1
Previously, VME bridge support was treated as any other driver (using module_init() macro), but if VME bridge and vme_user (staging) drivers were compiled into the kernel, then vme_user would attempt to register itself before the VME core support had been loaded. This would result in a kernel panic. The load order of these built-in drivers is based on the order in which drivers/staging/vme and driver/vme are compiled. This patch changes the VME core driver to use the subsys_initcall() macro which ensures that it is loaded before all other VME drivers regardless of the order in which they are compiled. Tested-by: Aaron Sierra <asierra@xes-inc.com> Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03VME: Rename vme_slot_get to avoid confusion with reference countingMartyn Welch1-3/+3
Traditionally the "get" functions increment the reference count of the object that is returned, which does not happen with vme_slot_get. The function vme_slot_get returns the physical VME slot associated with a particular struct vme_dev. Rename vme_slot_num to avoid any confusion. Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03VME: Provide access to VME bus enumeration and fix vme_user match functionMartyn Welch1-0/+13
The match function for vme_user is completely wrong. It will blindly bind against the first VME slot on each bus (at this point that would be just the first bus as the driver can only handle one bus). The original intention (before some major subsystem changes) was that the driver bind against the slot to which the bridge was attached in the VME system and to the bus(es) provided via the "bus" module parameter. To do this cleanly (i.e. without poking arround in the subsystems internal stuctures) a functionality has been added to provide access to the bus enumeration. Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06vme: Free DMA resource allocation structureMartyn Welch1-0/+2
There is a memory leak in the function vme_dma_free(). The resource structure allocated in vme_dma_request() needs to be free'd in vme_dma_free(). Reported-by: De Roo, Steven <steven.deroo@arcelormittal.com> Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-14vme: add missing put_device() after device_register() failsEmilio G. Cota1-0/+1
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 <cota@braap.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-26Staging: VME: move VME drivers out of stagingGreg Kroah-Hartman1-0/+1517
This moves the VME core, VME board drivers, and VME bridge drivers out of the drivers/staging/vme/ area to drivers/vme/. The VME device drivers have not moved out yet due to some API questions they are still working through, that should happen soon, hopefully. Cc: Martyn Welch <martyn.welch@ge.com> Cc: Manohar Vanga <manohar.vanga@cern.ch> Cc: Vincent Bossier <vincent.bossier@gmail.com> Cc: "Emilio G. Cota" <cota@braap.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>