Deleted Added
sdiff udiff text old ( 292051 ) new ( 292055 )
full compact
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 292055 2015-12-10 07:42:56Z 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

--- 4 unchanged lines hidden (view full) ---

45
46static efx_mcdi_ops_t __efx_mcdi_siena_ops = {
47 siena_mcdi_init, /* emco_init */
48 siena_mcdi_request_copyin, /* emco_request_copyin */
49 siena_mcdi_request_poll, /* emco_request_poll */
50 siena_mcdi_request_copyout, /* emco_request_copyout */
51 siena_mcdi_poll_reboot, /* emco_poll_reboot */
52 siena_mcdi_fini, /* emco_fini */
53 siena_mcdi_feature_supported, /* emco_feature_supported */
54 siena_mcdi_read_response, /* emco_read_response */
55};
56
57#endif /* EFSYS_OPT_SIENA */
58
59#if EFSYS_OPT_HUNTINGTON
60
61static efx_mcdi_ops_t __efx_mcdi_hunt_ops = {
62 hunt_mcdi_init, /* emco_init */
63 hunt_mcdi_request_copyin, /* emco_request_copyin */
64 hunt_mcdi_request_poll, /* emco_request_poll */
65 hunt_mcdi_request_copyout, /* emco_request_copyout */
66 hunt_mcdi_poll_reboot, /* emco_poll_reboot */
67 hunt_mcdi_fini, /* emco_fini */
68 hunt_mcdi_feature_supported, /* emco_feature_supported */
69 hunt_mcdi_read_response, /* emco_read_response */
70};
71
72#endif /* EFSYS_OPT_HUNTINGTON */
73
74
75
76 __checkReturn efx_rc_t

--- 1223 unchanged lines hidden (view full) ---

1300fail2:
1301 EFSYS_PROBE(fail2);
1302fail1:
1303 EFSYS_PROBE1(fail1, efx_rc_t, rc);
1304
1305 return (rc);
1306}
1307
1308 __checkReturn efx_rc_t
1309efx_mcdi_firmware_update_supported(
1310 __in efx_nic_t *enp,
1311 __out boolean_t *supportedp)
1312{
1313 efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
1314 efx_rc_t rc;
1315
1316 if (emcop != NULL) {
1317 if ((rc = emcop->emco_feature_supported(enp,
1318 EFX_MCDI_FEATURE_FW_UPDATE, supportedp)) != 0)
1319 goto fail1;
1320 } else {
1321 /* Earlier devices always supported updates */
1322 *supportedp = B_TRUE;
1323 }
1324
1325 return (0);
1326

--- 6 unchanged lines hidden (view full) ---

1333 __checkReturn efx_rc_t
1334efx_mcdi_macaddr_change_supported(
1335 __in efx_nic_t *enp,
1336 __out boolean_t *supportedp)
1337{
1338 efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
1339 efx_rc_t rc;
1340
1341 if (emcop != NULL) {
1342 if ((rc = emcop->emco_feature_supported(enp,
1343 EFX_MCDI_FEATURE_MACADDR_CHANGE, supportedp)) != 0)
1344 goto fail1;
1345 } else {
1346 /* Earlier devices always supported MAC changes */
1347 *supportedp = B_TRUE;
1348 }
1349
1350 return (0);
1351

--- 6 unchanged lines hidden (view full) ---

1358 __checkReturn efx_rc_t
1359efx_mcdi_link_control_supported(
1360 __in efx_nic_t *enp,
1361 __out boolean_t *supportedp)
1362{
1363 efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
1364 efx_rc_t rc;
1365
1366 if (emcop != NULL) {
1367 if ((rc = emcop->emco_feature_supported(enp,
1368 EFX_MCDI_FEATURE_LINK_CONTROL, supportedp)) != 0)
1369 goto fail1;
1370 } else {
1371 /* Earlier devices always supported link control */
1372 *supportedp = B_TRUE;
1373 }
1374
1375 return (0);
1376

--- 6 unchanged lines hidden (view full) ---

1383 __checkReturn efx_rc_t
1384efx_mcdi_mac_spoofing_supported(
1385 __in efx_nic_t *enp,
1386 __out boolean_t *supportedp)
1387{
1388 efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
1389 efx_rc_t rc;
1390
1391 if (emcop != NULL) {
1392 if ((rc = emcop->emco_feature_supported(enp,
1393 EFX_MCDI_FEATURE_MAC_SPOOFING, supportedp)) != 0)
1394 goto fail1;
1395 } else {
1396 /* Earlier devices always supported MAC spoofing */
1397 *supportedp = B_TRUE;
1398 }
1399
1400 return (0);
1401

--- 494 unchanged lines hidden ---