Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/mmc/mmc_da.c
Show First 20 Lines • Show All 1,404 Lines • ▼ Show 20 Lines | sdda_add_part(struct cam_periph *periph, u_int type, const char *name, | ||||
/* | /* | ||||
* 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); | ||||
part->disk = disk_alloc(); | part->disk = disk_alloc(); | ||||
part->disk->d_rotation_rate = DISK_RR_NON_ROTATING; | part->disk->d_rotation_rate = DISK_RR_NON_ROTATING; | ||||
part->disk->d_mediaword = _PC_MEDIA_SOLID | _PC_MEDIA_MMCSD | |||||
part->disk->d_devstat = devstat_new_entry(part->name, | part->disk->d_devstat = devstat_new_entry(part->name, | ||||
cnt, 512, | cnt, 512, | ||||
DEVSTAT_ALL_SUPPORTED, | DEVSTAT_ALL_SUPPORTED, | ||||
DEVSTAT_TYPE_DIRECT | XPORT_DEVSTAT_TYPE(cpi.transport), | DEVSTAT_TYPE_DIRECT | XPORT_DEVSTAT_TYPE(cpi.transport), | ||||
DEVSTAT_PRIORITY_DISK); | DEVSTAT_PRIORITY_DISK); | ||||
part->disk->d_open = sddaopen; | part->disk->d_open = sddaopen; | ||||
part->disk->d_close = sddaclose; | part->disk->d_close = sddaclose; | ||||
▲ Show 20 Lines • Show All 424 Lines • Show Last 20 Lines |