Lines Matching refs:isp

44 #include <dev/isp/isp_stds.h>
45 #include <dev/isp/ispmbox.h>
84 #define ISP_MAX_TARGETS(isp) (IS_FC(isp)? MAX_FC_TARG : MAX_TARGETS)
85 #define ISP_MAX_LUNS(isp) (isp)->isp_maxluns
92 #define ISP_RUN_ISR(isp) \
93 (*(isp)->isp_mdvec->dv_run_isr)(isp)
95 #define ISP_READ(isp, reg) \
96 (*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg))
98 #define ISP_WRITE(isp, reg, val) \
99 (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), (val))
101 #define ISP_MBOXDMASETUP(isp) \
102 (*(isp)->isp_mdvec->dv_mbxdma)((isp))
104 #define ISP_DMASETUP(isp, xs, req) \
105 (*(isp)->isp_mdvec->dv_dmaset)((isp), (xs), (req))
107 #define ISP_DMAFREE(isp, xs, hndl) \
108 if ((isp)->isp_mdvec->dv_dmaclr) \
109 (*(isp)->isp_mdvec->dv_dmaclr)((isp), (xs), (hndl))
111 #define ISP_IRQSETUP(isp) \
112 (((isp)->isp_mdvec->dv_irqsetup) ? (*(isp)->isp_mdvec->dv_irqsetup)(isp) : 0)
113 #define ISP_DUMPREGS(isp, m) \
114 if ((isp)->isp_mdvec->dv_dregs) (*(isp)->isp_mdvec->dv_dregs)((isp),(m))
116 #define ISP_SETBITS(isp, reg, val) \
117 (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), ISP_READ((isp), (reg)) | (val))
119 #define ISP_CLRBITS(isp, reg, val) \
120 (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), ISP_READ((isp), (reg)) & ~(val))
157 #define ISP_QAVAIL(isp) \
158 ISP_QFREE(isp->isp_reqidx, isp->isp_reqodx, RQUEST_QUEUE_LEN(isp))
160 #define ISP_ADD_REQUEST(isp, nxti) \
161 MEMORYBARRIER(isp, SYNC_REQUEST, isp->isp_reqidx, QENTRY_LEN, -1); \
162 ISP_WRITE(isp, isp->isp_rqstinrp, nxti); \
163 isp->isp_reqidx = nxti
165 #define ISP_SYNC_REQUEST(isp) \
166 MEMORYBARRIER(isp, SYNC_REQUEST, isp->isp_reqidx, QENTRY_LEN, -1); \
167 isp->isp_reqidx = ISP_NXT_QENTRY(isp->isp_reqidx, RQUEST_QUEUE_LEN(isp)); \
168 ISP_WRITE(isp, isp->isp_rqstinrp, isp->isp_reqidx)
424 #define FC_PORTDB_TGT(isp, bus, pdb) (int)(lp - FCPARAM(isp, bus)->portdb)
607 #define SDPARAM(isp, chan) (&((sdparam *)(isp)->isp_param)[(chan)])
608 #define FCPARAM(isp, chan) (&((fcparam *)(isp)->isp_param)[(chan)])
610 #define ISP_SET_SENDMARKER(isp, chan, val) \
611 if (IS_FC(isp)) { \
612 FCPARAM(isp, chan)->sendmarker = val; \
614 SDPARAM(isp, chan)->sendmarker = val; \
617 #define ISP_TST_SENDMARKER(isp, chan) \
618 (IS_FC(isp)? \
619 FCPARAM(isp, chan)->sendmarker != 0 : \
620 SDPARAM(isp, chan)->sendmarker != 0)
756 #define IS_SCSI(isp) (isp->isp_type & ISP_HA_SCSI)
757 #define IS_1020(isp) (isp->isp_type < ISP_HA_SCSI_1240)
758 #define IS_1240(isp) (isp->isp_type == ISP_HA_SCSI_1240)
759 #define IS_1080(isp) (isp->isp_type == ISP_HA_SCSI_1080)
760 #define IS_1280(isp) (isp->isp_type == ISP_HA_SCSI_1280)
761 #define IS_10160(isp) (isp->isp_type == ISP_HA_SCSI_10160)
762 #define IS_12160(isp) (isp->isp_type == ISP_HA_SCSI_12160)
764 #define IS_12X0(isp) (IS_1240(isp) || IS_1280(isp))
765 #define IS_1X160(isp) (IS_10160(isp) || IS_12160(isp))
766 #define IS_DUALBUS(isp) (IS_12X0(isp) || IS_12160(isp))
767 #define IS_ULTRA2(isp) (IS_1080(isp) || IS_1280(isp) || IS_1X160(isp))
768 #define IS_ULTRA3(isp) (IS_1X160(isp))
770 #define IS_FC(isp) ((isp)->isp_type & ISP_HA_FC)
771 #define IS_2100(isp) ((isp)->isp_type == ISP_HA_FC_2100)
772 #define IS_2200(isp) ((isp)->isp_type == ISP_HA_FC_2200)
773 #define IS_23XX(isp) ((isp)->isp_type >= ISP_HA_FC_2300 && \
774 (isp)->isp_type < ISP_HA_FC_2400)
775 #define IS_2300(isp) ((isp)->isp_type == ISP_HA_FC_2300)
776 #define IS_2312(isp) ((isp)->isp_type == ISP_HA_FC_2312)
777 #define IS_2322(isp) ((isp)->isp_type == ISP_HA_FC_2322)
778 #define IS_24XX(isp) ((isp)->isp_type >= ISP_HA_FC_2400)
779 #define IS_25XX(isp) ((isp)->isp_type >= ISP_HA_FC_2500)
780 #define IS_26XX(isp) ((isp)->isp_type >= ISP_HA_FC_2600)
781 #define IS_27XX(isp) ((isp)->isp_type >= ISP_HA_FC_2700)
975 * ISP_SLEEP(isp, usecs) microsecond sleep function
1124 int isp_target_put_entry(ispsoftc_t *isp, void *);