pci.c (af7fae857ea22e9c2aef812e1321d9c5c206edde) | pci.c (f4b9e6c90c572519041f4c5d9c4c3dd50aff42d4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * NVM Express device driver 4 * Copyright (c) 2011-2014, Intel Corporation. 5 */ 6 7#include <linux/acpi.h> 8#include <linux/aer.h> --- 416 unchanged lines hidden (view full) --- 425 struct nvme_iod *iod = blk_mq_rq_to_pdu(req); 426 int queue_idx = (set == &dev->tagset) ? hctx_idx + 1 : 0; 427 struct nvme_queue *nvmeq = &dev->queues[queue_idx]; 428 429 BUG_ON(!nvmeq); 430 iod->nvmeq = nvmeq; 431 432 nvme_req(req)->ctrl = &dev->ctrl; | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * NVM Express device driver 4 * Copyright (c) 2011-2014, Intel Corporation. 5 */ 6 7#include <linux/acpi.h> 8#include <linux/aer.h> --- 416 unchanged lines hidden (view full) --- 425 struct nvme_iod *iod = blk_mq_rq_to_pdu(req); 426 int queue_idx = (set == &dev->tagset) ? hctx_idx + 1 : 0; 427 struct nvme_queue *nvmeq = &dev->queues[queue_idx]; 428 429 BUG_ON(!nvmeq); 430 iod->nvmeq = nvmeq; 431 432 nvme_req(req)->ctrl = &dev->ctrl; |
433 nvme_req(req)->cmd = &iod->cmd; |
|
433 return 0; 434} 435 436static int queue_irq_offset(struct nvme_dev *dev) 437{ 438 /* if we have more than 1 vec, admin queue offsets us by 1 */ 439 if (dev->num_vecs > 1) 440 return 1; --- 486 unchanged lines hidden (view full) --- 927 928 /* 929 * We should not need to do this, but we're still using this to 930 * ensure we can drain requests on a dying queue. 931 */ 932 if (unlikely(!test_bit(NVMEQ_ENABLED, &nvmeq->flags))) 933 return BLK_STS_IOERR; 934 | 434 return 0; 435} 436 437static int queue_irq_offset(struct nvme_dev *dev) 438{ 439 /* if we have more than 1 vec, admin queue offsets us by 1 */ 440 if (dev->num_vecs > 1) 441 return 1; --- 486 unchanged lines hidden (view full) --- 928 929 /* 930 * We should not need to do this, but we're still using this to 931 * ensure we can drain requests on a dying queue. 932 */ 933 if (unlikely(!test_bit(NVMEQ_ENABLED, &nvmeq->flags))) 934 return BLK_STS_IOERR; 935 |
935 ret = nvme_setup_cmd(ns, req, cmnd); | 936 ret = nvme_setup_cmd(ns, req); |
936 if (ret) 937 return ret; 938 939 if (blk_rq_nr_phys_segments(req)) { 940 ret = nvme_map_data(dev, req, cmnd); 941 if (ret) 942 goto out_free_cmd; 943 } --- 2387 unchanged lines hidden --- | 937 if (ret) 938 return ret; 939 940 if (blk_rq_nr_phys_segments(req)) { 941 ret = nvme_map_data(dev, req, cmnd); 942 if (ret) 943 goto out_free_cmd; 944 } --- 2387 unchanged lines hidden --- |