fc.c (08e1507544839b98fc3732aea935e70ed9c209ec) | fc.c (ad22c355b707a8d8d48e282aadc01c0b0604b2e9) |
---|---|
1/* 2 * Copyright (c) 2016 Avago Technologies. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of version 2 of the GNU General Public License as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful. --- 2368 unchanged lines hidden (view full) --- 2377 (ctrl->lport->ops->poll_queue)) 2378 ctrl->lport->ops->poll_queue(&ctrl->lport->localport, 2379 queue->lldd_handle); 2380 2381 return ((atomic_read(&op->state) != FCPOP_STATE_ACTIVE)); 2382} 2383 2384static void | 1/* 2 * Copyright (c) 2016 Avago Technologies. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of version 2 of the GNU General Public License as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful. --- 2368 unchanged lines hidden (view full) --- 2377 (ctrl->lport->ops->poll_queue)) 2378 ctrl->lport->ops->poll_queue(&ctrl->lport->localport, 2379 queue->lldd_handle); 2380 2381 return ((atomic_read(&op->state) != FCPOP_STATE_ACTIVE)); 2382} 2383 2384static void |
2385nvme_fc_submit_async_event(struct nvme_ctrl *arg, int aer_idx) | 2385nvme_fc_submit_async_event(struct nvme_ctrl *arg) |
2386{ 2387 struct nvme_fc_ctrl *ctrl = to_fc_ctrl(arg); 2388 struct nvme_fc_fcp_op *aen_op; 2389 unsigned long flags; 2390 bool terminating = false; 2391 blk_status_t ret; 2392 | 2386{ 2387 struct nvme_fc_ctrl *ctrl = to_fc_ctrl(arg); 2388 struct nvme_fc_fcp_op *aen_op; 2389 unsigned long flags; 2390 bool terminating = false; 2391 blk_status_t ret; 2392 |
2393 if (aer_idx > NVME_NR_AEN_COMMANDS) 2394 return; 2395 | |
2396 spin_lock_irqsave(&ctrl->lock, flags); 2397 if (ctrl->flags & FCCTRL_TERMIO) 2398 terminating = true; 2399 spin_unlock_irqrestore(&ctrl->lock, flags); 2400 2401 if (terminating) 2402 return; 2403 | 2393 spin_lock_irqsave(&ctrl->lock, flags); 2394 if (ctrl->flags & FCCTRL_TERMIO) 2395 terminating = true; 2396 spin_unlock_irqrestore(&ctrl->lock, flags); 2397 2398 if (terminating) 2399 return; 2400 |
2404 aen_op = &ctrl->aen_ops[aer_idx]; | 2401 aen_op = &ctrl->aen_ops[0]; |
2405 2406 ret = nvme_fc_start_fcp_op(ctrl, aen_op->queue, aen_op, 0, 2407 NVMEFC_FCP_NODATA); 2408 if (ret) 2409 dev_err(ctrl->ctrl.device, | 2402 2403 ret = nvme_fc_start_fcp_op(ctrl, aen_op->queue, aen_op, 0, 2404 NVMEFC_FCP_NODATA); 2405 if (ret) 2406 dev_err(ctrl->ctrl.device, |
2410 "failed async event work [%d]\n", aer_idx); | 2407 "failed async event work\n"); |
2411} 2412 2413static void 2414__nvme_fc_final_op_cleanup(struct request *rq) 2415{ 2416 struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); 2417 struct nvme_fc_ctrl *ctrl = op->ctrl; 2418 --- 994 unchanged lines hidden --- | 2408} 2409 2410static void 2411__nvme_fc_final_op_cleanup(struct request *rq) 2412{ 2413 struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); 2414 struct nvme_fc_ctrl *ctrl = op->ctrl; 2415 --- 994 unchanged lines hidden --- |