Lines Matching refs:job
1714 static int ibmvfc_bsg_timeout(struct fc_bsg_job *job) in ibmvfc_bsg_timeout() argument
1716 struct ibmvfc_host *vhost = shost_priv(job->shost); in ibmvfc_bsg_timeout()
1717 unsigned long port_id = (unsigned long)job->dd_data; in ibmvfc_bsg_timeout()
1827 static int ibmvfc_bsg_request(struct fc_bsg_job *job) in ibmvfc_bsg_request() argument
1829 struct ibmvfc_host *vhost = shost_priv(job->shost); in ibmvfc_bsg_request()
1830 struct fc_rport *rport = job->rport; in ibmvfc_bsg_request()
1835 unsigned int code = job->request->msgcode; in ibmvfc_bsg_request()
1840 job->reply->reply_payload_rcv_len = 0; in ibmvfc_bsg_request()
1846 port_id = (job->request->rqst_data.h_els.port_id[0] << 16) | in ibmvfc_bsg_request()
1847 (job->request->rqst_data.h_els.port_id[1] << 8) | in ibmvfc_bsg_request()
1848 job->request->rqst_data.h_els.port_id[2]; in ibmvfc_bsg_request()
1854 port_id = (job->request->rqst_data.h_ct.port_id[0] << 16) | in ibmvfc_bsg_request()
1855 (job->request->rqst_data.h_ct.port_id[1] << 8) | in ibmvfc_bsg_request()
1856 job->request->rqst_data.h_ct.port_id[2]; in ibmvfc_bsg_request()
1869 job->dd_data = (void *)port_id; in ibmvfc_bsg_request()
1870 req_seg = dma_map_sg(vhost->dev, job->request_payload.sg_list, in ibmvfc_bsg_request()
1871 job->request_payload.sg_cnt, DMA_TO_DEVICE); in ibmvfc_bsg_request()
1878 rsp_seg = dma_map_sg(vhost->dev, job->reply_payload.sg_list, in ibmvfc_bsg_request()
1879 job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in ibmvfc_bsg_request()
1882 dma_unmap_sg(vhost->dev, job->request_payload.sg_list, in ibmvfc_bsg_request()
1883 job->request_payload.sg_cnt, DMA_TO_DEVICE); in ibmvfc_bsg_request()
1917 mad->iu.cmd_len = cpu_to_be32(job->request_payload.payload_len); in ibmvfc_bsg_request()
1918 mad->iu.rsp_len = cpu_to_be32(job->reply_payload.payload_len); in ibmvfc_bsg_request()
1922 mad->iu.cmd.va = cpu_to_be64(sg_dma_address(job->request_payload.sg_list)); in ibmvfc_bsg_request()
1923 mad->iu.cmd.len = cpu_to_be32(sg_dma_len(job->request_payload.sg_list)); in ibmvfc_bsg_request()
1924 mad->iu.rsp.va = cpu_to_be64(sg_dma_address(job->reply_payload.sg_list)); in ibmvfc_bsg_request()
1925 mad->iu.rsp.len = cpu_to_be32(sg_dma_len(job->reply_payload.sg_list)); in ibmvfc_bsg_request()
1945 job->reply->reply_payload_rcv_len = rsp_len; in ibmvfc_bsg_request()
1950 job->reply->result = rc; in ibmvfc_bsg_request()
1951 job->job_done(job); in ibmvfc_bsg_request()
1954 dma_unmap_sg(vhost->dev, job->request_payload.sg_list, in ibmvfc_bsg_request()
1955 job->request_payload.sg_cnt, DMA_TO_DEVICE); in ibmvfc_bsg_request()
1956 dma_unmap_sg(vhost->dev, job->reply_payload.sg_list, in ibmvfc_bsg_request()
1957 job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in ibmvfc_bsg_request()