Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/cam_compat.c
Show First 20 Lines • Show All 362 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct dev_match_result *dm; | struct dev_match_result *dm; | ||||
struct dev_match_result_0x18 *dm18; | struct dev_match_result_0x18 *dm18; | ||||
struct cam_periph_map_info mapinfo; | struct cam_periph_map_info mapinfo; | ||||
int i; | int i; | ||||
/* Remap the CCB into kernel address space */ | /* Remap the CCB into kernel address space */ | ||||
bzero(&mapinfo, sizeof(mapinfo)); | bzero(&mapinfo, sizeof(mapinfo)); | ||||
cam_periph_mapmem(ccb, &mapinfo, MAXPHYS); | cam_periph_mapmem(ccb, &mapinfo, maxphys); | ||||
dm = ccb->cdm.matches; | dm = ccb->cdm.matches; | ||||
/* Translate in-place: old fields are smaller */ | /* Translate in-place: old fields are smaller */ | ||||
dm18 = (struct dev_match_result_0x18 *)(dm); | dm18 = (struct dev_match_result_0x18 *)(dm); | ||||
for (i = 0; i < ccb->cdm.num_matches; i++) { | for (i = 0; i < ccb->cdm.num_matches; i++) { | ||||
dm18[i].type = dm[i].type; | dm18[i].type = dm[i].type; | ||||
switch (dm[i].type) { | switch (dm[i].type) { | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |