Lines Matching refs:isp
58 * Soft Definitions for Qlogic ISP SCSI adapters.
69 #include <dev/isp/isp_stds.h>
70 #include <dev/isp/ispmbox.h>
110 #define ISP_MAX_TARGETS(isp) (IS_FC(isp)? MAX_FC_TARG : MAX_TARGETS)
111 #define ISP_MAX_LUNS(isp) (isp)->isp_maxluns
114 * Macros to access ISP registers through bus specific layers-
117 #define ISP_READ_ISR(isp, isrp, semap, mbox0p) \
118 (*(isp)->isp_mdvec->dv_rd_isr)(isp, isrp, semap, mbox0p)
120 #define ISP_READ(isp, reg) \
121 (*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg))
123 #define ISP_WRITE(isp, reg, val) \
124 (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), (val))
126 #define ISP_MBOXDMASETUP(isp) \
127 (*(isp)->isp_mdvec->dv_mbxdma)((isp))
129 #define ISP_DMASETUP(isp, xs, req) \
130 (*(isp)->isp_mdvec->dv_dmaset)((isp), (xs), (req))
132 #define ISP_DMAFREE(isp, xs, hndl) \
133 if ((isp)->isp_mdvec->dv_dmaclr) \
134 (*(isp)->isp_mdvec->dv_dmaclr)((isp), (xs), (hndl))
136 #define ISP_RESET0(isp) \
137 if ((isp)->isp_mdvec->dv_reset0) (*(isp)->isp_mdvec->dv_reset0)((isp))
138 #define ISP_RESET1(isp) \
139 if ((isp)->isp_mdvec->dv_reset1) (*(isp)->isp_mdvec->dv_reset1)((isp))
140 #define ISP_DUMPREGS(isp, m) \
141 if ((isp)->isp_mdvec->dv_dregs) (*(isp)->isp_mdvec->dv_dregs)((isp),(m))
143 #define ISP_SETBITS(isp, reg, val) \
144 (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), ISP_READ((isp), (reg)) | (val))
146 #define ISP_CLRBITS(isp, reg, val) \
147 (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), ISP_READ((isp), (reg)) & ~(val))
157 #define SYNC_SFORDEV 2 /* scratch, sync for ISP */
182 #define ISP_QAVAIL(isp) \
183 ISP_QFREE(isp->isp_reqidx, isp->isp_reqodx, RQUEST_QUEUE_LEN(isp))
185 #define ISP_ADD_REQUEST(isp, nxti) \
186 MEMORYBARRIER(isp, SYNC_REQUEST, isp->isp_reqidx, QENTRY_LEN, -1); \
187 ISP_WRITE(isp, isp->isp_rqstinrp, nxti); \
188 isp->isp_reqidx = nxti
190 #define ISP_SYNC_REQUEST(isp) \
191 MEMORYBARRIER(isp, SYNC_REQUEST, isp->isp_reqidx, QENTRY_LEN, -1); \
192 isp->isp_reqidx = ISP_NXT_QENTRY(isp->isp_reqidx, RQUEST_QUEUE_LEN(isp)); \
193 ISP_WRITE(isp, isp->isp_rqstinrp, isp->isp_reqidx)
485 isp_fwstate : 4, /* ISP F/W state */
642 volatile uint32_t isp_reqodx; /* index of last ISP pickup */
685 #define SDPARAM(isp, chan) (&((sdparam *)(isp)->isp_param)[(chan)])
686 #define FCPARAM(isp, chan) (&((fcparam *)(isp)->isp_param)[(chan)])
688 #define ISP_SET_SENDMARKER(isp, chan, val) \
689 if (IS_FC(isp)) { \
690 FCPARAM(isp, chan)->sendmarker = val; \
692 SDPARAM(isp, chan)->sendmarker = val; \
695 #define ISP_TST_SENDMARKER(isp, chan) \
696 (IS_FC(isp)? \
697 FCPARAM(isp, chan)->sendmarker != 0 : \
698 SDPARAM(isp, chan)->sendmarker != 0)
701 * ISP Driver Run States
710 * ISP Configuration Options
817 #define IS_SCSI(isp) (isp->isp_type & ISP_HA_SCSI)
818 #define IS_1020(isp) (isp->isp_type < ISP_HA_SCSI_1240)
819 #define IS_1240(isp) (isp->isp_type == ISP_HA_SCSI_1240)
820 #define IS_1080(isp) (isp->isp_type == ISP_HA_SCSI_1080)
821 #define IS_1280(isp) (isp->isp_type == ISP_HA_SCSI_1280)
822 #define IS_10160(isp) (isp->isp_type == ISP_HA_SCSI_10160)
823 #define IS_12160(isp) (isp->isp_type == ISP_HA_SCSI_12160)
825 #define IS_12X0(isp) (IS_1240(isp) || IS_1280(isp))
826 #define IS_1X160(isp) (IS_10160(isp) || IS_12160(isp))
827 #define IS_DUALBUS(isp) (IS_12X0(isp) || IS_12160(isp))
828 #define IS_ULTRA2(isp) (IS_1080(isp) || IS_1280(isp) || IS_1X160(isp))
829 #define IS_ULTRA3(isp) (IS_1X160(isp))
831 #define IS_FC(isp) ((isp)->isp_type & ISP_HA_FC)
832 #define IS_2100(isp) ((isp)->isp_type == ISP_HA_FC_2100)
833 #define IS_2200(isp) ((isp)->isp_type == ISP_HA_FC_2200)
834 #define IS_23XX(isp) ((isp)->isp_type >= ISP_HA_FC_2300 && \
835 (isp)->isp_type < ISP_HA_FC_2400)
836 #define IS_2300(isp) ((isp)->isp_type == ISP_HA_FC_2300)
837 #define IS_2312(isp) ((isp)->isp_type == ISP_HA_FC_2312)
838 #define IS_2322(isp) ((isp)->isp_type == ISP_HA_FC_2322)
839 #define IS_24XX(isp) ((isp)->isp_type >= ISP_HA_FC_2400)
840 #define IS_25XX(isp) ((isp)->isp_type >= ISP_HA_FC_2500)
868 * Reset the ISP and call completion for any orphaned commands.
1024 * ISP_SLEEP(isp, usecs) microsecond sleep function
1045 * various objects so that the ISP's and the system's view
1176 int isp_target_put_entry(ispsoftc_t *isp, void *);