aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/base/efx_mcdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/base/efx_mcdi.c')
-rw-r--r--drivers/net/sfc/base/efx_mcdi.c38
1 files changed, 8 insertions, 30 deletions
diff --git a/drivers/net/sfc/base/efx_mcdi.c b/drivers/net/sfc/base/efx_mcdi.c
index c61b943c..347a5b35 100644
--- a/drivers/net/sfc/base/efx_mcdi.c
+++ b/drivers/net/sfc/base/efx_mcdi.c
@@ -1,31 +1,7 @@
-/*
- * Copyright (c) 2008-2016 Solarflare Communications Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
+/* SPDX-License-Identifier: BSD-3-Clause
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are
- * those of the authors and should not be interpreted as representing official
- * policies, either expressed or implied, of the FreeBSD Project.
+ * Copyright (c) 2008-2018 Solarflare Communications Inc.
+ * All rights reserved.
*/
#include "efx.h"
@@ -290,7 +266,8 @@ efx_mcdi_request_start(
*/
if ((max_version >= 2) &&
((emrp->emr_cmd > MC_CMD_CMD_SPACE_ESCAPE_7) ||
- (emrp->emr_in_length > MCDI_CTL_SDU_LEN_MAX_V1))) {
+ (emrp->emr_in_length > MCDI_CTL_SDU_LEN_MAX_V1) ||
+ (emrp->emr_out_length > MCDI_CTL_SDU_LEN_MAX_V1))) {
/* Construct MCDI v2 header */
hdr_len = sizeof (hdr);
EFX_POPULATE_DWORD_8(hdr[0],
@@ -792,9 +769,8 @@ efx_mcdi_ev_cpl(
emrp->emr_rc = 0;
}
}
- if (errcode == 0) {
+ if (emrp->emr_rc == 0)
efx_mcdi_finish_response(enp, emrp);
- }
emtp->emt_ev_cpl(emtp->emt_context);
}
@@ -809,6 +785,8 @@ efx_mcdi_get_proxy_handle(
{
efx_rc_t rc;
+ _NOTE(ARGUNUSED(enp))
+
/*
* Return proxy handle from MCDI request that returned with error
* MC_MCD_ERR_PROXY_PENDING. This handle is used to wait for a matching