• Home
  • Raw
  • Download

Lines Matching refs:bsg_job

17 	struct bsg_job *bsg_job = sp->u.bsg_job;  in qla2x00_bsg_job_done()  local
18 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_bsg_job_done()
21 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_bsg_job_done()
29 struct bsg_job *bsg_job = sp->u.bsg_job; in qla2x00_bsg_sp_free() local
30 struct fc_bsg_request *bsg_request = bsg_job->request; in qla2x00_bsg_sp_free()
39 bsg_job->request_payload.sg_list, in qla2x00_bsg_sp_free()
40 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla2x00_bsg_sp_free()
44 bsg_job->reply_payload.sg_list, in qla2x00_bsg_sp_free()
45 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla2x00_bsg_sp_free()
47 dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla2x00_bsg_sp_free()
48 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla2x00_bsg_sp_free()
50 dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, in qla2x00_bsg_sp_free()
51 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla2x00_bsg_sp_free()
116 qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job) in qla24xx_proc_fcp_prio_cfg_cmd() argument
118 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla24xx_proc_fcp_prio_cfg_cmd()
119 struct fc_bsg_request *bsg_request = bsg_job->request; in qla24xx_proc_fcp_prio_cfg_cmd()
120 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla24xx_proc_fcp_prio_cfg_cmd()
172 len = bsg_job->reply_payload.payload_len; in qla24xx_proc_fcp_prio_cfg_cmd()
182 bsg_job->reply_payload.sg_list, in qla24xx_proc_fcp_prio_cfg_cmd()
183 bsg_job->reply_payload.sg_cnt, ha->fcp_prio_cfg, in qla24xx_proc_fcp_prio_cfg_cmd()
189 len = bsg_job->request_payload.payload_len; in qla24xx_proc_fcp_prio_cfg_cmd()
209 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla24xx_proc_fcp_prio_cfg_cmd()
210 bsg_job->request_payload.sg_cnt, ha->fcp_prio_cfg, in qla24xx_proc_fcp_prio_cfg_cmd()
239 bsg_job_done(bsg_job, bsg_reply->result, in qla24xx_proc_fcp_prio_cfg_cmd()
245 qla2x00_process_els(struct bsg_job *bsg_job) in qla2x00_process_els() argument
247 struct fc_bsg_request *bsg_request = bsg_job->request; in qla2x00_process_els()
260 rport = fc_bsg_to_rport(bsg_job); in qla2x00_process_els()
267 host = fc_bsg_to_shost(bsg_job); in qla2x00_process_els()
288 if (bsg_job->request_payload.sg_cnt > 1 || in qla2x00_process_els()
289 bsg_job->reply_payload.sg_cnt > 1) { in qla2x00_process_els()
293 bsg_job->request_payload.sg_cnt, in qla2x00_process_els()
294 bsg_job->reply_payload.sg_cnt); in qla2x00_process_els()
337 dma_map_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla2x00_process_els()
338 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla2x00_process_els()
340 dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla2x00_process_els()
341 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla2x00_process_els()
346 rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, in qla2x00_process_els()
347 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla2x00_process_els()
349 dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, in qla2x00_process_els()
350 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla2x00_process_els()
355 if ((req_sg_cnt != bsg_job->request_payload.sg_cnt) || in qla2x00_process_els()
356 (rsp_sg_cnt != bsg_job->reply_payload.sg_cnt)) { in qla2x00_process_els()
360 "dma_reply_sg_cnt:%x.\n", bsg_job->request_payload.sg_cnt, in qla2x00_process_els()
361 req_sg_cnt, bsg_job->reply_payload.sg_cnt, rsp_sg_cnt); in qla2x00_process_els()
379 sp->u.bsg_job = bsg_job; in qla2x00_process_els()
400 dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla2x00_process_els()
401 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla2x00_process_els()
402 dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, in qla2x00_process_els()
403 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla2x00_process_els()
428 qla2x00_process_ct(struct bsg_job *bsg_job) in qla2x00_process_ct() argument
431 struct fc_bsg_request *bsg_request = bsg_job->request; in qla2x00_process_ct()
432 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_process_ct()
442 dma_map_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla2x00_process_ct()
443 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla2x00_process_ct()
451 rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, in qla2x00_process_ct()
452 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla2x00_process_ct()
460 if ((req_sg_cnt != bsg_job->request_payload.sg_cnt) || in qla2x00_process_ct()
461 (rsp_sg_cnt != bsg_job->reply_payload.sg_cnt)) { in qla2x00_process_ct()
464 "dma_reply_sg_cnt: %x\n", bsg_job->request_payload.sg_cnt, in qla2x00_process_ct()
465 req_sg_cnt, bsg_job->reply_payload.sg_cnt, rsp_sg_cnt); in qla2x00_process_ct()
526 sp->u.bsg_job = bsg_job; in qla2x00_process_ct()
550 dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla2x00_process_ct()
551 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla2x00_process_ct()
552 dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, in qla2x00_process_ct()
553 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla2x00_process_ct()
706 qla2x00_process_loopback(struct bsg_job *bsg_job) in qla2x00_process_loopback() argument
708 struct fc_bsg_request *bsg_request = bsg_job->request; in qla2x00_process_loopback()
709 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_process_loopback()
710 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_process_loopback()
735 bsg_job->request_payload.sg_list, bsg_job->request_payload.sg_cnt, in qla2x00_process_loopback()
745 bsg_job->reply_payload.sg_list, bsg_job->reply_payload.sg_cnt, in qla2x00_process_loopback()
755 if ((elreq.req_sg_cnt != bsg_job->request_payload.sg_cnt) || in qla2x00_process_loopback()
756 (elreq.rsp_sg_cnt != bsg_job->reply_payload.sg_cnt)) { in qla2x00_process_loopback()
761 bsg_job->request_payload.sg_cnt, elreq.req_sg_cnt, in qla2x00_process_loopback()
762 bsg_job->reply_payload.sg_cnt, elreq.rsp_sg_cnt); in qla2x00_process_loopback()
766 req_data_len = rsp_data_len = bsg_job->request_payload.payload_len; in qla2x00_process_loopback()
786 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla2x00_process_loopback()
787 bsg_job->request_payload.sg_cnt, req_data, req_data_len); in qla2x00_process_loopback()
914 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla2x00_process_loopback()
915 bsg_job->reply_payload.sg_cnt, rsp_data, in qla2x00_process_loopback()
919 bsg_job->reply_len = sizeof(struct fc_bsg_reply) + in qla2x00_process_loopback()
921 fw_sts_ptr = bsg_job->reply + sizeof(struct fc_bsg_reply); in qla2x00_process_loopback()
922 memcpy(bsg_job->reply + sizeof(struct fc_bsg_reply), response, in qla2x00_process_loopback()
935 bsg_job->reply_payload.sg_list, in qla2x00_process_loopback()
936 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla2x00_process_loopback()
939 bsg_job->request_payload.sg_list, in qla2x00_process_loopback()
940 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla2x00_process_loopback()
942 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_process_loopback()
948 qla84xx_reset(struct bsg_job *bsg_job) in qla84xx_reset() argument
950 struct fc_bsg_request *bsg_request = bsg_job->request; in qla84xx_reset()
951 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla84xx_reset()
952 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla84xx_reset()
976 bsg_job_done(bsg_job, bsg_reply->result, in qla84xx_reset()
984 qla84xx_updatefw(struct bsg_job *bsg_job) in qla84xx_updatefw() argument
986 struct fc_bsg_request *bsg_request = bsg_job->request; in qla84xx_updatefw()
987 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla84xx_updatefw()
988 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla84xx_updatefw()
1007 sg_cnt = dma_map_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla84xx_updatefw()
1008 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla84xx_updatefw()
1015 if (sg_cnt != bsg_job->request_payload.sg_cnt) { in qla84xx_updatefw()
1019 bsg_job->request_payload.sg_cnt, sg_cnt); in qla84xx_updatefw()
1024 data_len = bsg_job->request_payload.payload_len; in qla84xx_updatefw()
1034 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla84xx_updatefw()
1035 bsg_job->request_payload.sg_cnt, fw_buf, data_len); in qla84xx_updatefw()
1074 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla84xx_updatefw()
1084 dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla84xx_updatefw()
1085 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla84xx_updatefw()
1088 bsg_job_done(bsg_job, bsg_reply->result, in qla84xx_updatefw()
1094 qla84xx_mgmt_cmd(struct bsg_job *bsg_job) in qla84xx_mgmt_cmd() argument
1096 struct fc_bsg_request *bsg_request = bsg_job->request; in qla84xx_mgmt_cmd()
1097 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla84xx_mgmt_cmd()
1098 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla84xx_mgmt_cmd()
1130 bsg_job->reply_payload.sg_list, in qla84xx_mgmt_cmd()
1131 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla84xx_mgmt_cmd()
1141 if (sg_cnt != bsg_job->reply_payload.sg_cnt) { in qla84xx_mgmt_cmd()
1145 bsg_job->reply_payload.sg_cnt, sg_cnt); in qla84xx_mgmt_cmd()
1150 data_len = bsg_job->reply_payload.payload_len; in qla84xx_mgmt_cmd()
1180 bsg_job->request_payload.sg_list, in qla84xx_mgmt_cmd()
1181 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla84xx_mgmt_cmd()
1192 if (sg_cnt != bsg_job->request_payload.sg_cnt) { in qla84xx_mgmt_cmd()
1196 bsg_job->request_payload.sg_cnt, sg_cnt); in qla84xx_mgmt_cmd()
1201 data_len = bsg_job->request_payload.payload_len; in qla84xx_mgmt_cmd()
1211 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla84xx_mgmt_cmd()
1212 bsg_job->request_payload.sg_cnt, mgmt_b, data_len); in qla84xx_mgmt_cmd()
1255 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla84xx_mgmt_cmd()
1261 bsg_job->reply_payload.payload_len; in qla84xx_mgmt_cmd()
1263 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla84xx_mgmt_cmd()
1264 bsg_job->reply_payload.sg_cnt, mgmt_b, in qla84xx_mgmt_cmd()
1274 dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, in qla84xx_mgmt_cmd()
1275 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla84xx_mgmt_cmd()
1277 dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, in qla84xx_mgmt_cmd()
1278 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla84xx_mgmt_cmd()
1284 bsg_job_done(bsg_job, bsg_reply->result, in qla84xx_mgmt_cmd()
1290 qla24xx_iidma(struct bsg_job *bsg_job) in qla24xx_iidma() argument
1292 struct fc_bsg_request *bsg_request = bsg_job->request; in qla24xx_iidma()
1293 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla24xx_iidma()
1294 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla24xx_iidma()
1360 bsg_job->reply_len = sizeof(struct fc_bsg_reply) + in qla24xx_iidma()
1371 bsg_job_done(bsg_job, bsg_reply->result, in qla24xx_iidma()
1379 qla2x00_optrom_setup(struct bsg_job *bsg_job, scsi_qla_host_t *vha, in qla2x00_optrom_setup() argument
1382 struct fc_bsg_request *bsg_request = bsg_job->request; in qla2x00_optrom_setup()
1418 bsg_job->request_payload.payload_len); in qla2x00_optrom_setup()
1423 bsg_job->request_payload.payload_len > ha->optrom_size ? in qla2x00_optrom_setup()
1425 bsg_job->request_payload.payload_len; in qla2x00_optrom_setup()
1429 bsg_job->reply_payload.payload_len > ha->optrom_size ? in qla2x00_optrom_setup()
1431 bsg_job->reply_payload.payload_len; in qla2x00_optrom_setup()
1449 qla2x00_read_optrom(struct bsg_job *bsg_job) in qla2x00_read_optrom() argument
1451 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_read_optrom()
1452 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_read_optrom()
1461 rval = qla2x00_optrom_setup(bsg_job, vha, 0); in qla2x00_read_optrom()
1470 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla2x00_read_optrom()
1471 bsg_job->reply_payload.sg_cnt, ha->optrom_buffer, in qla2x00_read_optrom()
1480 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_read_optrom()
1486 qla2x00_update_optrom(struct bsg_job *bsg_job) in qla2x00_update_optrom() argument
1488 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_update_optrom()
1489 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_update_optrom()
1495 rval = qla2x00_optrom_setup(bsg_job, vha, 1); in qla2x00_update_optrom()
1504 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla2x00_update_optrom()
1505 bsg_job->request_payload.sg_cnt, ha->optrom_buffer, in qla2x00_update_optrom()
1516 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_update_optrom()
1522 qla2x00_update_fru_versions(struct bsg_job *bsg_job) in qla2x00_update_fru_versions() argument
1524 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_update_fru_versions()
1525 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_update_fru_versions()
1542 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla2x00_update_fru_versions()
1543 bsg_job->request_payload.sg_cnt, list, sizeof(bsg)); in qla2x00_update_fru_versions()
1566 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla2x00_update_fru_versions()
1568 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_update_fru_versions()
1575 qla2x00_read_fru_status(struct bsg_job *bsg_job) in qla2x00_read_fru_status() argument
1577 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_read_fru_status()
1578 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_read_fru_status()
1593 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla2x00_read_fru_status()
1594 bsg_job->request_payload.sg_cnt, sr, sizeof(*sr)); in qla2x00_read_fru_status()
1607 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla2x00_read_fru_status()
1608 bsg_job->reply_payload.sg_cnt, sr, sizeof(*sr)); in qla2x00_read_fru_status()
1616 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla2x00_read_fru_status()
1619 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_read_fru_status()
1626 qla2x00_write_fru_status(struct bsg_job *bsg_job) in qla2x00_write_fru_status() argument
1628 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_write_fru_status()
1629 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_write_fru_status()
1644 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla2x00_write_fru_status()
1645 bsg_job->request_payload.sg_cnt, sr, sizeof(*sr)); in qla2x00_write_fru_status()
1664 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla2x00_write_fru_status()
1666 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_write_fru_status()
1673 qla2x00_write_i2c(struct bsg_job *bsg_job) in qla2x00_write_i2c() argument
1675 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_write_i2c()
1676 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_write_i2c()
1691 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla2x00_write_i2c()
1692 bsg_job->request_payload.sg_cnt, i2c, sizeof(*i2c)); in qla2x00_write_i2c()
1710 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla2x00_write_i2c()
1712 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_write_i2c()
1719 qla2x00_read_i2c(struct bsg_job *bsg_job) in qla2x00_read_i2c() argument
1721 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_read_i2c()
1722 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_read_i2c()
1737 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla2x00_read_i2c()
1738 bsg_job->request_payload.sg_cnt, i2c, sizeof(*i2c)); in qla2x00_read_i2c()
1750 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla2x00_read_i2c()
1751 bsg_job->reply_payload.sg_cnt, i2c, sizeof(*i2c)); in qla2x00_read_i2c()
1759 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla2x00_read_i2c()
1762 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_read_i2c()
1769 qla24xx_process_bidir_cmd(struct bsg_job *bsg_job) in qla24xx_process_bidir_cmd() argument
1771 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla24xx_process_bidir_cmd()
1772 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla24xx_process_bidir_cmd()
1857 bsg_job->request_payload.sg_list, in qla24xx_process_bidir_cmd()
1858 bsg_job->request_payload.sg_cnt, in qla24xx_process_bidir_cmd()
1867 bsg_job->reply_payload.sg_list, bsg_job->reply_payload.sg_cnt, in qla24xx_process_bidir_cmd()
1875 if ((req_sg_cnt != bsg_job->request_payload.sg_cnt) || in qla24xx_process_bidir_cmd()
1876 (rsp_sg_cnt != bsg_job->reply_payload.sg_cnt)) { in qla24xx_process_bidir_cmd()
1881 bsg_job->request_payload.sg_cnt, req_sg_cnt, in qla24xx_process_bidir_cmd()
1882 bsg_job->reply_payload.sg_cnt, rsp_sg_cnt); in qla24xx_process_bidir_cmd()
1887 req_data_len = bsg_job->request_payload.payload_len; in qla24xx_process_bidir_cmd()
1888 rsp_data_len = bsg_job->reply_payload.payload_len; in qla24xx_process_bidir_cmd()
1907 sp->u.bsg_job = bsg_job; in qla24xx_process_bidir_cmd()
1925 bsg_job->reply_payload.sg_list, in qla24xx_process_bidir_cmd()
1926 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qla24xx_process_bidir_cmd()
1929 bsg_job->request_payload.sg_list, in qla24xx_process_bidir_cmd()
1930 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qla24xx_process_bidir_cmd()
1937 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla24xx_process_bidir_cmd()
1940 bsg_job_done(bsg_job, bsg_reply->result, in qla24xx_process_bidir_cmd()
1947 qlafx00_mgmt_cmd(struct bsg_job *bsg_job) in qlafx00_mgmt_cmd() argument
1949 struct fc_bsg_request *bsg_request = bsg_job->request; in qlafx00_mgmt_cmd()
1950 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qlafx00_mgmt_cmd()
1977 bsg_job->request_payload.sg_list, in qlafx00_mgmt_cmd()
1978 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qlafx00_mgmt_cmd()
1989 bsg_job->reply_payload.sg_list, in qlafx00_mgmt_cmd()
1990 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qlafx00_mgmt_cmd()
2001 "dma_reply_sg_cnt: %x\n", bsg_job->request_payload.sg_cnt, in qlafx00_mgmt_cmd()
2002 req_sg_cnt, bsg_job->reply_payload.sg_cnt, rsp_sg_cnt); in qlafx00_mgmt_cmd()
2033 sp->u.bsg_job = bsg_job; in qlafx00_mgmt_cmd()
2057 bsg_job->reply_payload.sg_list, in qlafx00_mgmt_cmd()
2058 bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE); in qlafx00_mgmt_cmd()
2062 bsg_job->request_payload.sg_list, in qlafx00_mgmt_cmd()
2063 bsg_job->request_payload.sg_cnt, DMA_TO_DEVICE); in qlafx00_mgmt_cmd()
2070 qla26xx_serdes_op(struct bsg_job *bsg_job) in qla26xx_serdes_op() argument
2072 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla26xx_serdes_op()
2073 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla26xx_serdes_op()
2080 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla26xx_serdes_op()
2081 bsg_job->request_payload.sg_cnt, &sr, sizeof(sr)); in qla26xx_serdes_op()
2090 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla26xx_serdes_op()
2091 bsg_job->reply_payload.sg_cnt, &sr, sizeof(sr)); in qla26xx_serdes_op()
2104 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla26xx_serdes_op()
2106 bsg_job_done(bsg_job, bsg_reply->result, in qla26xx_serdes_op()
2112 qla8044_serdes_op(struct bsg_job *bsg_job) in qla8044_serdes_op() argument
2114 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla8044_serdes_op()
2115 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla8044_serdes_op()
2122 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla8044_serdes_op()
2123 bsg_job->request_payload.sg_cnt, &sr, sizeof(sr)); in qla8044_serdes_op()
2132 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla8044_serdes_op()
2133 bsg_job->reply_payload.sg_cnt, &sr, sizeof(sr)); in qla8044_serdes_op()
2146 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla8044_serdes_op()
2148 bsg_job_done(bsg_job, bsg_reply->result, in qla8044_serdes_op()
2154 qla27xx_get_flash_upd_cap(struct bsg_job *bsg_job) in qla27xx_get_flash_upd_cap() argument
2156 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla27xx_get_flash_upd_cap()
2157 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla27xx_get_flash_upd_cap()
2171 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla27xx_get_flash_upd_cap()
2172 bsg_job->reply_payload.sg_cnt, &cap, sizeof(cap)); in qla27xx_get_flash_upd_cap()
2178 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla27xx_get_flash_upd_cap()
2180 bsg_job_done(bsg_job, bsg_reply->result, in qla27xx_get_flash_upd_cap()
2186 qla27xx_set_flash_upd_cap(struct bsg_job *bsg_job) in qla27xx_set_flash_upd_cap() argument
2188 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla27xx_set_flash_upd_cap()
2189 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla27xx_set_flash_upd_cap()
2199 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla27xx_set_flash_upd_cap()
2200 bsg_job->request_payload.sg_cnt, &cap, sizeof(cap)); in qla27xx_set_flash_upd_cap()
2224 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla27xx_set_flash_upd_cap()
2226 bsg_job_done(bsg_job, bsg_reply->result, in qla27xx_set_flash_upd_cap()
2232 qla27xx_get_bbcr_data(struct bsg_job *bsg_job) in qla27xx_get_bbcr_data() argument
2234 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla27xx_get_bbcr_data()
2235 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla27xx_get_bbcr_data()
2277 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla27xx_get_bbcr_data()
2278 bsg_job->reply_payload.sg_cnt, &bbcr, sizeof(bbcr)); in qla27xx_get_bbcr_data()
2283 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla27xx_get_bbcr_data()
2285 bsg_job_done(bsg_job, bsg_reply->result, in qla27xx_get_bbcr_data()
2291 qla2x00_get_priv_stats(struct bsg_job *bsg_job) in qla2x00_get_priv_stats() argument
2293 struct fc_bsg_request *bsg_request = bsg_job->request; in qla2x00_get_priv_stats()
2294 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_get_priv_stats()
2295 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_get_priv_stats()
2330 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla2x00_get_priv_stats()
2331 bsg_job->reply_payload.sg_cnt, stats, sizeof(*stats)); in qla2x00_get_priv_stats()
2338 bsg_job->reply_len = sizeof(*bsg_reply); in qla2x00_get_priv_stats()
2340 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_get_priv_stats()
2350 qla2x00_do_dport_diagnostics(struct bsg_job *bsg_job) in qla2x00_do_dport_diagnostics() argument
2352 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_do_dport_diagnostics()
2353 struct Scsi_Host *host = fc_bsg_to_shost(bsg_job); in qla2x00_do_dport_diagnostics()
2369 sg_copy_to_buffer(bsg_job->request_payload.sg_list, in qla2x00_do_dport_diagnostics()
2370 bsg_job->request_payload.sg_cnt, dd, sizeof(*dd)); in qla2x00_do_dport_diagnostics()
2375 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla2x00_do_dport_diagnostics()
2376 bsg_job->reply_payload.sg_cnt, dd, sizeof(*dd)); in qla2x00_do_dport_diagnostics()
2383 bsg_job->reply_len = sizeof(*bsg_reply); in qla2x00_do_dport_diagnostics()
2385 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_do_dport_diagnostics()
2394 qla2x00_get_flash_image_status(struct bsg_job *bsg_job) in qla2x00_get_flash_image_status() argument
2396 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job)); in qla2x00_get_flash_image_status()
2397 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla2x00_get_flash_image_status()
2419 sg_copy_from_buffer(bsg_job->reply_payload.sg_list, in qla2x00_get_flash_image_status()
2420 bsg_job->reply_payload.sg_cnt, &regions, sizeof(regions)); in qla2x00_get_flash_image_status()
2425 bsg_job->reply_len = sizeof(struct fc_bsg_reply); in qla2x00_get_flash_image_status()
2426 bsg_job_done(bsg_job, bsg_reply->result, in qla2x00_get_flash_image_status()
2433 qla2x00_process_vendor_specific(struct bsg_job *bsg_job) in qla2x00_process_vendor_specific() argument
2435 struct fc_bsg_request *bsg_request = bsg_job->request; in qla2x00_process_vendor_specific()
2439 return qla2x00_process_loopback(bsg_job); in qla2x00_process_vendor_specific()
2442 return qla84xx_reset(bsg_job); in qla2x00_process_vendor_specific()
2445 return qla84xx_updatefw(bsg_job); in qla2x00_process_vendor_specific()
2448 return qla84xx_mgmt_cmd(bsg_job); in qla2x00_process_vendor_specific()
2451 return qla24xx_iidma(bsg_job); in qla2x00_process_vendor_specific()
2454 return qla24xx_proc_fcp_prio_cfg_cmd(bsg_job); in qla2x00_process_vendor_specific()
2457 return qla2x00_read_optrom(bsg_job); in qla2x00_process_vendor_specific()
2460 return qla2x00_update_optrom(bsg_job); in qla2x00_process_vendor_specific()
2463 return qla2x00_update_fru_versions(bsg_job); in qla2x00_process_vendor_specific()
2466 return qla2x00_read_fru_status(bsg_job); in qla2x00_process_vendor_specific()
2469 return qla2x00_write_fru_status(bsg_job); in qla2x00_process_vendor_specific()
2472 return qla2x00_write_i2c(bsg_job); in qla2x00_process_vendor_specific()
2475 return qla2x00_read_i2c(bsg_job); in qla2x00_process_vendor_specific()
2478 return qla24xx_process_bidir_cmd(bsg_job); in qla2x00_process_vendor_specific()
2481 return qlafx00_mgmt_cmd(bsg_job); in qla2x00_process_vendor_specific()
2484 return qla26xx_serdes_op(bsg_job); in qla2x00_process_vendor_specific()
2487 return qla8044_serdes_op(bsg_job); in qla2x00_process_vendor_specific()
2490 return qla27xx_get_flash_upd_cap(bsg_job); in qla2x00_process_vendor_specific()
2493 return qla27xx_set_flash_upd_cap(bsg_job); in qla2x00_process_vendor_specific()
2496 return qla27xx_get_bbcr_data(bsg_job); in qla2x00_process_vendor_specific()
2500 return qla2x00_get_priv_stats(bsg_job); in qla2x00_process_vendor_specific()
2503 return qla2x00_do_dport_diagnostics(bsg_job); in qla2x00_process_vendor_specific()
2506 return qla2x00_get_flash_image_status(bsg_job); in qla2x00_process_vendor_specific()
2514 qla24xx_bsg_request(struct bsg_job *bsg_job) in qla24xx_bsg_request() argument
2516 struct fc_bsg_request *bsg_request = bsg_job->request; in qla24xx_bsg_request()
2517 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla24xx_bsg_request()
2527 rport = fc_bsg_to_rport(bsg_job); in qla24xx_bsg_request()
2531 host = fc_bsg_to_shost(bsg_job); in qla24xx_bsg_request()
2548 ret = qla2x00_process_els(bsg_job); in qla24xx_bsg_request()
2551 ret = qla2x00_process_ct(bsg_job); in qla24xx_bsg_request()
2554 ret = qla2x00_process_vendor_specific(bsg_job); in qla24xx_bsg_request()
2567 qla24xx_bsg_timeout(struct bsg_job *bsg_job) in qla24xx_bsg_timeout() argument
2569 struct fc_bsg_reply *bsg_reply = bsg_job->reply; in qla24xx_bsg_timeout()
2570 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job)); in qla24xx_bsg_timeout()
2590 && (sp->u.bsg_job == bsg_job)) { in qla24xx_bsg_timeout()