Ignore:
Timestamp:
Jul 17, 2017, 4:31:51 AM (8 years ago)
Author:
David Azarewicz
Message:

Added MSI support.

File:
1 edited

Legend:

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

    r188 r190  
    513513  rc_list->NumResource = 0;
    514514
    515   /* Register IRQ with resource manager */
    516   ret = RmAddIrq(rm_drvh, &ad_info->rm_irq, irq, pin);
    517   if (ret)
    518   {
    519     if (ret == RMRC_RES_ALREADY_CLAIMED)
    520     {
    521       ciiprintf("Device already claimed.");
    522     }
    523     else
    524     {
    525       iprintf("%s: couldn't register IRQ %d (rc = %s)", drv_name, irq, rmerr(ret));
    526     }
    527     return;
    528   }
    529   rc_list->hResource[rc_list->NumResource++] = ad_info->rm_irq;
    530 
    531515  /* Allocate all I/O and MMIO addresses offered by this device. In theory,
    532516   * we need only BAR #5, the AHCI MMIO BAR, but in order to prevent any
     
    600584  ad_info->bus_dev_func = BusDevFunc;
    601585  ad_info->irq = irq;
     586  ad_info->irq_pin = pin;
    602587
    603588  ad_info->mmio = MapPhysToLin(ad_info->mmio_phys, ad_info->mmio_size);
     
    612597
    613598  memset(&adapter, 0x00, sizeof(adapter));
    614   sprintf(tmp, "AHCI_%d Controller", ad_info_cnt);
     599  snprintf(tmp, sizeof(tmp), "AHCI_%d Controller", ad_info_cnt);
    615600  adapter.AdaptDescriptName = tmp;
    616601  adapter.AdaptFlags        = 0;
     
    650635  return;
    651636
    652 
    653637add_pci_fail:
    654638  /* something went wrong; try to clean up as far as possible */
     
    657641    if (ad_info->rm_bars[i] != 0) RMDeallocResource(rm_drvh, ad_info->rm_bars[i]);
    658642  }
    659   if (ad_info->rm_irq != 0) RMDeallocResource(rm_drvh, ad_info->rm_irq);
    660643}
    661644
Note: See TracChangeset for help on using the changeset viewer.