VirtualBox

Changeset 48191 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Aug 30, 2013 1:47:36 PM (11 years ago)
Author:
vboxsync
Message:

BusLogic: Dummy Execute SCSI command, try to fix alignment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevBusLogic.cpp

    r48190 r48191  
    5252
    5353/** Size of the command buffer. */
    54 #define BUSLOGIC_COMMAND_SIZE_MAX 64
     54#define BUSLOGIC_COMMAND_SIZE_MAX   59
    5555
    5656/** Size of the reply buffer. */
    57 #define BUSLOGIC_REPLY_SIZE_MAX 64
     57#define BUSLOGIC_REPLY_SIZE_MAX     64
    5858
    5959/** Custom fixed I/O ports for BIOS controller access.
     
    17711771            break;
    17721772
     1773        case BUSLOGICCOMMAND_EXECUTE_SCSI_COMMAND:
     1774            /* The parameter list length is at least 12 bytes; the 12th byte determines
     1775             * the number of additional CDB bytes that will follow.
     1776             */
     1777            if (pBusLogic->iParameter == 12)
     1778            {
     1779                /* First pass - set the number of following CDB bytes. */
     1780                pBusLogic->cbCommandParametersLeft = pBusLogic->aCommandBuffer[11];
     1781                Log(("Execute SCSI cmd: %u more bytes follow\n", pBusLogic->cbCommandParametersLeft));
     1782            }
     1783            else
     1784            {
     1785                PESCMD      pCmd;
     1786
     1787                /* Second pass - process received data. */
     1788                Log(("Execute SCSI cmd: received %u bytes\n", pBusLogic->aCommandBuffer[0]));
     1789
     1790                pCmd = (PESCMD)pBusLogic->aCommandBuffer;
     1791                Log(("Addr %08X, cbData %08X, cbCDB=%u\n", pCmd->u32PhysAddrData, pCmd->cbData, pCmd->cbCDB));
     1792            }
     1793            // This is currently a dummy - just fails every command.
     1794            pBusLogic->cbReplyParametersLeft = 4;
     1795            pBusLogic->aReplyBuffer[0] = pBusLogic->aReplyBuffer[1] = 0;
     1796            pBusLogic->aReplyBuffer[2] = 0x11;      /* HBA status (timeout). */
     1797            pBusLogic->aReplyBuffer[3] = 0;         /* Device status. */
     1798            break;
     1799
    17731800        case BUSLOGICCOMMAND_INQUIRE_HOST_ADAPTER_MODEL_NUMBER:
    17741801        {
     
    22802307                        /* There must be at least one byte following this command. */
    22812308                        pBusLogic->cbCommandParametersLeft = 1;
     2309                        break;
     2310                    case BUSLOGICCOMMAND_EXECUTE_SCSI_COMMAND:
     2311                        /* 12 bytes + variable-length CDB. */
     2312                        pBusLogic->cbCommandParametersLeft = 12;
    22822313                        break;
    22832314                    case BUSLOGICCOMMAND_EXT_BIOS_INFO:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette