diff options
author | Suresh Reddy <Suresh.Reddy@emulex.com> | 2014-09-12 08:09:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-13 17:12:15 -0400 |
commit | b29812c13514b3bb9236aed4bd35192e6b3d0f2d (patch) | |
tree | fcde98eeb330a63c9e2147f1f99a97ce51d5f122 /drivers/net/ethernet/emulex | |
parent | c30d72665cce3613ed222215b71dd4b5213169d2 (diff) |
be2net: use v1 of SET_FLOW_CONTROL command
In some configurations the FW doesn't allow changing flow control settings
of a link. Unless a v1 version of the SET_FLOW_CONTROL cmd is used, the FW
doesn't report an error to the driver.
Signed-off-by: Suresh Reddy <Suresh.Reddy@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 8bb6fd913819..5d8016c0c134 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c | |||
@@ -1948,6 +1948,7 @@ int be_cmd_set_flow_control(struct be_adapter *adapter, u32 tx_fc, u32 rx_fc) | |||
1948 | OPCODE_COMMON_SET_FLOW_CONTROL, sizeof(*req), | 1948 | OPCODE_COMMON_SET_FLOW_CONTROL, sizeof(*req), |
1949 | wrb, NULL); | 1949 | wrb, NULL); |
1950 | 1950 | ||
1951 | req->hdr.version = 1; | ||
1951 | req->tx_flow_control = cpu_to_le16((u16)tx_fc); | 1952 | req->tx_flow_control = cpu_to_le16((u16)tx_fc); |
1952 | req->rx_flow_control = cpu_to_le16((u16)rx_fc); | 1953 | req->rx_flow_control = cpu_to_le16((u16)rx_fc); |
1953 | 1954 | ||
@@ -1955,6 +1956,10 @@ int be_cmd_set_flow_control(struct be_adapter *adapter, u32 tx_fc, u32 rx_fc) | |||
1955 | 1956 | ||
1956 | err: | 1957 | err: |
1957 | spin_unlock_bh(&adapter->mcc_lock); | 1958 | spin_unlock_bh(&adapter->mcc_lock); |
1959 | |||
1960 | if (base_status(status) == MCC_STATUS_FEATURE_NOT_SUPPORTED) | ||
1961 | return -EOPNOTSUPP; | ||
1962 | |||
1958 | return status; | 1963 | return status; |
1959 | } | 1964 | } |
1960 | 1965 | ||
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h index 0e1186856aa6..3b1606cb3cbf 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.h +++ b/drivers/net/ethernet/emulex/benet/be_cmds.h | |||
@@ -57,7 +57,8 @@ enum mcc_base_status { | |||
57 | MCC_STATUS_ILLEGAL_FIELD = 3, | 57 | MCC_STATUS_ILLEGAL_FIELD = 3, |
58 | MCC_STATUS_INSUFFICIENT_BUFFER = 4, | 58 | MCC_STATUS_INSUFFICIENT_BUFFER = 4, |
59 | MCC_STATUS_UNAUTHORIZED_REQUEST = 5, | 59 | MCC_STATUS_UNAUTHORIZED_REQUEST = 5, |
60 | MCC_STATUS_NOT_SUPPORTED = 66 | 60 | MCC_STATUS_NOT_SUPPORTED = 66, |
61 | MCC_STATUS_FEATURE_NOT_SUPPORTED = 68 | ||
61 | }; | 62 | }; |
62 | 63 | ||
63 | /* Additional status */ | 64 | /* Additional status */ |