Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ata/ata_da.c
Show First 20 Lines • Show All 1,321 Lines • ▼ Show 20 Lines | case AC_FOUND_DEVICE: | ||||
&& status != CAM_REQ_INPROG) | && status != CAM_REQ_INPROG) | ||||
printf("adaasync: Unable to attach to new device " | printf("adaasync: Unable to attach to new device " | ||||
"due to status 0x%x\n", status); | "due to status 0x%x\n", status); | ||||
break; | break; | ||||
} | } | ||||
case AC_GETDEV_CHANGED: | case AC_GETDEV_CHANGED: | ||||
{ | { | ||||
softc = (struct ada_softc *)periph->softc; | softc = (struct ada_softc *)periph->softc; | ||||
memset(&cgd, 0, sizeof(cgd)); | |||||
xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | ||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE; | cgd.ccb_h.func_code = XPT_GDEV_TYPE; | ||||
xpt_action((union ccb *)&cgd); | xpt_action((union ccb *)&cgd); | ||||
/* | /* | ||||
* Update our information based on the new Identify data. | * Update our information based on the new Identify data. | ||||
*/ | */ | ||||
adasetflags(softc, &cgd); | adasetflags(softc, &cgd); | ||||
Show All 19 Lines | adaasync(void *callback_arg, u_int32_t code, | ||||
} | } | ||||
case AC_SENT_BDR: | case AC_SENT_BDR: | ||||
case AC_BUS_RESET: | case AC_BUS_RESET: | ||||
{ | { | ||||
softc = (struct ada_softc *)periph->softc; | softc = (struct ada_softc *)periph->softc; | ||||
cam_periph_async(periph, code, path, arg); | cam_periph_async(periph, code, path, arg); | ||||
if (softc->state != ADA_STATE_NORMAL) | if (softc->state != ADA_STATE_NORMAL) | ||||
break; | break; | ||||
memset(&cgd, 0, sizeof(cgd)); | |||||
xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | ||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE; | cgd.ccb_h.func_code = XPT_GDEV_TYPE; | ||||
xpt_action((union ccb *)&cgd); | xpt_action((union ccb *)&cgd); | ||||
if (ADA_RA >= 0 && softc->flags & ADA_FLAG_CAN_RAHEAD) | if (ADA_RA >= 0 && softc->flags & ADA_FLAG_CAN_RAHEAD) | ||||
softc->state = ADA_STATE_RAHEAD; | softc->state = ADA_STATE_RAHEAD; | ||||
else if (ADA_WC >= 0 && softc->flags & ADA_FLAG_CAN_WCACHE) | else if (ADA_WC >= 0 && softc->flags & ADA_FLAG_CAN_WCACHE) | ||||
softc->state = ADA_STATE_WCACHE; | softc->state = ADA_STATE_WCACHE; | ||||
else if ((softc->flags & ADA_FLAG_CAN_LOG) | else if ((softc->flags & ADA_FLAG_CAN_LOG) | ||||
▲ Show 20 Lines • Show All 2,324 Lines • Show Last 20 Lines |