• Home
  • Raw
  • Download

Lines Matching refs:dc

291 	struct esas2r_disc_context *dc = &a->disc_ctx;  in esas2r_disc_queue_event()  local
298 dc->disc_evt |= disc_evt; in esas2r_disc_queue_event()
314 struct esas2r_disc_context *dc = &a->disc_ctx; in esas2r_disc_start_port() local
326 if (dc->disc_evt) { in esas2r_disc_start_port()
352 esas2r_trace("disc_evt: %d", dc->disc_evt); in esas2r_disc_start_port()
354 dc->flags = 0; in esas2r_disc_start_port()
357 dc->flags |= DCF_POLLED; in esas2r_disc_start_port()
359 rq->interrupt_cx = dc; in esas2r_disc_start_port()
363 if (dc->disc_evt & DCDE_DEV_SCAN) { in esas2r_disc_start_port()
364 dc->disc_evt &= ~DCDE_DEV_SCAN; in esas2r_disc_start_port()
366 dc->flags |= DCF_DEV_SCAN; in esas2r_disc_start_port()
367 dc->state = DCS_BLOCK_DEV_SCAN; in esas2r_disc_start_port()
368 } else if (dc->disc_evt & DCDE_DEV_CHANGE) { in esas2r_disc_start_port()
369 dc->disc_evt &= ~DCDE_DEV_CHANGE; in esas2r_disc_start_port()
371 dc->flags |= DCF_DEV_CHANGE; in esas2r_disc_start_port()
372 dc->state = DCS_DEV_RMV; in esas2r_disc_start_port()
389 struct esas2r_disc_context *dc = in esas2r_disc_continue() local
394 while (dc->flags & (DCF_DEV_CHANGE | DCF_DEV_SCAN)) { in esas2r_disc_continue()
397 switch (dc->state) { in esas2r_disc_continue()
433 dc->flags &= ~(DCF_DEV_CHANGE | DCF_DEV_SCAN); in esas2r_disc_continue()
439 dc->state = DCS_DISC_DONE; in esas2r_disc_continue()
505 struct esas2r_disc_context *dc = in esas2r_disc_abort() local
512 dc->state = DCS_DISC_DONE; in esas2r_disc_abort()
520 struct esas2r_disc_context *dc = in esas2r_disc_block_dev_scan() local
539 rq->interrupt_cx = dc; in esas2r_disc_block_dev_scan()
551 struct esas2r_disc_context *dc = in esas2r_disc_block_dev_scan_cb() local
560 dc->scan_gen = rq->func_rsp.mgt_rsp.scan_generation; in esas2r_disc_block_dev_scan_cb()
562 dc->state = DCS_RAID_GRP_INFO; in esas2r_disc_block_dev_scan_cb()
563 dc->raid_grp_ix = 0; in esas2r_disc_block_dev_scan_cb()
569 if (!(dc->flags & DCF_POLLED)) in esas2r_disc_block_dev_scan_cb()
580 struct esas2r_disc_context *dc = in esas2r_disc_raid_grp_info() local
587 esas2r_trace("raid_group_idx: %d", dc->raid_grp_ix); in esas2r_disc_raid_grp_info()
589 if (dc->raid_grp_ix >= VDA_MAX_RAID_GROUPS) { in esas2r_disc_raid_grp_info()
590 dc->state = DCS_DISC_DONE; in esas2r_disc_raid_grp_info()
606 dc->scan_gen, in esas2r_disc_raid_grp_info()
611 grpinfo->grp_index = dc->raid_grp_ix; in esas2r_disc_raid_grp_info()
615 rq->interrupt_cx = dc; in esas2r_disc_raid_grp_info()
627 struct esas2r_disc_context *dc = in esas2r_disc_raid_grp_info_cb() local
637 dc->scan_gen = rq->func_rsp.mgt_rsp.scan_generation; in esas2r_disc_raid_grp_info_cb()
638 dc->raid_grp_ix = 0; in esas2r_disc_raid_grp_info_cb()
649 dc->raid_grp_ix++; in esas2r_disc_raid_grp_info_cb()
651 memcpy(&dc->raid_grp_name[0], in esas2r_disc_raid_grp_info_cb()
655 dc->interleave = le32_to_cpu(grpinfo->interleave); in esas2r_disc_raid_grp_info_cb()
656 dc->block_size = le32_to_cpu(grpinfo->block_size); in esas2r_disc_raid_grp_info_cb()
658 dc->state = DCS_PART_INFO; in esas2r_disc_raid_grp_info_cb()
659 dc->part_num = 0; in esas2r_disc_raid_grp_info_cb()
669 dc->dev_ix = 0; in esas2r_disc_raid_grp_info_cb()
670 dc->state = DCS_PT_DEV_INFO; in esas2r_disc_raid_grp_info_cb()
679 if (!(dc->flags & DCF_POLLED)) in esas2r_disc_raid_grp_info_cb()
690 struct esas2r_disc_context *dc = in esas2r_disc_part_info() local
697 esas2r_trace("part_num: %d", dc->part_num); in esas2r_disc_part_info()
699 if (dc->part_num >= VDA_MAX_PARTITIONS) { in esas2r_disc_part_info()
700 dc->state = DCS_RAID_GRP_INFO; in esas2r_disc_part_info()
701 dc->raid_grp_ix++; in esas2r_disc_part_info()
717 dc->scan_gen, in esas2r_disc_part_info()
722 partinfo->part_no = dc->part_num; in esas2r_disc_part_info()
725 &dc->raid_grp_name[0], in esas2r_disc_part_info()
730 rq->interrupt_cx = dc; in esas2r_disc_part_info()
742 struct esas2r_disc_context *dc = in esas2r_disc_part_info_cb() local
752 dc->scan_gen = rq->func_rsp.mgt_rsp.scan_generation; in esas2r_disc_part_info_cb()
753 dc->raid_grp_ix = 0; in esas2r_disc_part_info_cb()
754 dc->state = DCS_RAID_GRP_INFO; in esas2r_disc_part_info_cb()
758 dc->part_num = partinfo->part_no; in esas2r_disc_part_info_cb()
760 dc->curr_virt_id = le16_to_cpu(partinfo->target_id); in esas2r_disc_part_info_cb()
762 esas2r_targ_db_add_raid(a, dc); in esas2r_disc_part_info_cb()
764 dc->part_num++; in esas2r_disc_part_info_cb()
772 dc->state = DCS_RAID_GRP_INFO; in esas2r_disc_part_info_cb()
773 dc->raid_grp_ix++; in esas2r_disc_part_info_cb()
780 if (!(dc->flags & DCF_POLLED)) in esas2r_disc_part_info_cb()
791 struct esas2r_disc_context *dc = in esas2r_disc_passthru_dev_info() local
798 esas2r_trace("dev_ix: %d", dc->dev_ix); in esas2r_disc_passthru_dev_info()
809 dc->scan_gen, in esas2r_disc_passthru_dev_info()
810 dc->dev_ix, in esas2r_disc_passthru_dev_info()
816 rq->interrupt_cx = dc; in esas2r_disc_passthru_dev_info()
828 struct esas2r_disc_context *dc = in esas2r_disc_passthru_dev_info_cb() local
838 dc->scan_gen = rq->func_rsp.mgt_rsp.scan_generation; in esas2r_disc_passthru_dev_info_cb()
839 dc->dev_ix = 0; in esas2r_disc_passthru_dev_info_cb()
840 dc->state = DCS_PT_DEV_INFO; in esas2r_disc_passthru_dev_info_cb()
844 dc->dev_ix = le16_to_cpu(rq->func_rsp.mgt_rsp.dev_index); in esas2r_disc_passthru_dev_info_cb()
846 dc->curr_virt_id = le16_to_cpu(devinfo->target_id); in esas2r_disc_passthru_dev_info_cb()
849 dc->curr_phys_id = in esas2r_disc_passthru_dev_info_cb()
851 dc->dev_addr_type = ATTO_GDA_AT_PORT; in esas2r_disc_passthru_dev_info_cb()
852 dc->state = DCS_PT_DEV_ADDR; in esas2r_disc_passthru_dev_info_cb()
854 esas2r_trace("curr_virt_id: %d", dc->curr_virt_id); in esas2r_disc_passthru_dev_info_cb()
855 esas2r_trace("curr_phys_id: %d", dc->curr_phys_id); in esas2r_disc_passthru_dev_info_cb()
857 dc->dev_ix++; in esas2r_disc_passthru_dev_info_cb()
866 dc->state = DCS_DISC_DONE; in esas2r_disc_passthru_dev_info_cb()
873 if (!(dc->flags & DCF_POLLED)) in esas2r_disc_passthru_dev_info_cb()
884 struct esas2r_disc_context *dc = in esas2r_disc_passthru_dev_addr() local
915 rq->interrupt_cx = dc; in esas2r_disc_passthru_dev_addr()
927 hi->data.get_dev_addr.target_id = le32_to_cpu(dc->curr_phys_id); in esas2r_disc_passthru_dev_addr()
928 hi->data.get_dev_addr.addr_type = dc->dev_addr_type; in esas2r_disc_passthru_dev_addr()
942 struct esas2r_disc_context *dc = in esas2r_disc_passthru_dev_addr_cb() local
959 if (dc->dev_addr_type == ATTO_GDA_AT_PORT) { in esas2r_disc_passthru_dev_addr_cb()
961 memcpy(&dc->sas_addr, in esas2r_disc_passthru_dev_addr_cb()
965 memset(&dc->sas_addr, 0, sizeof(dc->sas_addr)); in esas2r_disc_passthru_dev_addr_cb()
968 dc->dev_addr_type = ATTO_GDA_AT_UNIQUE; in esas2r_disc_passthru_dev_addr_cb()
975 dc, in esas2r_disc_passthru_dev_addr_cb()
984 memcpy(&t->sas_addr, &dc->sas_addr, in esas2r_disc_passthru_dev_addr_cb()
1007 if (dc->flags & DCF_DEV_SCAN) { in esas2r_disc_passthru_dev_addr_cb()
1008 dc->dev_ix++; in esas2r_disc_passthru_dev_addr_cb()
1009 dc->state = DCS_PT_DEV_INFO; in esas2r_disc_passthru_dev_addr_cb()
1010 } else if (dc->flags & DCF_DEV_CHANGE) { in esas2r_disc_passthru_dev_addr_cb()
1011 dc->curr_targ++; in esas2r_disc_passthru_dev_addr_cb()
1012 dc->state = DCS_DEV_ADD; in esas2r_disc_passthru_dev_addr_cb()
1022 if (!(dc->flags & DCF_POLLED)) in esas2r_disc_passthru_dev_addr_cb()
1046 struct esas2r_disc_context *dc = in esas2r_disc_dev_remove() local
1074 dc->state = DCS_DEV_ADD; in esas2r_disc_dev_remove()
1075 dc->curr_targ = a->targetdb; in esas2r_disc_dev_remove()
1085 struct esas2r_disc_context *dc = in esas2r_disc_dev_add() local
1087 struct esas2r_target *t = dc->curr_targ; in esas2r_disc_dev_add()
1092 dc->state = DCS_DISC_DONE; in esas2r_disc_dev_add()
1104 dc->curr_virt_id = esas2r_targ_get_id(t, a); in esas2r_disc_dev_add()
1109 dc->block_size = luevt->id.tgtlun_raid.dwblock_size; in esas2r_disc_dev_add()
1110 dc->interleave = luevt->id.tgtlun_raid.dwinterleave; in esas2r_disc_dev_add()
1112 dc->block_size = 0; in esas2r_disc_dev_add()
1113 dc->interleave = 0; in esas2r_disc_dev_add()
1120 dc->state = DCS_PT_DEV_ADDR; in esas2r_disc_dev_add()
1121 dc->dev_addr_type = ATTO_GDA_AT_PORT; in esas2r_disc_dev_add()
1122 dc->curr_phys_id = luevt->wphys_target_id; in esas2r_disc_dev_add()
1130 dc->raid_grp_name[0] = 0; in esas2r_disc_dev_add()
1132 esas2r_targ_db_add_raid(a, dc); in esas2r_disc_dev_add()
1135 esas2r_trace("curr_virt_id: %d", dc->curr_virt_id); in esas2r_disc_dev_add()
1136 esas2r_trace("curr_phys_id: %d", dc->curr_phys_id); in esas2r_disc_dev_add()
1142 if (dc->state == DCS_DEV_ADD) { in esas2r_disc_dev_add()
1145 dc->curr_targ++; in esas2r_disc_dev_add()