linux/drivers/scsi/smartpqi/smartpqi_sis.c

// SPDX-License-Identifier: GPL-2.0
/*
 *    driver for Microchip PQI-based storage controllers
 *    Copyright (c) 2019-2023 Microchip Technology Inc. and its subsidiaries
 *    Copyright (c) 2016-2018 Microsemi Corporation
 *    Copyright (c) 2016 PMC-Sierra, Inc.
 *
 *    Questions/Comments/Bugfixes to [email protected]
 *
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <scsi/scsi_device.h>
#include <linux/unaligned.h>
#include "smartpqi.h"
#include "smartpqi_sis.h"

/* legacy SIS interface commands */
#define SIS_CMD_GET_ADAPTER_PROPERTIES
#define SIS_CMD_INIT_BASE_STRUCT_ADDRESS
#define SIS_CMD_GET_PQI_CAPABILITIES

/* for submission of legacy SIS commands */
#define SIS_REENABLE_SIS_MODE
#define SIS_ENABLE_MSIX
#define SIS_ENABLE_INTX
#define SIS_SOFT_RESET
#define SIS_CMD_READY
#define SIS_NOTIFY_KDUMP
#define SIS_TRIGGER_SHUTDOWN
#define SIS_PQI_RESET_QUIESCE

#define SIS_CMD_COMPLETE
#define SIS_CLEAR_CTRL_TO_HOST_DOORBELL

#define SIS_CMD_STATUS_SUCCESS
#define SIS_CMD_COMPLETE_TIMEOUT_SECS
#define SIS_CMD_COMPLETE_POLL_INTERVAL_MSECS

/* used with SIS_CMD_GET_ADAPTER_PROPERTIES command */
#define SIS_EXTENDED_PROPERTIES_SUPPORTED
#define SIS_SMARTARRAY_FEATURES_SUPPORTED
#define SIS_PQI_MODE_SUPPORTED
#define SIS_PQI_RESET_QUIESCE_SUPPORTED
#define SIS_REQUIRED_EXTENDED_PROPERTIES

/* used with SIS_CMD_INIT_BASE_STRUCT_ADDRESS command */
#define SIS_BASE_STRUCT_REVISION
#define SIS_BASE_STRUCT_ALIGNMENT

#define SIS_CTRL_KERNEL_FW_TRIAGE
#define SIS_CTRL_KERNEL_CTRL_LOGGING
#define SIS_CTRL_KERNEL_CTRL_LOGGING_STATUS
#define SIS_CTRL_KERNEL_UP
#define SIS_CTRL_KERNEL_PANIC
#define SIS_CTRL_READY_TIMEOUT_SECS
#define SIS_CTRL_READY_RESUME_TIMEOUT_SECS
#define SIS_CTRL_READY_POLL_INTERVAL_MSECS

enum sis_fw_triage_status {};

enum sis_ctrl_logging_status {};

#pragma pack(1)

/* for use with SIS_CMD_INIT_BASE_STRUCT_ADDRESS command */
struct sis_base_struct {};

#pragma pack()

unsigned int sis_ctrl_ready_timeout_secs =;

static int sis_wait_for_ctrl_ready_with_timeout(struct pqi_ctrl_info *ctrl_info,
	unsigned int timeout_secs)
{}

int sis_wait_for_ctrl_ready(struct pqi_ctrl_info *ctrl_info)
{}

int sis_wait_for_ctrl_ready_resume(struct pqi_ctrl_info *ctrl_info)
{}

bool sis_is_firmware_running(struct pqi_ctrl_info *ctrl_info)
{}

bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info)
{}

u32 sis_get_product_id(struct pqi_ctrl_info *ctrl_info)
{}

/* used for passing command parameters/results when issuing SIS commands */
struct sis_sync_cmd_params {};

static int sis_send_sync_cmd(struct pqi_ctrl_info *ctrl_info,
	u32 cmd, struct sis_sync_cmd_params *params)
{}

/*
 * This function verifies that we are talking to a controller that speaks PQI.
 */

int sis_get_ctrl_properties(struct pqi_ctrl_info *ctrl_info)
{}

int sis_get_pqi_capabilities(struct pqi_ctrl_info *ctrl_info)
{}

int sis_init_base_struct_addr(struct pqi_ctrl_info *ctrl_info)
{}

#define SIS_DOORBELL_BIT_CLEAR_TIMEOUT_SECS

static int sis_wait_for_doorbell_bit_to_clear(
	struct pqi_ctrl_info *ctrl_info, u32 bit)
{}

static inline int sis_set_doorbell_bit(struct pqi_ctrl_info *ctrl_info, u32 bit)
{}

void sis_enable_msix(struct pqi_ctrl_info *ctrl_info)
{}

void sis_enable_intx(struct pqi_ctrl_info *ctrl_info)
{}

void sis_shutdown_ctrl(struct pqi_ctrl_info *ctrl_info,
	enum pqi_ctrl_shutdown_reason ctrl_shutdown_reason)
{}

int sis_pqi_reset_quiesce(struct pqi_ctrl_info *ctrl_info)
{}

int sis_reenable_sis_mode(struct pqi_ctrl_info *ctrl_info)
{}

void sis_write_driver_scratch(struct pqi_ctrl_info *ctrl_info, u32 value)
{}

u32 sis_read_driver_scratch(struct pqi_ctrl_info *ctrl_info)
{}

static inline enum sis_fw_triage_status
	sis_read_firmware_triage_status(struct pqi_ctrl_info *ctrl_info)
{}

bool sis_is_ctrl_logging_supported(struct pqi_ctrl_info *ctrl_info)
{}

void sis_notify_kdump(struct pqi_ctrl_info *ctrl_info)
{}

static inline enum sis_ctrl_logging_status sis_read_ctrl_logging_status(struct pqi_ctrl_info *ctrl_info)
{}

void sis_soft_reset(struct pqi_ctrl_info *ctrl_info)
{}

#define SIS_FW_TRIAGE_STATUS_TIMEOUT_SECS
#define SIS_FW_TRIAGE_STATUS_POLL_INTERVAL_SECS

int sis_wait_for_fw_triage_completion(struct pqi_ctrl_info *ctrl_info)
{}

#define SIS_CTRL_LOGGING_STATUS_TIMEOUT_SECS
#define SIS_CTRL_LOGGING_STATUS_POLL_INTERVAL_SECS

int sis_wait_for_ctrl_logging_completion(struct pqi_ctrl_info *ctrl_info)
{}

void sis_verify_structures(void)
{}