Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/mmc/mmc_da.c
Show First 20 Lines • Show All 706 Lines • ▼ Show 20 Lines | && status != CAM_REQ_INPROG) | ||||
printf("sddaasync: Unable to attach to new device " | printf("sddaasync: 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: | ||||
{ | { | ||||
CAM_DEBUG(path, CAM_DEBUG_TRACE, ("=> AC_GETDEV_CHANGED\n")); | CAM_DEBUG(path, CAM_DEBUG_TRACE, ("=> AC_GETDEV_CHANGED\n")); | ||||
softc = (struct sdda_softc *)periph->softc; | softc = (struct sdda_softc *)periph->softc; | ||||
memset(&cgd, 0, sizeof(cgd)); | xpt_setup_stack_ccb( | ||||
xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | &cgd.ccb_h, sizeof(cgd), 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); | ||||
cam_periph_async(periph, code, path, arg); | cam_periph_async(periph, code, path, arg); | ||||
break; | break; | ||||
} | } | ||||
case AC_ADVINFO_CHANGED: | case AC_ADVINFO_CHANGED: | ||||
{ | { | ||||
uintptr_t buftype; | uintptr_t buftype; | ||||
▲ Show 20 Lines • Show All 835 Lines • ▼ Show 20 Lines | if (type == EXT_CSD_PART_CONFIG_ACC_RPMB) { | ||||
/* TODO: Create device, assign IOCTL handler */ | /* TODO: Create device, assign IOCTL handler */ | ||||
CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, | CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, | ||||
("Don't know what to do with RPMB partitions yet\n")); | ("Don't know what to do with RPMB partitions yet\n")); | ||||
return (false); | return (false); | ||||
} | } | ||||
bioq_init(&part->bio_queue); | bioq_init(&part->bio_queue); | ||||
bzero(&cpi, sizeof(cpi)); | xpt_setup_stack_ccb( | ||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); | &cpi.ccb_h, sizeof(cpi), periph->path, CAM_PRIORITY_NONE); | ||||
cpi.ccb_h.func_code = XPT_PATH_INQ; | cpi.ccb_h.func_code = XPT_PATH_INQ; | ||||
xpt_action((union ccb *)&cpi); | xpt_action((union ccb *)&cpi); | ||||
/* | /* | ||||
* Register this media as a disk | * Register this media as a disk | ||||
*/ | */ | ||||
(void)cam_periph_hold(periph, PRIBIO); | (void)cam_periph_hold(periph, PRIBIO); | ||||
cam_periph_unlock(periph); | cam_periph_unlock(periph); | ||||
▲ Show 20 Lines • Show All 450 Lines • Show Last 20 Lines |