#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/pci.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/ktime.h>
#include <linux/blkdev.h>
#include <linux/io.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_eh.h>
#include <linux/uaccess.h>
#include <linux/kthread.h>
#include "mvumi.h"
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
static const struct pci_device_id mvumi_pci_table[] = …;
MODULE_DEVICE_TABLE(pci, mvumi_pci_table);
static void tag_init(struct mvumi_tag *st, unsigned short size)
{ … }
static unsigned short tag_get_one(struct mvumi_hba *mhba, struct mvumi_tag *st)
{ … }
static void tag_release_one(struct mvumi_hba *mhba, struct mvumi_tag *st,
unsigned short tag)
{ … }
static bool tag_is_empty(struct mvumi_tag *st)
{ … }
static void mvumi_unmap_pci_addr(struct pci_dev *dev, void **addr_array)
{ … }
static int mvumi_map_pci_addr(struct pci_dev *dev, void **addr_array)
{ … }
static struct mvumi_res *mvumi_alloc_mem_resource(struct mvumi_hba *mhba,
enum resource_type type, unsigned int size)
{ … }
static void mvumi_release_mem_resource(struct mvumi_hba *mhba)
{ … }
static int mvumi_make_sgl(struct mvumi_hba *mhba, struct scsi_cmnd *scmd,
void *sgl_p, unsigned char *sg_count)
{ … }
static int mvumi_internal_cmd_sgl(struct mvumi_hba *mhba, struct mvumi_cmd *cmd,
unsigned int size)
{ … }
static struct mvumi_cmd *mvumi_create_internal_cmd(struct mvumi_hba *mhba,
unsigned int buf_size)
{ … }
static void mvumi_delete_internal_cmd(struct mvumi_hba *mhba,
struct mvumi_cmd *cmd)
{ … }
static struct mvumi_cmd *mvumi_get_cmd(struct mvumi_hba *mhba)
{ … }
static inline void mvumi_return_cmd(struct mvumi_hba *mhba,
struct mvumi_cmd *cmd)
{ … }
static void mvumi_free_cmds(struct mvumi_hba *mhba)
{ … }
static int mvumi_alloc_cmds(struct mvumi_hba *mhba)
{ … }
static unsigned int mvumi_check_ib_list_9143(struct mvumi_hba *mhba)
{ … }
static unsigned int mvumi_check_ib_list_9580(struct mvumi_hba *mhba)
{ … }
static void mvumi_get_ib_list_entry(struct mvumi_hba *mhba, void **ib_entry)
{ … }
static void mvumi_send_ib_list_entry(struct mvumi_hba *mhba)
{ … }
static char mvumi_check_ob_frame(struct mvumi_hba *mhba,
unsigned int cur_obf, struct mvumi_rsp_frame *p_outb_frame)
{ … }
static int mvumi_check_ob_list_9143(struct mvumi_hba *mhba,
unsigned int *cur_obf, unsigned int *assign_obf_end)
{ … }
static int mvumi_check_ob_list_9580(struct mvumi_hba *mhba,
unsigned int *cur_obf, unsigned int *assign_obf_end)
{ … }
static void mvumi_receive_ob_list_entry(struct mvumi_hba *mhba)
{ … }
static void mvumi_reset(struct mvumi_hba *mhba)
{ … }
static unsigned char mvumi_start(struct mvumi_hba *mhba);
static int mvumi_wait_for_outstanding(struct mvumi_hba *mhba)
{ … }
static int mvumi_wait_for_fw(struct mvumi_hba *mhba)
{ … }
static void mvumi_backup_bar_addr(struct mvumi_hba *mhba)
{ … }
static void mvumi_restore_bar_addr(struct mvumi_hba *mhba)
{ … }
static int mvumi_pci_set_master(struct pci_dev *pdev)
{ … }
static int mvumi_reset_host_9580(struct mvumi_hba *mhba)
{ … }
static int mvumi_reset_host_9143(struct mvumi_hba *mhba)
{ … }
static int mvumi_host_reset(struct scsi_cmnd *scmd)
{ … }
static int mvumi_issue_blocked_cmd(struct mvumi_hba *mhba,
struct mvumi_cmd *cmd)
{ … }
static void mvumi_release_fw(struct mvumi_hba *mhba)
{ … }
static unsigned char mvumi_flush_cache(struct mvumi_hba *mhba)
{ … }
static unsigned char
mvumi_calculate_checksum(struct mvumi_hs_header *p_header,
unsigned short len)
{ … }
static void mvumi_hs_build_page(struct mvumi_hba *mhba,
struct mvumi_hs_header *hs_header)
{ … }
static int mvumi_init_data(struct mvumi_hba *mhba)
{ … }
static int mvumi_hs_process_page(struct mvumi_hba *mhba,
struct mvumi_hs_header *hs_header)
{ … }
static int mvumi_handshake(struct mvumi_hba *mhba)
{ … }
static unsigned char mvumi_handshake_event(struct mvumi_hba *mhba)
{ … }
static unsigned char mvumi_check_handshake(struct mvumi_hba *mhba)
{ … }
static unsigned char mvumi_start(struct mvumi_hba *mhba)
{ … }
static void mvumi_complete_cmd(struct mvumi_hba *mhba, struct mvumi_cmd *cmd,
struct mvumi_rsp_frame *ob_frame)
{ … }
static void mvumi_complete_internal_cmd(struct mvumi_hba *mhba,
struct mvumi_cmd *cmd,
struct mvumi_rsp_frame *ob_frame)
{ … }
static void mvumi_show_event(struct mvumi_hba *mhba,
struct mvumi_driver_event *ptr)
{ … }
static int mvumi_handle_hotplug(struct mvumi_hba *mhba, u16 devid, int status)
{ … }
static u64 mvumi_inquiry(struct mvumi_hba *mhba,
unsigned int id, struct mvumi_cmd *cmd)
{ … }
static void mvumi_detach_devices(struct mvumi_hba *mhba)
{ … }
static void mvumi_rescan_devices(struct mvumi_hba *mhba, int id)
{ … }
static int mvumi_match_devices(struct mvumi_hba *mhba, int id, u64 wwid)
{ … }
static void mvumi_remove_devices(struct mvumi_hba *mhba, int id)
{ … }
static int mvumi_probe_devices(struct mvumi_hba *mhba)
{ … }
static int mvumi_rescan_bus(void *data)
{ … }
static void mvumi_proc_msg(struct mvumi_hba *mhba,
struct mvumi_hotplug_event *param)
{ … }
static void mvumi_notification(struct mvumi_hba *mhba, u8 msg, void *buffer)
{ … }
static int mvumi_get_event(struct mvumi_hba *mhba, unsigned char msg)
{ … }
static void mvumi_scan_events(struct work_struct *work)
{ … }
static void mvumi_launch_events(struct mvumi_hba *mhba, u32 isr_status)
{ … }
static void mvumi_handle_clob(struct mvumi_hba *mhba)
{ … }
static irqreturn_t mvumi_isr_handler(int irq, void *devp)
{ … }
static enum mvumi_qc_result mvumi_send_command(struct mvumi_hba *mhba,
struct mvumi_cmd *cmd)
{ … }
static void mvumi_fire_cmd(struct mvumi_hba *mhba, struct mvumi_cmd *cmd)
{ … }
static void mvumi_enable_intr(struct mvumi_hba *mhba)
{ … }
static void mvumi_disable_intr(struct mvumi_hba *mhba)
{ … }
static int mvumi_clear_intr(void *extend)
{ … }
static unsigned int mvumi_read_fw_status_reg(struct mvumi_hba *mhba)
{ … }
static struct mvumi_instance_template mvumi_instance_9143 = …;
static struct mvumi_instance_template mvumi_instance_9580 = …;
static int mvumi_slave_configure(struct scsi_device *sdev)
{ … }
static unsigned char mvumi_build_frame(struct mvumi_hba *mhba,
struct scsi_cmnd *scmd, struct mvumi_cmd *cmd)
{ … }
static int mvumi_queue_command(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
{ … }
static enum scsi_timeout_action mvumi_timed_out(struct scsi_cmnd *scmd)
{ … }
static int
mvumi_bios_param(struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int geom[])
{ … }
static const struct scsi_host_template mvumi_template = …;
static int mvumi_cfg_hw_reg(struct mvumi_hba *mhba)
{ … }
static int mvumi_init_fw(struct mvumi_hba *mhba)
{ … }
static int mvumi_io_attach(struct mvumi_hba *mhba)
{ … }
static int mvumi_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{ … }
static void mvumi_detach_one(struct pci_dev *pdev)
{ … }
static void mvumi_shutdown(struct pci_dev *pdev)
{ … }
static int __maybe_unused mvumi_suspend(struct device *dev)
{ … }
static int __maybe_unused mvumi_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(mvumi_pm_ops, mvumi_suspend, mvumi_resume);
static struct pci_driver mvumi_pci_driver = …;
module_pci_driver(…) …;