sfc: Translate MCDI error numbers received in events
commit5bc283e51327e249459caab1aff505000ae2beeb
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 8 Oct 2012 20:43:00 +0000 (8 21:43 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Wed, 21 Aug 2013 19:20:36 +0000 (21 20:20 +0100)
tree8fd6c302fe5eab6e3c9946d9ef4b667eccb1b3c6
parent86094f7f38ff711f3db8497fcb4d2e109100f497
sfc: Translate MCDI error numbers received in events

Currently we only translate error codes in efx_mcdi_poll(), but we
also need to do so in efx_mcdi_ev_cpl().

The reason we didn't notice before is that the MC firmware error codes
are mostly taken from Unix/Linux and no translation is necessary on
most architectures.  Make sure we notice any future failure by
changing the sign of resprc (matching the kernel convention) and BUG
if it's ever positive at command completion.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/mcdi.c
drivers/net/ethernet/sfc/mcdi.h