Lines Matching refs:pArray

162 	PVDevice	pArray = ID_TO_VDEV(id);  in hpt_delete_array()  local
167 if ((id==0) || check_VDevice_valid(pArray)) in hpt_delete_array()
170 if(!mIsArray(pArray)) return -1; in hpt_delete_array()
172 if (pArray->u.array.rf_rebuilding || pArray->u.array.rf_verifying || in hpt_delete_array()
173 pArray->u.array.rf_initializing) in hpt_delete_array()
176 for(i=0; i<pArray->u.array.bArnMember; i++) { in hpt_delete_array()
177 pa = pArray->u.array.pMember[i]; in hpt_delete_array()
185 if (pArray->pVBus!=_vbus_p) { HPT_ASSERT(0); return -1;} in hpt_delete_array()
186 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()
421 PVDevice pArray = ID_TO_VDEV(((PHPT_ADD_DISK_TO_ARRAY)lpInBuffer)->idArray); in Kernel_DeviceIoControl() local
422 pAdapter=(IAL_ADAPTER_T *)pArray->pVBus->OsExt; in Kernel_DeviceIoControl()
423 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()
429 while (!pArray->u.array.rf_rebuilding) in Kernel_DeviceIoControl()
431 if (mtx_sleep(pArray, &pAdapter->lock, 0, "hptwait", hz * 3) != 0) in Kernel_DeviceIoControl()
690 hpt_rebuild_data_block(IAL_ADAPTER_T *pAdapter, PVDevice pArray, UCHAR flags) in hpt_rebuild_data_block() argument
692 ULONG capacity = pArray->VDeviceCapacity / (pArray->u.array.bArnMember-1); in hpt_rebuild_data_block()
700 if (pArray->u.array.rf_broken==1 || in hpt_rebuild_data_block()
701 pArray->u.array.RebuildSectors>=capacity) in hpt_rebuild_data_block()
710 if(pArray->u.array.rf_rebuilding == 0) in hpt_rebuild_data_block()
712 pArray->u.array.rf_rebuilding = 1; in hpt_rebuild_data_block()
714 ioctl_ReportEvent(ET_REBUILD_STARTED, pArray); in hpt_rebuild_data_block()
719 if(pArray->u.array.rf_initializing == 0) in hpt_rebuild_data_block()
721 pArray->u.array.rf_initializing = 1; in hpt_rebuild_data_block()
723 ioctl_ReportEvent(ET_INITIALIZE_STARTED, pArray); in hpt_rebuild_data_block()
728 if(pArray->u.array.rf_verifying == 0) in hpt_rebuild_data_block()
730 pArray->u.array.rf_verifying = 1; in hpt_rebuild_data_block()
732 ioctl_ReportEvent(ET_VERIFY_STARTED, pArray); in hpt_rebuild_data_block()
743 if (pArray->VDeviceType==VD_RAID_1) in hpt_rebuild_data_block()
772 pCmd->uCmd.R1Control.Lba = pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
774 if (capacity - pArray->u.array.RebuildSectors < pCmd->uCmd.R1Control.nSectors) in hpt_rebuild_data_block()
775 pCmd->uCmd.R1Control.nSectors = capacity - pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
780 else if (pArray->VDeviceType==VD_RAID_5) in hpt_rebuild_data_block()
792 pCmd->uCmd.R5Control.StripeLine=pArray->u.array.RebuildSectors>>pArray->u.array.bArBlockSizeShift; in hpt_rebuild_data_block()
797 pCmd->pVDevice = pArray; in hpt_rebuild_data_block()
799 pArray->pfnSendCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()
818 if (!pArray->u.array.rf_abort_rebuild) in hpt_rebuild_data_block()
820 if(pArray->u.array.RebuildSectors < capacity) in hpt_rebuild_data_block()
822 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, flags); in hpt_rebuild_data_block()
831 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
832 pArray->u.array.rf_need_rebuild = 0; in hpt_rebuild_data_block()
833 pArray->u.array.CriticalMembers = 0; in hpt_rebuild_data_block()
834 pArray->u.array.RebuildSectors = MAX_LBA_T; in hpt_rebuild_data_block()
835 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
837 ioctl_ReportEvent(ET_REBUILD_FINISHED, pArray); in hpt_rebuild_data_block()
841 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
842 pArray->u.array.rf_need_rebuild = 0; in hpt_rebuild_data_block()
843 pArray->u.array.RebuildSectors = MAX_LBA_T; in hpt_rebuild_data_block()
845 ioctl_ReportEvent(ET_INITIALIZE_FINISHED, pArray); in hpt_rebuild_data_block()
848 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
850 ioctl_ReportEvent(ET_VERIFY_FINISHED, pArray); in hpt_rebuild_data_block()
857 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
858 if (pArray->u.array.rf_rebuilding) in hpt_rebuild_data_block()
861 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
862 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
863 ioctl_ReportEvent(ET_REBUILD_ABORTED, pArray); in hpt_rebuild_data_block()
865 else if (pArray->u.array.rf_verifying) in hpt_rebuild_data_block()
868 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
869 ioctl_ReportEvent(ET_VERIFY_ABORTED, pArray); in hpt_rebuild_data_block()
871 else if (pArray->u.array.rf_initializing) in hpt_rebuild_data_block()
874 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
875 ioctl_ReportEvent(ET_INITIALIZE_ABORTED, pArray); in hpt_rebuild_data_block()
885 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
886 pArray->u.array.rf_need_rebuild = 1; in hpt_rebuild_data_block()
888 ioctl_ReportEvent(ET_VERIFY_DATA_ERROR, pArray); in hpt_rebuild_data_block()
889 ioctl_ReportEvent(ET_VERIFY_FAILED, pArray); in hpt_rebuild_data_block()
891 if (!pArray->vf_online || pArray->u.array.rf_broken) break; in hpt_rebuild_data_block()
893 pArray->u.array.rf_auto_rebuild = 0; in hpt_rebuild_data_block()
894 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
895 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, in hpt_rebuild_data_block()
896 (pArray->VDeviceType == VD_RAID_1) ? DUPLICATE : REBUILD_PARITY); in hpt_rebuild_data_block()
908 pArray->u.array.rf_abort_rebuild = 0; in hpt_rebuild_data_block()
914 pArray->u.array.rf_rebuilding = 0; in hpt_rebuild_data_block()
915 pArray->u.array.rf_duplicate_and_create = 0; in hpt_rebuild_data_block()
917 ioctl_ReportEvent(ET_REBUILD_FAILED, pArray); in hpt_rebuild_data_block()
922 pArray->u.array.rf_initializing = 0; in hpt_rebuild_data_block()
924 ioctl_ReportEvent(ET_INITIALIZE_FAILED, pArray); in hpt_rebuild_data_block()
929 pArray->u.array.rf_verifying = 0; in hpt_rebuild_data_block()
931 ioctl_ReportEvent(ET_VERIFY_FAILED, pArray); in hpt_rebuild_data_block()
945 if (needsync) SyncArrayInfo(pArray); in hpt_rebuild_data_block()
946 if(needdelete && (pArray->u.array.rf_duplicate_must_done || (flags == INITIALIZE))) in hpt_rebuild_data_block()
947 fDeleteArray(_VBUS_P pArray, TRUE); in hpt_rebuild_data_block()