aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_def.h
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2012-08-22 07:55:04 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-24 04:11:07 -0400
commit33693c7aab43958906941a98f3947d66f4277e03 (patch)
tree922187fa54e8a74d18332b14b4def36f01e70775 /drivers/scsi/qla4xxx/ql4_def.h
parentc38fa3abea1df01c5692e8b5aa16dd0c66497419 (diff)
[SCSI] qla4xxx: Added new functions in isp_ops
Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_def.h')
-rw-r--r--drivers/scsi/qla4xxx/ql4_def.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 82f70db08078..11271a2f551c 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -388,8 +388,10 @@ struct isp_operations {
388 void (*disable_intrs) (struct scsi_qla_host *); 388 void (*disable_intrs) (struct scsi_qla_host *);
389 void (*enable_intrs) (struct scsi_qla_host *); 389 void (*enable_intrs) (struct scsi_qla_host *);
390 int (*start_firmware) (struct scsi_qla_host *); 390 int (*start_firmware) (struct scsi_qla_host *);
391 int (*restart_firmware) (struct scsi_qla_host *);
391 irqreturn_t (*intr_handler) (int , void *); 392 irqreturn_t (*intr_handler) (int , void *);
392 void (*interrupt_service_routine) (struct scsi_qla_host *, uint32_t); 393 void (*interrupt_service_routine) (struct scsi_qla_host *, uint32_t);
394 int (*need_reset) (struct scsi_qla_host *);
393 int (*reset_chip) (struct scsi_qla_host *); 395 int (*reset_chip) (struct scsi_qla_host *);
394 int (*reset_firmware) (struct scsi_qla_host *); 396 int (*reset_firmware) (struct scsi_qla_host *);
395 void (*queue_iocb) (struct scsi_qla_host *); 397 void (*queue_iocb) (struct scsi_qla_host *);
@@ -397,6 +399,15 @@ struct isp_operations {
397 uint16_t (*rd_shdw_req_q_out) (struct scsi_qla_host *); 399 uint16_t (*rd_shdw_req_q_out) (struct scsi_qla_host *);
398 uint16_t (*rd_shdw_rsp_q_in) (struct scsi_qla_host *); 400 uint16_t (*rd_shdw_rsp_q_in) (struct scsi_qla_host *);
399 int (*get_sys_info) (struct scsi_qla_host *); 401 int (*get_sys_info) (struct scsi_qla_host *);
402 uint32_t (*rd_reg_direct) (struct scsi_qla_host *, ulong);
403 void (*wr_reg_direct) (struct scsi_qla_host *, ulong, uint32_t);
404 int (*rd_reg_indirect) (struct scsi_qla_host *, uint32_t, uint32_t *);
405 int (*wr_reg_indirect) (struct scsi_qla_host *, uint32_t, uint32_t);
406 int (*idc_lock) (struct scsi_qla_host *);
407 void (*idc_unlock) (struct scsi_qla_host *);
408 void (*rom_lock_recovery) (struct scsi_qla_host *);
409 void (*queue_mailbox_command) (struct scsi_qla_host *, uint32_t *, int);
410 void (*process_mailbox_interrupt) (struct scsi_qla_host *, int);
400}; 411};
401 412
402struct ql4_mdump_size_table { 413struct ql4_mdump_size_table {
@@ -733,6 +744,8 @@ struct scsi_qla_host {
733#define MAX_MRB 128 744#define MAX_MRB 128
734 struct mrb *active_mrb_array[MAX_MRB]; 745 struct mrb *active_mrb_array[MAX_MRB];
735 uint32_t mrb_index; 746 uint32_t mrb_index;
747
748 uint32_t *reg_tbl;
736}; 749};
737 750
738struct ql4_task_data { 751struct ql4_task_data {
@@ -942,6 +955,20 @@ static inline int ql4xxx_reset_active(struct scsi_qla_host *ha)
942 test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags); 955 test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags);
943 956
944} 957}
958
959static inline int qla4_8xxx_rd_direct(struct scsi_qla_host *ha,
960 const uint32_t crb_reg)
961{
962 return ha->isp_ops->rd_reg_direct(ha, ha->reg_tbl[crb_reg]);
963}
964
965static inline void qla4_8xxx_wr_direct(struct scsi_qla_host *ha,
966 const uint32_t crb_reg,
967 const uint32_t value)
968{
969 ha->isp_ops->wr_reg_direct(ha, ha->reg_tbl[crb_reg], value);
970}
971
945/*---------------------------------------------------------------------------*/ 972/*---------------------------------------------------------------------------*/
946 973
947/* Defines for qla4xxx_initialize_adapter() and qla4xxx_recover_adapter() */ 974/* Defines for qla4xxx_initialize_adapter() and qla4xxx_recover_adapter() */