Lines Matching refs:ha

116 #define ql4_printk(level, ha, format, arg...) \
117 dev_printk(level , &((ha)->pdev->dev) , format , ## arg)
236 struct scsi_qla_host *ha; /* HA the SP is queued on */
272 struct scsi_qla_host *ha;
295 struct scsi_qla_host *ha;
306 int (*ddb_change)(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
427 int (*iospace_config) (struct scsi_qla_host *ha);
833 struct scsi_qla_host *ha;
856 static inline int is_ipv4_enabled(struct scsi_qla_host *ha)
858 return ((ha->ip_config.ipv4_options & IPOPT_IPV4_PROTOCOL_ENABLE) != 0);
861 static inline int is_ipv6_enabled(struct scsi_qla_host *ha)
863 return ((ha->ip_config.ipv6_options &
867 static inline int is_qla4010(struct scsi_qla_host *ha)
869 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010;
872 static inline int is_qla4022(struct scsi_qla_host *ha)
874 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4022;
877 static inline int is_qla4032(struct scsi_qla_host *ha)
879 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4032;
882 static inline int is_qla40XX(struct scsi_qla_host *ha)
884 return is_qla4032(ha) || is_qla4022(ha) || is_qla4010(ha);
887 static inline int is_qla8022(struct scsi_qla_host *ha)
889 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022;
892 static inline int is_qla8032(struct scsi_qla_host *ha)
894 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8324;
897 static inline int is_qla8042(struct scsi_qla_host *ha)
899 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8042;
902 static inline int is_qla80XX(struct scsi_qla_host *ha)
904 return is_qla8022(ha) || is_qla8032(ha) || is_qla8042(ha);
907 static inline int is_aer_supported(struct scsi_qla_host *ha)
909 return ((ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022) ||
910 (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8324) ||
911 (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8042));
914 static inline int adapter_up(struct scsi_qla_host *ha)
916 return (test_bit(AF_ONLINE, &ha->flags) != 0) &&
917 (test_bit(AF_LINK_UP, &ha->flags) != 0) &&
918 (!test_bit(AF_LOOPBACK, &ha->flags));
926 static inline void __iomem* isp_semaphore(struct scsi_qla_host *ha)
928 return (is_qla4010(ha) ?
929 &ha->reg->u1.isp4010.nvram :
930 &ha->reg->u1.isp4022.semaphore);
933 static inline void __iomem* isp_nvram(struct scsi_qla_host *ha)
935 return (is_qla4010(ha) ?
936 &ha->reg->u1.isp4010.nvram :
937 &ha->reg->u1.isp4022.nvram);
940 static inline void __iomem* isp_ext_hw_conf(struct scsi_qla_host *ha)
942 return (is_qla4010(ha) ?
943 &ha->reg->u2.isp4010.ext_hw_conf :
944 &ha->reg->u2.isp4022.p0.ext_hw_conf);
947 static inline void __iomem* isp_port_status(struct scsi_qla_host *ha)
949 return (is_qla4010(ha) ?
950 &ha->reg->u2.isp4010.port_status :
951 &ha->reg->u2.isp4022.p0.port_status);
954 static inline void __iomem* isp_port_ctrl(struct scsi_qla_host *ha)
956 return (is_qla4010(ha) ?
957 &ha->reg->u2.isp4010.port_ctrl :
958 &ha->reg->u2.isp4022.p0.port_ctrl);
961 static inline void __iomem* isp_port_error_status(struct scsi_qla_host *ha)
963 return (is_qla4010(ha) ?
964 &ha->reg->u2.isp4010.port_err_status :
965 &ha->reg->u2.isp4022.p0.port_err_status);
968 static inline void __iomem * isp_gp_out(struct scsi_qla_host *ha)
970 return (is_qla4010(ha) ?
971 &ha->reg->u2.isp4010.gp_out :
972 &ha->reg->u2.isp4022.p0.gp_out);
975 static inline int eeprom_ext_hw_conf_offset(struct scsi_qla_host *ha)
977 return (is_qla4010(ha) ?
982 int ql4xxx_sem_spinlock(struct scsi_qla_host * ha, u32 sem_mask, u32 sem_bits);
983 void ql4xxx_sem_unlock(struct scsi_qla_host * ha, u32 sem_mask);
984 int ql4xxx_sem_lock(struct scsi_qla_host * ha, u32 sem_mask, u32 sem_bits);
1043 static inline int ql4xxx_reset_active(struct scsi_qla_host *ha)
1045 return test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) ||
1046 test_bit(DPC_RESET_HA, &ha->dpc_flags) ||
1047 test_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags) ||
1048 test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags) ||
1049 test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags) ||
1050 test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags);
1054 static inline int qla4_8xxx_rd_direct(struct scsi_qla_host *ha,
1057 return ha->isp_ops->rd_reg_direct(ha, ha->reg_tbl[crb_reg]);
1060 static inline void qla4_8xxx_wr_direct(struct scsi_qla_host *ha,
1064 ha->isp_ops->wr_reg_direct(ha, ha->reg_tbl[crb_reg], value);