Ignore:
Timestamp:
Feb 15, 2011, 1:18:21 PM (14 years ago)
Author:
chris
Message:
  • Added minimum NCQ depth for SATA devices which don't support NCQ at all
  • Removed ATAPI devices from the flush cache queue as they caused timeouts with a DVD drive in an HP test box
  • Various cosmetic changes to debug levels, etc.
File:
1 edited

Legend:

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

    r69 r71  
    553553
    554554  /* enable interrupts on PCI-level (PCI 2.3 added a feature to disable ints) */
    555   pci_enable_int(ai->bus, ai->dev_func);
     555  /* pci_enable_int(ai->bus, ai->dev_func); */
    556556
    557557  return(0);
     
    11031103int ahci_flush_cache(AD_INFO *ai, int p, int d)
    11041104{
    1105   dprintf("flushing cache on %d.%d.%d\n", ad_no(ai), p, d);
    1106   return(ahci_exec_polled_cmd(ai, p, d, 30000,
    1107                               ai->ports[p].devs[d].lba48 ? ATA_CMD_FLUSH_EXT
    1108                                                          : ATA_CMD_FLUSH,
    1109                               AP_END));
     1105  if (!ai->ports[p].devs[d].atapi) {
     1106    dprintf("flushing cache on %d.%d.%d\n", ad_no(ai), p, d);
     1107    return(ahci_exec_polled_cmd(ai, p, d, 30000,
     1108                                ai->ports[p].devs[d].lba48 ? ATA_CMD_FLUSH_EXT
     1109                                                           : ATA_CMD_FLUSH,
     1110                                AP_END));
     1111  }
    11101112}
    11111113
     
    13971399  int d = iorb_unit_device(iorb);
    13981400
    1399   dphex(((IORB_ADAPTER_PASSTHRU _far *) iorb)->pControllerCmd,
    1400         ((IORB_ADAPTER_PASSTHRU _far *) iorb)->ControllerCmdLen,
    1401         "ahci_execute_cdb(%d.%d.%d)", a, p, d);
    1402 
    14031401  if (ad_infos[a].ports[p].devs[d].atapi) {
    14041402    ahci_exec_iorb(iorb, 0, atapi_execute_cdb);
     
    14711469      dprintf("NCQ off for a:%d p:%d\n", (int) ad_no(ai), p);
    14721470    } else {
    1473       ai->ports[p].devs[d].ncq_max = id_buf[ATA_ID_QUEUE_DEPTH] & 0x001fU;
     1471      ai->ports[p].devs[d].ncq_max = max(1, id_buf[ATA_ID_QUEUE_DEPTH] & 0x001fU);
    14741472      dprintf("NCQ max=%d for a:%d p:%d\n", ai->ports[p].devs[d].ncq_max, (int) ad_no(ai), p);
    14751473    }
     
    15181516  if (ai == ad_infos && p == 7 &&
    15191517      ai->pci->vendor == 0x8086 && ai->pci->device == 0x2829 &&
    1520       !memcmp(ds.DevDescriptName, "VBOX HARDDISK", 13)) {
     1518      !memcmp(ata_dev_name(id_buf), "VBOX HARDDISK", 13)) {
    15211519    /* running inside virtualbox */
    15221520    pci_hack_virtualbox();
Note: See TracChangeset for help on using the changeset viewer.