linux/drivers/scsi/esas2r/esas2r.h

/*
 *  linux/drivers/scsi/esas2r/esas2r.h
 *      For use with ATTO ExpressSAS R6xx SAS/SATA RAID controllers
 *
 *  Copyright (c) 2001-2013 ATTO Technology, Inc.
 *  (mailto:[email protected])
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * NO WARRANTY
 * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
 * solely responsible for determining the appropriateness of using and
 * distributing the Program and assumes all risks associated with its
 * exercise of rights under this Agreement, including but not limited to
 * the risks and costs of program errors, damage to or loss of data,
 * programs or equipment, and unavailability or interruption of operations.
 *
 * DISCLAIMER OF LIABILITY
 * NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 * USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
 * HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
 * USA.
 */

#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/proc_fs.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_tcq.h>

#include "esas2r_log.h"
#include "atioctl.h"
#include "atvda.h"

#ifndef ESAS2R_H
#define ESAS2R_H

/* Global Variables */
extern struct esas2r_adapter *esas2r_adapters[];
extern u8 *esas2r_buffered_ioctl;
extern dma_addr_t esas2r_buffered_ioctl_addr;
extern u32 esas2r_buffered_ioctl_size;
extern struct pci_dev *esas2r_buffered_ioctl_pcid;
#define SGL_PG_SZ_MIN
#define SGL_PG_SZ_MAX
extern int sgl_page_size;
#define NUM_SGL_MIN
#define NUM_SGL_MAX
extern int num_sg_lists;
#define NUM_REQ_MIN
#define NUM_REQ_MAX
extern int num_requests;
#define NUM_AE_MIN
#define NUM_AE_MAX
extern int num_ae_requests;
extern int cmd_per_lun;
extern int can_queue;
extern int esas2r_max_sectors;
extern int sg_tablesize;
extern int interrupt_mode;
extern int num_io_requests;

/* Macro defintions */
#define ESAS2R_MAX_ID
#define MAX_ADAPTERS
#define ESAS2R_DRVR_NAME
#define ESAS2R_LONGNAME
#define ESAS2R_MAX_DEVICES
#define ATTONODE_NAME
#define ESAS2R_MAJOR_REV
#define ESAS2R_MINOR_REV
#define ESAS2R_VERSION_STR
#define ESAS2R_COPYRIGHT_YEARS
#define ESAS2R_DEFAULT_SGL_PAGE_SIZE
#define ESAS2R_DEFAULT_CMD_PER_LUN
#define ESAS2R_DEFAULT_NUM_SG_LISTS
#define DEFINED_NUM_TO_STR(num)
#define NUM_TO_STR(num)

#define ESAS2R_SGL_ALIGN
#define ESAS2R_LIST_ALIGN
#define ESAS2R_LIST_EXTRA
#define ESAS2R_DATA_BUF_LEN
#define ESAS2R_DEFAULT_TMO
#define ESAS2R_DISC_BUF_LEN
#define ESAS2R_FWCOREDUMP_SZ
#define ESAS2R_NUM_PHYS
#define ESAS2R_TARG_ID_INV
#define ESAS2R_INT_STS_MASK
#define ESAS2R_INT_ENB_MASK
#define ESAS2R_INT_DIS_MASK
#define ESAS2R_MAX_TARGETS
#define ESAS2R_KOBJ_NAME_LEN

/* u16 (WORD) component macros */
#define LOBYTE(w)
#define HIBYTE(w)
#define MAKEWORD(lo, hi)

/* u32 (DWORD) component macros */
#define LOWORD(d)
#define HIWORD(d)
#define MAKEDWORD(lo, hi)

/* macro to get the lowest nonzero bit of a value */
#define LOBIT(x)

/* These functions are provided to access the chip's control registers.
 * The register is specified by its byte offset from the register base
 * for the adapter.
 */
#define esas2r_read_register_dword(a, reg)

#define esas2r_write_register_dword(a, reg, data)

#define esas2r_flush_register_dword(a, r)

/* This function is provided to access the chip's data window.   The
 * register is specified by its byte offset from the window base
 * for the adapter.
 */
#define esas2r_read_data_byte(a, reg)

/* ATTO vendor and device Ids */
#define ATTO_VENDOR_ID
#define ATTO_DID_INTEL_IOP348
#define ATTO_DID_MV_88RC9580
#define ATTO_DID_MV_88RC9580TS
#define ATTO_DID_MV_88RC9580TSE
#define ATTO_DID_MV_88RC9580TL

/* ATTO subsystem device Ids */
#define ATTO_SSDID_TBT
#define ATTO_TSSC_3808
#define ATTO_TSSC_3808E
#define ATTO_TLSH_1068
#define ATTO_ESAS_R680
#define ATTO_ESAS_R608
#define ATTO_ESAS_R60F
#define ATTO_ESAS_R6F0
#define ATTO_ESAS_R644
#define ATTO_ESAS_R648

/*
 * flash definitions & structures
 * define the code types
 */
#define FBT_CPYR
#define FBT_SETUP
#define FBT_FLASH_VER

/* offsets to various locations in flash */
#define FLS_OFFSET_BOOT
#define FLS_OFFSET_NVR
#define FLS_OFFSET_CPYR
#define FLS_LENGTH_BOOT
#define FLS_BLOCK_SIZE
#define FI_NVR_2KB
#define FI_NVR_8KB
#define FM_BUF_SZ

/*
 * marvell frey (88R9580) register definitions
 * chip revision identifiers
 */
#define MVR_FREY_B2

/*
 * memory window definitions.  window 0 is the data window with definitions
 * of MW_DATA_XXX.  window 1 is the register window with definitions of
 * MW_REG_XXX.
 */
#define MW_REG_WINDOW_SIZE
#define MW_REG_OFFSET_HWREG
#define MW_REG_OFFSET_PCI
#define MW_REG_PCI_HWREG_DELTA
#define MW_DATA_WINDOW_SIZE
#define MW_DATA_ADDR_SER_FLASH
#define MW_DATA_ADDR_SRAM
#define MW_DATA_ADDR_PAR_FLASH

/*
 * the following registers are for the communication
 * list interface (AKA message unit (MU))
 */
#define MU_IN_LIST_ADDR_LO
#define MU_IN_LIST_ADDR_HI

#define MU_IN_LIST_WRITE
    #define MU_ILW_TOGGLE

#define MU_IN_LIST_READ
    #define MU_ILR_TOGGLE
    #define MU_ILIC_LIST
    #define MU_ILIC_LIST_F0
    #define MU_ILIC_DEST
    #define MU_ILIC_DEST_DDR
#define MU_IN_LIST_IFC_CONFIG

#define MU_IN_LIST_CONFIG
    #define MU_ILC_ENABLE
    #define MU_ILC_ENTRY_MASK
    #define MU_ILC_ENTRY_4_DW
    #define MU_ILC_DYNAMIC_SRC
    #define MU_ILC_NUMBER_MASK
    #define MU_ILC_NUMBER_SHIFT

#define MU_OUT_LIST_ADDR_LO
#define MU_OUT_LIST_ADDR_HI

#define MU_OUT_LIST_COPY_PTR_LO
#define MU_OUT_LIST_COPY_PTR_HI

#define MU_OUT_LIST_WRITE
    #define MU_OLW_TOGGLE

#define MU_OUT_LIST_COPY
    #define MU_OLC_TOGGLE
    #define MU_OLC_WRT_PTR

#define MU_OUT_LIST_IFC_CONFIG
    #define MU_OLIC_LIST
    #define MU_OLIC_LIST_F0
    #define MU_OLIC_SOURCE
    #define MU_OLIC_SOURCE_DDR

#define MU_OUT_LIST_CONFIG
    #define MU_OLC_ENABLE
    #define MU_OLC_ENTRY_MASK
    #define MU_OLC_ENTRY_4_DW
    #define MU_OLC_NUMBER_MASK
    #define MU_OLC_NUMBER_SHIFT

#define MU_OUT_LIST_INT_STAT
    #define MU_OLIS_INT

#define MU_OUT_LIST_INT_MASK
    #define MU_OLIS_MASK

/*
 * the maximum size of the communication lists is two greater than the
 * maximum amount of VDA requests.  the extra are to prevent queue overflow.
 */
#define ESAS2R_MAX_NUM_REQS
#define ESAS2R_NUM_EXTRA
#define ESAS2R_MAX_COMM_LIST_SIZE

/*
 * the following registers are for the CPU interface
 */
#define MU_CTL_STATUS_IN
    #define MU_CTL_IN_FULL_RST
#define MU_CTL_STATUS_IN_B2
    #define MU_CTL_IN_FULL_RST2
#define MU_DOORBELL_IN
    #define DRBL_RESET_BUS
    #define DRBL_PAUSE_AE
    #define DRBL_RESUME_AE
    #define DRBL_MSG_IFC_DOWN
    #define DRBL_FLASH_REQ
    #define DRBL_FLASH_DONE
    #define DRBL_FORCE_INT
    #define DRBL_MSG_IFC_INIT
    #define DRBL_POWER_DOWN
    #define DRBL_DRV_VER_1
    #define DRBL_DRV_VER
#define MU_DOORBELL_IN_ENB
#define MU_DOORBELL_OUT
 #define DRBL_PANIC_REASON_MASK
    #define DRBL_UNUSED_HANDLER
    #define DRBL_UNDEF_INSTR
    #define DRBL_PREFETCH_ABORT
    #define DRBL_DATA_ABORT
    #define DRBL_JUMP_TO_ZERO
  #define DRBL_FW_RESET
  #define DRBL_FW_VER_MSK
  #define DRBL_FW_VER_0
  #define DRBL_FW_VER_1
  #define DRBL_FW_VER
#define MU_DOORBELL_OUT_ENB
    #define DRBL_ENB_MASK
#define MU_INT_STATUS_OUT
    #define MU_INTSTAT_POST_OUT
    #define MU_INTSTAT_DRBL_IN
    #define MU_INTSTAT_DRBL
    #define MU_INTSTAT_MASK
#define MU_INT_MASK_OUT

/* PCI express registers accessed via window 1 */
#define MVR_PCI_WIN1_REMAP
    #define MVRPW1R_ENABLE


/* structures */

/* inbound list dynamic source entry */
struct esas2r_inbound_list_source_entry {};

/* PCI data structure in expansion ROM images */
struct __packed esas2r_boot_header {};

struct __packed esas2r_boot_image {};

struct __packed esas2r_pc_image {};

struct __packed esas2r_efi_image {};

struct esas2r_adapter;
struct esas2r_sg_context;
struct esas2r_request;

RQCALLBK;
RQBUILDSGL;

struct esas2r_component_header {};

#define FI_REL_VER_SZ

struct esas2r_flash_img_v0 {};

struct esas2r_flash_img {};

/* definitions for flash script (FS) commands */
struct esas2r_ioctlfs_command {};

struct esas2r_ioctl_fs {};

struct esas2r_sas_nvram {};

PGETPHYSADDR;

struct esas2r_sg_context {};

struct esas2r_target {};

struct esas2r_request {};

struct esas2r_flash_context {};

struct esas2r_disc_context {};

struct esas2r_mem_desc {};

enum fw_event_type {};

struct esas2r_vda_ae {};

struct esas2r_fw_event_work {};

enum state {};

struct esas2r_firmware {};

struct esas2r_adapter {};

/*
 * Function Declarations
 * SCSI functions
 */
const char *esas2r_info(struct Scsi_Host *);
int esas2r_write_params(struct esas2r_adapter *a, struct esas2r_request *rq,
			struct esas2r_sas_nvram *data);
int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg);
int esas2r_ioctl(struct scsi_device *dev, unsigned int cmd, void __user *arg);
u8 handle_hba_ioctl(struct esas2r_adapter *a,
		    struct atto_ioctl *ioctl_hba);
int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd);
int esas2r_show_info(struct seq_file *m, struct Scsi_Host *sh);
long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg);

/* SCSI error handler (eh) functions */
int esas2r_eh_abort(struct scsi_cmnd *cmd);
int esas2r_device_reset(struct scsi_cmnd *cmd);
int esas2r_host_reset(struct scsi_cmnd *cmd);
int esas2r_bus_reset(struct scsi_cmnd *cmd);
int esas2r_target_reset(struct scsi_cmnd *cmd);

/* Internal functions */
int esas2r_init_adapter(struct Scsi_Host *host, struct pci_dev *pcid,
			int index);
int esas2r_read_fw(struct esas2r_adapter *a, char *buf, long off, int count);
int esas2r_write_fw(struct esas2r_adapter *a, const char *buf, long off,
		    int count);
int esas2r_read_vda(struct esas2r_adapter *a, char *buf, long off, int count);
int esas2r_write_vda(struct esas2r_adapter *a, const char *buf, long off,
		     int count);
int esas2r_read_fs(struct esas2r_adapter *a, char *buf, long off, int count);
int esas2r_write_fs(struct esas2r_adapter *a, const char *buf, long off,
		    int count);
void esas2r_adapter_tasklet(unsigned long context);
irqreturn_t esas2r_interrupt(int irq, void *dev_id);
irqreturn_t esas2r_msi_interrupt(int irq, void *dev_id);
void esas2r_kickoff_timer(struct esas2r_adapter *a);

extern const struct dev_pm_ops esas2r_pm_ops;

void esas2r_fw_event_off(struct esas2r_adapter *a);
void esas2r_fw_event_on(struct esas2r_adapter *a);
bool esas2r_nvram_write(struct esas2r_adapter *a, struct esas2r_request *rq,
			struct esas2r_sas_nvram *nvram);
void esas2r_nvram_get_defaults(struct esas2r_adapter *a,
			       struct esas2r_sas_nvram *nvram);
void esas2r_complete_request_cb(struct esas2r_adapter *a,
				struct esas2r_request *rq);
void esas2r_reset_detected(struct esas2r_adapter *a);
void esas2r_target_state_changed(struct esas2r_adapter *ha, u16 targ_id,
				 u8 state);
int esas2r_req_status_to_error(u8 req_stat);
void esas2r_kill_adapter(int i);
void esas2r_free_request(struct esas2r_adapter *a, struct esas2r_request *rq);
struct esas2r_request *esas2r_alloc_request(struct esas2r_adapter *a);
u32 esas2r_get_uncached_size(struct esas2r_adapter *a);
bool esas2r_init_adapter_struct(struct esas2r_adapter *a,
				void **uncached_area);
bool esas2r_check_adapter(struct esas2r_adapter *a);
bool esas2r_init_adapter_hw(struct esas2r_adapter *a, bool init_poll);
void esas2r_start_request(struct esas2r_adapter *a, struct esas2r_request *rq);
bool esas2r_send_task_mgmt(struct esas2r_adapter *a,
			   struct esas2r_request *rqaux, u8 task_mgt_func);
void esas2r_do_tasklet_tasks(struct esas2r_adapter *a);
void esas2r_adapter_interrupt(struct esas2r_adapter *a);
void esas2r_do_deferred_processes(struct esas2r_adapter *a);
void esas2r_reset_bus(struct esas2r_adapter *a);
void esas2r_reset_adapter(struct esas2r_adapter *a);
void esas2r_timer_tick(struct esas2r_adapter *a);
const char *esas2r_get_model_name(struct esas2r_adapter *a);
const char *esas2r_get_model_name_short(struct esas2r_adapter *a);
u32 esas2r_stall_execution(struct esas2r_adapter *a, u32 start_time,
			   u32 *delay);
void esas2r_build_flash_req(struct esas2r_adapter *a,
			    struct esas2r_request *rq,
			    u8 sub_func,
			    u8 cksum,
			    u32 addr,
			    u32 length);
void esas2r_build_mgt_req(struct esas2r_adapter *a,
			  struct esas2r_request *rq,
			  u8 sub_func,
			  u8 scan_gen,
			  u16 dev_index,
			  u32 length,
			  void *data);
void esas2r_build_ae_req(struct esas2r_adapter *a, struct esas2r_request *rq);
void esas2r_build_cli_req(struct esas2r_adapter *a,
			  struct esas2r_request *rq,
			  u32 length,
			  u32 cmd_rsp_len);
void esas2r_build_ioctl_req(struct esas2r_adapter *a,
			    struct esas2r_request *rq,
			    u32 length,
			    u8 sub_func);
void esas2r_build_cfg_req(struct esas2r_adapter *a,
			  struct esas2r_request *rq,
			  u8 sub_func,
			  u32 length,
			  void *data);
void esas2r_power_down(struct esas2r_adapter *a);
bool esas2r_power_up(struct esas2r_adapter *a, bool init_poll);
void esas2r_wait_request(struct esas2r_adapter *a, struct esas2r_request *rq);
u32 esas2r_map_data_window(struct esas2r_adapter *a, u32 addr_lo);
bool esas2r_process_fs_ioctl(struct esas2r_adapter *a,
			     struct esas2r_ioctl_fs *fs,
			     struct esas2r_request *rq,
			     struct esas2r_sg_context *sgc);
bool esas2r_read_flash_block(struct esas2r_adapter *a, void *to, u32 from,
			     u32 size);
bool esas2r_read_mem_block(struct esas2r_adapter *a, void *to, u32 from,
			   u32 size);
bool esas2r_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi,
		   struct esas2r_request *rq, struct esas2r_sg_context *sgc);
void esas2r_force_interrupt(struct esas2r_adapter *a);
void esas2r_local_start_request(struct esas2r_adapter *a,
				struct esas2r_request *rq);
void esas2r_process_adapter_reset(struct esas2r_adapter *a);
void esas2r_complete_request(struct esas2r_adapter *a,
			     struct esas2r_request *rq);
void esas2r_dummy_complete(struct esas2r_adapter *a,
			   struct esas2r_request *rq);
void esas2r_ae_complete(struct esas2r_adapter *a, struct esas2r_request *rq);
void esas2r_start_vda_request(struct esas2r_adapter *a,
			      struct esas2r_request *rq);
bool esas2r_read_flash_rev(struct esas2r_adapter *a);
bool esas2r_read_image_type(struct esas2r_adapter *a);
bool esas2r_nvram_read_direct(struct esas2r_adapter *a);
bool esas2r_nvram_validate(struct esas2r_adapter *a);
void esas2r_nvram_set_defaults(struct esas2r_adapter *a);
bool esas2r_print_flash_rev(struct esas2r_adapter *a);
void esas2r_send_reset_ae(struct esas2r_adapter *a, bool pwr_mgt);
bool esas2r_init_msgs(struct esas2r_adapter *a);
bool esas2r_is_adapter_present(struct esas2r_adapter *a);
void esas2r_nuxi_mgt_data(u8 function, void *data);
void esas2r_nuxi_cfg_data(u8 function, void *data);
void esas2r_nuxi_ae_data(union atto_vda_ae *ae);
void esas2r_reset_chip(struct esas2r_adapter *a);
void esas2r_log_request_failure(struct esas2r_adapter *a,
				struct esas2r_request *rq);
void esas2r_polled_interrupt(struct esas2r_adapter *a);
bool esas2r_ioreq_aborted(struct esas2r_adapter *a, struct esas2r_request *rq,
			  u8 status);
bool esas2r_build_sg_list_sge(struct esas2r_adapter *a,
			      struct esas2r_sg_context *sgc);
bool esas2r_build_sg_list_prd(struct esas2r_adapter *a,
			      struct esas2r_sg_context *sgc);
void esas2r_targ_db_initialize(struct esas2r_adapter *a);
void esas2r_targ_db_remove_all(struct esas2r_adapter *a, bool notify);
void esas2r_targ_db_report_changes(struct esas2r_adapter *a);
struct esas2r_target *esas2r_targ_db_add_raid(struct esas2r_adapter *a,
					      struct esas2r_disc_context *dc);
struct esas2r_target *esas2r_targ_db_add_pthru(struct esas2r_adapter *a,
					       struct esas2r_disc_context *dc,
					       u8 *ident,
					       u8 ident_len);
void esas2r_targ_db_remove(struct esas2r_adapter *a, struct esas2r_target *t);
struct esas2r_target *esas2r_targ_db_find_by_sas_addr(struct esas2r_adapter *a,
						      u64 *sas_addr);
struct esas2r_target *esas2r_targ_db_find_by_ident(struct esas2r_adapter *a,
						   void *identifier,
						   u8 ident_len);
u16 esas2r_targ_db_find_next_present(struct esas2r_adapter *a, u16 target_id);
struct esas2r_target *esas2r_targ_db_find_by_virt_id(struct esas2r_adapter *a,
						     u16 virt_id);
u16 esas2r_targ_db_get_tgt_cnt(struct esas2r_adapter *a);
void esas2r_disc_initialize(struct esas2r_adapter *a);
void esas2r_disc_start_waiting(struct esas2r_adapter *a);
void esas2r_disc_check_for_work(struct esas2r_adapter *a);
void esas2r_disc_check_complete(struct esas2r_adapter *a);
void esas2r_disc_queue_event(struct esas2r_adapter *a, u8 disc_evt);
bool esas2r_disc_start_port(struct esas2r_adapter *a);
void esas2r_disc_local_start_request(struct esas2r_adapter *a,
				     struct esas2r_request *rq);
bool esas2r_set_degraded_mode(struct esas2r_adapter *a, char *error_str);
bool esas2r_process_vda_ioctl(struct esas2r_adapter *a,
			      struct atto_ioctl_vda *vi,
			      struct esas2r_request *rq,
			      struct esas2r_sg_context *sgc);
void esas2r_queue_fw_event(struct esas2r_adapter *a,
			   enum fw_event_type type,
			   void *data,
			   int data_sz);

/* Inline functions */

/* Allocate a chip scatter/gather list entry */
static inline struct esas2r_mem_desc *esas2r_alloc_sgl(struct esas2r_adapter *a)
{}

/* Initialize a scatter/gather context */
static inline void esas2r_sgc_init(struct esas2r_sg_context *sgc,
				   struct esas2r_adapter *a,
				   struct esas2r_request *rq,
				   struct atto_vda_sge *first)
{}

static inline void esas2r_rq_init_request(struct esas2r_request *rq,
					  struct esas2r_adapter *a)
{}

static inline void esas2r_rq_free_sg_lists(struct esas2r_request *rq,
					   struct esas2r_adapter *a)
{}

static inline void esas2r_rq_destroy_request(struct esas2r_request *rq,
					     struct esas2r_adapter *a)

{}

static inline bool esas2r_is_tasklet_pending(struct esas2r_adapter *a)
{}

/*
 * Build the scatter/gather list for an I/O request according to the
 * specifications placed in the esas2r_sg_context.  The caller must initialize
 * struct esas2r_sg_context prior to the initial call by calling
 * esas2r_sgc_init()
 */
static inline bool esas2r_build_sg_list(struct esas2r_adapter *a,
					struct esas2r_request *rq,
					struct esas2r_sg_context *sgc)
{}

static inline void esas2r_disable_chip_interrupts(struct esas2r_adapter *a)
{}

static inline void esas2r_enable_chip_interrupts(struct esas2r_adapter *a)
{}

/* Schedule a TASKLET to perform non-interrupt tasks that may require delays
 * or long completion times.
 */
static inline void esas2r_schedule_tasklet(struct esas2r_adapter *a)
{}

static inline void esas2r_enable_heartbeat(struct esas2r_adapter *a)
{}

static inline void esas2r_disable_heartbeat(struct esas2r_adapter *a)
{}

/* Set the initial state for resetting the adapter on the next pass through
 * esas2r_do_deferred.
 */
static inline void esas2r_local_reset_adapter(struct esas2r_adapter *a)
{}

/* See if an interrupt is pending on the adapter. */
static inline bool esas2r_adapter_interrupt_pending(struct esas2r_adapter *a)
{}

static inline u16 esas2r_targ_get_id(struct esas2r_target *t,
				     struct esas2r_adapter *a)
{}

/*  Build and start an asynchronous event request */
static inline void esas2r_start_ae_request(struct esas2r_adapter *a,
					   struct esas2r_request *rq)
{}

static inline void esas2r_comp_list_drain(struct esas2r_adapter *a,
					  struct list_head *comp_list)
{}

/* sysfs handlers */
extern struct bin_attribute bin_attr_fw;
extern struct bin_attribute bin_attr_fs;
extern struct bin_attribute bin_attr_vda;
extern struct bin_attribute bin_attr_hw;
extern struct bin_attribute bin_attr_live_nvram;
extern struct bin_attribute bin_attr_default_nvram;

#endif /* ESAS2R_H */