Benign repos Download

efa_com.c

Source contains an unconditional loopAssigns a negative errno constant
SHA-256934e762bd0135649a5ee1b91334f29a6cd4e41f18bb42796c350b8a4231913cd

Evidence

imports efa_com.h lines 1–13
1// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2/*
3 * Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All rights reserved.
4 */
5
6#include <linux/log2.h>
7
8#include "efa_com.h"
9#include "efa_regs_defs.h"
10
11#define ADMIN_CMD_TIMEOUT_US 30000000 /* usecs */
12
13#define EFA_REG_READ_TIMEOUT_US 50000 /* …
Kernel error code return lines 138–148
138:25… >dmadev, size, &sq->dma_addr, GFP_KERNEL);
139 if (!sq->entries)
140 return -ENOMEM;
141
142 spin_lock_init(&sq->lock);
⋯6 lines
English function-word token "the" lines 236–242
236:43… S_AENQ_CAPS_OFF);
237
238 /*
239 * Init cons_db to mark that all entries in the queue
240 * are initially available
241 */
242 writel(edev->aenq.cc, edev->reg_bar + EFA_REGS_AENQ_CON …
Copies bytes with native memcpy lines 349–358
349:26… ctx->wait_event);
350
351 aqe = &aq->sq.entries[pi];
352 memset(aqe, 0, sizeof(*aqe));
353 memcpy(aqe, cmd, cmd_size_in_bytes);
354
355 aq->sq.pc++;
356 atomic64_inc(&aq->stats.submitted_cmd);
357
358 if ((aq->sq.pc & queue_size_mask) == 0) …
Assigns a negative errno constant lines 530–542
530:18… pletion (polling) timeout\n");
531 /* EFA didn't have any completion */
532 atomic64_inc(&aq->stats.no_completion);
533
534 clear_bit(EFA_AQ_STATE_RUNNING_BIT, &aq->state);
535 err = -ETIME;
536 goto out;
537 }
⋯5 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.