Lines Matching refs:xs
218 #define XS_CHANNEL(xs) \
219 ((int) (xs)->xs_periph->periph_channel->chan_channel)
220 #define XS_ISP(xs) \
221 device_private((xs)->xs_periph->periph_channel->chan_adapter->adapt_dev)
222 #define XS_LUN(xs) ((int) (xs)->xs_periph->periph_lun)
223 #define XS_TGT(xs) ((int) (xs)->xs_periph->periph_target)
224 #define XS_CDBP(xs) ((uint8_t *) (xs)->cmd)
225 #define XS_CDBLEN(xs) (xs)->cmdlen
226 #define XS_XFRLEN(xs) (xs)->datalen
227 #define XS_TIME(xs) (xs)->timeout
228 #define XS_GET_RESID(xs) (xs)->resid
229 #define XS_SET_RESID(xs, r) (xs)->resid = r
230 #define XS_STSP(xs) (&(xs)->status)
231 #define XS_SNSP(xs) (&(xs)->sense.scsi_sense)
232 #define XS_SNSLEN(xs) (sizeof (xs)->sense)
233 #define XS_SNSKEY(xs) SSD_SENSE_KEY((xs)->sense.scsi_sense.flags)
234 #define XS_SNSASC(xs) ((xs)->sense.scsi_sense.asc)
235 #define XS_SNSASCQ(xs) ((xs)->sense.scsi_sense.ascq)
237 #define XS_TAG_P(ccb) (((xs)->xs_control & XS_CTL_POLL) != 0)
239 #define XS_TAG_TYPE(xs) \
240 (((xs)->xs_control & XS_CTL_URGENT) ? REQFLAG_HTAG : REQFLAG_STAG)
242 #define XS_SETERR(xs, v) (xs)->error = v
254 #define XS_ERR(xs) (xs)->error
255 #define XS_NOERR(xs) ((xs)->error == XS_NOERROR)
256 #define XS_INITERR(xs) (xs)->error = 0, XS_CMD_S_CLEAR(xs)
258 #define XS_SAVE_SENSE(xs, ptr, len) \
259 if (xs->error == XS_NOERROR) { \
260 xs->error = XS_SENSE; \
262 memcpy(&(xs)->sense, ptr, imin(XS_SNSLEN(xs), len))
264 #define XS_SENSE_VALID(xs) (xs)->error == XS_SENSE
380 #define XS_CMD_S_WDOG(xs) (xs)->xs_status |= XS_PSTS_INWDOG
381 #define XS_CMD_C_WDOG(xs) (xs)->xs_status &= ~XS_PSTS_INWDOG
382 #define XS_CMD_WDOG_P(xs) (((xs)->xs_status & XS_PSTS_INWDOG) != 0)
384 #define XS_CMD_S_GRACE(xs) (xs)->xs_status |= XS_PSTS_GRACE
385 #define XS_CMD_C_GRACE(xs) (xs)->xs_status &= ~XS_PSTS_GRACE
386 #define XS_CMD_GRACE_P(xs) (((xs)->xs_status & XS_PSTS_GRACE) != 0)
388 #define XS_CMD_S_DONE(xs) (xs)->xs_status |= XS_STS_DONE
389 #define XS_CMD_C_DONE(xs) (xs)->xs_status &= ~XS_STS_DONE
390 #define XS_CMD_DONE_P(xs) (((xs)->xs_status & XS_STS_DONE) != 0)
392 #define XS_CMD_S_CLEAR(xs) (xs)->xs_status &= ~XS_PSTS_ALL