Lines Matching refs:pAdapter
62 static void lock_driver_idle(IAL_ADAPTER_T *pAdapter);
193 lock_driver_idle(IAL_ADAPTER_T *pAdapter) in lock_driver_idle() argument
195 _VBUS_INST(&pAdapter->VBus) in lock_driver_idle()
196 mtx_lock(&pAdapter->lock); in lock_driver_idle()
197 while (pAdapter->outstandingCommands) { in lock_driver_idle()
198 KdPrint(("outstandingCommands is %d, wait..\n", pAdapter->outstandingCommands)); in lock_driver_idle()
200 mtx_sleep(pAdapter, &pAdapter->lock, 0, "hptidle", 0); in lock_driver_idle()
214 IAL_ADAPTER_T *pAdapter; in Kernel_DeviceIoControl() local
239 pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt; in Kernel_DeviceIoControl()
244 periph = hpt_get_periph(pAdapter->mvSataAdapter.adapterId, i); in Kernel_DeviceIoControl()
300 for (pAdapter=gIal_Adapter; pAdapter; pAdapter=pAdapter->next) { in Kernel_DeviceIoControl()
301 if (pAdapter->beeping) { in Kernel_DeviceIoControl()
302 pAdapter->beeping = 0; in Kernel_DeviceIoControl()
303 BeepOff(pAdapter->mvSataAdapter.adapterIoBaseAddress); in Kernel_DeviceIoControl()
359 pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt; in Kernel_DeviceIoControl()
364 lock_driver_idle(pAdapter); in Kernel_DeviceIoControl()
367 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
370 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
382 pAdapter=(IAL_ADAPTER_T *)(ID_TO_VDEV(*(DEVICEID *)lpOutBuffer))->pVBus->OsExt; in Kernel_DeviceIoControl()
383 mtx_lock(&pAdapter->lock); in Kernel_DeviceIoControl()
387 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), DUP… in Kernel_DeviceIoControl()
391 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), INI… in Kernel_DeviceIoControl()
395 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), REB… in Kernel_DeviceIoControl()
397 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
404 pAdapter=(IAL_ADAPTER_T *)(ID_TO_VDEV(*(DEVICEID *)lpOutBuffer))->pVBus->OsExt; in Kernel_DeviceIoControl()
405 mtx_lock(&pAdapter->lock); in Kernel_DeviceIoControl()
408 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), DUP… in Kernel_DeviceIoControl()
410 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), INI… in Kernel_DeviceIoControl()
412 …hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, ID_TO_VDEV(*(DEVICEID *)lpOutBuffer), REB… in Kernel_DeviceIoControl()
414 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
420 pAdapter=(IAL_ADAPTER_T *)pArray->pVBus->OsExt; in Kernel_DeviceIoControl()
423 mtx_lock(&pAdapter->lock); in Kernel_DeviceIoControl()
426 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, DUPLICATE); in Kernel_DeviceIoControl()
429 if (mtx_sleep(pArray, &pAdapter->lock, 0, "hptwait", hz * 3) != 0) in Kernel_DeviceIoControl()
432 mtx_unlock(&pAdapter->lock); in Kernel_DeviceIoControl()
457 IAL_ADAPTER_T *pAdapter; in hpt_set_array_state() local
466 pAdapter=(IAL_ADAPTER_T *)pVDevice->pVBus->OsExt; in hpt_set_array_state()
472 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
476 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
483 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pVDevice, in hpt_set_array_state()
488 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
492 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
504 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
506 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
514 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
518 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
526 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
530 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
535 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pVDevice, VERIFY); in hpt_set_array_state()
539 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
543 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
549 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
551 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
559 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
563 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
569 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
573 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
577 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pVDevice, VERIFY); in hpt_set_array_state()
581 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
585 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
591 mtx_lock(&pAdapter->lock); in hpt_set_array_state()
593 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
601 if (mtx_sleep(pVDevice, &pAdapter->lock, 0, in hpt_set_array_state()
605 mtx_unlock(&pAdapter->lock); in hpt_set_array_state()
688 hpt_rebuild_data_block(IAL_ADAPTER_T *pAdapter, PVDevice pArray, UCHAR flags) in hpt_rebuild_data_block() argument
696 _VBUS_INST(&pAdapter->VBus) in hpt_rebuild_data_block()
702 mtx_lock(&pAdapter->lock); in hpt_rebuild_data_block()
801 mtx_sleep(pCmd, &pAdapter->lock, 0, "hptrbld", hz * 60); in hpt_rebuild_data_block()
820 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, flags); in hpt_rebuild_data_block()
893 hpt_queue_dpc((HPT_DPC)hpt_rebuild_data_block, pAdapter, pArray, in hpt_rebuild_data_block()
935 while (pAdapter->outstandingCommands) in hpt_rebuild_data_block()
937 KdPrintI(("currcmds is %d, wait..\n", pAdapter->outstandingCommands)); in hpt_rebuild_data_block()
940 mtx_sleep(pAdapter, &pAdapter->lock, 0, "hptidle", 0); in hpt_rebuild_data_block()
947 Check_Idle_Call(pAdapter); in hpt_rebuild_data_block()
948 mtx_unlock(&pAdapter->lock); in hpt_rebuild_data_block()