efx_mcdi.c (293757) | efx_mcdi.c (293765) |
---|---|
1/*- 2 * Copyright (c) 2008-2015 Solarflare Communications Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, --- 15 unchanged lines hidden (view full) --- 24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * The views and conclusions contained in the software and documentation are 27 * those of the authors and should not be interpreted as representing official 28 * policies, either expressed or implied, of the FreeBSD Project. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008-2015 Solarflare Communications Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, --- 15 unchanged lines hidden (view full) --- 24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * The views and conclusions contained in the software and documentation are 27 * those of the authors and should not be interpreted as representing official 28 * policies, either expressed or implied, of the FreeBSD Project. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/efx_mcdi.c 293757 2016-01-12 13:39:25Z arybchik $"); | 32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/efx_mcdi.c 293765 2016-01-12 15:25:03Z arybchik $"); |
33 34#include "efsys.h" 35#include "efx.h" 36#include "efx_types.h" 37#include "efx_regs.h" 38#include "efx_regs_mcdi.h" 39#include "efx_impl.h" 40 --- 597 unchanged lines hidden (view full) --- 638 __in efx_nic_t *enp, 639 __in unsigned int seq, 640 __in unsigned int outlen, 641 __in int errcode) 642{ 643 efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); 644 const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; 645 efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; | 33 34#include "efsys.h" 35#include "efx.h" 36#include "efx_types.h" 37#include "efx_regs.h" 38#include "efx_regs_mcdi.h" 39#include "efx_impl.h" 40 --- 597 unchanged lines hidden (view full) --- 638 __in efx_nic_t *enp, 639 __in unsigned int seq, 640 __in unsigned int outlen, 641 __in int errcode) 642{ 643 efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); 644 const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; 645 efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; |
646 efx_nic_cfg_t *encp = &enp->en_nic_cfg; | |
647 efx_mcdi_req_t *emrp; 648 int state; 649 650 EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MCDI); 651 EFSYS_ASSERT3U(enp->en_features, &, EFX_FEATURE_MCDI); 652 653 /* 654 * Serialise against efx_mcdi_request_poll()/efx_mcdi_request_start() --- 8 unchanged lines hidden (view full) --- 663 EFSYS_UNLOCK(enp->en_eslp, state); 664 return; 665 } 666 667 emrp = emip->emi_pending_req; 668 emip->emi_pending_req = NULL; 669 EFSYS_UNLOCK(enp->en_eslp, state); 670 | 646 efx_mcdi_req_t *emrp; 647 int state; 648 649 EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MCDI); 650 EFSYS_ASSERT3U(enp->en_features, &, EFX_FEATURE_MCDI); 651 652 /* 653 * Serialise against efx_mcdi_request_poll()/efx_mcdi_request_start() --- 8 unchanged lines hidden (view full) --- 662 EFSYS_UNLOCK(enp->en_eslp, state); 663 return; 664 } 665 666 emrp = emip->emi_pending_req; 667 emip->emi_pending_req = NULL; 668 EFSYS_UNLOCK(enp->en_eslp, state); 669 |
671 if (encp->enc_mcdi_max_payload_length > MCDI_CTL_SDU_LEN_MAX_V1) { | 670 if (emip->emi_max_version >= 2) { |
672 /* MCDIv2 response details do not fit into an event. */ 673 efx_mcdi_read_response_header(enp, emrp); 674 } else { 675 if (errcode != 0) { 676 if (!emrp->emr_quiet) { 677 EFSYS_PROBE2(mcdi_err, int, emrp->emr_cmd, 678 int, errcode); 679 } --- 1306 unchanged lines hidden --- | 671 /* MCDIv2 response details do not fit into an event. */ 672 efx_mcdi_read_response_header(enp, emrp); 673 } else { 674 if (errcode != 0) { 675 if (!emrp->emr_quiet) { 676 EFSYS_PROBE2(mcdi_err, int, emrp->emr_cmd, 677 int, errcode); 678 } --- 1306 unchanged lines hidden --- |