18 Oct, 2011
4 commits
-
Signed-off-by: Manohar Vanga
Cc: Martyn Welch
Reviewed-by: Emilio G. Cota
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Martyn Welch
Reviewed-by: Emilio G. Cota
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Martyn Welch
Reviewed-by: Emilio G. Cota
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Martyn Welch
Reviewed-by: Emilio G. Cota
Signed-off-by: Greg Kroah-Hartman
10 Sep, 2011
1 commit
-
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
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
24 Aug, 2011
3 commits
-
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
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
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
Acked-by: Martyn Welch
Acked-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Manohar Vanga
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
29 Jun, 2011
5 commits
-
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
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
The wait_event_interruptible call requires a condition as second argument that
needs to be true sometimes, which is obviously not the case with '0'. The new
logic is inspired from the tsi148 driver and takes into account Universe II chip
specifics.Signed-off-by: Vincent Bossier
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Resurrect the vme/ctl device by allowing to open it even if it has no resources
and make related read/write/llseek operations dummy.Signed-off-by: Vincent Bossier
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
The driver must acknowledge the interrupts that have been actually serviced, not
the ones active. The current code could acknowledge an interrupt that has not
been serviced at all.Signed-off-by: Vincent Bossier
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
This patch solves all the existing issues reported by checkpatch.pl in the VME
sub-system.Signed-off-by: Vincent Bossier
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
15 Mar, 2011
1 commit
-
This patch was generated by the following semantic patch:
//
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
//Signed-off-by: Ilia Mirkin
Signed-off-by: Greg Kroah-Hartman
01 Mar, 2011
2 commits
-
Remove some more unreachable code found in bridges/vme_ca91cx42.c
and bridges/vme_tsi148.cSigned-off-by: Manohar Vanga
Signed-off-by: Greg Kroah-Hartman -
Remove some unreachable code (kfree calls) from vme.c
Signed-off-by: Manohar Vanga
Signed-off-by: Greg Kroah-Hartman
24 Feb, 2011
2 commits
-
Fix loop condition in vme_register_bridge that results in an infinite
loop in the event that device_register fails.Signed-off-by: Manohar Vanga
Acked-by: Martyn Welch
Acked-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
Removed some unreachable code from vme_register_bridge
Signed-off-by: Manohar Vanga
Acked-by: Martyn Welch
Acked-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman
28 Jan, 2011
1 commit
-
Signed-off-by: Jeff Garzik
10 Dec, 2010
2 commits
-
Convert 'const struct pci_device_id xxx[]' to 'DEFINE_PCI_DEVICE_TABLE(xxx)'.
Signed-off-by: Namhyung Kim
Signed-off-by: Greg Kroah-Hartman -
Convert 'const struct pci_device_id xxx[]' to 'DEFINE_PCI_DEVICE_TABLE(xxx)'.
Signed-off-by: Namhyung Kim
Signed-off-by: Greg Kroah-Hartman
04 Dec, 2010
3 commits
-
Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
[martyn.welch@ge.com: Fixed checkpatch line length warnings]
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
buf_unalloc() frees the memory buffers allocated with vme_alloc_consistent.
The associated VME resource is needed in both vme_alloc_consistent and
vme_free_consistent; however the slave VME resources are being freed before
the calls to vme_free_consistent are made, which means the buffers
are never returned.Fix this by freeing the VME resources only after the consistent buffers have
been returned.Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
17 Nov, 2010
15 commits
-
Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
kern_buf is not iomem; it comes from kmalloc and is directly
dereferenced.Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
unsigned int is what struct kparam_array internally uses.
Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
The cookie passed to request_irq isn't the same as the one passed
to free_irq, which results in the following warning:[ 63.243533] WARNING: at kernel/irq/manage.c:899 __free_irq+0x9b/0x17d()
[ 63.243533] Hardware name:
[ 63.243533] Trying to free already-free IRQ 17
[ 63.243533] Modules linked in: vme_tsi148(-) vme e1000e iTCO_wdt iTCO_vendor_support [last unloaded: scsi_wait_scan]
[ 63.243533] Pid: 2013, comm: rmmod Not tainted 2.6.35 #2
[ 63.243533] Call Trace:
[ 63.243533] [] warn_slowpath_common+0x80/0x98
[ 63.243533] [] warn_slowpath_fmt+0x41/0x43
[ 63.243533] [] __free_irq+0x9b/0x17d
[ 63.243533] [] free_irq+0x33/0x4e
[ 63.243533] [] tsi148_irq_exit+0x6b/0x70 [vme_tsi148]
[...]
[ 63.243533] ---[ end trace bbf92311d969efb4 ]---Fix it by passing the same cookie to both functions.
Signed-off-by: Emilio G. Cota
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
tsi148_irq_exit is called twice in .remove, which causes an oops.
Remove the second call, which apart from being redundant cannot
possibly work; the CR/CSR space has been already unmapped.Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
This fixes an oops when removing the module.
Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Emilio G. Cota
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman