nvme_sim.c (b754c27916c5d1b0fe2f57d6d4ba94c7de1b541b) | nvme_sim.c (cfb43eb12e67c218e7fa211e5c92460553f17bf6) |
---|---|
1/*- 2 * Copyright (c) 2016 Netflix, Inc 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 59 unchanged lines hidden (view full) --- 68{ 69 union ccb *ccb = (union ccb *)ccb_arg; 70 71 /* 72 * Let the periph know the completion, and let it sort out what 73 * it means. Make our best guess, though for the status code. 74 */ 75 memcpy(&ccb->nvmeio.cpl, cpl, sizeof(*cpl)); | 1/*- 2 * Copyright (c) 2016 Netflix, Inc 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 59 unchanged lines hidden (view full) --- 68{ 69 union ccb *ccb = (union ccb *)ccb_arg; 70 71 /* 72 * Let the periph know the completion, and let it sort out what 73 * it means. Make our best guess, though for the status code. 74 */ 75 memcpy(&ccb->nvmeio.cpl, cpl, sizeof(*cpl)); |
76 if (nvme_completion_is_error(cpl)) | 76 if (nvme_completion_is_error(cpl)) { |
77 ccb->ccb_h.status = CAM_REQ_CMP_ERR; | 77 ccb->ccb_h.status = CAM_REQ_CMP_ERR; |
78 else | 78 xpt_done(ccb); 79 } else { |
79 ccb->ccb_h.status = CAM_REQ_CMP; | 80 ccb->ccb_h.status = CAM_REQ_CMP; |
80 xpt_done(ccb); | 81 xpt_done_direct(ccb); 82 } |
81} 82 83static void 84nvme_sim_nvmeio(struct cam_sim *sim, union ccb *ccb) 85{ 86 struct ccb_nvmeio *nvmeio = &ccb->nvmeio; 87 struct nvme_request *req; 88 void *payload; --- 309 unchanged lines hidden --- | 83} 84 85static void 86nvme_sim_nvmeio(struct cam_sim *sim, union ccb *ccb) 87{ 88 struct ccb_nvmeio *nvmeio = &ccb->nvmeio; 89 struct nvme_request *req; 90 void *payload; --- 309 unchanged lines hidden --- |