#ifndef _CPQARY3_Q_MEM_H
#define _CPQARY3_Q_MEM_H
#ifdef __cplusplus
extern "C" {
#endif
#define CPQARY3_GET_MEM_TAG 4
#define CPQARY3_FREE 0
#define CPQARY3_OCCUPIED 1
#define CPQARY3_SELF_OCCUPIED 2
#define CPQARY3_POLL_OCCUPIED 3
#define CPQARY3_PHYCTGS_DONE 0x01
#define CPQARY3_CMDMEM_DONE 0x02
#define CPQARY3_MEMLIST_DONE 0x04
#define CPQARY3_SUBMITTED_Q 0x0100
#define CPQARY3_APPEND_RETRIEVE 1
#define CPQARY3_REMOVE_SUBMITTED 0
#define CPQARY3_Q_UNMASK 0x0300
#define NO_OF_CMDLIST_IN_A_BLK 3
typedef struct cpqary3_phyctg {
size_t real_size;
ddi_dma_handle_t cpqary3_dmahandle;
ddi_acc_handle_t cpqary3_acchandle;
ddi_dma_cookie_t cpqary3_dmacookie;
} cpqary3_phyctg_t;
typedef struct cpqary3_command_private CMDLIST;
typedef struct cpqary3_command_private {
uint8_t occupied;
uint8_t cmdpvt_flag;
uint32_t cmdlist_phyaddr;
uint32_t cmdlist_erraddr;
cpqary3_tag_t tag;
ErrorInfo_t *errorinfop;
CommandList_t *cmdlist_memaddr;
struct cpqary3_command_private *next;
struct cpqary3_command_private *prev;
struct cpqary3_per_controller *ctlr;
struct cpqary3_pkt *pvt_pkt;
struct cpqary3_driver_private *driverdata;
struct cpqary3_command_private *snext;
struct cpqary3_command_private *sprev;
void (*complete)(CMDLIST *);
} cpqary3_cmdpvt_t;
typedef struct physical_handle_address {
cpqary3_phyctg_t *blk_addr;
struct physical_handle_address *next;
} cpqary3_phys_hdl_addr_t;
typedef struct cpqary3_cmdmemlist {
uint16_t max_memcnt;
cpqary3_cmdpvt_t *pool;
cpqary3_cmdpvt_t *head;
cpqary3_cmdpvt_t *tail;
cpqary3_phys_hdl_addr_t *cpqary3_phyctgp;
} cpqary3_cmdmemlist_t;
#ifdef __cplusplus
}
#endif
#endif