Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mps/mps_user.c
Show First 20 Lines • Show All 2,046 Lines • ▼ Show 20 Lines | if (target > sc->max_devices) { | ||||
"for Bus/Target to DevHandle mapping."); | "for Bus/Target to DevHandle mapping."); | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
dev_handle = sc->mapping_table[target].dev_handle; | dev_handle = sc->mapping_table[target].dev_handle; | ||||
if (dev_handle) | if (dev_handle) | ||||
data->DevHandle = dev_handle; | data->DevHandle = dev_handle; | ||||
} else { | } else { | ||||
bus = 0; | bus = 0; | ||||
target = mps_mapping_get_sas_id_from_handle(sc, dev_handle); | target = mps_mapping_get_tid_from_handle(sc, dev_handle); | ||||
data->Bus = bus; | data->Bus = bus; | ||||
data->TargetID = target; | data->TargetID = target; | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 357 Lines • Show Last 20 Lines |