fbnic_mac.c
Source references XOR syntaxReads result through dot or arrow access
SHA-256a934313e24b5c74fc5fac9bb036dcf814b11cfd626fcbe3dee525409c4f0bf43
MaleculeO(Er)H(Db₂)
Evidence
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright (c) Meta Platforms, Inc. and affiliates. */
3
4#include <linux/bitfield.h>
5#include <net/tcp.h>
6
7#include "fbnic.h"
8#include "fbnic_mac.h"
9#include "fbnic_netdev.h"
10
11static void fbnic_init_readrq(struct fbnic_dev *fbd, unsigned int offset,
12 unsigned …
12:38… nt readrq)
13{
14 u32 val = rd32(fbd, offset);
15
16 /* The TDF_CTL masks are a superset of the RNI_RBP ones. So we can
17 * use them when setting either th …
498:2… case FBNIC_AUI_25GAUI:
499 lane_mask = 1;
500 break;
501 }
502
503 /* Use an XOR to remove the bits we expect to see set */
504 switch (fec) {
505 case FBNIC_FEC_OFF:
506 lane_mask ^= FIELD_GET(FBNIC_SIG_PCS_OUT0_BLO …
841:20… _alloc_cmpl(FBNIC_TLV_MSG_ID_TSENE_READ_RESP);
842 if (!fw_cmpl)
843 return -ENOMEM;
844
845 switch (id) {
⋯5 lines
851 break;
852 default:
853 err = -EINVAL;
854 goto exit_free;
855 }
⋯5 lines
865:58… )) {
866 dev_err(fbd->dev, "Timed out waiting for TSENE read\n");
867 err = -ETIMEDOUT;
868 goto exit_cleanup;
869 }
870
871 /* Handle error returned by firmware */
872 if (fw_cmpl->result) {
873 err = fw_cmpl->result;
874 dev_err(fbd->dev, "%s: Firmware returned error %d\n",
875 __func__, err);
876 goto exit_cleanup;
877 }