#ifndef _MV_SAS_H_
#define _MV_SAS_H_
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/types.h>
#include <linux/ctype.h>
#include <linux/dma-mapping.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <asm/unaligned.h>
#include <scsi/libsas.h>
#include <scsi/scsi.h>
#include <scsi/scsi_tcq.h>
#include <scsi/sas_ata.h>
#include "mv_defs.h"
#define DRV_NAME …
#define DRV_VERSION …
#define MVS_ID_NOT_MAPPED …
#define WIDE_PORT_MAX_PHY …
#define mv_printk(fmt, arg ...) …
#ifdef MV_DEBUG
#define mv_dprintk(format, arg...) …
#else
#define mv_dprintk …
#endif
#define MV_MAX_U32 …
extern int interrupt_coalescing;
extern struct mvs_tgt_initiator mvs_tgt;
extern struct mvs_info *tgt_mvi;
extern const struct mvs_dispatch mvs_64xx_dispatch;
extern const struct mvs_dispatch mvs_94xx_dispatch;
#define bit(n) …
#define for_each_phy(__lseq_mask, __mc, __lseq) …
#define MVS_PHY_ID …
#define MV_INIT_DELAYED_WORK(w, f, d) …
#define UNASSOC_D2H_FIS(id) …
#define SATA_RECEIVED_FIS_LIST(reg_set) …
#define SATA_RECEIVED_SDB_FIS(reg_set) …
#define SATA_RECEIVED_D2H_FIS(reg_set) …
#define SATA_RECEIVED_PIO_FIS(reg_set) …
#define SATA_RECEIVED_DMA_FIS(reg_set) …
enum dev_status { … };
enum dev_reset { … };
struct mvs_info;
struct mvs_prv_info;
struct mvs_dispatch { … };
struct mvs_chip_info { … };
#define MVS_MAX_SG …
#define MVS_CHIP_SLOT_SZ …
#define MVS_RX_FISL_SZ …
#define MVS_CHIP_DISP …
struct mvs_err_info { … };
struct mvs_cmd_hdr { … };
struct mvs_port { … };
struct mvs_phy { … };
struct mvs_device { … };
struct phy_tuning { … };
struct ffe_control { … };
struct hba_info_page { … };
struct mvs_slot_info { … };
struct mvs_info { … };
struct mvs_prv_info{ … };
struct mvs_wq { … };
struct mvs_task_exec_info { … };
void mvs_get_sas_addr(void *buf, u32 buflen);
void mvs_iounmap(void __iomem *regs);
int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex);
void mvs_phys_reset(struct mvs_info *mvi, u32 phy_mask, int hard);
int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
void *funcdata);
void mvs_set_sas_addr(struct mvs_info *mvi, int port_id, u32 off_lo,
u32 off_hi, u64 sas_addr);
void mvs_scan_start(struct Scsi_Host *shost);
int mvs_scan_finished(struct Scsi_Host *shost, unsigned long time);
int mvs_queue_command(struct sas_task *task, gfp_t gfp_flags);
int mvs_abort_task(struct sas_task *task);
void mvs_port_formed(struct asd_sas_phy *sas_phy);
void mvs_port_deformed(struct asd_sas_phy *sas_phy);
int mvs_dev_found(struct domain_device *dev);
void mvs_dev_gone(struct domain_device *dev);
int mvs_lu_reset(struct domain_device *dev, u8 *lun);
int mvs_slot_complete(struct mvs_info *mvi, u32 rx_desc, u32 flags);
int mvs_I_T_nexus_reset(struct domain_device *dev);
int mvs_query_task(struct sas_task *task);
void mvs_release_task(struct mvs_info *mvi,
struct domain_device *dev);
void mvs_do_release_task(struct mvs_info *mvi, int phy_no,
struct domain_device *dev);
void mvs_int_port(struct mvs_info *mvi, int phy_no, u32 events);
void mvs_update_phyinfo(struct mvs_info *mvi, int i, int get_st);
int mvs_int_rx(struct mvs_info *mvi, bool self_clear);
struct mvs_device *mvs_find_dev_by_reg_set(struct mvs_info *mvi, u8 reg_set);
int mvs_gpio_write(struct sas_ha_struct *, u8 reg_type, u8 reg_index,
u8 reg_count, u8 *write_data);
#endif