- Timestamp:
- Dec 2, 2010, 1:12:53 PM (15 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/os2ahci.def
r45 r48 1 1 library os2ahci 2 Description '$@#thi.guten (www.thiguten.de):1.00.2010120 1#@OS/2 AHCI Adapter Device Driver'2 Description '$@#thi.guten (www.thiguten.de):1.00.20101202#@OS/2 AHCI Adapter Device Driver' 3 3 protmode 4 4 -
trunk/src/os2ahci/pci.c
r42 r48 179 179 180 180 static char s_generic[] = "Generic"; 181 182 /****************************************************************************** 183 * other strings 184 */ 185 static char s_already_claimed[] = "Warning: device already claimed by other driver.\n"; 181 186 182 187 … … 641 646 case RMRC_DEV_ALREADY_CLAIMED: 642 647 case RMRC_RES_ALREADY_CLAIMED: 643 cprintf( "warning: device already claimed by other driver\n");648 cprintf(s_already_claimed); 644 649 return; 645 650 default: … … 677 682 pci_write_conf(bus, dev_func, AHCI_MMIO, sizeof(u32), mmio_bios); 678 683 } 679 goto add_pci_fail;684 return; 680 685 } 681 686 for (mmio_size = 0x00000010UL; … … 696 701 697 702 if (ret != RMRC_SUCCESS) { 703 if (ret == RMRC_RES_ALREADY_CLAIMED) { 704 /* MT: according to my observations, this is the 2nd place 705 * where we could fail due to the adapter having been already 706 * claimed by another driver... 707 */ 708 cprintf(s_already_claimed); 709 return; 710 } 698 711 /* didn't work; try to find another MMIO region */ 699 cprintf("warning: BIOS MMIO address not accepted by resource manager\n"); 712 cprintf("warning: BIOS MMIO address not accepted by resource manager " 713 "(code %d)\n", ret); 700 714 memset(&resource, 0x00, sizeof(resource)); 701 715 resource.ResourceType = RS_TYPE_MEM; 702 716 resource.MEMResource.MemSize = mmio_size; 703 717 resource.MEMResource.MemFlags = RS_MEM_EXCLUSIVE | RS_SEARCH; 704 718 705 719 ret = RMAllocResource(rm_drvh, &ad_info->rm_mmio, &resource); 706 720 707 721 if (ret == RMRC_SUCCESS) { 708 722 /* MT: got a new address from Resource Manager; now we … … 711 725 */ 712 726 mmio_bios = (mmio_bios & 0x0000000fUL) | 713 727 (resource.MEMResource.MemBase & 0xfffffff0UL); 714 728 ddprintf("address we got from RM: 0x%08lx\n", 715 729 resource.MEMResource.MemBase); 716 730 ddprintf("setting new MMIO addr to 0x%08lx\n", mmio_bios); 717 731 718 732 if (pci_write_conf(bus, dev_func, AHCI_MMIO, 719 733 sizeof(u32), mmio_bios) != OH_SUCCESS) { 720 734 /* failed to update MMIO address - bail out */ 721 722 723 goto add_pci_fail;735 cprintf("error: couldn't update MMIO address\n"); 736 ret = ~RMRC_SUCCESS; 737 return; 724 738 } 725 726 739 } 727 740 } … … 729 742 if (ret != RMRC_SUCCESS) { 730 743 cprintf("error: couldn't register MMIO region (rc = %d)\n", ret); 731 goto add_pci_fail;744 return; 732 745 } 733 746 rc_list->hResource[rc_list->NumResource++] = ad_info->rm_mmio;
Note:
See TracChangeset
for help on using the changeset viewer.