alistair23-linux/drivers/ntb/hw/mscc
Kelvin Cao 3df54c870f ntb_hw_switchtec: Allow using Switchtec NTB in multi-partition setups
Allow using Switchtec NTB in setups that have more than two partitions.
Note: this does not enable having multi-host communication, it only
allows for a single NTB link between two hosts in a network that might
have more than two.

Use following logic to determine the NT peer partition:

1) If there are 2 partitions, and the target vector is set in
   the Switchtec configuration, use the partition specified in target
   vector.
2) If there are 2 partitions and target vector is unset
   use the only other partition as specified in the NT EP map.
3) If there are more than 2 partitions and target vector is set
   use the other partition specified in target vector.
4) If there are more than 2 partitions and target vector is unset,
   this is invalid and report an error.

Signed-off-by: Kelvin Cao <kelvin.cao@microsemi.com>
[logang@deltatee.com: commit message fleshed out]
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2018-01-28 22:17:23 -05:00
..
Kconfig NTB: switchtec_ntb: Introduce initial NTB driver 2017-11-18 20:37:12 -05:00
Makefile NTB: switchtec_ntb: Introduce initial NTB driver 2017-11-18 20:37:12 -05:00
ntb_hw_switchtec.c ntb_hw_switchtec: Allow using Switchtec NTB in multi-partition setups 2018-01-28 22:17:23 -05:00