VirtualBox

Ignore:
Timestamp:
Jan 17, 2011 8:05:15 PM (14 years ago)
Author:
vboxsync
Message:

Storage/DevATA+ATAController: only allow read/write commands for ATA devices

File:
1 edited

Legend:

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

    r35560 r35595  
    36543654        case ATA_READ_SECTORS:
    36553655        case ATA_READ_SECTORS_WITHOUT_RETRIES:
    3656             if (!s->pDrvBlock)
     3656            if (!s->pDrvBlock || s->fATAPI)
    36573657                goto abort_cmd;
    36583658            s->cSectorsPerIRQ = 1;
     
    36633663        case ATA_WRITE_SECTORS:
    36643664        case ATA_WRITE_SECTORS_WITHOUT_RETRIES:
     3665            if (!s->pDrvBlock || s->fATAPI)
     3666                goto abort_cmd;
    36653667            s->cSectorsPerIRQ = 1;
    36663668            ataStartTransfer(s, ataGetNSectors(s) * 512, PDMBLOCKTXDIR_TO_DEVICE, ATAFN_BT_READ_WRITE_SECTORS, ATAFN_SS_WRITE_SECTORS, false);
     
    36693671            s->fLBA48 = true;
    36703672        case ATA_READ_MULTIPLE:
    3671             if (!s->cMultSectors)
     3673            if (!s->pDrvBlock || !s->cMultSectors || s->fATAPI)
    36723674                goto abort_cmd;
    36733675            s->cSectorsPerIRQ = s->cMultSectors;
     
    36773679            s->fLBA48 = true;
    36783680        case ATA_WRITE_MULTIPLE:
    3679             if (!s->cMultSectors)
     3681            if (!s->pDrvBlock || !s->cMultSectors || s->fATAPI)
    36803682                goto abort_cmd;
    36813683            s->cSectorsPerIRQ = s->cMultSectors;
     
    36863688        case ATA_READ_DMA:
    36873689        case ATA_READ_DMA_WITHOUT_RETRIES:
    3688             if (!s->pDrvBlock)
     3690            if (!s->pDrvBlock || s->fATAPI)
    36893691                goto abort_cmd;
    36903692            s->cSectorsPerIRQ = ATA_MAX_MULT_SECTORS;
     
    36963698        case ATA_WRITE_DMA:
    36973699        case ATA_WRITE_DMA_WITHOUT_RETRIES:
    3698             if (!s->pDrvBlock)
     3700            if (!s->pDrvBlock || s->fATAPI)
    36993701                goto abort_cmd;
    37003702            s->cSectorsPerIRQ = ATA_MAX_MULT_SECTORS;
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