/* DAC960_ProcessRequest attempts to remove one I/O Request from Controller's I/O Request Queue and queues it to the Controller. WaitForCommand is true if this function should wait for a Command to become available if necessary. This function returns true if an I/O Request was queued and false otherwise.  */
static void DAC960_ProcessRequest(DAC960_Controller_T *controller)
/* DAC960_ProcessRequest attempts to remove one I/O Request from Controller's I/O Request Queue and queues it to the Controller. WaitForCommand is true if this function should wait for a Command to become available if necessary. This function returns true if an I/O Request was queued and false otherwise.  */
static void DAC960_ProcessRequest(DAC960_Controller_T *controller)
{
	int i;
	if (!controller->ControllerInitialized)
		return;
	for (i = controller->req_q_index; i < DAC960_MaxLogicalDrives; i++) {
		struct request_queue *req_q = controller->RequestQueue[i];
		if (req_q == NULL)
			continue;
		if (!DAC960_process_queue(controller, req_q)) {
			controller->req_q_index = i;
			return;
		}
	}
	if (controller->req_q_index == 0)
		return;
	for (i = 0; i < controller->req_q_index; i++) {
		struct request_queue *req_q = controller->RequestQueue[i];
		if (req_q == NULL)
			continue;
		if (!DAC960_process_queue(controller, req_q)) {
			controller->req_q_index = i;
			return;
		}
	}
}