VirtualBox

Changeset 47830 in vbox


Ignore:
Timestamp:
Aug 18, 2013 12:33:32 PM (11 years ago)
Author:
vboxsync
Message:

Devices/Storage: Missing changes

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vscsi.h

    r44528 r47830  
    122122
    123123    /**
     124     * Retrieve the sector size of the underlying medium.
     125     *
     126     * @returns VBox status status code.
     127     * @param   hVScsiLun        Virtual SCSI LUN handle.
     128     * @param   pvScsiLunUser    Opaque user data which may
     129     *                           be used to identify the medium.
     130     * @param   pcbSectorSize    Where to store the sector size of the
     131     *                           medium.
     132     */
     133    DECLR3CALLBACKMEMBER(int, pfnVScsiLunMediumGetSectorSize, (VSCSILUN hVScsiLun,
     134                                                              void *pvScsiLunUser,
     135                                                              uint32_t *pcbSectorSize));
     136
     137    /**
    124138     * Set the lock state of the underlying medium.
    125139     *
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r47829 r47830  
    12561256    p[67] = RT_H2LE_U16(120); /* minimum PIO cycle time without flow control */
    12571257    p[68] = RT_H2LE_U16(120); /* minimum PIO cycle time with IORDY flow control */
    1258     if (s->pDrvBlock->pfnDiscard)
     1258    if (   s->pDrvBlock->pfnDiscard
     1259        || s->cbSector != 512)
    12591260    {
    12601261        p[80] = RT_H2LE_U16(0x1f0); /* support everything up to ATA/ATAPI-8 ACS */
     
    12871288        p[103] = RT_H2LE_U16(s->cTotalSectors >> 48);
    12881289    }
     1290
     1291    if (s->cbSector != 512)
     1292    {
     1293        /* Enable reporting of logical sector size. */
     1294        p[106] |= RT_H2LE_U16(RT_BIT(12));
     1295        p[117] = RT_H2LE_U16(s->cbSector);
     1296        p[118] = RT_H2LE_U16(s->cbSector >> 16);
     1297    }
     1298
    12891299    if (s->pDrvBlock->pfnDiscard) /** @todo: Set bit 14 in word 69 too? (Deterministic read after TRIM). */
    12901300        p[169] = RT_H2LE_U16(1); /* DATA SET MANAGEMENT command supported. */
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