linux/drivers/scsi/am53c974.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * AMD am53c974 driver.
 * Copyright (c) 2014 Hannes Reinecke, SUSE Linux GmbH
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/interrupt.h>

#include <scsi/scsi_host.h>

#include "esp_scsi.h"

#define DRV_MODULE_NAME
#define DRV_MODULE_VERSION

static bool am53c974_debug;
static bool am53c974_fenab =;

#define esp_dma_log(f, a...)

#define ESP_DMA_CMD
#define ESP_DMA_STC
#define ESP_DMA_SPA
#define ESP_DMA_WBC
#define ESP_DMA_WAC
#define ESP_DMA_STATUS
#define ESP_DMA_SMDLA
#define ESP_DMA_WMAC

#define ESP_DMA_CMD_IDLE
#define ESP_DMA_CMD_BLAST
#define ESP_DMA_CMD_ABORT
#define ESP_DMA_CMD_START
#define ESP_DMA_CMD_MASK
#define ESP_DMA_CMD_DIAG
#define ESP_DMA_CMD_MDL
#define ESP_DMA_CMD_INTE_P
#define ESP_DMA_CMD_INTE_D
#define ESP_DMA_CMD_DIR

#define ESP_DMA_STAT_PWDN
#define ESP_DMA_STAT_ERROR
#define ESP_DMA_STAT_ABORT
#define ESP_DMA_STAT_DONE
#define ESP_DMA_STAT_SCSIINT
#define ESP_DMA_STAT_BCMPLT

/* EEPROM is accessed with 16-bit values */
#define DC390_EEPROM_READ
#define DC390_EEPROM_LEN

/*
 * DC390 EEPROM
 *
 * 8 * 4 bytes of per-device options
 * followed by HBA specific options
 */

/* Per-device options */
#define DC390_EE_MODE1
#define DC390_EE_SPEED

/* HBA-specific options */
#define DC390_EE_ADAPT_SCSI_ID
#define DC390_EE_MODE2
#define DC390_EE_DELAY
#define DC390_EE_TAG_CMD_NUM

#define DC390_EE_MODE1_PARITY_CHK
#define DC390_EE_MODE1_SYNC_NEGO
#define DC390_EE_MODE1_EN_DISC
#define DC390_EE_MODE1_SEND_START
#define DC390_EE_MODE1_TCQ

#define DC390_EE_MODE2_MORE_2DRV
#define DC390_EE_MODE2_GREATER_1G
#define DC390_EE_MODE2_RST_SCSI_BUS
#define DC390_EE_MODE2_ACTIVE_NEGATION
#define DC390_EE_MODE2_NO_SEEK
#define DC390_EE_MODE2_LUN_CHECK

struct pci_esp_priv {};

static void pci_esp_dma_drain(struct esp *esp);

static inline struct pci_esp_priv *pci_esp_get_priv(struct esp *esp)
{}

static void pci_esp_write8(struct esp *esp, u8 val, unsigned long reg)
{}

static u8 pci_esp_read8(struct esp *esp, unsigned long reg)
{}

static void pci_esp_write32(struct esp *esp, u32 val, unsigned long reg)
{}

static int pci_esp_irq_pending(struct esp *esp)
{}

static void pci_esp_reset_dma(struct esp *esp)
{}

static void pci_esp_dma_drain(struct esp *esp)
{}

static void pci_esp_dma_invalidate(struct esp *esp)
{}

static int pci_esp_dma_error(struct esp *esp)
{}

static void pci_esp_send_dma_cmd(struct esp *esp, u32 addr, u32 esp_count,
				 u32 dma_count, int write, u8 cmd)
{}

static u32 pci_esp_dma_length_limit(struct esp *esp, u32 dma_addr, u32 dma_len)
{}

static const struct esp_driver_ops pci_esp_ops =;

/*
 * Read DC-390 eeprom
 */
static void dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd)
{}

static u16 dc390_eeprom_get_data(struct pci_dev *pdev)
{}

static void dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr)
{}

static void dc390_check_eeprom(struct esp *esp)
{}

static int pci_esp_probe_one(struct pci_dev *pdev,
			      const struct pci_device_id *id)
{}

static void pci_esp_remove_one(struct pci_dev *pdev)
{}

static struct pci_device_id am53c974_pci_tbl[] =;
MODULE_DEVICE_TABLE(pci, am53c974_pci_tbl);

static struct pci_driver am53c974_driver =;

module_pci_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_VERSION();
MODULE_ALIAS();

module_param(am53c974_debug, bool, 0644);
MODULE_PARM_DESC();

module_param(am53c974_fenab, bool, 0444);
MODULE_PARM_DESC();