/* DAC960_ProcessCompletedBuffer performs completion processing for an individual Buffer.  */
static bool DAC960_ProcessCompletedRequest(DAC960_Command_T *Command, bool SuccessfulIO)
/* DAC960_ProcessCompletedBuffer performs completion processing for an individual Buffer.  */
static bool DAC960_ProcessCompletedRequest(DAC960_Command_T *Command, bool SuccessfulIO)
{
	struct request *Request = Command->Request;
	int Error = SuccessfulIO ? 0 : -EIO;
	pci_unmap_sg(Command->Controller->PCIDevice, Command->cmd_sglist,
		Command->SegmentCount, Command->DmaDirection);
	 if (!__blk_end_request(Request, Error, Command->BlockCount << 9)) {
		if (Command->Completion) {
			complete(Command->Completion);
			Command->Completion = NULL;
		}
		return true;
	}
	return false;
}