diff options
author | Rick Farrington <ricardo.farrington@cavium.com> | 2017-03-18 01:43:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-22 03:48:29 +0300 |
commit | 9549c6c872beee08ddb5bb92715bfde3b7161a88 (patch) | |
tree | a46f7dfd50095b83ba4439e9db64f7511178ead2 /drivers/net/ethernet/cavium/liquidio/response_manager.c | |
parent | 71dbc3414caaf68d1914f63864b65d2a4d0bc39c (diff) | |
download | linux-9549c6c872beee08ddb5bb92715bfde3b7161a88.tar.xz |
liquidio: fix for vf mac addr command sent to nic firmware
Change to support host<->firmware command return value.
Fix for vf mac addr state command.
1. Added support for firmware commands to return a value:
- previously, the returned code overlapped with host codes, thus
commands were only returning 0 (success) or -1 (interpreted as
timeout)
- per 'response_manager.h', the error codes are split into two fields
(major/minor) now, firmware commands are grouped into their own
'major' group, separate from the host's 'major' group, which allow f/w
commands to return any 16-bit value
2. The command to set vf mac addr was logging a success message even if
command failed. Now command uses a callback function to log the status
message.
3. The command to set vf mac addr was not logging a message when set via
the host 'ip' command. Now, the callback function will log an
appropriate message.
Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/response_manager.c')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/response_manager.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/response_manager.c b/drivers/net/ethernet/cavium/liquidio/response_manager.c index 945633339723..3d691c69f74d 100644 --- a/drivers/net/ethernet/cavium/liquidio/response_manager.c +++ b/drivers/net/ethernet/cavium/liquidio/response_manager.c @@ -101,8 +101,15 @@ int lio_process_ordered_list(struct octeon_device *octeon_dev, if ((status64 & 0xff) != 0xff) { octeon_swap_8B_data(&status64, 1); if (((status64 & 0xff) != 0xff)) { - status = (u32)(status64 & - 0xffffffffULL); + /* retrieve 16-bit firmware status */ + status = (u32)(status64 & 0xffffULL); + if (status) { + status = + FIRMWARE_STATUS_CODE(status); + } else { + /* i.e. no error */ + status = OCTEON_REQUEST_DONE; + } } } } else if (force_quit || (sc->timeout && |