Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/nvme/nvme_sim.c
Context not available. | |||||
memcpy(&req->cmd, &ccb->nvmeio.cmd, sizeof(ccb->nvmeio.cmd)); | memcpy(&req->cmd, &ccb->nvmeio.cmd, sizeof(ccb->nvmeio.cmd)); | ||||
nvme_ctrlr_submit_io_request(ctrlr, req); | if (ccb->ccb_h.func_code == XPT_NVME_IO) | ||||
imp: why 0x10? | |||||
Not Done Inline ActionsBit 4 (i.e. 0x10) appeared to be the first unused bit in xflags and is used to differentiate between Admin commands (bit 4 set) and NVM commands (bit 4 clear). As I wasn't sure about the approach, I didn't create a #define for it at this time. chuck_tuffli.net: Bit 4 (i.e. 0x10) appeared to be the first unused bit in xflags and is used to differentiate… | |||||
Not Done Inline ActionsYea, that was the point of my rather cryptic, mysterious comment :) imp: Yea, that was the point of my rather cryptic, mysterious comment :) | |||||
nvme_ctrlr_submit_io_request(ctrlr, req); | |||||
else | |||||
nvme_ctrlr_submit_admin_request(ctrlr, req); | |||||
ccb->ccb_h.status |= CAM_SIM_QUEUED; | ccb->ccb_h.status |= CAM_SIM_QUEUED; | ||||
} | } | ||||
Context not available. | |||||
ccb->ccb_h.status = CAM_REQ_CMP; | ccb->ccb_h.status = CAM_REQ_CMP; | ||||
break; | break; | ||||
case XPT_NVME_IO: /* Execute the requested I/O operation */ | case XPT_NVME_IO: /* Execute the requested I/O operation */ | ||||
case XPT_NVME_ADMIN: /* or Admin operation */ | |||||
nvme_sim_nvmeio(sim, ccb); | nvme_sim_nvmeio(sim, ccb); | ||||
return; /* no done */ | return; /* no done */ | ||||
default: | default: | ||||
Context not available. |
why 0x10?