Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/nvme/nvme_xpt.c
Show First 20 Lines • Show All 628 Lines • ▼ Show 20 Lines | nvme_device_transport(struct cam_path *path) | ||||
path->device->transport = cpi.transport; | path->device->transport = cpi.transport; | ||||
path->device->transport_version = cpi.transport_version; | path->device->transport_version = cpi.transport_version; | ||||
path->device->protocol = cpi.protocol; | path->device->protocol = cpi.protocol; | ||||
path->device->protocol_version = cpi.protocol_version; | path->device->protocol_version = cpi.protocol_version; | ||||
/* Tell the controller what we think */ | /* Tell the controller what we think */ | ||||
memset(&cts, 0, sizeof(cts)); | |||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); | xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); | ||||
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; | cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; | ||||
cts.type = CTS_TYPE_CURRENT_SETTINGS; | cts.type = CTS_TYPE_CURRENT_SETTINGS; | ||||
cts.transport = path->device->transport; | cts.transport = path->device->transport; | ||||
cts.transport_version = path->device->transport_version; | cts.transport_version = path->device->transport_version; | ||||
cts.protocol = path->device->protocol; | cts.protocol = path->device->protocol; | ||||
cts.protocol_version = path->device->protocol_version; | cts.protocol_version = path->device->protocol_version; | ||||
cts.proto_specific.valid = 0; | cts.proto_specific.valid = 0; | ||||
▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | nvme_announce_periph(struct cam_periph *periph) | ||||
struct cam_path *path = periph->path; | struct cam_path *path = periph->path; | ||||
struct ccb_trans_settings_nvme *nvmex; | struct ccb_trans_settings_nvme *nvmex; | ||||
struct sbuf sb; | struct sbuf sb; | ||||
char buffer[120]; | char buffer[120]; | ||||
cam_periph_assert(periph, MA_OWNED); | cam_periph_assert(periph, MA_OWNED); | ||||
/* Ask the SIM for connection details */ | /* Ask the SIM for connection details */ | ||||
memset(&cts, 0, sizeof(cts)); | |||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); | xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); | ||||
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; | cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; | ||||
cts.type = CTS_TYPE_CURRENT_SETTINGS; | cts.type = CTS_TYPE_CURRENT_SETTINGS; | ||||
xpt_action((union ccb*)&cts); | xpt_action((union ccb*)&cts); | ||||
if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) | if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) | ||||
return; | return; | ||||
nvmex = &cts.xport_specific.nvme; | nvmex = &cts.xport_specific.nvme; | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |