aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio/response_manager.h
diff options
context:
space:
mode:
authorRick Farrington <ricardo.farrington@cavium.com>2017-03-17 15:43:26 -0700
committerDavid S. Miller <davem@davemloft.net>2017-03-21 17:48:29 -0700
commit9549c6c872beee08ddb5bb92715bfde3b7161a88 (patch)
treea46f7dfd50095b83ba4439e9db64f7511178ead2 /drivers/net/ethernet/cavium/liquidio/response_manager.h
parentnet: usb: pegasus: use new api ethtool_{get|set}_link_ksettings (diff)
downloadlinux-dev-9549c6c872beee08ddb5bb92715bfde3b7161a88.tar.xz
linux-dev-9549c6c872beee08ddb5bb92715bfde3b7161a88.zip
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.h')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/response_manager.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/response_manager.h b/drivers/net/ethernet/cavium/liquidio/response_manager.h
index cbb2d84e8932..9169c2815dba 100644
--- a/drivers/net/ethernet/cavium/liquidio/response_manager.h
+++ b/drivers/net/ethernet/cavium/liquidio/response_manager.h
@@ -78,6 +78,8 @@ enum {
/*------------ Error codes used by host driver -----------------*/
#define DRIVER_MAJOR_ERROR_CODE 0x0000
+/*------ Error codes used by firmware (bits 15..0 set by firmware */
+#define FIRMWARE_MAJOR_ERROR_CODE 0x0001
/** A value of 0x00000000 indicates no error i.e. success */
#define DRIVER_ERROR_NONE 0x00000000
@@ -116,6 +118,9 @@ enum {
};
+#define FIRMWARE_STATUS_CODE(status) \
+ ((FIRMWARE_MAJOR_ERROR_CODE << 16) | (status))
+
/** Initialize the response lists. The number of response lists to create is
* given by count.
* @param octeon_dev - the octeon device structure.