Lines Matching refs:req

41 				struct hpt_iop_request_scsi_command *req);
48 u32 req = 0;
52 req = readl(&hba->u.itl.iop->inbound_queue);
53 if (req != IOPMU_QUEUE_EMPTY)
58 if (req != IOPMU_QUEUE_EMPTY) {
59 writel(req, &hba->u.itl.iop->outbound_queue);
88 u32 req;
90 while ((req = readl(&hba->u.itl.iop->outbound_queue)) !=
93 if (req & IOPMU_QUEUE_MASK_HOST_BITS)
94 hptiop_request_callback_itl(hba, req);
99 ((char __iomem *)hba->u.itl.iop + req);
103 hptiop_request_callback_itl(hba, req);
108 hptiop_request_callback_itl(hba, req);
178 struct hpt_iop_request_scsi_command *req;
191 req = hba->reqs[tag >> 8].req_virt;
193 req->header.result = cpu_to_le32(IOP_RESULT_SUCCESS);
195 hptiop_finish_scsi_req(hba, tag>>8, req);
233 struct hpt_iop_request_scsi_command *req;
242 req = hba->reqs[(_tag >> 4) & 0xff].req_virt;
244 req->header.result = IOP_RESULT_SUCCESS;
245 hptiop_finish_scsi_req(hba, (_tag >> 4) & 0xff, req);
301 struct hpt_iop_request_header __iomem *req = _req;
304 writel(readl(&req->flags) | IOP_REQUEST_FLAG_SYNC_REQUEST, &req->flags);
305 writel(0, &req->context);
306 writel((unsigned long)req - (unsigned long)hba->u.itl.iop,
312 if (readl(&req->context))
404 struct hpt_iop_request_get_config __iomem *req;
410 req = (struct hpt_iop_request_get_config __iomem *)
413 writel(0, &req->header.flags);
414 writel(IOP_REQUEST_TYPE_GET_CONFIG, &req->header.type);
415 writel(sizeof(struct hpt_iop_request_get_config), &req->header.size);
416 writel(IOP_RESULT_PENDING, &req->header.result);
418 if (iop_send_sync_request_itl(hba, req, 20000)) {
423 memcpy_fromio(config, req, sizeof(*config));
431 struct hpt_iop_request_get_config *req = hba->u.mv.internal_req;
433 req->header.flags = cpu_to_le32(IOP_REQUEST_FLAG_OUTPUT_CONTEXT);
434 req->header.type = cpu_to_le32(IOP_REQUEST_TYPE_GET_CONFIG);
435 req->header.size =
437 req->header.result = cpu_to_le32(IOP_RESULT_PENDING);
438 req->header.context = cpu_to_le32(IOP_REQUEST_TYPE_GET_CONFIG<<5);
439 req->header.context_hi32 = 0;
446 memcpy(config, req, sizeof(struct hpt_iop_request_get_config));
476 struct hpt_iop_request_set_config __iomem *req;
482 req = (struct hpt_iop_request_set_config __iomem *)
485 memcpy_toio((u8 __iomem *)req + sizeof(struct hpt_iop_request_header),
490 writel(0, &req->header.flags);
491 writel(IOP_REQUEST_TYPE_SET_CONFIG, &req->header.type);
492 writel(sizeof(struct hpt_iop_request_set_config), &req->header.size);
493 writel(IOP_RESULT_PENDING, &req->header.result);
495 if (iop_send_sync_request_itl(hba, req, 20000)) {
507 struct hpt_iop_request_set_config *req = hba->u.mv.internal_req;
509 memcpy(req, config, sizeof(struct hpt_iop_request_set_config));
510 req->header.flags = cpu_to_le32(IOP_REQUEST_FLAG_OUTPUT_CONTEXT);
511 req->header.type = cpu_to_le32(IOP_REQUEST_TYPE_SET_CONFIG);
512 req->header.size =
514 req->header.result = cpu_to_le32(IOP_RESULT_PENDING);
515 req->header.context = cpu_to_le32(IOP_REQUEST_TYPE_SET_CONFIG<<5);
516 req->header.context_hi32 = 0;
529 struct hpt_iop_request_set_config *req =
532 memcpy(req, config, sizeof(struct hpt_iop_request_set_config));
533 req->header.flags = cpu_to_le32(IOP_REQUEST_FLAG_OUTPUT_CONTEXT);
534 req->header.type = cpu_to_le32(IOP_REQUEST_TYPE_SET_CONFIG);
535 req->header.size =
537 req->header.result = cpu_to_le32(IOP_RESULT_PENDING);
538 req->header.context = cpu_to_le32(IOP_REQUEST_TYPE_SET_CONFIG<<5);
539 req->header.context_hi32 = 0;
700 dprintk("get_req : req=%p\n", hba->req_list);
709 static void free_req(struct hptiop_hba *hba, struct hptiop_request *req)
711 dprintk("free_req(%d, %p)\n", req->index, req);
712 req->next = hba->req_list;
713 hba->req_list = req;
717 struct hpt_iop_request_scsi_command *req)
721 dprintk("hptiop_finish_scsi_req: req=%p, type=%d, "
723 req, req->header.type, req->header.result,
724 req->header.context, tag);
726 BUG_ON(!req->header.result);
727 BUG_ON(req->header.type != cpu_to_le32(IOP_REQUEST_TYPE_SCSI_COMMAND));
734 switch (le32_to_cpu(req->header.result)) {
737 scsi_bufflen(scp) - le32_to_cpu(req->dataxfer_length));
757 scsi_bufflen(scp) - le32_to_cpu(req->dataxfer_length));
759 memcpy(scp->sense_buffer, &req->sg_list, SCSI_SENSE_BUFFERSIZE);
768 scsi_bufflen(scp) - le32_to_cpu(req->dataxfer_length));
778 struct hpt_iop_request_scsi_command *req;
783 req = hba->reqs[tag].req_virt;
785 req->header.result = cpu_to_le32(IOP_RESULT_SUCCESS);
788 req = hba->reqs[tag].req_virt;
791 hptiop_finish_scsi_req(hba, tag, req);
796 struct hpt_iop_request_header __iomem *req;
800 req = (struct hpt_iop_request_header __iomem *)
802 dprintk("hptiop_iop_request_callback_itl: req=%p, type=%d, "
804 req, readl(&req->type), readl(&req->result),
805 readl(&req->context), tag);
807 BUG_ON(!readl(&req->result));
808 BUG_ON(readl(&req->type) != IOP_REQUEST_TYPE_IOCTL_COMMAND);
810 p = (struct hpt_iop_request_ioctl_command __iomem *)req;
812 (readl(&req->context) |
813 ((u64)readl(&req->context_hi32)<<32));
815 if (readl(&req->result) == IOP_RESULT_SUCCESS) {
1000 struct hpt_iop_request_scsi_command *req;
1006 dprintk("hptiop_queuecmd : no free req\n");
1013 "req_index=%d, req=%p\n",
1033 req = _req->req_virt;
1036 sg_count = hptiop_buildsgl(scp, req->sg_list);
1040 req->header.flags = cpu_to_le32(IOP_REQUEST_FLAG_OUTPUT_CONTEXT);
1041 req->header.type = cpu_to_le32(IOP_REQUEST_TYPE_SCSI_COMMAND);
1042 req->header.result = cpu_to_le32(IOP_RESULT_PENDING);
1043 req->dataxfer_length = cpu_to_le32(scsi_bufflen(scp));
1044 req->channel = scp->device->channel;
1045 req->target = scp->device->id;
1046 req->lun = scp->device->lun;
1047 req->header.size = cpu_to_le32(struct_size(req, sg_list, sg_count));
1049 memcpy(req->cdb, scp->cmnd, sizeof(req->cdb));