aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2005-07-06 13:30:05 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-14 10:47:30 -0400
commitabbd8870b9cb7754a4935826bc9f3c7b029f8b7c (patch)
treec795f15d35c18a08c97dcbdaeb83a4e0c67679c6 /drivers/scsi/qla2xxx/qla_def.h
parenteb1dd68bc897d4e5a5133bfffbd4777a0fe16c4c (diff)
[SCSI] qla2xxx: Factor-out ISP specific functions to method-based call tables.
Factor-out ISP specific functions to method-based call tables. In anticipation of ISP24xx/ISP25xx support, factor-out ISP specific functions into a method-based call table. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h46
1 files changed, 44 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 83a32e403e29..24e22dc2fe57 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -33,6 +33,7 @@
33#include <linux/mempool.h> 33#include <linux/mempool.h>
34#include <linux/spinlock.h> 34#include <linux/spinlock.h>
35#include <linux/completion.h> 35#include <linux/completion.h>
36#include <linux/interrupt.h>
36#include <asm/semaphore.h> 37#include <asm/semaphore.h>
37 38
38#include <scsi/scsi.h> 39#include <scsi/scsi.h>
@@ -1950,6 +1951,47 @@ struct gid_list_info {
1950#define GID_LIST_SIZE (sizeof(struct gid_list_info) * MAX_FIBRE_DEVICES) 1951#define GID_LIST_SIZE (sizeof(struct gid_list_info) * MAX_FIBRE_DEVICES)
1951 1952
1952/* 1953/*
1954 * ISP operations
1955 */
1956struct isp_operations {
1957
1958 int (*pci_config) (struct scsi_qla_host *);
1959 void (*reset_chip) (struct scsi_qla_host *);
1960 int (*chip_diag) (struct scsi_qla_host *);
1961 void (*config_rings) (struct scsi_qla_host *);
1962 void (*reset_adapter) (struct scsi_qla_host *);
1963 int (*nvram_config) (struct scsi_qla_host *);
1964 void (*update_fw_options) (struct scsi_qla_host *);
1965 int (*load_risc) (struct scsi_qla_host *, uint32_t *);
1966
1967 char * (*pci_info_str) (struct scsi_qla_host *, char *);
1968 char * (*fw_version_str) (struct scsi_qla_host *, char *);
1969
1970 irqreturn_t (*intr_handler) (int, void *, struct pt_regs *);
1971 void (*enable_intrs) (struct scsi_qla_host *);
1972 void (*disable_intrs) (struct scsi_qla_host *);
1973
1974 int (*abort_command) (struct scsi_qla_host *, srb_t *);
1975 int (*abort_target) (struct fc_port *);
1976 int (*fabric_login) (struct scsi_qla_host *, uint16_t, uint8_t,
1977 uint8_t, uint8_t, uint16_t *, uint8_t);
1978 int (*fabric_logout) (struct scsi_qla_host *, uint16_t);
1979
1980 uint16_t (*calc_req_entries) (uint16_t);
1981 void (*build_iocbs) (srb_t *, cmd_entry_t *, uint16_t);
1982 ms_iocb_entry_t * (*prep_ms_iocb) (struct scsi_qla_host *, uint32_t,
1983 uint32_t);
1984
1985 uint8_t * (*read_nvram) (struct scsi_qla_host *, uint8_t *,
1986 uint32_t, uint32_t);
1987 int (*write_nvram) (struct scsi_qla_host *, uint8_t *, uint32_t,
1988 uint32_t);
1989
1990 void (*fw_dump) (struct scsi_qla_host *, int);
1991 void (*ascii_fw_dump) (struct scsi_qla_host *);
1992};
1993
1994/*
1953 * Linux Host Adapter structure 1995 * Linux Host Adapter structure
1954 */ 1996 */
1955typedef struct scsi_qla_host { 1997typedef struct scsi_qla_host {
@@ -2055,8 +2097,7 @@ typedef struct scsi_qla_host {
2055 uint16_t rsp_ring_index; /* Current index. */ 2097 uint16_t rsp_ring_index; /* Current index. */
2056 uint16_t response_q_length; 2098 uint16_t response_q_length;
2057 2099
2058 uint16_t (*calc_request_entries)(uint16_t); 2100 struct isp_operations isp_ops;
2059 void (*build_scsi_iocbs)(srb_t *, cmd_entry_t *, uint16_t);
2060 2101
2061 /* Outstandings ISP commands. */ 2102 /* Outstandings ISP commands. */
2062 srb_t *outstanding_cmds[MAX_OUTSTANDING_COMMANDS]; 2103 srb_t *outstanding_cmds[MAX_OUTSTANDING_COMMANDS];
@@ -2149,6 +2190,7 @@ typedef struct scsi_qla_host {
2149 2190
2150 dma_addr_t gid_list_dma; 2191 dma_addr_t gid_list_dma;
2151 struct gid_list_info *gid_list; 2192 struct gid_list_info *gid_list;
2193 int gid_list_info_size;
2152 2194
2153 dma_addr_t rlc_rsp_dma; 2195 dma_addr_t rlc_rsp_dma;
2154 rpt_lun_cmd_rsp_t *rlc_rsp; 2196 rpt_lun_cmd_rsp_t *rlc_rsp;