linux/drivers/net/ethernet/meta/fbnic/fbnic_irq.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) Meta Platforms, Inc. and affiliates. */

#include <linux/pci.h>
#include <linux/types.h>

#include "fbnic.h"
#include "fbnic_netdev.h"
#include "fbnic_txrx.h"

static irqreturn_t fbnic_fw_msix_intr(int __always_unused irq, void *data)
{}

/**
 * fbnic_fw_enable_mbx - Configure and initialize Firmware Mailbox
 * @fbd: Pointer to device to initialize
 *
 * This function will initialize the firmware mailbox rings, enable the IRQ
 * and initialize the communication between the Firmware and the host. The
 * firmware is expected to respond to the initialization by sending an
 * interrupt essentially notifying the host that it has seen the
 * initialization and is now synced up.
 *
 * Return: non-zero on failure.
 **/
int fbnic_fw_enable_mbx(struct fbnic_dev *fbd)
{}

/**
 * fbnic_fw_disable_mbx - Disable mailbox and place it in standby state
 * @fbd: Pointer to device to disable
 *
 * This function will disable the mailbox interrupt, free any messages still
 * in the mailbox and place it into a standby state. The firmware is
 * expected to see the update and assume that the host is in the reset state.
 **/
void fbnic_fw_disable_mbx(struct fbnic_dev *fbd)
{}

static irqreturn_t fbnic_pcs_msix_intr(int __always_unused irq, void *data)
{}

/**
 * fbnic_pcs_irq_enable - Configure the MAC to enable it to advertise link
 * @fbd: Pointer to device to initialize
 *
 * This function provides basic bringup for the MAC/PCS IRQ. For now the IRQ
 * will remain disabled until we start the MAC/PCS/PHY logic via phylink.
 *
 * Return: non-zero on failure.
 **/
int fbnic_pcs_irq_enable(struct fbnic_dev *fbd)
{}

/**
 * fbnic_pcs_irq_disable - Teardown the MAC IRQ to prepare for stopping
 * @fbd: Pointer to device that is stopping
 *
 * This function undoes the work done in fbnic_pcs_irq_enable and prepares
 * the device to no longer receive traffic on the host interface.
 **/
void fbnic_pcs_irq_disable(struct fbnic_dev *fbd)
{}

int fbnic_request_irq(struct fbnic_dev *fbd, int nr, irq_handler_t handler,
		      unsigned long flags, const char *name, void *data)
{}

void fbnic_free_irq(struct fbnic_dev *fbd, int nr, void *data)
{}

void fbnic_free_irqs(struct fbnic_dev *fbd)
{}

int fbnic_alloc_irqs(struct fbnic_dev *fbd)
{}