VirtualBox

Changeset 48399 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Sep 10, 2013 8:36:43 AM (11 years ago)
Author:
vboxsync
Message:

DevAHCI.cpp: Logging nits.

File:
1 edited

Legend:

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

    r47829 r48399  
    25852585}
    25862586
    2587 #ifdef DEBUG
     2587#ifdef LOG_ENABLED
    25882588
    25892589/**
     
    27002700    ahciLog(("%s: *** End command header info dump. ***\n", __FUNCTION__));
    27012701}
    2702 #endif /* DEBUG */
     2702
     2703#endif /* LOG_ENABLED */
    27032704
    27042705/**
     
    42374238                    break;
    42384239                }
    4239                 else if (!pAhciPort->pDrvMount->pfnIsMounted(pAhciPort->pDrvMount))
     4240                if (!pAhciPort->pDrvMount->pfnIsMounted(pAhciPort->pDrvMount))
    42404241                {
    42414242                    atapiCmdErrorSimple(pAhciPort, pAhciReq, SCSI_SENSE_NOT_READY, SCSI_ASC_MEDIUM_NOT_PRESENT);
     
    42584259                     * valid area this often generates too many release log
    42594260                     * entries otherwise. */
    4260                     static uint64_t uLastLogTS = 0;
    4261                     if (RTTimeMilliTS() >= uLastLogTS + 1000)
     4261                    static uint64_t s_uLastLogTS = 0;
     4262                    if (RTTimeMilliTS() >= s_uLastLogTS + 1000)
    42624263                    {
    42634264                        LogRel(("AHCI ATAPI: LUN#%d: CD-ROM block number %Ld invalid (READ)\n", pAhciPort->iLUN, (uint64_t)iATAPILBA + cSectors));
    4264                         uLastLogTS = RTTimeMilliTS();
     4265                        s_uLastLogTS = RTTimeMilliTS();
    42654266                    }
    42664267                    atapiCmdErrorSimple(pAhciPort, pAhciReq, SCSI_SENSE_ILLEGAL_REQUEST, SCSI_ASC_LOGICAL_BLOCK_OOR);
     
    42994300                     * valid area this often generates too many release log
    43004301                     * entries otherwise. */
    4301                     static uint64_t uLastLogTS = 0;
    4302                     if (RTTimeMilliTS() >= uLastLogTS + 1000)
     4302                    static uint64_t s_uLastLogTS = 0;
     4303                    if (RTTimeMilliTS() >= s_uLastLogTS + 1000)
    43034304                    {
    43044305                        LogRel(("AHCI ATA: LUN#%d: CD-ROM block number %Ld invalid (READ CD)\n", pAhciPort->iLUN, (uint64_t)iATAPILBA + cSectors));
    4305                         uLastLogTS = RTTimeMilliTS();
     4306                        s_uLastLogTS = RTTimeMilliTS();
    43064307                    }
    43074308                    atapiCmdErrorSimple(pAhciPort, pAhciReq, SCSI_SENSE_ILLEGAL_REQUEST, SCSI_ASC_LOGICAL_BLOCK_OOR);
     
    43524353                     * valid area this often generates too many release log
    43534354                     * entries otherwise. */
    4354                     static uint64_t uLastLogTS = 0;
    4355                     if (RTTimeMilliTS() >= uLastLogTS + 1000)
     4355                    static uint64_t s_uLastLogTS = 0;
     4356                    if (RTTimeMilliTS() >= s_uLastLogTS + 1000)
    43564357                    {
    43574358                        LogRel(("AHCI ATAPI: LUN#%d: CD-ROM block number %Ld invalid (SEEK)\n", pAhciPort->iLUN, (uint64_t)iATAPILBA));
    4358                         uLastLogTS = RTTimeMilliTS();
     4359                        s_uLastLogTS = RTTimeMilliTS();
    43594360                    }
    43604361                    atapiCmdErrorSimple(pAhciPort, pAhciReq, SCSI_SENSE_ILLEGAL_REQUEST, SCSI_ASC_LOGICAL_BLOCK_OOR);
     
    48234824
    48244825    pbPacket = pAhciReq->aATAPICmd;
    4825 #ifdef DEBUG
    48264826    Log(("%s: LUN#%d CMD=%#04x \"%s\"\n", __FUNCTION__, pAhciPort->iLUN, pbPacket[0], SCSICmdText(pbPacket[0])));
    4827 #else /* !DEBUG */
    4828     Log(("%s: LUN#%d CMD=%#04x\n", __FUNCTION__, pAhciPort->iLUN, pbPacket[0]));
    4829 #endif /* !DEBUG */
    48304827    Log2(("%s: limit=%#x packet: %.*Rhxs\n", __FUNCTION__, pAhciReq->cmdFis[AHCI_CMDFIS_CYLL] | (pAhciReq->cmdFis[AHCI_CMDFIS_CYLH] << 8), ATAPI_PACKET_SIZE, pbPacket));
    48314828
     
    61706167    PDMDevHlpPhysRead(pAhciPort->CTX_SUFF(pDevIns), pAhciReq->GCPhysCmdHdrAddr, &pAhciReq->cmdHdr, sizeof(CmdHdr));
    61716168
    6172 #ifdef DEBUG
     6169#ifdef LOG_ENABLED
    61736170    /* Print some infos about the command header. */
    61746171    ahciDumpCmdHdrInfo(pAhciPort, &pAhciReq->cmdHdr);
     
    62086205    pAhciReq->cPrdtlEntries = AHCI_CMDHDR_PRDTL_ENTRIES(pAhciReq->cmdHdr.u32DescInf);
    62096206
    6210 #ifdef DEBUG
     6207#ifdef LOG_ENABLED
    62116208    /* Print some infos about the FIS. */
    62126209    ahciDumpFisInfo(pAhciPort, &pAhciReq->cmdFis[0]);
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