summaryrefslogtreecommitdiff
path: root/drivers/rapidio/devices/tsi721.h
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2016-03-22 21:25:51 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-22 22:36:02 (GMT)
commitba5d141b55ff0c02127cabd344585622bbaa5d02 (patch)
tree4aad2e7ecb313ac4c3c0c59899803b50acac05d3 /drivers/rapidio/devices/tsi721.h
parent174f1a71cc692ddb4bc30ec93edb6d7eb370b382 (diff)
downloadlinux-ba5d141b55ff0c02127cabd344585622bbaa5d02.tar.xz
rapidio/tsi721: add check for overlapped IB window mappings
Add check for attempts to request mapping of inbound RapidIO address space that overlaps with existing active mapping windows. Tsi721 device does not support overlapped inbound windows and SRIO address decoding behavior is not defined in such cases. This patch is applicable to kernel versions starting from v3.7. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio/devices/tsi721.h')
-rw-r--r--drivers/rapidio/devices/tsi721.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/rapidio/devices/tsi721.h b/drivers/rapidio/devices/tsi721.h
index 9d25025..355f356 100644
--- a/drivers/rapidio/devices/tsi721.h
+++ b/drivers/rapidio/devices/tsi721.h
@@ -808,6 +808,13 @@ struct msix_irq {
};
#endif /* CONFIG_PCI_MSI */
+struct tsi721_ib_win {
+ u64 rstart;
+ u32 size;
+ dma_addr_t lstart;
+ bool active;
+};
+
struct tsi721_device {
struct pci_dev *pdev;
struct rio_mport *mport;
@@ -843,6 +850,10 @@ struct tsi721_device {
/* Outbound Messaging */
int omsg_init[TSI721_OMSG_CHNUM];
struct tsi721_omsg_ring omsg_ring[TSI721_OMSG_CHNUM];
+
+ /* Inbound Mapping Windows */
+ struct tsi721_ib_win ib_win[TSI721_IBWIN_NUM];
+ spinlock_t win_lock;
};
#ifdef CONFIG_RAPIDIO_DMA_ENGINE