Lines Matching refs:scb
90 #define SCB_GET_SIM(ahd, scb) \
155 /************************** Softc/SCB Platform Data ***************************/
200 ahd_scb_timer_reset(struct scb *scb, u_int usec)
202 if (!(scb->xs->xs_control & XS_CTL_POLL)) {
203 callout_reset(&scb->xs->xs_callout,
204 (usec * hz)/1000000, ahd_timeout, scb);
313 static __inline void ahd_set_transaction_status(struct scb *, uint32_t);
314 static __inline void ahd_set_scsi_status(struct scb *, uint32_t);
315 static __inline void ahd_set_xfer_status(struct scb *, uint32_t);
316 static __inline uint32_t ahd_get_transaction_status(struct scb *);
317 static __inline uint32_t ahd_get_scsi_status(struct scb *);
318 static __inline void ahd_set_transaction_tag(struct scb *, int, u_int);
319 static __inline u_long ahd_get_transfer_length(struct scb *);
320 static __inline int ahd_get_transfer_dir(struct scb *);
321 static __inline void ahd_set_residual(struct scb *, u_long);
322 static __inline void ahd_set_sense_residual(struct scb *, u_long);
323 static __inline u_long ahd_get_residual(struct scb *);
324 static __inline int ahd_perform_autosense(struct scb *);
325 static __inline uint32_t ahd_get_sense_bufsize(struct ahd_softc*, struct scb*);
328 static __inline void ahd_freeze_scb(struct scb *);
329 static __inline void ahd_platform_freeze_devq(struct ahd_softc *, struct scb *);
334 void ahd_set_transaction_status(struct scb *scb, uint32_t status)
336 scb->xs->error = status;
340 void ahd_set_scsi_status(struct scb *scb, uint32_t status)
342 scb->xs->xs_status = status;
346 void ahd_set_xfer_status(struct scb *scb, uint32_t status)
348 scb->xs->status = status;
352 uint32_t ahd_get_transaction_status(struct scb *scb)
354 return (scb->xs->error);
358 uint32_t ahd_get_scsi_status(struct scb *scb)
360 return (scb->xs->xs_status);
364 void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type)
366 scb->xs->xs_tag_type = type;
370 u_long ahd_get_transfer_length(struct scb *scb)
372 return (scb->xs->datalen);
376 int ahd_get_transfer_dir(struct scb *scb)
378 return (scb->xs->xs_control & (XS_CTL_DATA_IN|XS_CTL_DATA_OUT));
382 void ahd_set_residual(struct scb *scb, u_long resid)
384 scb->xs->resid = resid;
389 void ahd_set_sense_residual(struct scb *scb, u_long resid)
391 //scb->xs->sense.scsi_sense.extra_len = resid; /* ??? */
396 u_long ahd_get_residual(struct scb *scb)
398 return (scb->xs->resid);
402 int ahd_perform_autosense(struct scb *scb)
404 return (!(scb->flags & SCB_SENSE));
408 ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb)
426 ahd_freeze_scb(struct scb *scb)
428 struct scsipi_xfer *xs = scb->xs;
430 if (!(scb->flags & SCB_FREEZE_QUEUE)) {
432 scb->flags |= SCB_FREEZE_QUEUE;
437 ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
452 ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb)
457 && scb->io_ctx != NULL
458 && (scb->io_ctx->ccb_h.status & CAM_RELEASE_SIMQ) == 0) {
459 scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ;
462 scb->io_ctx = NULL;
525 static __inline void ahd_print_path(struct ahd_softc *, struct scb *);
528 ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
564 void ahd_done(struct ahd_softc *, struct scb *);