Lines Matching defs:iue
93 static inline union viosrp_iu *vio_iu(struct iu_entry *iue)
95 return (union viosrp_iu *) (iue->sbuf->buf);
98 static int send_iu(struct iu_entry *iue, uint64_t length, uint8_t format)
100 struct srp_target *target = iue->target;
109 rc = h_copy_rdma(length, vport->liobn, iue->sbuf->dma,
110 vport->riobn, iue->remote_token);
120 crq.cooked.IU_data_ptr = vio_iu(iue)->srp.rsp.tag;
139 static int send_rsp(struct iu_entry *iue, struct scsi_cmnd *sc,
142 union viosrp_iu *iu = vio_iu(iue);
146 if (test_bit(V_LINKED, &iue->flags) && (status == NO_SENSE))
154 if (test_bit(V_DIOVER, &iue->flags))
187 send_iu(iue, sizeof(iu->srp.rsp) + SRP_RSP_SENSE_DATA_LEN,
197 struct iu_entry *iue;
205 list_for_each_entry(iue, &target->cmd_queue, ilist) {
206 if (!test_and_set_bit(V_FLYING, &iue->flags)) {
208 cmd = iue->sbuf->buf;
209 err = srp_cmd_queue(shost, cmd, iue,
213 srp_iu_put(iue);
226 struct iu_entry *iue = (struct iu_entry *) sc->SCp.ptr;
227 struct srp_target *target = iue->target;
274 iue, sidx, nsg);
289 struct iu_entry *iue = (struct iu_entry *) sc->SCp.ptr;
290 struct srp_target *target = iue->target;
293 dprintk("%p %p %x %u\n", iue, target, vio_iu(iue)->srp.cmd.cdb[0],
297 err = srp_transfer_data(sc, &vio_iu(iue)->srp.cmd, ibmvstgt_rdma, 1, 1);
300 list_del(&iue->ilist);
305 iue, sc->result, vio_iu(iue)->srp.cmd.cdb[0]);
306 send_rsp(iue, sc, HARDWARE_ERROR, 0x00);
308 send_rsp(iue, sc, NO_SENSE, 0x00);
311 srp_iu_put(iue);
315 int send_adapter_info(struct iu_entry *iue,
318 struct srp_target *target = iue->target;
364 static void process_login(struct iu_entry *iue)
366 union viosrp_iu *iu = vio_iu(iue);
369 struct Scsi_Host *shost = iue->target->shost;
392 send_iu(iue, sizeof(*rsp), VIOSRP_SRP_FORMAT);
395 static inline void queue_cmd(struct iu_entry *iue)
397 struct srp_target *target = iue->target;
401 list_add_tail(&iue->ilist, &target->cmd_queue);
405 static int process_tsk_mgmt(struct iu_entry *iue)
407 union viosrp_iu *iu = vio_iu(iue);
410 dprintk("%p %u\n", iue, iu->srp.tsk_mgmt.tsk_mgmt_func);
432 scsi_tgt_tsk_mgmt_request(iue->target->shost,
433 (unsigned long)iue->target->shost,
437 iue);
439 send_rsp(iue, NULL, ILLEGAL_REQUEST, 0x20);
444 static int process_mad_iu(struct iu_entry *iue)
446 union viosrp_iu *iu = vio_iu(iue);
457 send_iu(iue, sizeof(iu->mad.error_log), VIOSRP_MAD_FORMAT);
461 info->common.status = send_adapter_info(iue, info->buffer,
463 send_iu(iue, sizeof(*info), VIOSRP_MAD_FORMAT);
468 send_iu(iue, sizeof(*conf), VIOSRP_MAD_FORMAT);
477 static int process_srp_iu(struct iu_entry *iue)
479 union viosrp_iu *iu = vio_iu(iue);
485 process_login(iue);
488 done = process_tsk_mgmt(iue);
491 queue_cmd(iue);
514 struct iu_entry *iue;
518 iue = srp_iu_get(target);
519 if (!iue) {
524 iue->remote_token = crq->IU_data_ptr;
527 iue->remote_token, vport->liobn, iue->sbuf->dma);
530 eprintk("%ld transferring data error %p\n", err, iue);
535 done = process_mad_iu(iue);
537 done = process_srp_iu(iue);
540 srp_iu_put(iue);
729 struct iu_entry *iue = (struct iu_entry *) sc->SCp.ptr;
730 struct srp_target *target = iue->target;
732 dprintk("%p %p %x\n", iue, target, vio_iu(iue)->srp.cmd.cdb[0]);
735 list_del(&iue->ilist);
738 srp_iu_put(iue);
746 struct iu_entry *iue = (struct iu_entry *) ((void *) mid);
747 union viosrp_iu *iu = vio_iu(iue);
750 eprintk("%p %d\n", iue, result);
764 send_rsp(iue, NULL, status, asc);
765 srp_iu_put(iue);