Lines Matching refs:fcmd
435 static int socal_hw_enque (fc_channel *fc, fcp_cmnd *fcmd) in socal_hw_enque() argument
446 if (fcmd->proto == TYPE_SCSI_FCP) in socal_hw_enque()
450 SOD(("Putting a FCP packet type %d into hw queue %d\n", fcmd->proto, qno)) in socal_hw_enque()
473 switch (fcmd->proto) { in socal_hw_enque()
475 request->shdr.token = TOKEN(TYPE_SCSI_FCP, port->mask, fcmd->token); in socal_hw_enque()
476 request->data[0].base = fc->dma_scsi_cmd + fcmd->token * sizeof(fcp_cmd); in socal_hw_enque()
478 request->data[1].base = fc->dma_scsi_rsp + fcmd->token * fc->rsp_size; in socal_hw_enque()
480 if (fcmd->data) { in socal_hw_enque()
482 i = fc->scsi_cmd_pool[fcmd->token].fcp_data_len; in socal_hw_enque()
484 request->data[2].base = fcmd->data; in socal_hw_enque()
486 request->type = (fc->scsi_cmd_pool[fcmd->token].fcp_cntl & FCP_CNTL_WRITE) ? in socal_hw_enque()
495 FILL_FCHDR_RCTL_DID(fch, R_CTL_COMMAND, fcmd->did); in socal_hw_enque()
507 request->shdr.token = TOKEN(PROTO_OFFLINE, port->mask, fcmd->token); in socal_hw_enque()
509 FILL_FCHDR_RCTL_DID(fch, R_CTL_COMMAND, fcmd->did); in socal_hw_enque()
519 request->shdr.token = TOKEN(PROTO_REPORT_AL_MAP, port->mask, fcmd->token); in socal_hw_enque()
524 request->data[0].base = fcmd->cmd; in socal_hw_enque()
529 request->shdr.token = TOKEN(fcmd->proto, port->mask, fcmd->token); in socal_hw_enque()
532 memcpy (fch, &fcmd->fch, sizeof(fc_hdr)); in socal_hw_enque()
533 request->data[0].count = fcmd->cmdlen; in socal_hw_enque()
534 request->data[1].count = fcmd->rsplen; in socal_hw_enque()
535 request->type = fcmd->class; in socal_hw_enque()
536 switch (fcmd->class) { in socal_hw_enque()
538 request->data[0].base = fcmd->cmd; in socal_hw_enque()
539 request->data[0].count = fcmd->cmdlen; in socal_hw_enque()
541 request->shdr.bytecnt = fcmd->cmdlen; in socal_hw_enque()
545 request->data[0].base = fcmd->rsp; in socal_hw_enque()
546 request->data[0].count = fcmd->rsplen; in socal_hw_enque()
552 request->data[0].base = fcmd->cmd; in socal_hw_enque()
553 request->data[1].base = fcmd->rsp; in socal_hw_enque()
554 request->data[0].count = fcmd->cmdlen; in socal_hw_enque()
555 request->data[1].count = fcmd->rsplen; in socal_hw_enque()
557 request->shdr.bytecnt = fcmd->cmdlen; in socal_hw_enque()
562 request->data[0].base = fcmd->cmd; in socal_hw_enque()
563 request->data[1].base = fcmd->rsp; in socal_hw_enque()
564 request->data[0].count = fcmd->cmdlen; in socal_hw_enque()
565 request->data[1].count = fcmd->rsplen; in socal_hw_enque()
566 request->type = (fcmd->class == FC_CLASS_IO_READ) ? SOCAL_CQTYPE_IO_READ : SOCAL_CQTYPE_IO_WRITE; in socal_hw_enque()
567 if (fcmd->data) { in socal_hw_enque()
568 request->data[2].base = fcmd->data; in socal_hw_enque()
569 request->data[2].count = fcmd->datalen; in socal_hw_enque()
570 request->shdr.bytecnt = fcmd->datalen; in socal_hw_enque()