Ignore:
Timestamp:
Jul 24, 2023, 5:51:46 PM (2 years ago)
Author:
David Azarewicz
Message:

Added workaround to help with VirtualBox issues.
Improved diagnostic messages.
Changed how timeouts are reset and how ctx hooks are triggered.
Added quirk for devices with issues executing some standard commands.
Changed to make /N the default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/trace.c

    r209 r211  
    11/**
    22 *
    3  * Copyright (c) 2013-2021 David Azarewicz <david@88watts.net>
     3 * Copyright (c) 2013-2023 David Azarewicz <david@88watts.net>
    44 *
    55 */
     
    2222    AD_INFO *ai = ad_infos + a;
    2323
    24     dprintf(0,"Adapter %d: PCI=%d:%d:%d ID=%04x:%04x %s %s irq=%d addr=0x%x version=%x\n", a,
    25       PCI_BUS_FROM_BDF(ai->bus_dev_func), PCI_DEV_FROM_BDF(ai->bus_dev_func),
    26       PCI_FUNC_FROM_BDF(ai->bus_dev_func),
    27       ai->pci_vendor, ai->pci_device, vendor_from_id(ai->pci_vendor), ai->pci->chipname,
     24    dprintf(0,"Adapter %d: %d:%d:%d ID=%04x:%04x %s %s irq=%d adr=%x version=%x\n", a,
     25      PCI_BUS_FROM_BDF(ai->BusDevFunc), PCI_DEV_FROM_BDF(ai->BusDevFunc),
     26      PCI_FUNC_FROM_BDF(ai->BusDevFunc),
     27      ai->PciVendor, ai->PciDevice, vendor_from_id(ai->PciVendor), ai->pChipName,
    2828      ai->irq, ai->mmio_phys,
    2929      ai->bios_config[HOST_VERSION / sizeof(u32)]);
     
    6363
    6464#ifdef DEBUG
    65 void DumpIorb(IORBH *pIorb)
     65void DumpIorb(IORBH *pIorb, IORBH FAR16DATA *vIorb)
    6666{
    67   if (!(D32g_DbgLevel & DBG_DETAILED)) return;
    68   if (!ad_infos[iorb_unit_adapter(pIorb)].ports[iorb_unit_port(pIorb)].devs[iorb_unit_device(pIorb)].atapi) return;
     67  //if (!(D32g_DbgLevel & DBG_DETAILED)) return;
     68  if (ad_infos[iorb_unit_adapter(pIorb)].ports[iorb_unit_port(pIorb)].devs[iorb_unit_device(pIorb)].atapi) return;
    6969
    7070  dprintf(0,"IORB %x: Size=%x Len=%x Handle=%x CmdCode=%x\n",
    71       pIorb, sizeof(IORBH), pIorb->Length, pIorb->UnitHandle, pIorb->CommandCode);
     71      vIorb, sizeof(IORBH), pIorb->Length, pIorb->UnitHandle, pIorb->CommandCode);
    7272  dprintf(0,"  CmdMod=%x ReqCtrl=%x Status=%x ErrorCode=%x\n",
    7373      pIorb->CommandModifier, pIorb->RequestControl, pIorb->Status, pIorb->ErrorCode);
     
    7575      pIorb->Timeout, pIorb->StatusBlockLen, pIorb->pStatusBlock, pIorb->Reserved_1,
    7676      pIorb->f16NxtIORB);
     77
     78  if (pIorb->CommandCode == IOCC_EXECUTE_IO || pIorb->CommandCode == IOCC_EXECUTE_IO_64)
     79  {
     80    IORB_EXECUTEIO64 *pIo = (IORB_EXECUTEIO64*)pIorb;
     81    ULONGLONG ullLba;
     82
     83    ullLba = pIo->RBA;
     84    if (pIorb->CommandCode == IOCC_EXECUTE_IO_64) ullLba = pIo->ullRBA;
     85
     86    dprintf(0,"  I/O: Block=%llx Count=%x Xferred=%x Size=%x Flags=%x\n",
     87      ullLba, pIo->BlockCount, pIo->BlocksXferred, pIo->BlockSize, pIo->Flags);
     88  }
    7789}
    7890#endif
Note: See TracChangeset for help on using the changeset viewer.