passthru.c (77d651a65569a5e60f314b768500e94fcb936311) passthru.c (ab7a2737ac5acd7d485ca45d8772497717fbc781)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * NVMe Over Fabrics Target Passthrough command implementation.
4 *
5 * Copyright (c) 2017-2018 Western Digital Corporation or its
6 * affiliates.
7 * Copyright (c) 2019-2020, Eideticom Inc.
8 *

--- 214 unchanged lines hidden (view full) ---

223
224 blk_rq_bio_prep(rq, bio, req->sg_cnt);
225
226 return 0;
227}
228
229static void nvmet_passthru_execute_cmd(struct nvmet_req *req)
230{
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * NVMe Over Fabrics Target Passthrough command implementation.
4 *
5 * Copyright (c) 2017-2018 Western Digital Corporation or its
6 * affiliates.
7 * Copyright (c) 2019-2020, Eideticom Inc.
8 *

--- 214 unchanged lines hidden (view full) ---

223
224 blk_rq_bio_prep(rq, bio, req->sg_cnt);
225
226 return 0;
227}
228
229static void nvmet_passthru_execute_cmd(struct nvmet_req *req)
230{
231 struct nvme_ctrl *ctrl = nvmet_req_passthru_ctrl(req);
231 struct nvme_ctrl *ctrl = nvmet_req_subsys(req)->passthru_ctrl;
232 struct request_queue *q = ctrl->admin_q;
233 struct nvme_ns *ns = NULL;
234 struct request *rq = NULL;
235 unsigned int timeout;
236 u32 effects;
237 u16 status;
238 int ret;
239

--- 64 unchanged lines hidden (view full) ---

304
305/*
306 * We need to emulate set host behaviour to ensure that any requested
307 * behaviour of the target's host matches the requested behaviour
308 * of the device's host and fail otherwise.
309 */
310static void nvmet_passthru_set_host_behaviour(struct nvmet_req *req)
311{
232 struct request_queue *q = ctrl->admin_q;
233 struct nvme_ns *ns = NULL;
234 struct request *rq = NULL;
235 unsigned int timeout;
236 u32 effects;
237 u16 status;
238 int ret;
239

--- 64 unchanged lines hidden (view full) ---

304
305/*
306 * We need to emulate set host behaviour to ensure that any requested
307 * behaviour of the target's host matches the requested behaviour
308 * of the device's host and fail otherwise.
309 */
310static void nvmet_passthru_set_host_behaviour(struct nvmet_req *req)
311{
312 struct nvme_ctrl *ctrl = nvmet_req_passthru_ctrl(req);
312 struct nvme_ctrl *ctrl = nvmet_req_subsys(req)->passthru_ctrl;
313 struct nvme_feat_host_behavior *host;
314 u16 status = NVME_SC_INTERNAL;
315 int ret;
316
317 host = kzalloc(sizeof(*host) * 2, GFP_KERNEL);
318 if (!host)
319 goto out_complete_req;
320

--- 276 unchanged lines hidden ---
313 struct nvme_feat_host_behavior *host;
314 u16 status = NVME_SC_INTERNAL;
315 int ret;
316
317 host = kzalloc(sizeof(*host) * 2, GFP_KERNEL);
318 if (!host)
319 goto out_complete_req;
320

--- 276 unchanged lines hidden ---