Lines Matching refs:pArray

160 	PVDevice	pArray = ID_TO_VDEV(id);  in hpt_delete_array()  local
165 if ((id==0) || check_VDevice_valid(pArray)) in hpt_delete_array()
168 if(!mIsArray(pArray)) return -1; in hpt_delete_array()
170 if (pArray->u.array.rf_rebuilding || pArray->u.array.rf_verifying || in hpt_delete_array()
171 pArray->u.array.rf_initializing) in hpt_delete_array()
174 for(i=0; i<pArray->u.array.bArnMember; i++) { in hpt_delete_array()
175 pa = pArray->u.array.pMember[i]; in hpt_delete_array()
183 if (pArray->pVBus!=_vbus_p) { HPT_ASSERT(0); return -1;} in hpt_delete_array()
184 fDeleteArray(_VBUS_P pArray, del_block0); in hpt_delete_array()
222 PVDevice pArray; in Kernel_DeviceIoControl() local
230 pArray = ID_TO_VDEV(idArray); in Kernel_DeviceIoControl()
232 if((idArray == 0) || check_VDevice_valid(pArray)) in Kernel_DeviceIoControl()
235 if(!mIsArray(pArray)) in Kernel_DeviceIoControl()
238 _vbus_p=pArray->pVBus; in Kernel_DeviceIoControl()
242 if(pArray == _vbus_p->pVDevice[i]) in Kernel_DeviceIoControl()
419 PVDevice pArray = ID_TO_VDEV(((PHPT_ADD_DISK_TO_ARRAY)lpInBuffer)->idArray); in Kernel_DeviceIoControl() local
420 pAdapter=(IAL_ADAPTER_T *)pArray->pVBus->OsExt; in Kernel_DeviceIoControl()
421 if(pArray->u.array.rf_rebuilding == 0) in Kernel_DeviceIoControl()
424 pArray->u.array.rf_auto_rebuild = 0; in Kernel_DeviceIoControl()
425 pArray->u.array.rf_abort_rebuild = 0; in Kernel_DeviceIoControl()
426 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, DUPLICATE); in Kernel_DeviceIoControl()
427 while (!pArray->u.array.rf_rebuilding) in Kernel_DeviceIoControl()
429 if (mtx_sleep(pArray, &pAdapter->lock, 0, "hptwait", hz * 3) != 0) in Kernel_DeviceIoControl()
688 hpt_rebuild_data_block(IAL_ADAPTER_T *pAdapter, PVDevice pArray, UCHAR flags) in hpt_rebuild_data_block() argument
690 ULONG capacity = pArray->VDeviceCapacity / (pArray->u.array.bArnMember-1); in hpt_rebuild_data_block()
698 if (pArray->u.array.rf_broken==1 || in hpt_rebuild_data_block()
699 pArray->u.array.RebuildSectors>=capacity) in hpt_rebuild_data_block()
708 if(pArray->u.array.rf_rebuilding == 0) in hpt_rebuild_data_block()
710 pArray->u.array.rf_rebuilding = 1; in hpt_rebuild_data_block()
712 ioctl_ReportEvent(ET_REBUILD_STARTED, pArray); in hpt_rebuild_data_block()
717 if(pArray->u.array.rf_initializing == 0) in hpt_rebuild_data_block()
719 pArray->u.array.rf_initializing = 1; in hpt_rebuild_data_block()
721 ioctl_ReportEvent(ET_INITIALIZE_STARTED, pArray); in hpt_rebuild_data_block()
726 if(pArray->u.array.rf_verifying == 0) in hpt_rebuild_data_block()
728 pArray->u.array.rf_verifying = 1; in hpt_rebuild_data_block()
730 ioctl_ReportEvent(ET_VERIFY_STARTED, pArray); in hpt_rebuild_data_block()
741 if (pArray->VDeviceType==VD_RAID_1) in hpt_rebuild_data_block()
770 pCmd->uCmd.R1Control.Lba = pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
772 if (capacity - pArray->u.array.RebuildSectors < pCmd->uCmd.R1Control.nSectors) in hpt_rebuild_data_block()
773 pCmd->uCmd.R1Control.nSectors = capacity - pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
778 else if (pArray->VDeviceType==VD_RAID_5) in hpt_rebuild_data_block()
790 pCmd->uCmd.R5Control.StripeLine=pArray->u.array.RebuildSectors>>pArray->u.array.bArBlockSizeShift; in hpt_rebuild_data_block()
795 pCmd->pVDevice = pArray; in hpt_rebuild_data_block()
797 pArray->pfnSendCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()
816 if (!pArray->u.array.rf_abort_rebuild) in hpt_rebuild_data_block()
818 if(pArray->u.array.RebuildSectors < capacity) in hpt_rebuild_data_block()
820 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, flags); in hpt_rebuild_data_block()
829 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
830 pArray->u.array.rf_need_rebuild = 0; in hpt_rebuild_data_block()
831 pArray->u.array.CriticalMembers = 0; in hpt_rebuild_data_block()
832 pArray->u.array.RebuildSectors = MAX_LBA_T; in hpt_rebuild_data_block()
833 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
835 ioctl_ReportEvent(ET_REBUILD_FINISHED, pArray); in hpt_rebuild_data_block()
839 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
840 pArray->u.array.rf_need_rebuild = 0; in hpt_rebuild_data_block()
841 pArray->u.array.RebuildSectors = MAX_LBA_T; in hpt_rebuild_data_block()
843 ioctl_ReportEvent(ET_INITIALIZE_FINISHED, pArray); in hpt_rebuild_data_block()
846 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
848 ioctl_ReportEvent(ET_VERIFY_FINISHED, pArray); in hpt_rebuild_data_block()
855 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
856 if (pArray->u.array.rf_rebuilding) in hpt_rebuild_data_block()
859 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
860 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
861 ioctl_ReportEvent(ET_REBUILD_ABORTED, pArray); in hpt_rebuild_data_block()
863 else if (pArray->u.array.rf_verifying) in hpt_rebuild_data_block()
866 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
867 ioctl_ReportEvent(ET_VERIFY_ABORTED, pArray); in hpt_rebuild_data_block()
869 else if (pArray->u.array.rf_initializing) in hpt_rebuild_data_block()
872 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
873 ioctl_ReportEvent(ET_INITIALIZE_ABORTED, pArray); in hpt_rebuild_data_block()
883 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
884 pArray->u.array.rf_need_rebuild = 1; in hpt_rebuild_data_block()
886 ioctl_ReportEvent(ET_VERIFY_DATA_ERROR, pArray); in hpt_rebuild_data_block()
887 ioctl_ReportEvent(ET_VERIFY_FAILED, pArray); in hpt_rebuild_data_block()
889 if (!pArray->vf_online || pArray->u.array.rf_broken) break; in hpt_rebuild_data_block()
891 pArray->u.array.rf_auto_rebuild = 0; in hpt_rebuild_data_block()
892 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
893 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, in hpt_rebuild_data_block()
894 (pArray->VDeviceType == VD_RAID_1) ? DUPLICATE : REBUILD_PARITY); in hpt_rebuild_data_block()
906 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
912 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
913 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
915 ioctl_ReportEvent(ET_REBUILD_FAILED, pArray); in hpt_rebuild_data_block()
920 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
922 ioctl_ReportEvent(ET_INITIALIZE_FAILED, pArray); in hpt_rebuild_data_block()
927 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
929 ioctl_ReportEvent(ET_VERIFY_FAILED, pArray); in hpt_rebuild_data_block()
943 if (needsync) SyncArrayInfo(pArray); in hpt_rebuild_data_block()
944 if(needdelete && (pArray->u.array.rf_duplicate_must_done || (flags == INITIALIZE))) in hpt_rebuild_data_block()
945 fDeleteArray(_VBUS_P pArray, TRUE); in hpt_rebuild_data_block()