Searched refs:sgc (Results 1 - 22 of 22) sorted by relevance

/linux-4.1.27/drivers/scsi/esas2r/
H A Desas2r_io.c188 struct esas2r_sg_context *sgc) esas2r_build_sg_list_sge()
190 struct esas2r_request *rq = sgc->first_req; esas2r_build_sg_list_sge()
193 while (sgc->length) { esas2r_build_sg_list_sge()
198 len = (*sgc->get_phys_addr)(sgc, &addr); esas2r_build_sg_list_sge()
204 if (unlikely(len > sgc->length)) esas2r_build_sg_list_sge()
205 len = sgc->length; esas2r_build_sg_list_sge()
222 if (unlikely(sgc->sge.a64.curr > sgc->sge.a64.limit)) { esas2r_build_sg_list_sge()
237 sgelen = (u8)((u8 *)sgc->sge.a64.curr esas2r_build_sg_list_sge()
238 - (u8 *)sgc->sge.a64.last); esas2r_build_sg_list_sge()
244 memcpy(sgl->virt_addr, sgc->sge.a64.last, sgelen); esas2r_build_sg_list_sge()
247 sgc->sge.a64.curr = esas2r_build_sg_list_sge()
252 sgc->sge.a64.limit = esas2r_build_sg_list_sge()
257 sgc->sge.a64.last->length = cpu_to_le32( esas2r_build_sg_list_sge()
259 sgc->sge.a64.last->address = esas2r_build_sg_list_sge()
268 if (sgc->sge.a64.chain) { esas2r_build_sg_list_sge()
269 sgc->sge.a64.chain->length |= esas2r_build_sg_list_sge()
271 ((u8 *)(sgc->sge.a64. esas2r_build_sg_list_sge()
279 ((u8 *)sgc-> esas2r_build_sg_list_sge()
299 sgc->sge.a64.chain = sgc->sge.a64.last; esas2r_build_sg_list_sge()
306 sgc->sge.a64.last = sgc->sge.a64.curr; esas2r_build_sg_list_sge()
309 sgc->sge.a64.curr->length = cpu_to_le32(SGE_ADDR_64 | len); esas2r_build_sg_list_sge()
310 sgc->sge.a64.curr->address = cpu_to_le32(addr); esas2r_build_sg_list_sge()
311 sgc->sge.a64.curr++; esas2r_build_sg_list_sge()
312 sgc->cur_offset += len; esas2r_build_sg_list_sge()
313 sgc->length -= len; esas2r_build_sg_list_sge()
328 sgc->sge.a64.last->length |= cpu_to_le32(SGE_LAST); esas2r_build_sg_list_sge()
334 if (sgc->sge.a64.chain) { esas2r_build_sg_list_sge()
335 sgc->sge.a64.chain->length |= cpu_to_le32( esas2r_build_sg_list_sge()
336 ((u8 *)(sgc->sge.a64.curr) - esas2r_build_sg_list_sge()
346 ((u16)((u8 *)sgc->sge.a64.last - (u8 *)vrq) esas2r_build_sg_list_sge()
371 struct esas2r_sg_context *sgc) esas2r_build_prd_iblk()
373 struct esas2r_request *rq = sgc->first_req; esas2r_build_prd_iblk()
380 while (sgc->length) { esas2r_build_prd_iblk()
383 len = (*sgc->get_phys_addr)(sgc, &addr); esas2r_build_prd_iblk()
390 if (unlikely(len > sgc->length)) esas2r_build_prd_iblk()
391 len = sgc->length; esas2r_build_prd_iblk()
409 if (sgc->sge.prd.sge_cnt == 0) { esas2r_build_prd_iblk()
410 if (len == sgc->length) { esas2r_build_prd_iblk()
418 sgc->sge.prd.curr->ctl_len = cpu_to_le32( esas2r_build_prd_iblk()
420 sgc->sge.prd.curr->address = cpu_to_le64(addr); esas2r_build_prd_iblk()
423 sgc->cur_offset += len; esas2r_build_prd_iblk()
424 sgc->length -= len; esas2r_build_prd_iblk()
432 if (sgc->sge.prd.chain) { esas2r_build_prd_iblk()
439 sgc->sge.prd.chain->ctl_len |= cpu_to_le32( esas2r_build_prd_iblk()
440 sgc->sge.prd.sgl_max_cnt); esas2r_build_prd_iblk()
467 sgc->sge.prd.chain = sgc->sge.prd.curr; esas2r_build_prd_iblk()
469 sgc->sge.prd.chain->ctl_len = cpu_to_le32(PRD_CHAIN); esas2r_build_prd_iblk()
470 sgc->sge.prd.chain->address = esas2r_build_prd_iblk()
478 sgc->sge.prd.curr = esas2r_build_prd_iblk()
482 sgc->sge.prd.sge_cnt = sgc->sge.prd.sgl_max_cnt - 1; esas2r_build_prd_iblk()
485 sgc->sge.prd.sge_cnt--; esas2r_build_prd_iblk()
487 sgc->sge.prd.curr->ctl_len = cpu_to_le32(PRD_DATA | len); esas2r_build_prd_iblk()
488 sgc->sge.prd.curr->address = cpu_to_le64(addr); esas2r_build_prd_iblk()
492 sgc->sge.prd.curr++; esas2r_build_prd_iblk()
496 sgc->cur_offset += len; esas2r_build_prd_iblk()
497 sgc->length -= len; esas2r_build_prd_iblk()
513 if (sgc->sge.prd.chain) { esas2r_build_prd_iblk()
514 sgc->sge.prd.chain->ctl_len |= esas2r_build_prd_iblk()
515 cpu_to_le32(sgc->sge.prd.sgl_max_cnt esas2r_build_prd_iblk()
516 - sgc->sge.prd.sge_cnt esas2r_build_prd_iblk()
525 struct esas2r_sg_context *sgc) esas2r_build_sg_list_prd()
527 struct esas2r_request *rq = sgc->first_req; esas2r_build_sg_list_prd()
528 u32 len = sgc->length; esas2r_build_sg_list_prd()
596 sgc->length = startlba * t->block_size; esas2r_build_sg_list_prd()
602 if (sgc->length > len) esas2r_build_sg_list_prd()
603 sgc->length = len; esas2r_build_sg_list_prd()
605 sgc->length = len; esas2r_build_sg_list_prd()
608 sgc->length = len; esas2r_build_sg_list_prd()
614 (struct atto_physical_region_description *)sgc->sge.a64.curr; esas2r_build_sg_list_prd()
616 sgc->sge.prd.sgl_max_cnt = sgl_page_size / esas2r_build_sg_list_prd()
623 sgc->sge.prd.sge_cnt = 0; esas2r_build_sg_list_prd()
624 sgc->sge.prd.chain = NULL; esas2r_build_sg_list_prd()
625 sgc->sge.prd.curr = curr_iblk_chn; esas2r_build_sg_list_prd()
629 len -= sgc->length; esas2r_build_sg_list_prd()
633 if (unlikely(!esas2r_build_prd_iblk(a, sgc))) esas2r_build_sg_list_prd()
642 sgc->length = t->inter_byte; esas2r_build_sg_list_prd()
644 sgc->length = len; esas2r_build_sg_list_prd()
187 esas2r_build_sg_list_sge(struct esas2r_adapter *a, struct esas2r_sg_context *sgc) esas2r_build_sg_list_sge() argument
370 esas2r_build_prd_iblk(struct esas2r_adapter *a, struct esas2r_sg_context *sgc) esas2r_build_prd_iblk() argument
524 esas2r_build_sg_list_prd(struct esas2r_adapter *a, struct esas2r_sg_context *sgc) esas2r_build_sg_list_prd() argument
H A Desas2r_flash.c144 if (fc->sgc.cur_offset == NULL) esas2r_fmapi_callback()
181 struct esas2r_sg_context *sgc = &fc->sgc; build_flash_msg() local
186 if (sgc->cur_offset) build_flash_msg()
187 cksum = esas2r_calc_byte_xor_cksum(sgc->cur_offset, build_flash_msg()
188 sgc->length, build_flash_msg()
199 sgc->length); build_flash_msg()
208 fc->curr_len = fc->sgc.length; build_flash_msg()
210 if (sgc->cur_offset) { build_flash_msg()
212 esas2r_sgc_init(sgc, a, rq, &rq->vrq->flash.data.sge[0]); build_flash_msg()
214 if (!esas2r_build_sg_list(a, rq, sgc)) { build_flash_msg()
219 fc->sgc.length = 0; build_flash_msg()
364 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
366 fc->sgc.length = fc->cmp_len; fw_download_proc()
368 fc->sgc.cur_offset = fc->sgc_offset + fw_download_proc()
376 * for the next request and therefore sgc.length can be = 0. fw_download_proc()
378 while (fc->sgc.length == 0) { fw_download_proc()
392 fc->sgc.length = ch->length; fw_download_proc()
393 fc->sgc.cur_offset = fc->sgc_offset + fw_download_proc()
406 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
407 fc->sgc.cur_offset = fc->sgc_offset fw_download_proc()
430 fc->sgc.length = ch->length; fw_download_proc()
431 fc->sgc.cur_offset = fc->sgc_offset + fw_download_proc()
441 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
442 fc->sgc.cur_offset = fc->sgc_offset fw_download_proc()
466 fc->sgc.length = ch->length; fw_download_proc()
467 fc->sgc.cur_offset = fc->sgc_offset + fw_download_proc()
477 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
478 fc->sgc.cur_offset = fc->sgc_offset fw_download_proc()
500 fc->sgc.length = ch->length; fw_download_proc()
501 fc->sgc.cur_offset = fc->sgc_offset + fw_download_proc()
511 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
512 fc->sgc.cur_offset = fc->sgc_offset fw_download_proc()
544 && fc->sgc.length > fc->cmp_len) fw_download_proc()
545 fc->sgc.length = fc->cmp_len; fw_download_proc()
848 struct esas2r_sg_context *sgc) esas2r_process_fs_ioctl()
915 esas2r_sgc_init(sgc, a, rq, rq->vrq->flash.data.sge); esas2r_process_fs_ioctl()
916 sgc->length = datalen; esas2r_process_fs_ioctl()
918 if (!esas2r_build_sg_list(a, rq, sgc)) { esas2r_process_fs_ioctl()
1390 struct esas2r_request *rq, struct esas2r_sg_context *sgc) esas2r_fm_api()
1402 memcpy(&fc->sgc, sgc, sizeof(struct esas2r_sg_context)); esas2r_fm_api()
1403 sgc = &fc->sgc; esas2r_fm_api()
1405 fc->sgc_offset = sgc->cur_offset; esas2r_fm_api()
1456 fc->sgc.length = FLS_LENGTH_BOOT; esas2r_fm_api()
1457 fc->sgc.cur_offset = NULL; esas2r_fm_api()
845 esas2r_process_fs_ioctl(struct esas2r_adapter *a, struct esas2r_ioctl_fs *fs, struct esas2r_request *rq, struct esas2r_sg_context *sgc) esas2r_process_fs_ioctl() argument
1389 esas2r_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi, struct esas2r_request *rq, struct esas2r_sg_context *sgc) esas2r_fm_api() argument
H A Desas2r_ioctl.c90 static u32 get_physaddr_fm_api(struct esas2r_sg_context *sgc, u64 *addr) get_physaddr_fm_api() argument
92 struct esas2r_adapter *a = (struct esas2r_adapter *)sgc->adapter; get_physaddr_fm_api()
93 int offset = sgc->cur_offset - a->save_offset; get_physaddr_fm_api()
99 static u32 get_physaddr_fm_api_header(struct esas2r_sg_context *sgc, u64 *addr) get_physaddr_fm_api_header() argument
101 struct esas2r_adapter *a = (struct esas2r_adapter *)sgc->adapter; get_physaddr_fm_api_header()
102 int offset = sgc->cur_offset - a->save_offset; get_physaddr_fm_api_header()
189 static u32 get_physaddr_buffered_ioctl(struct esas2r_sg_context *sgc, get_physaddr_buffered_ioctl() argument
192 int offset = (u8 *)sgc->cur_offset - esas2r_buffered_ioctl; get_physaddr_buffered_ioctl()
209 struct esas2r_sg_context sgc; handle_buffered_ioctl() local
263 sgc.cur_offset = esas2r_buffered_ioctl + bi->offset; handle_buffered_ioctl()
264 sgc.get_phys_addr = (PGETPHYSADDR)get_physaddr_buffered_ioctl; handle_buffered_ioctl()
265 sgc.length = esas2r_buffered_ioctl_size; handle_buffered_ioctl()
267 if (!(*bi->callback)(a, rq, &sgc, bi->context)) { handle_buffered_ioctl()
295 struct esas2r_sg_context *sgc, void *context) smp_ioctl_callback()
300 esas2r_sgc_init(sgc, a, rq, rq->vrq->ioctl.sge); smp_ioctl_callback()
301 esas2r_build_ioctl_req(a, rq, sgc->length, VDA_IOCTL_SMP); smp_ioctl_callback()
303 if (!esas2r_build_sg_list(a, rq, sgc)) { smp_ioctl_callback()
344 struct esas2r_sg_context *sgc, csmi_ioctl_tunnel()
353 esas2r_sgc_init(sgc, a, rq, rq->vrq->ioctl.sge); csmi_ioctl_tunnel()
354 esas2r_build_ioctl_req(a, rq, sgc->length, VDA_IOCTL_CSMI); csmi_ioctl_tunnel()
367 if (!esas2r_build_sg_list(a, rq, sgc)) csmi_ioctl_tunnel()
392 struct esas2r_sg_context *sgc, void *context) csmi_ioctl_callback()
514 if (!csmi_ioctl_tunnel(a, ioctl_csmi, rq, sgc, csmi_ioctl_callback()
585 if (!csmi_ioctl_tunnel(a, ioctl_csmi, rq, sgc, csmi_ioctl_callback()
670 struct esas2r_sg_context *sgc) hba_ioctl_tunnel()
672 esas2r_sgc_init(sgc, a, rq, rq->vrq->ioctl.sge); hba_ioctl_tunnel()
674 esas2r_build_ioctl_req(a, rq, sgc->length, VDA_IOCTL_HBA); hba_ioctl_tunnel()
676 if (!esas2r_build_sg_list(a, rq, sgc)) { hba_ioctl_tunnel()
746 struct esas2r_sg_context *sgc, hba_ioctl_callback()
905 if (hba_ioctl_tunnel(a, hi, rq, sgc)) hba_ioctl_callback()
921 if (hba_ioctl_tunnel(a, hi, rq, sgc)) hba_ioctl_callback()
992 if (hba_ioctl_tunnel(a, hi, rq, sgc)) hba_ioctl_callback()
1009 esas2r_sgc_init(sgc, a, rq, NULL); hba_ioctl_callback()
1011 sgc->length = hi->data_length; hba_ioctl_callback()
1012 sgc->cur_offset += offsetof(struct atto_ioctl, data.byte) hba_ioctl_callback()
1038 if (sgc->length) { hba_ioctl_callback()
1051 if (!esas2r_build_sg_list(a, rq, sgc)) { hba_ioctl_callback()
1068 if (hba_ioctl_tunnel(a, hi, rq, sgc)) hba_ioctl_callback()
1114 if (hba_ioctl_tunnel(a, hi, rq, sgc)) hba_ioctl_callback()
1164 if (hba_ioctl_tunnel(a, hi, rq, sgc)) hba_ioctl_callback()
1839 static u32 get_physaddr_vda(struct esas2r_sg_context *sgc, u64 *addr) get_physaddr_vda() argument
1841 struct esas2r_adapter *a = (struct esas2r_adapter *)sgc->adapter; get_physaddr_vda()
1842 int offset = (u8 *)sgc->cur_offset - (u8 *)a->vda_buffer; get_physaddr_vda()
1858 struct esas2r_sg_context sgc; esas2r_read_vda() local
1876 sgc.first_req = rq; esas2r_read_vda()
1877 sgc.adapter = a; esas2r_read_vda()
1878 sgc.cur_offset = a->vda_buffer + VDA_BUFFER_HEADER_SZ; esas2r_read_vda()
1879 sgc.get_phys_addr = (PGETPHYSADDR)get_physaddr_vda; esas2r_read_vda()
1884 esas2r_process_vda_ioctl(a, vi, rq, &sgc); esas2r_read_vda()
1958 static u32 get_physaddr_fs_api(struct esas2r_sg_context *sgc, u64 *addr) get_physaddr_fs_api() argument
1960 struct esas2r_adapter *a = (struct esas2r_adapter *)sgc->adapter; get_physaddr_fs_api()
1963 u32 offset = (u8 *)sgc->cur_offset - (u8 *)fs; get_physaddr_fs_api()
1978 struct esas2r_sg_context sgc; esas2r_read_fs() local
2007 sgc.cur_offset = fs->data; esas2r_read_fs()
2008 sgc.get_phys_addr = (PGETPHYSADDR)get_physaddr_fs_api; esas2r_read_fs()
2012 if (!esas2r_process_fs_ioctl(a, fs, rq, &sgc)) { esas2r_read_fs()
293 smp_ioctl_callback(struct esas2r_adapter *a, struct esas2r_request *rq, struct esas2r_sg_context *sgc, void *context) smp_ioctl_callback() argument
341 csmi_ioctl_tunnel(struct esas2r_adapter *a, union atto_ioctl_csmi *ci, struct esas2r_request *rq, struct esas2r_sg_context *sgc, u32 ctrl_code, u16 target_id) csmi_ioctl_tunnel() argument
390 csmi_ioctl_callback(struct esas2r_adapter *a, struct esas2r_request *rq, struct esas2r_sg_context *sgc, void *context) csmi_ioctl_callback() argument
667 hba_ioctl_tunnel(struct esas2r_adapter *a, struct atto_ioctl *hi, struct esas2r_request *rq, struct esas2r_sg_context *sgc) hba_ioctl_tunnel() argument
744 hba_ioctl_callback(struct esas2r_adapter *a, struct esas2r_request *rq, struct esas2r_sg_context *sgc, void *context) hba_ioctl_callback() argument
H A Desas2r_main.c819 static u32 get_physaddr_from_sgc(struct esas2r_sg_context *sgc, u64 *addr) get_physaddr_from_sgc() argument
823 if (likely(sgc->cur_offset == sgc->exp_offset)) { get_physaddr_from_sgc()
829 if (sgc->sgel_count < sgc->num_sgel) { get_physaddr_from_sgc()
831 if (sgc->exp_offset > (u8 *)0) { get_physaddr_from_sgc()
833 sgc->cur_sgel = sg_next(sgc->cur_sgel); get_physaddr_from_sgc()
834 ++(sgc->sgel_count); get_physaddr_from_sgc()
838 len = sg_dma_len(sgc->cur_sgel); get_physaddr_from_sgc()
839 (*addr) = sg_dma_address(sgc->cur_sgel); get_physaddr_from_sgc()
842 sgc->exp_offset += len; get_physaddr_from_sgc()
847 } else if (sgc->cur_offset < sgc->exp_offset) { get_physaddr_from_sgc()
853 len = sg_dma_len(sgc->cur_sgel); get_physaddr_from_sgc()
854 (*addr) = sg_dma_address(sgc->cur_sgel); get_physaddr_from_sgc()
856 sgc->exp_offset -= len; get_physaddr_from_sgc()
860 (sgc->cur_offset - sgc->exp_offset); get_physaddr_from_sgc()
862 sgc->exp_offset += len; get_physaddr_from_sgc()
866 sgc->exp_offset - sgc->cur_offset); get_physaddr_from_sgc()
867 } else { /* if ( sgc->cur_offset > sgc->exp_offset ) */ get_physaddr_from_sgc()
883 struct esas2r_sg_context sgc; esas2r_queuecommand() local
918 esas2r_sgc_init(&sgc, a, rq, NULL); esas2r_queuecommand()
920 sgc.length = bufflen; esas2r_queuecommand()
921 sgc.cur_offset = NULL; esas2r_queuecommand()
923 sgc.cur_sgel = scsi_sglist(cmd); esas2r_queuecommand()
924 sgc.exp_offset = NULL; esas2r_queuecommand()
925 sgc.num_sgel = scsi_dma_map(cmd); esas2r_queuecommand()
926 sgc.sgel_count = 0; esas2r_queuecommand()
928 if (unlikely(sgc.num_sgel < 0)) { esas2r_queuecommand()
933 sgc.get_phys_addr = (PGETPHYSADDR)get_physaddr_from_sgc; esas2r_queuecommand()
935 if (unlikely(!esas2r_build_sg_list(a, rq, &sgc))) { esas2r_queuecommand()
H A Desas2r_vda.c68 struct esas2r_sg_context *sgc) esas2r_process_vda_ioctl()
135 u8 *cmdcurr_offset = sgc->cur_offset esas2r_process_vda_ioctl()
162 cmdcurr_offset = sgc->cur_offset; esas2r_process_vda_ioctl()
175 esas2r_sgc_init(sgc, a, rq, esas2r_process_vda_ioctl()
177 sgc->length = payldlen; esas2r_process_vda_ioctl()
179 if (!esas2r_build_sg_list(a, rq, sgc)) { esas2r_process_vda_ioctl()
195 sgc->cur_offset = cmdcurr_offset; esas2r_process_vda_ioctl()
255 esas2r_sgc_init(sgc, a, rq, firstsg); esas2r_process_vda_ioctl()
256 sgc->length = datalen; esas2r_process_vda_ioctl()
258 if (!esas2r_build_sg_list(a, rq, sgc)) { esas2r_process_vda_ioctl()
65 esas2r_process_vda_ioctl(struct esas2r_adapter *a, struct atto_ioctl_vda *vi, struct esas2r_request *rq, struct esas2r_sg_context *sgc) esas2r_process_vda_ioctl() argument
H A Desas2r.h408 struct esas2r_sg_context *sgc);
598 typedef u32 (*PGETPHYSADDR) (struct esas2r_sg_context *sgc, u64 *addr);
712 struct esas2r_sg_context sgc; member in struct:esas2r_flash_context
1070 struct esas2r_sg_context *sgc);
1076 struct esas2r_request *rq, struct esas2r_sg_context *sgc);
1107 struct esas2r_sg_context *sgc);
1109 struct esas2r_sg_context *sgc);
1141 struct esas2r_sg_context *sgc);
1168 static inline void esas2r_sgc_init(struct esas2r_sg_context *sgc, esas2r_sgc_init() argument
1173 sgc->adapter = a; esas2r_sgc_init()
1174 sgc->first_req = rq; esas2r_sgc_init()
1180 sgc->sge.a64.limit = (struct atto_vda_sge *)((u8 *)rq->vrq esas2r_sgc_init()
1187 sgc->sge.a64.last = esas2r_sgc_init()
1188 sgc->sge.a64.curr = first; esas2r_sgc_init()
1193 sgc->sge.a64.last = esas2r_sgc_init()
1194 sgc->sge.a64.curr = &rq->vrq->scsi.u.sge[0]; esas2r_sgc_init()
1198 sgc->sge.a64.chain = NULL; esas2r_sgc_init()
1305 struct esas2r_sg_context *sgc) esas2r_build_sg_list()
1310 return (*a->build_sgl)(a, sgc); esas2r_build_sg_list()
1303 esas2r_build_sg_list(struct esas2r_adapter *a, struct esas2r_request *rq, struct esas2r_sg_context *sgc) esas2r_build_sg_list() argument
H A Desas2r_disc.c53 static u32 esas2r_disc_get_phys_addr(struct esas2r_sg_context *sgc, u64 *addr);
888 struct esas2r_sg_context sgc; esas2r_disc_passthru_dev_addr() local
896 sgc.cur_offset = NULL; esas2r_disc_passthru_dev_addr()
897 sgc.get_phys_addr = (PGETPHYSADDR)esas2r_disc_get_phys_addr; esas2r_disc_passthru_dev_addr()
898 sgc.length = offsetof(struct atto_ioctl, data) esas2r_disc_passthru_dev_addr()
901 esas2r_sgc_init(&sgc, a, rq, rq->vrq->ioctl.sge); esas2r_disc_passthru_dev_addr()
903 esas2r_build_ioctl_req(a, rq, sgc.length, VDA_IOCTL_HBA); esas2r_disc_passthru_dev_addr()
905 if (!esas2r_build_sg_list(a, rq, &sgc)) { esas2r_disc_passthru_dev_addr()
1030 static u32 esas2r_disc_get_phys_addr(struct esas2r_sg_context *sgc, u64 *addr) esas2r_disc_get_phys_addr() argument
1032 struct esas2r_adapter *a = sgc->adapter; esas2r_disc_get_phys_addr()
1034 if (sgc->length > ESAS2R_DISC_BUF_LEN) esas2r_disc_get_phys_addr()
1040 return sgc->length; esas2r_disc_get_phys_addr()
/linux-4.1.27/drivers/net/ethernet/intel/ixgbe/
H A Dixgbe_fcoe.c54 ddp->sgc = 0; ixgbe_fcoe_clear_ddp()
135 dma_unmap_sg(&adapter->pdev->dev, ddp->sgl, ddp->sgc, ixgbe_fcoe_ddp_put()
152 * @sgc: the number of scatter-gather items
157 struct scatterlist *sgl, unsigned int sgc, ixgbe_fcoe_ddp_setup()
194 xid, ddp->sgl, ddp->sgc); ixgbe_fcoe_ddp_setup()
212 dmacount = dma_map_sg(&adapter->pdev->dev, sgl, sgc, DMA_FROM_DEVICE); ixgbe_fcoe_ddp_setup()
226 ddp->sgc = sgc; ixgbe_fcoe_ddp_setup()
347 dma_unmap_sg(&adapter->pdev->dev, sgl, sgc, DMA_FROM_DEVICE);
358 * @sgc: the number of scatter-gather items
368 struct scatterlist *sgl, unsigned int sgc) ixgbe_fcoe_ddp_get()
370 return ixgbe_fcoe_ddp_setup(netdev, xid, sgl, sgc, 0); ixgbe_fcoe_ddp_get()
378 * @sgc: the number of scatter-gather items
389 struct scatterlist *sgl, unsigned int sgc) ixgbe_fcoe_ddp_target()
391 return ixgbe_fcoe_ddp_setup(netdev, xid, sgl, sgc, 1); ixgbe_fcoe_ddp_target()
466 ddp->sgc, DMA_FROM_DEVICE); ixgbe_fcoe_ddp()
469 ddp->sgc = 0; ixgbe_fcoe_ddp()
156 ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid, struct scatterlist *sgl, unsigned int sgc, int target_mode) ixgbe_fcoe_ddp_setup() argument
367 ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, struct scatterlist *sgl, unsigned int sgc) ixgbe_fcoe_ddp_get() argument
388 ixgbe_fcoe_ddp_target(struct net_device *netdev, u16 xid, struct scatterlist *sgl, unsigned int sgc) ixgbe_fcoe_ddp_target() argument
H A Dixgbe_fcoe.h63 unsigned int sgc; member in struct:ixgbe_fcoe_ddp
H A Dixgbe.h917 struct scatterlist *sgl, unsigned int sgc);
919 struct scatterlist *sgl, unsigned int sgc);
/linux-4.1.27/drivers/net/ethernet/intel/i40e/
H A Di40e_fcoe.c167 dma_unmap_sg(&pf->pdev->dev, ddp->sgl, ddp->sgc, i40e_fcoe_ddp_unmap()
170 ddp->sgc = 0; i40e_fcoe_ddp_unmap()
810 * @sgc: the number of scatter-gather items
816 struct scatterlist *sgl, unsigned int sgc, i40e_fcoe_ddp_setup()
849 xid, ddp->sgl, ddp->sgc); i40e_fcoe_ddp_setup()
866 dmacount = dma_map_sg(&pf->pdev->dev, sgl, sgc, DMA_FROM_DEVICE); i40e_fcoe_ddp_setup()
868 dev_info(&pf->pdev->dev, "dma_map_sg for sgl %p, sgc %d failed\n", i40e_fcoe_ddp_setup()
869 sgl, sgc); i40e_fcoe_ddp_setup()
928 ddp->sgc = sgc;
942 dma_unmap_sg(&pf->pdev->dev, sgl, sgc, DMA_FROM_DEVICE);
953 * @sgc: the number of scatter-gather items
963 struct scatterlist *sgl, unsigned int sgc) i40e_fcoe_ddp_get()
965 return i40e_fcoe_ddp_setup(netdev, xid, sgl, sgc, 0); i40e_fcoe_ddp_get()
973 * @sgc: the number of scatter-gather items
984 struct scatterlist *sgl, unsigned int sgc) i40e_fcoe_ddp_target()
986 return i40e_fcoe_ddp_setup(netdev, xid, sgl, sgc, 1); i40e_fcoe_ddp_target()
815 i40e_fcoe_ddp_setup(struct net_device *netdev, u16 xid, struct scatterlist *sgl, unsigned int sgc, int target_mode) i40e_fcoe_ddp_setup() argument
962 i40e_fcoe_ddp_get(struct net_device *netdev, u16 xid, struct scatterlist *sgl, unsigned int sgc) i40e_fcoe_ddp_get() argument
983 i40e_fcoe_ddp_target(struct net_device *netdev, u16 xid, struct scatterlist *sgl, unsigned int sgc) i40e_fcoe_ddp_target() argument
H A Di40e_fcoe.h108 unsigned int sgc; member in struct:i40e_fcoe_ddp
/linux-4.1.27/net/8021q/
H A Dvlan_dev.c383 struct scatterlist *sgl, unsigned int sgc) vlan_dev_fcoe_ddp_setup()
390 rc = ops->ndo_fcoe_ddp_setup(real_dev, xid, sgl, sgc); vlan_dev_fcoe_ddp_setup()
441 struct scatterlist *sgl, unsigned int sgc) vlan_dev_fcoe_ddp_target()
448 rc = ops->ndo_fcoe_ddp_target(real_dev, xid, sgl, sgc); vlan_dev_fcoe_ddp_target()
382 vlan_dev_fcoe_ddp_setup(struct net_device *dev, u16 xid, struct scatterlist *sgl, unsigned int sgc) vlan_dev_fcoe_ddp_setup() argument
440 vlan_dev_fcoe_ddp_target(struct net_device *dev, u16 xid, struct scatterlist *sgl, unsigned int sgc) vlan_dev_fcoe_ddp_target() argument
/linux-4.1.27/drivers/crypto/caam/
H A Dcaamalg.c2623 int sgc; aead_edesc_alloc() local
2646 sgc = dma_map_sg_chained(jrdev, req->assoc, assoc_nents ? : 1, aead_edesc_alloc()
2649 sgc = dma_map_sg_chained(jrdev, req->src, src_nents ? : 1, aead_edesc_alloc()
2652 sgc = dma_map_sg_chained(jrdev, req->src, src_nents ? : 1, aead_edesc_alloc()
2654 sgc = dma_map_sg_chained(jrdev, req->dst, dst_nents ? : 1, aead_edesc_alloc()
2851 int sgc; aead_giv_edesc_alloc() local
2865 sgc = dma_map_sg_chained(jrdev, req->assoc, assoc_nents ? : 1, aead_giv_edesc_alloc()
2868 sgc = dma_map_sg_chained(jrdev, req->src, src_nents ? : 1, aead_giv_edesc_alloc()
2871 sgc = dma_map_sg_chained(jrdev, req->src, src_nents ? : 1, aead_giv_edesc_alloc()
2873 sgc = dma_map_sg_chained(jrdev, req->dst, dst_nents ? : 1, aead_giv_edesc_alloc()
3069 int sgc; ablkcipher_edesc_alloc() local
3080 sgc = dma_map_sg_chained(jrdev, req->src, src_nents ? : 1, ablkcipher_edesc_alloc()
3083 sgc = dma_map_sg_chained(jrdev, req->src, src_nents ? : 1, ablkcipher_edesc_alloc()
3085 sgc = dma_map_sg_chained(jrdev, req->dst, dst_nents ? : 1, ablkcipher_edesc_alloc()
3248 int sgc; ablkcipher_giv_edesc_alloc() local
3259 sgc = dma_map_sg_chained(jrdev, req->src, src_nents ? : 1, ablkcipher_giv_edesc_alloc()
3262 sgc = dma_map_sg_chained(jrdev, req->src, src_nents ? : 1, ablkcipher_giv_edesc_alloc()
3264 sgc = dma_map_sg_chained(jrdev, req->dst, dst_nents ? : 1, ablkcipher_giv_edesc_alloc()
/linux-4.1.27/kernel/sched/
H A Dcore.c5461 if (group->sgc->capacity != SCHED_CAPACITY_SCALE) { sched_domain_debug_one()
5463 group->sgc->capacity); sched_domain_debug_one()
5688 if (free_sgc && atomic_dec_and_test(&sg->sgc->ref)) free_sched_groups()
5689 kfree(sg->sgc); free_sched_groups()
5707 kfree(sd->groups->sgc); free_sched_domain()
5914 sg->sgc = *per_cpu_ptr(sdd->sgc, i); for_each_cpu()
5915 if (atomic_inc_return(&sg->sgc->ref) == 1) for_each_cpu()
5919 * Initialize sgc->capacity such that even if we mess up the for_each_cpu()
5923 sg->sgc->capacity = SCHED_CAPACITY_SCALE * cpumask_weight(sg_span); for_each_cpu()
5961 (*sg)->sgc = *per_cpu_ptr(sdd->sgc, cpu); get_group()
5962 atomic_set(&(*sg)->sgc->ref, 1); /* for claim_allocations */ get_group()
6049 atomic_set(&sg->sgc->nr_busy_cpus, sg->group_weight); init_sched_groups_capacity()
6140 if (atomic_read(&(*per_cpu_ptr(sdd->sgc, cpu))->ref)) claim_allocations()
6141 *per_cpu_ptr(sdd->sgc, cpu) = NULL; claim_allocations()
6603 sdd->sgc = alloc_percpu(struct sched_group_capacity *); for_each_sd_topology()
6604 if (!sdd->sgc) for_each_sd_topology()
6610 struct sched_group_capacity *sgc; for_each_cpu() local
6628 sgc = kzalloc_node(sizeof(struct sched_group_capacity) + cpumask_size(), for_each_cpu()
6630 if (!sgc) for_each_cpu()
6633 *per_cpu_ptr(sdd->sgc, j) = sgc; for_each_cpu()
6660 if (sdd->sgc) for_each_cpu()
6661 kfree(*per_cpu_ptr(sdd->sgc, j)); for_each_cpu()
6667 free_percpu(sdd->sgc);
6668 sdd->sgc = NULL;
H A Dfair.c4680 avg_load = (avg_load * SCHED_CAPACITY_SCALE) / group->sgc->capacity;
6081 sdg->sgc->capacity = capacity; update_cpu_capacity()
6093 sdg->sgc->next_update = jiffies + interval; update_group_capacity()
6109 struct sched_group_capacity *sgc; for_each_cpu() local
6128 sgc = rq->sd->groups->sgc; for_each_cpu()
6129 capacity += sgc->capacity; for_each_cpu()
6139 capacity += group->sgc->capacity;
6144 sdg->sgc->capacity = capacity;
6190 return group->sgc->imbalance; sg_imbalanced()
6297 sgs->group_capacity = group->sgc->capacity;
6416 time_after_eq(jiffies, sg->sgc->next_update)) update_sd_lb_stats()
7053 int *group_imbalance = &sd_parent->groups->sgc->imbalance; load_balance()
7146 int *group_imbalance = &sd_parent->groups->sgc->imbalance; load_balance()
7460 atomic_inc(&sd->groups->sgc->nr_busy_cpus); set_cpu_sd_state_busy()
7477 atomic_dec(&sd->groups->sgc->nr_busy_cpus); set_cpu_sd_state_idle()
7691 struct sched_group_capacity *sgc; nohz_kick_needed() local
7721 sgc = sd->groups->sgc; nohz_kick_needed()
7722 nr_busy = atomic_read(&sgc->nr_busy_cpus); nohz_kick_needed()
H A Dsched.h845 struct sched_group_capacity *sgc; member in struct:sched_group
868 return to_cpumask(sg->sgc->cpumask); sched_group_mask()
/linux-4.1.27/drivers/scsi/fcoe/
H A Dfcoe.c1027 * @sgc: The number of sg items
1032 struct scatterlist *sgl, unsigned int sgc) fcoe_ddp_setup()
1039 sgc); fcoe_ddp_setup()
1049 * @sgc: The number of sg items
1054 struct scatterlist *sgl, unsigned int sgc) fcoe_ddp_target()
1060 sgl, sgc); fcoe_ddp_target()
1031 fcoe_ddp_setup(struct fc_lport *lport, u16 xid, struct scatterlist *sgl, unsigned int sgc) fcoe_ddp_setup() argument
1053 fcoe_ddp_target(struct fc_lport *lport, u16 xid, struct scatterlist *sgl, unsigned int sgc) fcoe_ddp_target() argument
/linux-4.1.27/include/linux/
H A Dnetdevice.h905 * struct scatterlist *sgl, unsigned int sgc);
917 * struct scatterlist *sgl, unsigned int sgc);
1118 unsigned int sgc);
1124 unsigned int sgc);
H A Dsched.h1057 struct sched_group_capacity **__percpu sgc; member in struct:sd_data
/linux-4.1.27/drivers/scsi/qla2xxx/
H A Dqla_iocb.c1234 int sgc; qla24xx_build_scsi_crc_2_iocbs() local
1250 sgc = 0; qla24xx_build_scsi_crc_2_iocbs()
H A Dqla_target.c2265 int sgc; qlt_build_ctio_crc2_pkt() local
2282 sgc = 0; qlt_build_ctio_crc2_pkt()

Completed in 692 milliseconds