Changeset 122 for trunk/src/os2ahci/pci.c
- Timestamp:
- Sep 1, 2011, 1:32:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/pci.c
r112 r122 417 417 memset(&parm, 0x00, sizeof(parm)); 418 418 if (oemhlp_call(OH_BIOS_INFO, &parm, &data) != OH_SUCCESS) { 419 cprintf(" couldn't get PCI BIOS information\n");419 cprintf("%s: couldn't get PCI BIOS information\n", drv_name); 420 420 return; 421 421 } … … 614 614 615 615 /* found a supported AHCI device */ 616 if (verbosity > 0) { 617 cprintf("found AHCI device: %s %s (%04x:%04x)\n" 616 cvvprintf("found AHCI device: %s %s (%04x:%04x)\n" 618 617 " class:0x%06lx bus:%d devfunc:0x%02x\n", 619 618 vendor_from_id(vendor), device_from_id(device), 620 619 vendor, device, 621 620 class, bus, dev_func); 622 }623 621 624 622 /* make sure we got room in the adapter information array */ 625 623 if (ad_info_cnt >= MAX_AD - 1) { 626 cprintf(" error: too many AHCI devices\n");624 cprintf("%s: too many AHCI devices\n", drv_name); 627 625 return; 628 626 } … … 665 663 ret = RMAllocResource(rm_drvh, &ad_info->rm_irq, &resource); 666 664 if (ret != RMRC_SUCCESS) { 667 cprintf(" error: couldn't register IRQ %d (rc = %s)\n", irq, rmerr(ret));665 cprintf("%s: couldn't register IRQ %d (rc = %s)\n", drv_name, irq, rmerr(ret)); 668 666 return; 669 667 } … … 689 687 if (i == AHCI_PCI_BAR) { 690 688 if (resource.ResourceType != RS_TYPE_MEM) { 691 cprintf(" error: BAR #5 must be an MMIO region\n");689 cprintf("%s: BAR #5 must be an MMIO region\n", drv_name); 692 690 goto add_pci_fail; 693 691 } … … 700 698 ret = RMAllocResource(rm_drvh, ad_info->rm_bars + i, &resource); 701 699 if (ret != RMRC_SUCCESS) { 702 cprintf("error: couldn't register [MM]IO region (rc = %s)\n", rmerr(ret)); 700 cprintf("%s: couldn't register [MM]IO region (rc = %s)\n", 701 drv_name, rmerr(ret)); 703 702 goto add_pci_fail; 704 703 } … … 707 706 708 707 if (ad_info->mmio_phys == 0) { 709 cprintf(" error: couldn't determine MMIO base address\n");708 cprintf("%s: couldn't determine MMIO base address\n", drv_name); 710 709 goto add_pci_fail; 711 710 } … … 724 723 if (DevHelp_AllocPhys((long) AHCI_PORT_PRIV_DMA_SZ * AHCI_MAX_PORTS, 725 724 MEMTYPE_ABOVE_1M, &ad_info->dma_buf_phys) != 0) { 726 cprintf(" error: couldn't allocate DMA scratch buffers for AHCI ports\n");725 cprintf("%s: couldn't allocate DMA scratch buffers for AHCI ports\n", drv_name); 727 726 ad_info->dma_buf_phys = 0; 728 727 goto add_pci_fail; … … 731 730 /* allocate GDT selectors for memory-mapped I/O and DMA scratch buffers */ 732 731 if (DevHelp_AllocGDTSelector(gdt, PORT_DMA_BUF_SEGS + 1) != 0) { 733 cprintf(" error: couldn't allocate GDT selectors\n");732 cprintf("%s: couldn't allocate GDT selectors\n", drv_name); 734 733 memset(gdt, 0x00, sizeof(gdt)); 735 734 goto add_pci_fail; … … 739 738 if (DevHelp_PhysToGDTSelector(ad_info->mmio_phys, 740 739 (USHORT) ad_info->mmio_size, gdt[0]) != 0) { 741 cprintf(" error: couldn't map MMIO address to GDT selector\n");740 cprintf("%s: couldn't map MMIO address to GDT selector\n", drv_name); 742 741 goto add_pci_fail; 743 742 } … … 749 748 750 749 if (DevHelp_PhysToGDTSelector(addr, len, gdt[i+1]) != 0) { 751 cprintf(" error: couldn't map DMA scratch buffer to GDT selector\n");750 cprintf("%s: couldn't map DMA scratch buffer to GDT selector\n", drv_name); 752 751 goto add_pci_fail; 753 752 } … … 780 779 ret = RMCreateAdapter(rm_drvh, &ad_info->rm_adh, &adapter, NULL, rc_list); 781 780 if (ret != RMRC_SUCCESS) { 782 cprintf(" error: couldn't register adapter (rc = %s)\n", rmerr(ret));781 cprintf("%s: couldn't register adapter (rc = %s)\n", drv_name, rmerr(ret)); 783 782 goto add_pci_fail; 784 783 } … … 827 826 parm.read_config.size = size; 828 827 if ((rc = oemhlp_call(OH_READ_CONFIG, &parm, &data) != OH_SUCCESS)) { 829 cprintf(" error: couldn't read config space (bus = %d, dev_func = 0x%02x, indx = 0x%02x, rc = %d)\n",830 bus, dev_func, indx, rc);828 cprintf("%s: couldn't read config space (bus = %d, dev_func = 0x%02x, indx = 0x%02x, rc = %d)\n", 829 drv_name, bus, dev_func, indx, rc); 831 830 return(rc); 832 831 } … … 854 853 855 854 if ((rc = oemhlp_call(OH_WRITE_CONFIG, &parm, &data) != OH_SUCCESS)) { 856 cprintf(" error: couldn't write config space (bus = %d, dev_func = 0x%02x, indx = 0x%02x, rc = %d)\n",857 bus, dev_func, indx, rc);855 cprintf("%s: couldn't write config space (bus = %d, dev_func = 0x%02x, indx = 0x%02x, rc = %d)\n", 856 drv_name, bus, dev_func, indx, rc); 858 857 return(rc); 859 858 } … … 877 876 oemhlp.ProtIDCEntry == NULL || 878 877 oemhlp.ProtIDC_DS == 0) { 879 cprintf(" couldn't attach to OEMHLP$\n");878 cprintf("%s: couldn't attach to OEMHLP$\n", drv_name); 880 879 return(OH_NOT_SUPPORTED); 881 880 } … … 973 972 pci_write_conf(bus, dev_func, PCI_BAR(i), sizeof(u32), bar_addr) != OH_SUCCESS) { 974 973 975 cprintf(" error: couldn't determine [MM]IO size\n");974 cprintf("%s: couldn't determine [MM]IO size\n", drv_name); 976 975 if (bar_addr != 0) { 977 976 pci_write_conf(bus, dev_func, PCI_BAR(i), sizeof(u32), bar_addr);
Note:
See TracChangeset
for help on using the changeset viewer.