VirtualBox

Changeset 65057 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jan 3, 2017 10:27:02 AM (8 years ago)
Author:
vboxsync
Message:

Devices/Storage: Kill the host SCSI passthrough driver, wasn't really working ever (just a simple proof of concept only working on Linux and very limited command set). Can't be used now anyway after the I/O rework because the PDMISCSICONNECTOR is obsolete and not used by any SCSI controller so the driver must be rewritten in case we want SCSI passthrough at some point.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmstorageifs.h

    r64660 r65057  
    957957#define PDMIMEDIAEX_IID                      "1f82b709-a9f7-4928-ad50-e879c9bbeba1"
    958958
    959 /**
    960  * Data direction.
    961  */
    962 typedef enum PDMSCSIREQUESTTXDIR
    963 {
    964     PDMSCSIREQUESTTXDIR_UNKNOWN     = 0x00,
    965     PDMSCSIREQUESTTXDIR_FROM_DEVICE = 0x01,
    966     PDMSCSIREQUESTTXDIR_TO_DEVICE   = 0x02,
    967     PDMSCSIREQUESTTXDIR_NONE        = 0x03,
    968     PDMSCSIREQUESTTXDIR_32BIT_HACK  = 0x7fffffff
    969 } PDMSCSIREQUESTTXDIR;
    970 
    971 /**
    972  * SCSI request structure.
    973  */
    974 typedef struct PDMSCSIREQUEST
    975 {
    976     /** The logical unit. */
    977     uint32_t               uLogicalUnit;
    978     /** Direction of the data flow. */
    979     PDMSCSIREQUESTTXDIR    uDataDirection;
    980     /** Size of the SCSI CDB. */
    981     uint32_t               cbCDB;
    982     /** Pointer to the SCSI CDB. */
    983     uint8_t               *pbCDB;
    984     /** Overall size of all scatter gather list elements
    985      *  for data transfer if any. */
    986     uint32_t               cbScatterGather;
    987     /** Number of elements in the scatter gather list. */
    988     uint32_t               cScatterGatherEntries;
    989     /** Pointer to the head of the scatter gather list. */
    990     PRTSGSEG               paScatterGatherHead;
    991     /** Size of the sense buffer. */
    992     uint32_t               cbSenseBuffer;
    993     /** Pointer to the sense buffer. *
    994      * Current assumption that the sense buffer is not scattered. */
    995     uint8_t               *pbSenseBuffer;
    996     /** Opaque user data for use by the device. Left untouched by everything else! */
    997     void                  *pvUser;
    998 } PDMSCSIREQUEST, *PPDMSCSIREQUEST;
    999 /** Pointer to a const SCSI request structure. */
    1000 typedef const PDMSCSIREQUEST *PCSCSIREQUEST;
    1001 
    1002 /** Pointer to a SCSI port interface. */
    1003 typedef struct PDMISCSIPORT *PPDMISCSIPORT;
    1004 /**
    1005  * SCSI command execution port interface (down).
    1006  * Pair with PDMISCSICONNECTOR.
    1007  */
    1008 typedef struct PDMISCSIPORT
    1009 {
    1010 
    1011     /**
    1012      * Notify the device on request completion.
    1013      *
    1014      * @returns VBox status code.
    1015      * @param   pInterface    Pointer to this interface.
    1016      * @param   pSCSIRequest  Pointer to the finished SCSI request.
    1017      * @param   rcCompletion  SCSI_STATUS_* code for the completed request.
    1018      * @param   fRedo         Flag whether the request can to be redone
    1019      *                        when it failed.
    1020      * @param   rcReq         The status code the request completed with (VERR_*)
    1021      *                        Should be only used to choose the correct error message
    1022      *                        displayed to the user if the error can be fixed by him
    1023      *                        (fRedo is true).
    1024      */
    1025      DECLR3CALLBACKMEMBER(int, pfnSCSIRequestCompleted, (PPDMISCSIPORT pInterface, PPDMSCSIREQUEST pSCSIRequest,
    1026                                                          int rcCompletion, bool fRedo, int rcReq));
    1027 
    1028     /**
    1029      * Returns the storage controller name, instance and LUN of the attached medium.
    1030      *
    1031      * @returns VBox status.
    1032      * @param   pInterface      Pointer to this interface.
    1033      * @param   ppcszController Where to store the name of the storage controller.
    1034      * @param   piInstance      Where to store the instance number of the controller.
    1035      * @param   piLUN           Where to store the LUN of the attached device.
    1036      */
    1037     DECLR3CALLBACKMEMBER(int, pfnQueryDeviceLocation, (PPDMISCSIPORT pInterface, const char **ppcszController,
    1038                                                        uint32_t *piInstance, uint32_t *piLUN));
    1039 
    1040 } PDMISCSIPORT;
    1041 /** PDMISCSIPORT interface ID. */
    1042 #define PDMISCSIPORT_IID                        "05d9fc3b-e38c-4b30-8344-a323feebcfe5"
    1043 
    1044 /**
    1045  * LUN type.
    1046  */
    1047 typedef enum PDMSCSILUNTYPE
    1048 {
    1049     PDMSCSILUNTYPE_INVALID = 0,
    1050     PDMSCSILUNTYPE_SBC,         /** Hard disk (SBC) */
    1051     PDMSCSILUNTYPE_MMC,         /** CD/DVD drive (MMC) */
    1052     PDMSCSILUNTYPE_SSC,         /** Tape drive (SSC) */
    1053     PDMSCSILUNTYPE_32BIT_HACK = 0x7fffffff
    1054 } PDMSCSILUNTYPE, *PPDMSCSILUNTYPE;
    1055 
    1056 
    1057 /** Pointer to a SCSI connector interface. */
    1058 typedef struct PDMISCSICONNECTOR *PPDMISCSICONNECTOR;
    1059 /**
    1060  * SCSI command execution connector interface (up).
    1061  * Pair with PDMISCSIPORT.
    1062  */
    1063 typedef struct PDMISCSICONNECTOR
    1064 {
    1065 
    1066     /**
    1067      * Submits a SCSI request for execution.
    1068      *
    1069      * @returns VBox status code.
    1070      * @param   pInterface      Pointer to this interface.
    1071      * @param   pSCSIRequest    Pointer to the SCSI request to execute.
    1072      */
    1073      DECLR3CALLBACKMEMBER(int, pfnSCSIRequestSend, (PPDMISCSICONNECTOR pInterface, PPDMSCSIREQUEST pSCSIRequest));
    1074 
    1075     /**
    1076      * Queries the type of the attached LUN.
    1077      *
    1078      * @returns VBox status code.
    1079      * @param   pInterface      Pointer to this interface.
    1080      * @param   iLUN            The logical unit number.
    1081      * @param   pSCSIRequest    Pointer to the LUN to be returned.
    1082      */
    1083      DECLR3CALLBACKMEMBER(int, pfnQueryLUNType, (PPDMISCSICONNECTOR pInterface, uint32_t iLun, PPDMSCSILUNTYPE pLUNType));
    1084 
    1085 } PDMISCSICONNECTOR;
    1086 /** PDMISCSICONNECTOR interface ID. */
    1087 #define PDMISCSICONNECTOR_IID                   "94465fbd-a2f2-447e-88c9-7366421bfbfe"
    1088 
    1089959/** @} */
    1090960
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