Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ahb/ahb.c
Show First 20 Lines • Show All 610 Lines • ▼ Show 20 Lines | || target_id == ahb->scsi_id) { | ||||
else if (target_id == ahb->scsi_id) | else if (target_id == ahb->scsi_id) | ||||
ccb->ccb_h.status = CAM_SCSI_BUS_RESET; | ccb->ccb_h.status = CAM_SCSI_BUS_RESET; | ||||
else | else | ||||
ccb->ccb_h.status = CAM_BDR_SENT; | ccb->ccb_h.status = CAM_BDR_SENT; | ||||
ahbecbfree(ahb, pending_ecb); | ahbecbfree(ahb, pending_ecb); | ||||
xpt_done(ccb); | xpt_done(ccb); | ||||
} else if (ahb->immed_ecb != NULL) { | } else if (ahb->immed_ecb != NULL) { | ||||
/* Re-instate timeout */ | /* Re-instate timeout */ | ||||
callout_reset(&pending_ecb->timer, | callout_reset_sbt(&pending_ecb->timer, | ||||
(ccb->ccb_h.timeout * hz) / 1000, | SBT_1MS * ccb->ccb_h.timeout, 0, ahbtimeout, | ||||
ahbtimeout, pending_ecb); | pending_ecb, 0); | ||||
} | } | ||||
} | } | ||||
if (ahb->immed_ecb != NULL) { | if (ahb->immed_ecb != NULL) { | ||||
ahb->immed_ecb = NULL; | ahb->immed_ecb = NULL; | ||||
device_printf(ahb->dev, "No longer in timeout\n"); | device_printf(ahb->dev, "No longer in timeout\n"); | ||||
} else if (target_id == ahb->scsi_id) | } else if (target_id == ahb->scsi_id) | ||||
device_printf(ahb->dev, "SCSI Bus Reset Delivered\n"); | device_printf(ahb->dev, "SCSI Bus Reset Delivered\n"); | ||||
▲ Show 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | /* ecb->hecb.flag_word2 |= FW2_DATA_DIR_IN; */ | ||||
ecb->state = ECB_ACTIVE; | ecb->state = ECB_ACTIVE; | ||||
ccb->ccb_h.status |= CAM_SIM_QUEUED; | ccb->ccb_h.status |= CAM_SIM_QUEUED; | ||||
LIST_INSERT_HEAD(&ahb->pending_ccbs, &ccb->ccb_h, sim_links.le); | LIST_INSERT_HEAD(&ahb->pending_ccbs, &ccb->ccb_h, sim_links.le); | ||||
/* Tell the adapter about this command */ | /* Tell the adapter about this command */ | ||||
ahbqueuembox(ahb, ecb_paddr, ATTN_STARTECB|ccb->ccb_h.target_id); | ahbqueuembox(ahb, ecb_paddr, ATTN_STARTECB|ccb->ccb_h.target_id); | ||||
callout_reset(&ecb->timer, (ccb->ccb_h.timeout * hz) / 1000, ahbtimeout, | callout_reset_sbt(&ecb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, | ||||
ecb); | ahbtimeout, ecb, 0); | ||||
} | } | ||||
static void | static void | ||||
ahbaction(struct cam_sim *sim, union ccb *ccb) | ahbaction(struct cam_sim *sim, union ccb *ccb) | ||||
{ | { | ||||
struct ahb_softc *ahb; | struct ahb_softc *ahb; | ||||
CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ahbaction\n")); | CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ahbaction\n")); | ||||
▲ Show 20 Lines • Show All 318 Lines • Show Last 20 Lines |