VSCSIIoReq.cpp revision 98744bb362e14debc292b1cf9e11f0d32b37338a
/* $Id$ */
/** @file
* Virtual SCSI driver: I/O request handling.
*/
/*
* Copyright (C) 2006-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#define LOG_GROUP LOG_GROUP_VSCSI
#include "VSCSIInternal.h"
{
int rc = VINF_SUCCESS;
if (!pVScsiIoReq)
return VERR_NO_MEMORY;
if (RT_FAILURE(rc))
{
}
return rc;
}
{
int rc = VINF_SUCCESS;
LogFlowFunc(("pVScsiLun=%#p pVScsiReq=%#p enmTxDir=%u uOffset=%llu cbTransfer=%u\n",
if (!pVScsiIoReq)
return VERR_NO_MEMORY;
if (RT_FAILURE(rc))
{
}
return rc;
}
{
}
{
int rcReq = SCSI_STATUS_OK;
("Unregistered I/O request completed\n"));
/** @todo error reporting */
if (RT_SUCCESS(rcIoReq))
else if (!fRedoPossible)
{
/** @todo Not 100% correct for the write case as the 0x00 ASCQ for write errors
* is not used for SBC devices. */
}
else
/* Free the I/O request */
/* Notify completion of the SCSI request. */
return VINF_SUCCESS;
}
{
return pVScsiIoReq->enmTxDir;
}
{
return VINF_SUCCESS;
}