Lines Matching refs:pArray

159 	PVDevice	pArray = ID_TO_VDEV(id);  in hpt_delete_array()  local
164 if ((id==0) || check_VDevice_valid(pArray)) in hpt_delete_array()
167 if(!mIsArray(pArray)) return -1; in hpt_delete_array()
169 if (pArray->u.array.rf_rebuilding || pArray->u.array.rf_verifying || in hpt_delete_array()
170 pArray->u.array.rf_initializing) in hpt_delete_array()
173 for(i=0; i<pArray->u.array.bArnMember; i++) { in hpt_delete_array()
174 pa = pArray->u.array.pMember[i]; in hpt_delete_array()
182 if (pArray->pVBus!=_vbus_p) { HPT_ASSERT(0); return -1;} in hpt_delete_array()
183 fDeleteArray(_VBUS_P pArray, del_block0); in hpt_delete_array()
224 PVDevice pArray; in Kernel_DeviceIoControl() local
232 pArray = ID_TO_VDEV(idArray); in Kernel_DeviceIoControl()
234 if((idArray == 0) || check_VDevice_valid(pArray)) in Kernel_DeviceIoControl()
237 if(!mIsArray(pArray)) in Kernel_DeviceIoControl()
240 _vbus_p=pArray->pVBus; in Kernel_DeviceIoControl()
244 if(pArray == _vbus_p->pVDevice[i]) in Kernel_DeviceIoControl()
420 PVDevice pArray = ID_TO_VDEV(((PHPT_ADD_DISK_TO_ARRAY)lpInBuffer)->idArray); in Kernel_DeviceIoControl() local
421 pAdapter=(IAL_ADAPTER_T *)pArray->pVBus->OsExt; in Kernel_DeviceIoControl()
422 if(pArray->u.array.rf_rebuilding == 0) in Kernel_DeviceIoControl()
426 pArray->u.array.rf_auto_rebuild = 0; in Kernel_DeviceIoControl()
427 pArray->u.array.rf_abort_rebuild = 0; in Kernel_DeviceIoControl()
428 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, DUPLICATE); in Kernel_DeviceIoControl()
430 while (!pArray->u.array.rf_rebuilding) in Kernel_DeviceIoControl()
691 hpt_rebuild_data_block(IAL_ADAPTER_T *pAdapter, PVDevice pArray, UCHAR flags) in hpt_rebuild_data_block() argument
694 ULONG capacity = pArray->VDeviceCapacity / (pArray->u.array.bArnMember-1); in hpt_rebuild_data_block()
702 if (pArray->u.array.rf_broken==1 || in hpt_rebuild_data_block()
703 pArray->u.array.RebuildSectors>=capacity) in hpt_rebuild_data_block()
712 if(pArray->u.array.rf_rebuilding == 0) in hpt_rebuild_data_block()
714 pArray->u.array.rf_rebuilding = 1; in hpt_rebuild_data_block()
716 ioctl_ReportEvent(ET_REBUILD_STARTED, pArray); in hpt_rebuild_data_block()
721 if(pArray->u.array.rf_initializing == 0) in hpt_rebuild_data_block()
723 pArray->u.array.rf_initializing = 1; in hpt_rebuild_data_block()
725 ioctl_ReportEvent(ET_INITIALIZE_STARTED, pArray); in hpt_rebuild_data_block()
730 if(pArray->u.array.rf_verifying == 0) in hpt_rebuild_data_block()
732 pArray->u.array.rf_verifying = 1; in hpt_rebuild_data_block()
734 ioctl_ReportEvent(ET_VERIFY_STARTED, pArray); in hpt_rebuild_data_block()
745 if (pArray->VDeviceType==VD_RAID_1) in hpt_rebuild_data_block()
776 pCmd->uCmd.R1Control.Lba = pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
778 if (capacity - pArray->u.array.RebuildSectors < pCmd->uCmd.R1Control.nSectors) in hpt_rebuild_data_block()
779 pCmd->uCmd.R1Control.nSectors = capacity - pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
784 else if (pArray->VDeviceType==VD_RAID_5) in hpt_rebuild_data_block()
796 pCmd->uCmd.R5Control.StripeLine=pArray->u.array.RebuildSectors>>pArray->u.array.bArBlockSizeShift; in hpt_rebuild_data_block()
801 pCmd->pVDevice = pArray; in hpt_rebuild_data_block()
803 pArray->pfnSendCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()
829 if (!pArray->u.array.rf_abort_rebuild) in hpt_rebuild_data_block()
831 if(pArray->u.array.RebuildSectors < capacity) in hpt_rebuild_data_block()
833 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, flags); in hpt_rebuild_data_block()
842 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
843 pArray->u.array.rf_need_rebuild = 0; in hpt_rebuild_data_block()
844 pArray->u.array.CriticalMembers = 0; in hpt_rebuild_data_block()
845 pArray->u.array.RebuildSectors = MAX_LBA_T; in hpt_rebuild_data_block()
846 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
848 ioctl_ReportEvent(ET_REBUILD_FINISHED, pArray); in hpt_rebuild_data_block()
852 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
853 pArray->u.array.rf_need_rebuild = 0; in hpt_rebuild_data_block()
854 pArray->u.array.RebuildSectors = MAX_LBA_T; in hpt_rebuild_data_block()
856 ioctl_ReportEvent(ET_INITIALIZE_FINISHED, pArray); in hpt_rebuild_data_block()
859 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
861 ioctl_ReportEvent(ET_VERIFY_FINISHED, pArray); in hpt_rebuild_data_block()
868 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
869 if (pArray->u.array.rf_rebuilding) in hpt_rebuild_data_block()
872 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
873 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
874 ioctl_ReportEvent(ET_REBUILD_ABORTED, pArray); in hpt_rebuild_data_block()
876 else if (pArray->u.array.rf_verifying) in hpt_rebuild_data_block()
879 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
880 ioctl_ReportEvent(ET_VERIFY_ABORTED, pArray); in hpt_rebuild_data_block()
882 else if (pArray->u.array.rf_initializing) in hpt_rebuild_data_block()
885 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
886 ioctl_ReportEvent(ET_INITIALIZE_ABORTED, pArray); in hpt_rebuild_data_block()
896 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
897 pArray->u.array.rf_need_rebuild = 1; in hpt_rebuild_data_block()
899 ioctl_ReportEvent(ET_VERIFY_DATA_ERROR, pArray); in hpt_rebuild_data_block()
900 ioctl_ReportEvent(ET_VERIFY_FAILED, pArray); in hpt_rebuild_data_block()
902 if (!pArray->vf_online || pArray->u.array.rf_broken) break; in hpt_rebuild_data_block()
904 pArray->u.array.rf_auto_rebuild = 0; in hpt_rebuild_data_block()
905 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
906 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, in hpt_rebuild_data_block()
907 (pArray->VDeviceType == VD_RAID_1) ? DUPLICATE : REBUILD_PARITY); in hpt_rebuild_data_block()
919 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
925 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
926 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
928 ioctl_ReportEvent(ET_REBUILD_FAILED, pArray); in hpt_rebuild_data_block()
933 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
935 ioctl_ReportEvent(ET_INITIALIZE_FAILED, pArray); in hpt_rebuild_data_block()
940 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
942 ioctl_ReportEvent(ET_VERIFY_FAILED, pArray); in hpt_rebuild_data_block()
959 if (needsync) SyncArrayInfo(pArray); in hpt_rebuild_data_block()
960 if(needdelete && (pArray->u.array.rf_duplicate_must_done || (flags == INITIALIZE))) in hpt_rebuild_data_block()
961 fDeleteArray(_VBUS_P pArray, TRUE); in hpt_rebuild_data_block()