/drivers/scsi/fnic/ |
D | vnic_rq.c | 27 static int vnic_rq_alloc_bufs(struct vnic_rq *rq) in vnic_rq_alloc_bufs() argument 31 unsigned int i, j, count = rq->ring.desc_count; in vnic_rq_alloc_bufs() 34 vdev = rq->vdev; in vnic_rq_alloc_bufs() 37 rq->bufs[i] = kzalloc(VNIC_RQ_BUF_BLK_SZ, GFP_ATOMIC); in vnic_rq_alloc_bufs() 38 if (!rq->bufs[i]) { in vnic_rq_alloc_bufs() 45 buf = rq->bufs[i]; in vnic_rq_alloc_bufs() 48 buf->desc = (u8 *)rq->ring.descs + in vnic_rq_alloc_bufs() 49 rq->ring.desc_size * buf->index; in vnic_rq_alloc_bufs() 51 buf->next = rq->bufs[0]; in vnic_rq_alloc_bufs() 54 buf->next = rq->bufs[i + 1]; in vnic_rq_alloc_bufs() [all …]
|
D | vnic_rq.h | 105 static inline unsigned int vnic_rq_desc_avail(struct vnic_rq *rq) in vnic_rq_desc_avail() argument 108 return rq->ring.desc_avail; in vnic_rq_desc_avail() 111 static inline unsigned int vnic_rq_desc_used(struct vnic_rq *rq) in vnic_rq_desc_used() argument 114 return rq->ring.desc_count - rq->ring.desc_avail - 1; in vnic_rq_desc_used() 117 static inline void *vnic_rq_next_desc(struct vnic_rq *rq) in vnic_rq_next_desc() argument 119 return rq->to_use->desc; in vnic_rq_next_desc() 122 static inline unsigned int vnic_rq_next_index(struct vnic_rq *rq) in vnic_rq_next_index() argument 124 return rq->to_use->index; in vnic_rq_next_index() 127 static inline unsigned int vnic_rq_next_buf_index(struct vnic_rq *rq) in vnic_rq_next_buf_index() argument 129 return rq->buf_index++; in vnic_rq_next_buf_index() [all …]
|
/drivers/net/ethernet/cisco/enic/ |
D | vnic_rq.c | 31 static int vnic_rq_alloc_bufs(struct vnic_rq *rq) in vnic_rq_alloc_bufs() argument 34 unsigned int i, j, count = rq->ring.desc_count; in vnic_rq_alloc_bufs() 38 rq->bufs[i] = kzalloc(VNIC_RQ_BUF_BLK_SZ(count), GFP_ATOMIC); in vnic_rq_alloc_bufs() 39 if (!rq->bufs[i]) in vnic_rq_alloc_bufs() 44 buf = rq->bufs[i]; in vnic_rq_alloc_bufs() 47 buf->desc = (u8 *)rq->ring.descs + in vnic_rq_alloc_bufs() 48 rq->ring.desc_size * buf->index; in vnic_rq_alloc_bufs() 50 buf->next = rq->bufs[0]; in vnic_rq_alloc_bufs() 53 buf->next = rq->bufs[i + 1]; in vnic_rq_alloc_bufs() 61 rq->to_use = rq->to_clean = rq->bufs[0]; in vnic_rq_alloc_bufs() [all …]
|
D | vnic_rq.h | 100 static inline unsigned int vnic_rq_desc_avail(struct vnic_rq *rq) in vnic_rq_desc_avail() argument 103 return rq->ring.desc_avail; in vnic_rq_desc_avail() 106 static inline unsigned int vnic_rq_desc_used(struct vnic_rq *rq) in vnic_rq_desc_used() argument 109 return rq->ring.desc_count - rq->ring.desc_avail - 1; in vnic_rq_desc_used() 112 static inline void *vnic_rq_next_desc(struct vnic_rq *rq) in vnic_rq_next_desc() argument 114 return rq->to_use->desc; in vnic_rq_next_desc() 117 static inline unsigned int vnic_rq_next_index(struct vnic_rq *rq) in vnic_rq_next_index() argument 119 return rq->to_use->index; in vnic_rq_next_index() 122 static inline void vnic_rq_post(struct vnic_rq *rq, in vnic_rq_post() argument 127 struct vnic_rq_buf *buf = rq->to_use; in vnic_rq_post() [all …]
|
/drivers/scsi/esas2r/ |
D | esas2r_disc.c | 49 struct esas2r_request *rq); 51 struct esas2r_request *rq); 55 struct esas2r_request *rq); 59 struct esas2r_request *rq); 61 struct esas2r_request *rq); 63 struct esas2r_request *rq); 65 struct esas2r_request *rq); 67 struct esas2r_request *rq); 69 struct esas2r_request *rq); 71 struct esas2r_request *rq); [all …]
|
D | esas2r_vda.c | 59 static void clear_vda_request(struct esas2r_request *rq); 62 struct esas2r_request *rq); 67 struct esas2r_request *rq, in esas2r_process_vda_ioctl() argument 93 clear_vda_request(rq); in esas2r_process_vda_ioctl() 95 rq->vrq->scsi.function = vi->function; in esas2r_process_vda_ioctl() 96 rq->interrupt_cb = esas2r_complete_vda_ioctl; in esas2r_process_vda_ioctl() 97 rq->interrupt_cx = vi; in esas2r_process_vda_ioctl() 112 rq->vrq->flash.length = cpu_to_le32(datalen); in esas2r_process_vda_ioctl() 113 rq->vrq->flash.sub_func = vi->cmd.flash.sub_func; in esas2r_process_vda_ioctl() 115 memcpy(rq->vrq->flash.data.file.file_name, in esas2r_process_vda_ioctl() [all …]
|
D | esas2r_int.c | 173 struct esas2r_request *rq, in esas2r_handle_outbound_rsp_err() argument 181 if (unlikely(rq->req_stat != RS_SUCCESS)) { in esas2r_handle_outbound_rsp_err() 182 memcpy(&rq->func_rsp, &rsp->func_rsp, sizeof(rsp->func_rsp)); in esas2r_handle_outbound_rsp_err() 184 if (rq->req_stat == RS_ABORTED) { in esas2r_handle_outbound_rsp_err() 185 if (rq->timeout > RQ_MAX_TIMEOUT) in esas2r_handle_outbound_rsp_err() 186 rq->req_stat = RS_TIMEOUT; in esas2r_handle_outbound_rsp_err() 187 } else if (rq->req_stat == RS_SCSI_ERROR) { in esas2r_handle_outbound_rsp_err() 188 u8 scsistatus = rq->func_rsp.scsi_rsp.scsi_stat; in esas2r_handle_outbound_rsp_err() 197 rq->req_stat = RS_SUCCESS; in esas2r_handle_outbound_rsp_err() 198 rq->func_rsp.scsi_rsp.scsi_stat = in esas2r_handle_outbound_rsp_err() [all …]
|
D | esas2r_io.c | 46 void esas2r_start_request(struct esas2r_adapter *a, struct esas2r_request *rq) in esas2r_start_request() argument 49 struct esas2r_request *startrq = rq; in esas2r_start_request() 54 if (rq->vrq->scsi.function == VDA_FUNC_SCSI) in esas2r_start_request() 55 rq->req_stat = RS_SEL2; in esas2r_start_request() 57 rq->req_stat = RS_DEGRADED; in esas2r_start_request() 58 } else if (likely(rq->vrq->scsi.function == VDA_FUNC_SCSI)) { in esas2r_start_request() 59 t = a->targetdb + rq->target_id; in esas2r_start_request() 63 rq->req_stat = RS_SEL; in esas2r_start_request() 66 rq->vrq->scsi.target_id = cpu_to_le16(t->virt_targ_id); in esas2r_start_request() 75 rq->req_stat = RS_SEL; in esas2r_start_request() [all …]
|
D | esas2r_ioctl.c | 83 struct esas2r_request *rq) in complete_fm_api_req() argument 111 struct esas2r_request *rq; in do_fm_api() local 118 rq = esas2r_alloc_request(a); in do_fm_api() 119 if (rq == NULL) { in do_fm_api() 151 rq->comp_cb = complete_fm_api_req; in do_fm_api() 155 if (!esas2r_fm_api(a, (struct esas2r_flash_img *)a->save_offset, rq, in do_fm_api() 174 esas2r_free_request(a, (struct esas2r_request *)rq); in do_fm_api() 182 struct esas2r_request *rq) in complete_nvr_req() argument 199 struct esas2r_request *rq) in complete_buffered_ioctl_req() argument 208 struct esas2r_request *rq; in handle_buffered_ioctl() local [all …]
|
D | esas2r_main.c | 145 struct esas2r_request *rq; in write_live_nvram() local 148 rq = esas2r_alloc_request(a); in write_live_nvram() 149 if (rq == NULL) in write_live_nvram() 152 if (esas2r_write_params(a, rq, (struct esas2r_sas_nvram *)buf)) in write_live_nvram() 155 esas2r_free_request(a, rq); in write_live_nvram() 881 struct esas2r_request *rq; in esas2r_queuecommand() local 894 rq = esas2r_alloc_request(a); in esas2r_queuecommand() 895 if (unlikely(rq == NULL)) { in esas2r_queuecommand() 900 rq->cmd = cmd; in esas2r_queuecommand() 905 rq->vrq->scsi.flags |= cpu_to_le32(FCP_CMND_WRD); in esas2r_queuecommand() [all …]
|
/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_rx.c | 54 static inline void mlx5e_read_title_slot(struct mlx5e_rq *rq, in mlx5e_read_title_slot() argument 60 rq->stats.cqe_compress_blks++; in mlx5e_read_title_slot() 92 static inline void mlx5e_decompress_cqe(struct mlx5e_rq *rq, in mlx5e_decompress_cqe() argument 101 if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) in mlx5e_decompress_cqe() 106 (cq->decmprs_wqe_counter + 1) & rq->wq.sz_m1; in mlx5e_decompress_cqe() 109 static inline void mlx5e_decompress_cqe_no_hash(struct mlx5e_rq *rq, in mlx5e_decompress_cqe_no_hash() argument 112 mlx5e_decompress_cqe(rq, cq, cqcc); in mlx5e_decompress_cqe_no_hash() 117 static inline u32 mlx5e_decompress_cqes_cont(struct mlx5e_rq *rq, in mlx5e_decompress_cqes_cont() argument 133 mlx5e_decompress_cqe_no_hash(rq, cq, cqcc); in mlx5e_decompress_cqes_cont() 134 rq->handle_rx_cqe(rq, &cq->title); in mlx5e_decompress_cqes_cont() [all …]
|
/drivers/ide/ |
D | ide-pm.c | 10 struct request *rq; in generic_ide_suspend() local 21 rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM); in generic_ide_suspend() 22 rq->cmd_type = REQ_TYPE_ATA_PM_SUSPEND; in generic_ide_suspend() 23 rq->special = &rqpm; in generic_ide_suspend() 29 ret = blk_execute_rq(drive->queue, NULL, rq, 0); in generic_ide_suspend() 30 blk_put_request(rq); in generic_ide_suspend() 41 static void ide_end_sync_rq(struct request *rq, int error) in ide_end_sync_rq() argument 43 complete(rq->end_io_data); in ide_end_sync_rq() 46 static int ide_pm_execute_rq(struct request *rq) in ide_pm_execute_rq() argument 48 struct request_queue *q = rq->q; in ide_pm_execute_rq() [all …]
|
D | ide-io.c | 57 int ide_end_rq(ide_drive_t *drive, struct request *rq, int error, in ide_end_rq() argument 70 return blk_end_request(rq, error, nr_bytes); in ide_end_rq() 78 struct request *rq = cmd->rq; in ide_complete_cmd() local 105 if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { in ide_complete_cmd() 106 struct ide_cmd *orig_cmd = rq->special; in ide_complete_cmd() 118 struct request *rq = hwif->rq; in ide_complete_rq() local 125 if (blk_noretry_request(rq) && error <= 0) in ide_complete_rq() 126 nr_bytes = blk_rq_sectors(rq) << 9; in ide_complete_rq() 128 rc = ide_end_rq(drive, rq, error, nr_bytes); in ide_complete_rq() 130 hwif->rq = NULL; in ide_complete_rq() [all …]
|
D | ide-cd.c | 96 static int cdrom_log_sense(ide_drive_t *drive, struct request *rq) in cdrom_log_sense() argument 101 if (!sense || !rq || (rq->cmd_flags & REQ_QUIET)) in cdrom_log_sense() 124 if (rq->cmd[0] == GPCMD_START_STOP_UNIT && sense->asc == 0x24) in cdrom_log_sense() 210 static void ide_cd_complete_failed_rq(ide_drive_t *drive, struct request *rq) in ide_cd_complete_failed_rq() argument 218 struct request *failed = (struct request *)rq->special; in ide_cd_complete_failed_rq() 219 void *sense = bio_data(rq->bio); in ide_cd_complete_failed_rq() 229 failed->sense_len = rq->sense_len; in ide_cd_complete_failed_rq() 247 static int ide_cd_breathe(ide_drive_t *drive, struct request *rq) in ide_cd_breathe() argument 252 if (!rq->errors) in ide_cd_breathe() 255 rq->errors = 1; in ide_cd_breathe() [all …]
|
D | ide-eh.c | 7 static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, in ide_ata_error() argument 15 rq->errors |= ERROR_RESET; in ide_ata_error() 28 rq->errors = ERROR_MAX; in ide_ata_error() 31 rq->errors |= ERROR_RECAL; in ide_ata_error() 35 if ((stat & ATA_DRQ) && rq_data_dir(rq) == READ && in ide_ata_error() 42 if (rq->errors >= ERROR_MAX || blk_noretry_request(rq)) { in ide_ata_error() 43 ide_kill_rq(drive, rq); in ide_ata_error() 48 rq->errors |= ERROR_RESET; in ide_ata_error() 50 if ((rq->errors & ERROR_RESET) == ERROR_RESET) { in ide_ata_error() 51 ++rq->errors; in ide_ata_error() [all …]
|
D | ide-floppy.c | 66 struct request *rq = pc->rq; in ide_floppy_callback() local 75 rq->cmd_type == REQ_TYPE_BLOCK_PC) in ide_floppy_callback() 79 u8 *buf = bio_data(rq->bio); in ide_floppy_callback() 100 if (rq->cmd_type == REQ_TYPE_DRV_PRIV) in ide_floppy_callback() 101 rq->errors = uptodate ? 0 : IDE_DRV_ERROR_GENERAL; in ide_floppy_callback() 136 unsigned int done = blk_rq_bytes(drive->hwif->rq); in ide_floppy_issue_pc() 191 struct ide_atapi_pc *pc, struct request *rq, in idefloppy_create_rw_cmd() argument 196 int blocks = blk_rq_sectors(rq) / floppy->bs_factor; in idefloppy_create_rw_cmd() 197 int cmd = rq_data_dir(rq); in idefloppy_create_rw_cmd() 206 memcpy(rq->cmd, pc->c, 12); in idefloppy_create_rw_cmd() [all …]
|
D | ide-atapi.c | 92 struct request *rq; in ide_queue_pc_tail() local 95 rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM); in ide_queue_pc_tail() 96 rq->cmd_type = REQ_TYPE_DRV_PRIV; in ide_queue_pc_tail() 97 rq->special = (char *)pc; in ide_queue_pc_tail() 100 error = blk_rq_map_kern(drive->queue, rq, buf, bufflen, in ide_queue_pc_tail() 106 memcpy(rq->cmd, pc->c, 12); in ide_queue_pc_tail() 108 rq->cmd[13] = REQ_IDETAPE_PC1; in ide_queue_pc_tail() 109 error = blk_execute_rq(drive->queue, disk, rq, 0); in ide_queue_pc_tail() 111 blk_put_request(rq); in ide_queue_pc_tail() 171 void ide_prep_sense(ide_drive_t *drive, struct request *rq) in ide_prep_sense() argument [all …]
|
D | ide-park.c | 13 struct request *rq; in issue_park_cmd() local 34 rq = blk_get_request(q, READ, __GFP_RECLAIM); in issue_park_cmd() 35 rq->cmd[0] = REQ_PARK_HEADS; in issue_park_cmd() 36 rq->cmd_len = 1; in issue_park_cmd() 37 rq->cmd_type = REQ_TYPE_DRV_PRIV; in issue_park_cmd() 38 rq->special = &timeout; in issue_park_cmd() 39 rc = blk_execute_rq(q, NULL, rq, 1); in issue_park_cmd() 40 blk_put_request(rq); in issue_park_cmd() 48 rq = blk_get_request(q, READ, GFP_NOWAIT); in issue_park_cmd() 49 if (IS_ERR(rq)) in issue_park_cmd() [all …]
|
/drivers/md/ |
D | dm-rq.c | 149 static void free_old_clone_request(struct mapped_device *md, struct request *rq) in free_old_clone_request() argument 151 mempool_free(rq, md->rq_pool); in free_old_clone_request() 206 static struct dm_rq_target_io *tio_from_request(struct request *rq) in tio_from_request() argument 208 return (rq->q->mq_ops ? blk_mq_rq_to_pdu(rq) : rq->special); in tio_from_request() 291 struct request *rq = tio->orig; in dm_end_request() local 293 if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { in dm_end_request() 294 rq->errors = clone->errors; in dm_end_request() 295 rq->resid_len = clone->resid_len; in dm_end_request() 297 if (rq->sense) in dm_end_request() 303 rq->sense_len = clone->sense_len; in dm_end_request() [all …]
|
/drivers/s390/char/ |
D | raw3270.c | 138 struct raw3270_request *rq; in raw3270_request_alloc() local 141 rq = kzalloc(sizeof(struct raw3270_request), GFP_KERNEL | GFP_DMA); in raw3270_request_alloc() 142 if (!rq) in raw3270_request_alloc() 147 rq->buffer = kmalloc(size, GFP_KERNEL | GFP_DMA); in raw3270_request_alloc() 148 if (!rq->buffer) { in raw3270_request_alloc() 149 kfree(rq); in raw3270_request_alloc() 153 rq->size = size; in raw3270_request_alloc() 154 INIT_LIST_HEAD(&rq->list); in raw3270_request_alloc() 159 rq->ccw.cda = __pa(rq->buffer); in raw3270_request_alloc() 160 rq->ccw.flags = CCW_FLAG_SLI; in raw3270_request_alloc() [all …]
|
D | fs3270.c | 47 fs3270_wake_up(struct raw3270_request *rq, void *data) in fs3270_wake_up() argument 63 fs3270_do_io(struct raw3270_view *view, struct raw3270_request *rq) in fs3270_do_io() argument 69 rq->callback = fs3270_wake_up; in fs3270_do_io() 70 rq->callback_data = &fp->wait; in fs3270_do_io() 80 rc = raw3270_start(view, rq); in fs3270_do_io() 83 wait_event(fp->wait, raw3270_request_final(rq)); in fs3270_do_io() 93 fs3270_reset_callback(struct raw3270_request *rq, void *data) in fs3270_reset_callback() argument 97 fp = (struct fs3270 *) rq->view; in fs3270_reset_callback() 98 raw3270_request_reset(rq); in fs3270_reset_callback() 103 fs3270_restore_callback(struct raw3270_request *rq, void *data) in fs3270_restore_callback() argument [all …]
|
/drivers/usb/misc/ |
D | uss720.c | 95 struct uss720_async_request *rq = container_of(kref, struct uss720_async_request, ref_count); in destroy_async() local 96 struct parport_uss720_private *priv = rq->priv; in destroy_async() 99 if (likely(rq->urb)) in destroy_async() 100 usb_free_urb(rq->urb); in destroy_async() 101 kfree(rq->dr); in destroy_async() 103 list_del_init(&rq->asynclist); in destroy_async() 105 kfree(rq); in destroy_async() 113 struct uss720_async_request *rq; in async_complete() local 118 rq = urb->context; in async_complete() 119 priv = rq->priv; in async_complete() [all …]
|
/drivers/scsi/device_handler/ |
D | scsi_dh_emc.c | 270 struct request *rq; in get_req() local 273 rq = blk_get_request(sdev->request_queue, in get_req() 275 if (IS_ERR(rq)) { in get_req() 280 blk_rq_set_block_pc(rq); in get_req() 281 rq->cmd_len = COMMAND_SIZE(cmd); in get_req() 282 rq->cmd[0] = cmd; in get_req() 287 rq->cmd[1] = 0x10; in get_req() 288 rq->cmd[4] = len; in get_req() 292 rq->cmd[1] = 0x10; in get_req() 293 rq->cmd[8] = len; in get_req() [all …]
|
/drivers/infiniband/sw/rdmavt/ |
D | srq.c | 100 srq->rq.size = srq_init_attr->attr.max_wr + 1; in rvt_create_srq() 101 srq->rq.max_sge = srq_init_attr->attr.max_sge; in rvt_create_srq() 102 sz = sizeof(struct ib_sge) * srq->rq.max_sge + in rvt_create_srq() 104 srq->rq.wq = vmalloc_user(sizeof(struct rvt_rwq) + srq->rq.size * sz); in rvt_create_srq() 105 if (!srq->rq.wq) { in rvt_create_srq() 116 u32 s = sizeof(struct rvt_rwq) + srq->rq.size * sz; in rvt_create_srq() 120 srq->rq.wq); in rvt_create_srq() 139 spin_lock_init(&srq->rq.lock); in rvt_create_srq() 140 srq->rq.wq->head = 0; in rvt_create_srq() 141 srq->rq.wq->tail = 0; in rvt_create_srq() [all …]
|
/drivers/char/ |
D | raw.c | 211 struct raw_config_request rq; in raw_ctl_ioctl() local 217 if (copy_from_user(&rq, (void __user *) arg, sizeof(rq))) in raw_ctl_ioctl() 220 return bind_set(rq.raw_minor, rq.block_major, rq.block_minor); in raw_ctl_ioctl() 223 if (copy_from_user(&rq, (void __user *) arg, sizeof(rq))) in raw_ctl_ioctl() 226 err = bind_get(rq.raw_minor, &dev); in raw_ctl_ioctl() 230 rq.block_major = MAJOR(dev); in raw_ctl_ioctl() 231 rq.block_minor = MINOR(dev); in raw_ctl_ioctl() 233 if (copy_to_user((void __user *)arg, &rq, sizeof(rq))) in raw_ctl_ioctl() 253 struct raw32_config_request rq; in raw_ctl_compat_ioctl() local 259 if (copy_from_user(&rq, user_req, sizeof(rq))) in raw_ctl_compat_ioctl() [all …]
|