diff options
| author | Warner Losh <imp@FreeBSD.org> | 2017-07-14 14:52:20 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2017-07-14 14:52:20 +0000 |
| commit | df4245150a25c3e305010a798adc57c5fd900520 (patch) | |
| tree | 1f2e339ff0f0e48c1a4de6e35083fe870c2c32b3 /sys/dev/nvme/nvme_sim.c | |
| parent | 5cead59181b1e371f22abff631625e27f71e946d (diff) | |
Notes
Diffstat (limited to 'sys/dev/nvme/nvme_sim.c')
| -rw-r--r-- | sys/dev/nvme/nvme_sim.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index 86b7710d8b5d8..08ced0a247323 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -110,7 +110,10 @@ nvme_sim_nvmeio(struct cam_sim *sim, union ccb *ccb) 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) + nvme_ctrlr_submit_io_request(ctrlr, req); + else + nvme_ctrlr_submit_admin_request(ctrlr, req); ccb->ccb_h.status |= CAM_SIM_QUEUED; } @@ -225,6 +228,7 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) ccb->ccb_h.status = CAM_REQ_CMP; break; case XPT_NVME_IO: /* Execute the requested I/O operation */ + case XPT_NVME_ADMIN: /* or Admin operation */ nvme_sim_nvmeio(sim, ccb); return; /* no done */ default: |
