net/sfc/base: import MCDI implementation
authorAndrew Rybchenko <arybchenko@solarflare.com>
Tue, 29 Nov 2016 16:18:38 +0000 (16:18 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:39:25 +0000 (19:39 +0100)
commit6f619653b9b15ac2514fe8d935018dd0b07c75f0
tree7989477aaadad16b7e005966525f17059acb6dd0
parent11358bf6f60c144d35d3d85698e9c13cc09f0181
net/sfc/base: import MCDI implementation

Implement interface to talk to NIC management CPU. Provide
helpers to fill in MCDI requests, execute it and process
received response.

MCDI request is prepared in either PCI BAR mapped memory
(SFN5xxx/SFN6xxx) or DMA-mapped memory (SFN7xxx/SFN8xxx) and,
doorbell is pressed (memory-mapped register) to execute it.

Events about MCDI completion are delivered to house-keeping
event queue, but usage of these events is optional and MCDI
buffer may be simply polled waiting for completion
indication set.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/sfc/base/efx.h
drivers/net/sfc/base/efx_check.h
drivers/net/sfc/base/efx_ev.c
drivers/net/sfc/base/efx_impl.h
drivers/net/sfc/base/efx_mcdi.c [new file with mode: 0644]
drivers/net/sfc/base/efx_mcdi.h [new file with mode: 0644]
drivers/net/sfc/base/efx_nic.c