ntb_transport: Check the number of spads the hardware supports
authorLogan Gunthorpe <logang@deltatee.com>
Tue, 7 Jun 2016 17:20:22 +0000 (11:20 -0600)
committerJon Mason <jdmason@kudzu.us>
Fri, 5 Aug 2016 14:21:06 +0000 (10:21 -0400)
commit19645a077120c6417e9dc5ad469c45194cf78a82
tree41676f4b27a17fb9b75ba47b33f0bdf6756adcf6
parent8b71d285061181f91194114cc7dabce73185eed1
ntb_transport: Check the number of spads the hardware supports

I'm working on hardware that currently has a limited number of
scratchpad registers and ntb_ndev fails with no clue as to why. I
feel it is better to fail early and provide a reasonable error message
then to fail later on.

The same is done to ntb_perf, but it doesn't currently require enough
spads to actually fail. I've also removed the unused SPAD_MSG and
SPAD_ACK enums so that MAX_SPAD accurately reflects the number of
spads used.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/ntb_transport.c
drivers/ntb/test/ntb_perf.c