Changeset 104221 in vbox
- Timestamp:
- Apr 8, 2024 10:18:11 AM (10 months ago)
- Location:
- trunk/src/VBox/Devices/Storage/VSCSI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp
r103902 r104221 70 70 LogFlowFunc(("CDB: %.*Rhxs Cmd: %s\n", pVScsiReq->cbCDB, pVScsiReq->pbCDB, SCSICmdText(pVScsiReq->pbCDB[0]))); 71 71 72 if (!pVScsiReq->cbCDB) 73 { 74 *prcReq = vscsiReqSenseErrorSet(&pVScsiDevice->VScsiSense, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, 75 SCSI_ASC_ILLEGAL_OPCODE, 0x00); 76 return true; 77 } 78 72 79 switch (pVScsiReq->pbCDB[0]) 73 80 { … … 95 102 case SCSI_REPORT_LUNS: 96 103 { 104 if (pVScsiReq->cbCDB < 10) 105 { 106 *prcReq = vscsiReqSenseErrorSet(&pVScsiDevice->VScsiSense, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, 107 SCSI_ASC_ILLEGAL_OPCODE, 0x00); 108 break; 109 } 110 97 111 /* 98 112 * If allocation length is less than 16 bytes SPC compliant devices have … … 130 144 case SCSI_REQUEST_SENSE: 131 145 { 146 if (pVScsiReq->cbCDB < 5) 147 { 148 *prcReq = vscsiReqSenseErrorSet(&pVScsiDevice->VScsiSense, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, 149 SCSI_ASC_ILLEGAL_OPCODE, 0x00); 150 break; 151 } 152 132 153 vscsiReqSetXferDir(pVScsiReq, VSCSIXFERDIR_T2I); 133 154 vscsiReqSetXferSize(pVScsiReq, pVScsiReq->pbCDB[4]); … … 143 164 case SCSI_MAINTENANCE_IN: 144 165 { 166 if (pVScsiReq->cbCDB < 8) 167 { 168 *prcReq = vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, 169 SCSI_ASC_ILLEGAL_OPCODE, 0x00); 170 break; 171 } 172 145 173 if (pVScsiReq->pbCDB[1] == SCSI_MAINTENANCE_IN_REPORT_SUPP_OPC) 146 174 { … … 377 405 { 378 406 PVSCSILUNINT pVScsiLun = pVScsiDevice->papVScsiLun[pVScsiReq->iLun]; 379 rc = pVScsiLun->pVScsiLunDesc->pfnVScsiLunReqProcess(pVScsiLun, pVScsiReq); 407 PVSCSILUNDESC pVScsiLunDesc = pVScsiLun->pVScsiLunDesc; 408 uint8_t const bOpc = pVScsiReq->pbCDB[0]; 409 uint8_t const cbCdbMin = pVScsiLunDesc->pacbCdbOpc[bOpc]; 410 411 /* Fail if the opcode is not supported or the CDB is too short. */ 412 if ( cbCdbMin != VSCSI_LUN_CDB_SZ_INVALID 413 && pVScsiReq->cbCDB >= cbCdbMin) 414 rc = pVScsiLunDesc->pfnVScsiLunReqProcess(pVScsiLun, pVScsiReq); 415 else 416 { 417 /* 418 * CDB length is smaller than what the LUN expects, respond with an 419 * ILLEGAL OPCODE error. 420 */ 421 vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, 422 SCSI_ASC_ILLEGAL_OPCODE, 0x00); 423 424 vscsiDeviceReqComplete(pVScsiDevice, pVScsiReq, 425 SCSI_STATUS_CHECK_CONDITION, false, VINF_SUCCESS); 426 } 380 427 } 381 428 else -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
r99739 r104221 242 242 /** @} */ 243 243 244 /** @name Helper macros to specify a range of not supported CDB opcodes for the entries pointed 245 * to by VSCSILUNDESC::pacbCdbOpc. 246 * @{ */ 247 #define VSCSI_LUN_CDB_SZ_INVALID 0 248 #define VSCSI_LUN_CDB_SZ_INVALID_X2 \ 249 VSCSI_LUN_CDB_SZ_INVALID, \ 250 VSCSI_LUN_CDB_SZ_INVALID 251 #define VSCSI_LUN_CDB_SZ_INVALID_X4 \ 252 VSCSI_LUN_CDB_SZ_INVALID_X2, \ 253 VSCSI_LUN_CDB_SZ_INVALID_X2 254 #define VSCSI_LUN_CDB_SZ_INVALID_X8 \ 255 VSCSI_LUN_CDB_SZ_INVALID_X4, \ 256 VSCSI_LUN_CDB_SZ_INVALID_X4 257 #define VSCSI_LUN_CDB_SZ_INVALID_X16 \ 258 VSCSI_LUN_CDB_SZ_INVALID_X8, \ 259 VSCSI_LUN_CDB_SZ_INVALID_X8 260 /** @} */ 261 262 244 263 /** 245 264 * Virtual SCSI LUN descriptor. … … 253 272 /** LUN type size */ 254 273 size_t cbLun; 274 /** Pointer to the array holding the CDB length indexed by the opcode. 275 * A 0 entry means opcode not supported (CDB must be at least 1 byte big). */ 276 const uint8_t *pacbCdbOpc; 255 277 /** Number of entries in the supported operation codes array. */ 256 278 uint32_t cSupOpcInfo; -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
r103902 r104221 1775 1775 1776 1776 1777 /** 1778 * The supported operation codes for the SBC LUN type. 1779 * 1780 * @note This gives the minimum size required by our implementation 1781 * which may be smaller than what the spec defines (for example 1782 * we do not access the control byte at the end). 1783 */ 1784 static uint8_t s_acbCdbOpc[] = 1785 { 1786 1, /**< 0x00 TEST UNIT READY */ 1787 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x01 Invalid */ 1788 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x02 - 0x03 Invalid */ 1789 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x04 - 0x07 Invalid */ 1790 5, /**< 0x08 READ (6) */ 1791 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x09 Invalid */ 1792 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x0a - 0x0b Invalid */ 1793 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x0c - 0x0f Invalid */ 1794 1795 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x10 - 0x11 Invalid */ 1796 5, /**< 0x12 INQUIRY */ 1797 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x13 Invalid */ 1798 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x14 Invalid */ 1799 5, /**< 0x15 MODE SELECT (6) */ 1800 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x16 - 0x17 Invalid */ 1801 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x18 - 0x19 Invalid */ 1802 5, /**< 0x1a MODE SENSE (6) */ 1803 5, /**< 0x1b START STOP UNIT */ 1804 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x1c - 0x1d Invalid */ 1805 5, /**< 0x1e PREVENT ALLOW MEDIUM REMOVAL */ 1806 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x1f Invalid */ 1807 1808 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x20 - 0x23 Invalid */ 1809 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x24 Invalid */ 1810 1, /**< 0x25 READ CAPACITY */ 1811 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x26 - 0x27 Invalid */ 1812 9, /**< 0x28 READ (10) */ 1813 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x29 - 0x2a Invalid */ 1814 6, /**< 0x2b SEEK (10) */ 1815 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x2c - 0x2d Invalid */ 1816 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x2e Invalid */ 1817 5, /**< 0x2f VERIFY (10) */ 1818 1819 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0x30 - 0x37 Invalid */ 1820 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x38 - 0x3b Invalid */ 1821 8, /**< 0x3c READ BUFFER */ 1822 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x3d Invalid */ 1823 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x3e - 0x3f Invalid */ 1824 1825 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x40 - 0x41 Invalid */ 1826 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x42 Invalid */ 1827 9, /**< 0x43 READ TOC PMA ATIP */ 1828 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x44 - 0x45 Invalid */ 1829 9, /**< 0x46 GET CONFIGURATION */ 1830 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x47 Invalid */ 1831 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x48 - 0x49 Invalid */ 1832 9, /**< 0x4a GET EVENT STATUS NOTIFICATION */ 1833 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x4b Invalid */ 1834 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x4c Invalid */ 1835 9, /**< 0x4d LOG SENSE */ 1836 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x4e - 0x4f Invalid */ 1837 1838 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x50 Invalid */ 1839 9, /**< 0x51 READ DISC INFORMATION */ 1840 9, /**< 0x52 READ TRACK INFORMATION */ 1841 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x53 Invalid */ 1842 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x54 - 0x57 Invalid */ 1843 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x58 - 0x59 Invalid */ 1844 9, /**< 0x5a MODE SENSE (10) */ 1845 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x5b Invalid */ 1846 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x5c - 0x5f Invalid */ 1847 1848 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0x60 - 0x6f Invalid */ 1849 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0x70 - 0x7f Invalid */ 1850 1851 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0x80 - 0x87 Invalid */ 1852 14, /**< 0x88 READ (16) */ 1853 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x89 Invalid */ 1854 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x8a - 0x8b Invalid */ 1855 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x8c - 0x8f Invalid */ 1856 1857 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0x90 - 0x97 Invalid */ 1858 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x98 - 0x9b Invalid */ 1859 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x9c - 0x9d Invalid */ 1860 2, /**< 0x9e SERVICE ACTION IN (16) (at least 2). */ 1861 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x9f Invalid */ 1862 1863 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0xa0 - 0xa7 Invalid */ 1864 10, /**< 0xa8 READ (12) */ 1865 VSCSI_LUN_CDB_SZ_INVALID, /**< 0xa9 Invalid */ 1866 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0xaa - 0xab Invalid */ 1867 VSCSI_LUN_CDB_SZ_INVALID, /**< 0xac Invalid */ 1868 10, /**< 0xad READ DVD STRUCTURE */ 1869 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0xae - 0xaf Invalid */ 1870 1871 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0xb0 - 0xb7 Invalid */ 1872 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0xb8 - 0xbb Invalid */ 1873 VSCSI_LUN_CDB_SZ_INVALID, /**< 0xbc Invalid */ 1874 10, /**< 0xbd MECHANISM STATUS */ 1875 10, /**< 0xbe READ CD */ 1876 VSCSI_LUN_CDB_SZ_INVALID, /**< 0xbf Invalid */ 1877 1878 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0xc0 - 0xcf Invalid */ 1879 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0xd0 - 0xdf Invalid */ 1880 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0xe0 - 0xef Invalid */ 1881 VSCSI_LUN_CDB_SZ_INVALID_X16 /**< 0xf0 - 0xff Invalid */ 1882 }; 1883 AssertCompileSize(s_acbCdbOpc, 256 * sizeof(uint8_t)); 1884 1885 1777 1886 VSCSILUNDESC g_VScsiLunTypeMmc = 1778 1887 { … … 1783 1892 /** cbLun */ 1784 1893 sizeof(VSCSILUNMMC), 1894 /** pacbCdbOpc */ 1895 &s_acbCdbOpc[0], 1785 1896 /** cSupOpcInfo */ 1786 1897 0, -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp
r103882 r104221 231 231 else 232 232 { 233 SCSIINQUIRYDATA ScsiInquiryReply; 234 235 vscsiReqSetXferSize(pVScsiReq, RT_MIN(sizeof(SCSIINQUIRYDATA), scsiBE2H_U16(&pVScsiReq->pbCDB[3]))); 236 memset(&ScsiInquiryReply, 0, sizeof(ScsiInquiryReply)); 237 238 ScsiInquiryReply.cbAdditional = 31; 239 ScsiInquiryReply.u5PeripheralDeviceType = SCSI_INQUIRY_DATA_PERIPHERAL_DEVICE_TYPE_DIRECT_ACCESS; 240 ScsiInquiryReply.u3PeripheralQualifier = SCSI_INQUIRY_DATA_PERIPHERAL_QUALIFIER_CONNECTED; 241 ScsiInquiryReply.u3AnsiVersion = 0x05; /* SPC-4 compliant */ 242 ScsiInquiryReply.fCmdQue = 1; /* Command queuing supported. */ 243 ScsiInquiryReply.fWBus16 = 1; 244 245 const char *pszVendorId = "VBOX"; 246 const char *pszProductId = "HARDDISK"; 247 const char *pszProductLevel = "1.0"; 248 int rcTmp = vscsiLunQueryInqStrings(pVScsiLun, &pszVendorId, &pszProductId, &pszProductLevel); 249 Assert(RT_SUCCESS(rcTmp) || rcTmp == VERR_NOT_FOUND); RT_NOREF(rcTmp); 250 251 scsiPadStrS(ScsiInquiryReply.achVendorId, pszVendorId, 8); 252 scsiPadStrS(ScsiInquiryReply.achProductId, pszProductId, 16); 253 scsiPadStrS(ScsiInquiryReply.achProductLevel, pszProductLevel, 4); 254 255 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, (uint8_t *)&ScsiInquiryReply, sizeof(SCSIINQUIRYDATA)); 256 rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); 233 if (pVScsiReq->cbCDB >= 5) 234 { 235 SCSIINQUIRYDATA ScsiInquiryReply; 236 237 vscsiReqSetXferSize(pVScsiReq, RT_MIN(sizeof(SCSIINQUIRYDATA), scsiBE2H_U16(&pVScsiReq->pbCDB[3]))); 238 memset(&ScsiInquiryReply, 0, sizeof(ScsiInquiryReply)); 239 240 ScsiInquiryReply.cbAdditional = 31; 241 ScsiInquiryReply.u5PeripheralDeviceType = SCSI_INQUIRY_DATA_PERIPHERAL_DEVICE_TYPE_DIRECT_ACCESS; 242 ScsiInquiryReply.u3PeripheralQualifier = SCSI_INQUIRY_DATA_PERIPHERAL_QUALIFIER_CONNECTED; 243 ScsiInquiryReply.u3AnsiVersion = 0x05; /* SPC-4 compliant */ 244 ScsiInquiryReply.fCmdQue = 1; /* Command queuing supported. */ 245 ScsiInquiryReply.fWBus16 = 1; 246 247 const char *pszVendorId = "VBOX"; 248 const char *pszProductId = "HARDDISK"; 249 const char *pszProductLevel = "1.0"; 250 int rcTmp = vscsiLunQueryInqStrings(pVScsiLun, &pszVendorId, &pszProductId, &pszProductLevel); 251 Assert(RT_SUCCESS(rcTmp) || rcTmp == VERR_NOT_FOUND); RT_NOREF(rcTmp); 252 253 scsiPadStrS(ScsiInquiryReply.achVendorId, pszVendorId, 8); 254 scsiPadStrS(ScsiInquiryReply.achProductId, pszProductId, 16); 255 scsiPadStrS(ScsiInquiryReply.achProductLevel, pszProductLevel, 4); 256 257 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, (uint8_t *)&ScsiInquiryReply, sizeof(SCSIINQUIRYDATA)); 258 rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); 259 } 260 else 261 rcReq = vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, SCSI_ASC_INVALID_MESSAGE, 0x00); 257 262 } 258 263 break; … … 422 427 423 428 vscsiReqSetXferDir(pVScsiReq, VSCSIXFERDIR_T2I); 424 vscsiReqSetXferSize(pVScsiReq, scsiBE2H_U 16(&pVScsiReq->pbCDB[6]));429 vscsiReqSetXferSize(pVScsiReq, scsiBE2H_U24(&pVScsiReq->pbCDB[6])); 425 430 426 431 switch (uDataMode) … … 630 635 } 631 636 637 638 /** 639 * The supported operation codes for the SBC LUN type. 640 * 641 * @note This gives the minimum size required by our implementation 642 * which may be smaller than what the spec defines (for example 643 * we do not access the control byte at the end). 644 */ 645 static uint8_t s_acbCdbOpc[] = 646 { 647 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0x00 - 0x07 Invalid */ 648 5, /**< 0x08 READ (6) */ 649 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x09 Invalid */ 650 5, /**< 0x0a WRITE (6) */ 651 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x0b Invalid */ 652 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x0c - 0x0f Invalid */ 653 654 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x10 - 0x11 Invalid */ 655 3, /**< 0x12 INQUIRY (at least 3) */ 656 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x13 - 0x14 Invalid */ 657 5, /**< 0x15 MODE SELECT (6) */ 658 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x16 - 0x19 Invalid */ 659 5, /**< 0x1a MODE SENSE (6) */ 660 1, /**< 0x1b START STOP UNIT */ 661 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x1c - 0x1f Invalid */ 662 663 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x20 - 0x23 Invalid */ 664 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x24 Invalid */ 665 1, /**< 0x25 READ CAPACITY */ 666 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x26 - 0x27 Invalid */ 667 9, /**< 0x28 READ (10) */ 668 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x29 Invalid */ 669 9, /**< 0x2a WRITE (10) */ 670 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x2b - 0x2e Invalid */ 671 1, /**< 0x2f VERIFY (10) */ 672 673 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x30 - 0x33 Invalid */ 674 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x34 Invalid */ 675 1, /**< 0x35 SYNCHRONIZE CACHE */ 676 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x36 - 0x39 Invalid */ 677 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x3a - 0x3b Invalid */ 678 8, /**< 0x3c READ BUFFER */ 679 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x3d Invalid */ 680 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x3e - 0x3f Invalid */ 681 682 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x40 - 0x41 Invalid */ 683 9, /**< 0x42 UNMAP */ 684 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x43 Invalid */ 685 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0x44 - 0x4b Invalid */ 686 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x4c Invalid */ 687 9, /**< 0x4d LOG SENSE */ 688 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x4e - 0x4f Invalid */ 689 690 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0x50 - 0x5f Invalid */ 691 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0x60 - 0x6f Invalid */ 692 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0x70 - 0x7f Invalid */ 693 694 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0x80 - 0x87 Invalid */ 695 14, /**< 0x88 READ (16) */ 696 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x89 Invalid */ 697 14, /**< 0x8a WRITE (16) */ 698 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x8b Invalid */ 699 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x8c - 0x8f Invalid */ 700 701 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0x90 - 0x97 Invalid */ 702 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0x98 - 0x9b Invalid */ 703 VSCSI_LUN_CDB_SZ_INVALID_X2, /**< 0x9c - 0x9d Invalid */ 704 2, /**< 0x9e SERVICE ACTION IN (16) (at least 2). */ 705 VSCSI_LUN_CDB_SZ_INVALID, /**< 0x9f Invalid */ 706 707 VSCSI_LUN_CDB_SZ_INVALID_X8, /**< 0xa0 - 0xa7 Invalid */ 708 10, /**< 0xa8 READ (12) */ 709 VSCSI_LUN_CDB_SZ_INVALID, /**< 0xa9 Invalid */ 710 10, /**< 0xaa WRITE (12) */ 711 VSCSI_LUN_CDB_SZ_INVALID, /**< 0xab Invalid */ 712 VSCSI_LUN_CDB_SZ_INVALID_X4, /**< 0xac - 0xaf Invalid */ 713 714 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0xb0 - 0xbf Invalid */ 715 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0xc0 - 0xcf Invalid */ 716 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0xd0 - 0xdf Invalid */ 717 VSCSI_LUN_CDB_SZ_INVALID_X16, /**< 0xe0 - 0xef Invalid */ 718 VSCSI_LUN_CDB_SZ_INVALID_X16 /**< 0xf0 - 0xff Invalid */ 719 }; 720 AssertCompileSize(s_acbCdbOpc, 256 * sizeof(uint8_t)); 721 722 632 723 VSCSILUNDESC g_VScsiLunTypeSbc = 633 724 { … … 638 729 /** cbLun */ 639 730 sizeof(VSCSILUNSBC), 731 /** pacbCdbOpc */ 732 &s_acbCdbOpc[0], 640 733 /** cSupOpcInfo */ 641 734 0, -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSsc.cpp
r103882 r104221 453 453 /** cbLun */ 454 454 sizeof(VSCSILUNSSC), 455 /** pacbCdbOpc */ 456 NULL, 455 457 /** cSupOpcInfo */ 456 458 0,
Note:
See TracChangeset
for help on using the changeset viewer.