net/sfc/base: improve robustness of MAC stats get via MCDI
authorAndy Moreton <amoreton@solarflare.com>
Tue, 20 Feb 2018 07:33:56 +0000 (07:33 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:42 +0000 (14:08 +0200)
commit0edb4ecbe85bb8aef0c237bd00d9d1ef8e76a45b
treef111817c4f97f27d32ba66434d881d4555058a59
parent96cab03ded0a71224cdda9a16708554ae48cc6d4
net/sfc/base: improve robustness of MAC stats get via MCDI

Previously the code relied on the callers of efx_mcdi_mac_stats
to provide a DMA buffer or NULL depending on the action. Fix
this so that the DMA buffer is only passed in the request when
needed, and that an error is reported for a missing DMA buffer.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/base/efx_mcdi.c