Lines Matching refs:pAdapter
64 static void lock_driver_idle(IAL_ADAPTER_T *pAdapter);
195 lock_driver_idle(IAL_ADAPTER_T *pAdapter) in lock_driver_idle() argument
197 _VBUS_INST(&pAdapter->VBus) in lock_driver_idle()
198 mtx_lock(&pAdapter->lock); in lock_driver_idle()
199 while (pAdapter->outstandingCommands) { in lock_driver_idle()
200 KdPrint(("outstandingCommands is %d, wait..\n", pAdapter->outstandingCommands)); in lock_driver_idle()
202 mtx_sleep(pAdapter, &pAdapter->lock, 0, "hptidle", 0); in lock_driver_idle()
216 IAL_ADAPTER_T *pAdapter; in Kernel_DeviceIoControl() local
241 pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt; in Kernel_DeviceIoControl()
246 periph = hpt_get_periph(pAdapter->mvSataAdapter.adapterId, i); in Kernel_DeviceIoControl()
302 for (pAdapter=gIal_Adapter; pAdapter; pAdapter=pAdapter->next) { in Kernel_DeviceIoControl()
303 if (pAdapter->beeping) { in Kernel_DeviceIoControl()
304 pAdapter->beeping = 0; in Kernel_DeviceIoControl()
305 BeepOff(pAdapter->mvSataAdapter.adapterIoBaseAddress); in Kernel_DeviceIoControl()
361 pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt; in Kernel_DeviceIoControl()
366 lock_driver_idle(pAdapter); in Kernel_DeviceIoControl()
369 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
372 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
384 pAdapter=(IAL_ADAPTER_T *)(ID_TO_VDEV(*(DEVICEID *)lpOutBuffer))->pVBus->OsExt; in Kernel_DeviceIoControl()
385 mtx_lock(&pAdapter->lock); in Kernel_DeviceIoControl()
389 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), DUP… in Kernel_DeviceIoControl()
393 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), INI… in Kernel_DeviceIoControl()
397 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), REB… in Kernel_DeviceIoControl()
399 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
406 pAdapter=(IAL_ADAPTER_T *)(ID_TO_VDEV(*(DEVICEID *)lpOutBuffer))->pVBus->OsExt; in Kernel_DeviceIoControl()
407 mtx_lock(&pAdapter->lock); in Kernel_DeviceIoControl()
410 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), DUP… in Kernel_DeviceIoControl()
412 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), INI… in Kernel_DeviceIoControl()
414 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), REB… in Kernel_DeviceIoControl()
416 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
422 pAdapter=(IAL_ADAPTER_T *)pArray->pVBus->OsExt; in Kernel_DeviceIoControl()
425 mtx_lock(&pAdapter->lock); in Kernel_DeviceIoControl()
428 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, DUPLICATE); in Kernel_DeviceIoControl()
431 if (mtx_sleep(pArray, &pAdapter->lock, 0, "hptwait", hz * 3) != 0) in Kernel_DeviceIoControl()
434 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
459 IAL_ADAPTER_T *pAdapter; in hpt_set_array_state() local
468 pAdapter=(IAL_ADAPTER_T *)pVDevice->pVBus->OsExt; in hpt_set_array_state()
474 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
478 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
485 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pVDevice, in hpt_set_array_state()
490 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
494 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
506 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
508 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
516 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
520 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
528 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
532 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
537 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pVDevice, VERIFY); in hpt_set_array_state()
541 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
545 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
551 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
553 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
561 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
565 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
571 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
575 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
579 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pVDevice, VERIFY); in hpt_set_array_state()
583 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
587 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
593 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
595 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
603 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
607 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
690 hpt_rebuild_data_block(IAL_ADAPTER_T *pAdapter, PVDevice pArray, UCHAR flags) in hpt_rebuild_data_block() argument
698 _VBUS_INST(&pAdapter->VBus) in hpt_rebuild_data_block()
704 mtx_lock(&pAdapter->lock); in hpt_rebuild_data_block()
803 mtx_sleep(pCmd, &pAdapter->lock, 0, "hptrbld", hz * 60); in hpt_rebuild_data_block()
822 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, flags); in hpt_rebuild_data_block()
895 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, in hpt_rebuild_data_block()
937 while (pAdapter->outstandingCommands) in hpt_rebuild_data_block()
939 KdPrintI(("currcmds is %d, wait..\n", pAdapter->outstandingCommands)); in hpt_rebuild_data_block()
942 mtx_sleep(pAdapter, &pAdapter->lock, 0, "hptidle", 0); in hpt_rebuild_data_block()
949 Check_Idle_Call(pAdapter); in hpt_rebuild_data_block()
950 mtx_unlock(&pAdapter->lock); in hpt_rebuild_data_block()