Changeset 184
- Timestamp:
- Dec 15, 2016, 12:31:51 AM (9 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r180 r184 14 14 BLD_MINOR=01 # must be 2 digits 15 15 BLD_REV=0 # not used at this time 16 FIXPACK=Test Build17 16 18 17 !ifndef %ROOT 19 ROOT=$+$(%cwd)$- 20 !e lse18 !error ROOT must be set in the environment. 19 !endif 21 20 ROOT=$(%ROOT) 22 !endif23 21 24 22 !ifndef %WATCOM # if not defined in the environment … … 51 49 !endif 52 50 51 !ifdef %FIXPACK 52 FIXPACK=$(%FIXPACK) 53 !endif 54 53 55 VERSION=$(BLD_MAJOR).$(BLD_MINOR) 54 56 ZIPDIR=$(ROOT)\tmp … … 73 75 74 76 !ifdef __LOADDLL__ 75 !loaddll wcc $(WATCOM)\BINP\DLL\wccd.dll77 !loaddll wcc386 $(WATCOM)\BINP\DLL\wccd386.dll 76 78 !loaddll wlink $(WATCOM)\BINP\DLL\wlinkd.dll 77 79 !endif … … 80 82 AFLAGS=-q -6p -bt=os2 -wx -d1 81 83 CFLAGS =-q -bt=os2 -6s -olinar -s -ze -zl -zq -zfp -zgp -ms -wx -zp1 -ecs -ei -za99 82 CFLAGS_DEBUG=-q -bt=os2 -6s -olinar -s -ze -zl -zq -zfp -zgp -ms -wx -zp1 -ecs -ei -za99 83 !ifneq FIXPACK 84 CFLAGS+= -DTESTVER 84 85 !ifdef DEBUG 86 CDEFS=-DDEBUG 87 O=Debug 88 !else 89 CDEFS= 90 O=Retail 85 91 !endif 86 92 87 ############################################################################### 88 # Main dependencies 93 !ifneq FIXPACK 94 CDEFS+= -DTESTVER 95 !endif 89 96 90 97 LIBS = $(DRV32KIT)\Drv32.lib $(DDK)\base32\lib\kee.lib 91 98 92 OBJS = os2ahci.obj pci.obj ahci.obj ata.objatapi.obj &93 ctxhook.obj trace.obj ioctl.obj apm.objthunk.obj99 OBJS = $(O)\os2ahci.obj $(O)\pci.obj $(O)\ahci.obj $(O)\ata.obj $(O)\atapi.obj & 100 $(O)\ctxhook.obj $(O)\trace.obj $(O)\ioctl.obj $(O)\apm.obj $(O)\thunk.obj 94 101 95 INCS = os2ahci.h ahci.h 102 .asm.obj: .autodepend 103 $(AS) $(AFLAGS) -fo=$^@ $[@ 104 #wdis -l $^@ 96 105 97 all: os2ahci.add os2ahci.sym 106 .c.obj: .autodepend 107 $(CC) $(CFLAGS) $(CDEFS) -fo=$^@ $[@ 108 wdis -l $^@ 98 109 99 clean: .symbolic 100 rm -f $(OBJS) os2ahci.add *.cod *.lst *.def *.map *.sym *.err *.lnk version.h 110 all: directory $(O)\os2ahci.add $(O)\os2ahci.sym 101 111 102 ############################################################################### 103 # Object/source dependencies 104 105 os2ahci.obj: os2ahci.c Makefile $(INCS) version.h ioctl.h 106 107 pci.obj: pci.c Makefile $(INCS) 108 109 ahci.obj: ahci.c Makefile $(INCS) ata.h atapi.h 110 111 ata.obj: ata.c Makefile $(INCS) ata.h 112 113 atapi.obj: atapi.c Makefile $(INCS) atapi.h ata.h 114 115 ctxhook.obj: ctxhook.c Makefile $(INCS) ata.h atapi.h 116 117 apm.obj: apm.c Makefile $(INCS) 118 119 ioctl.obj: ioctl.c Makefile $(INCS) ioctl.h atapi.h 120 121 trace.obj: trace.c Makefile $(INCS) 122 123 ############################################################################### 124 # Action definitions (compile/link commands) 112 directory: .symbolic 113 $(ROOT)\Tools\createpath.cmd $(O) 125 114 126 115 version.h: Makefile .always … … 135 124 @AddToFile $^@,$#define BLDLEVEL,BLDLEVEL2,$(VENDOR),$(VERSION),AHCI Driver (c) %Y $(VENDOR),$(FIXPACK) 136 125 137 .asm.obj: .autodepend 138 $(AS) $(AFLAGS) $(AS_INCLUDE) $[@ 139 #wdis -l $^@ 140 141 .c.obj: .autodepend 142 $(CC) $(CFLAGS) $[@ 143 wdis -l $^@ 144 145 os2ahci.add: version.h $(OBJS) makefile 126 $(O)\os2ahci.add: version.h $(OBJS) Makefile 146 127 @%create $^&.lrf 147 128 @%append $^&.lrf format os2 lx phys … … 168 149 @%erase $^&.lrf 169 150 170 os2ahci.sym:os2ahci.map151 $(O)\os2ahci.sym: $(O)\os2ahci.map 171 152 wat2map.cmd $[@ $^*.ma1 172 $(MAPSYM) $^*.ma1 173 @%erase $^*.ma1 153 cd $(O) 154 $(MAPSYM) $^&.ma1 155 @%erase $^&.ma1 156 cd .. 174 157 175 release: os2ahci.addos2ahci.sym .symbolic158 release: $(O)\os2ahci.add $(O)\os2ahci.sym .symbolic 176 159 @if exist $(WPIFILE) @del $(WPIFILE) 177 160 @!rm -rf $(ZIPDIR) … … 180 163 181 164 @md $(ZIPDIR)\pkg1 182 @copy /b $(ROOT)\src\os2ahci\ os2ahci.add $(ZIPDIR)\pkg1 >NUL183 @copy /b $(ROOT)\src\os2ahci\ os2ahci.sym $(ZIPDIR)\pkg1 >NUL165 @copy /b $(ROOT)\src\os2ahci\$(O)\os2ahci.add $(ZIPDIR)\pkg1 >NUL 166 @copy /b $(ROOT)\src\os2ahci\$(O)\os2ahci.sym $(ZIPDIR)\pkg1 >NUL 184 167 185 168 @md $(ZIPDIR)\pkg2 … … 200 183 @!rm -rf $(ZIPDIR) 201 184 185 clean: .symbolic 186 rm -f *.def *.err *.lnk version.h 187 @if exist Debug @!rm -r Debug 188 @if exist Retail @!rm -r Retail 189 190 -
trunk/src/os2ahci/ahci.c
r183 r184 148 148 if (i == HOST_VERSION) version = val; 149 149 150 NTPRINTF(" %02x: %08lx", i, val);150 dprintf(0," %02x: %08lx", i, val); 151 151 152 152 if (i == HOST_CAP) { 153 NTPRINTF(" -");154 if (val & HOST_CAP_64) NTPRINTF(" 64bit");155 if (val & HOST_CAP_NCQ) NTPRINTF(" ncq");156 if (val & HOST_CAP_SNTF) NTPRINTF(" sntf");157 if (val & HOST_CAP_MPS) NTPRINTF(" mps");158 if (val & HOST_CAP_SSS) NTPRINTF(" sss");159 if (val & HOST_CAP_ALPM) NTPRINTF(" alpm");160 if (val & HOST_CAP_LED) NTPRINTF(" led");161 if (val & HOST_CAP_CLO) NTPRINTF(" clo");162 if (val & HOST_CAP_ONLY) NTPRINTF(" ahci_only");163 if (val & HOST_CAP_PMP) NTPRINTF(" pmp");164 if (val & HOST_CAP_FBS) NTPRINTF(" fbs");165 if (val & HOST_CAP_PIO_MULTI) NTPRINTF(" pio_multi");166 if (val & HOST_CAP_SSC) NTPRINTF(" ssc");167 if (val & HOST_CAP_PART) NTPRINTF(" part");168 if (val & HOST_CAP_CCC) NTPRINTF(" ccc");169 if (val & HOST_CAP_EMS) NTPRINTF(" ems");170 if (val & HOST_CAP_SXS) NTPRINTF(" sxs");171 NTPRINTF(" cmd_slots:%d", ((val >> 8) & 0x1f) + 1);172 NTPRINTF(" ports:%d", (val & 0x1f) + 1);153 dprintf(0," -"); 154 if (val & HOST_CAP_64) dprintf(0," 64bit"); 155 if (val & HOST_CAP_NCQ) dprintf(0," ncq"); 156 if (val & HOST_CAP_SNTF) dprintf(0," sntf"); 157 if (val & HOST_CAP_MPS) dprintf(0," mps"); 158 if (val & HOST_CAP_SSS) dprintf(0," sss"); 159 if (val & HOST_CAP_ALPM) dprintf(0," alpm"); 160 if (val & HOST_CAP_LED) dprintf(0," led"); 161 if (val & HOST_CAP_CLO) dprintf(0," clo"); 162 if (val & HOST_CAP_ONLY) dprintf(0," ahci_only"); 163 if (val & HOST_CAP_PMP) dprintf(0," pmp"); 164 if (val & HOST_CAP_FBS) dprintf(0," fbs"); 165 if (val & HOST_CAP_PIO_MULTI) dprintf(0," pio_multi"); 166 if (val & HOST_CAP_SSC) dprintf(0," ssc"); 167 if (val & HOST_CAP_PART) dprintf(0," part"); 168 if (val & HOST_CAP_CCC) dprintf(0," ccc"); 169 if (val & HOST_CAP_EMS) dprintf(0," ems"); 170 if (val & HOST_CAP_SXS) dprintf(0," sxs"); 171 dprintf(0," cmd_slots:%d", ((val >> 8) & 0x1f) + 1); 172 dprintf(0," ports:%d", (val & 0x1f) + 1); 173 173 } else if (i == HOST_CTL) { 174 NTPRINTF(" -");175 if (val & HOST_AHCI_EN) NTPRINTF(" ahci_enabled");176 if (val & HOST_IRQ_EN) NTPRINTF(" irq_enabled");177 if (val & HOST_RESET) NTPRINTF(" resetting");174 dprintf(0," -"); 175 if (val & HOST_AHCI_EN) dprintf(0," ahci_enabled"); 176 if (val & HOST_IRQ_EN) dprintf(0," irq_enabled"); 177 if (val & HOST_RESET) dprintf(0," resetting"); 178 178 } else if (i == HOST_CAP2) { 179 NTPRINTF(" -");180 if (val & HOST_CAP2_BOH) NTPRINTF(" boh");181 if (val & HOST_CAP2_NVMHCI) NTPRINTF(" nvmhci");182 if (val & HOST_CAP2_APST) NTPRINTF(" apst");183 } 184 NTPRINTF("\n");179 dprintf(0," -"); 180 if (val & HOST_CAP2_BOH) dprintf(0," boh"); 181 if (val & HOST_CAP2_NVMHCI) dprintf(0," nvmhci"); 182 if (val & HOST_CAP2_APST) dprintf(0," apst"); 183 } 184 dprintf(0,"\n"); 185 185 } 186 186 } … … 228 228 if (ai->pci->board >= sizeof(initial_flags) / sizeof(*initial_flags)) 229 229 { 230 DPRINTF(0,"error: invalid board index in PCI info\n");230 dprintf(0,"error: invalid board index in PCI info\n"); 231 231 return(-1); 232 232 } … … 446 446 while (((tmp = readl(ai->mmio + HOST_CTL)) & HOST_RESET) != 0) { 447 447 if (TimerCheckAndBlock(&Timer)) { 448 DPRINTF(0,"controller reset failed (0x%x)\n", tmp);448 dprintf(0,"controller reset failed (0x%x)\n", tmp); 449 449 return(-1); 450 450 } … … 558 558 559 559 /* couldn't enable AHCI mode */ 560 DPRINTF(0,"failed to enable AHCI mode on adapter %d\n", ad_no(ai));560 dprintf(0,"failed to enable AHCI mode on adapter %d\n", ad_no(ai)); 561 561 return(1); 562 562 } … … 635 635 636 636 #ifdef DAZ_NEW_CODE 637 ai->ports[p].dma_buf = MemAlloc (AHCI_PORT_PRIV_DMA_SZ);637 ai->ports[p].dma_buf = MemAllocAlign(AHCI_PORT_PRIV_DMA_SZ, 1024); 638 638 ai->ports[p].dma_buf_phys = MemPhysAdr(ai->ports[p].dma_buf); 639 639 #endif … … 714 714 if (Dev32Help_SetIRQ(irq_handlers[irq_map_cnt], ai->irq, 0) != 0) 715 715 { 716 DPRINTF(0,"failed to register exclusive interrupt\n");716 dprintf(0,"failed to register exclusive interrupt\n"); 717 717 return(-1); 718 718 } … … 963 963 if ((rc = ahci_stop_fis_rx(ai, p)) != 0) 964 964 { 965 DPRINTF(0,"error: failed to stop FIS receive (%d)\n", rc);965 dprintf(0,"error: failed to stop FIS receive (%d)\n", rc); 966 966 return(rc); 967 967 } … … 970 970 if ((rc = ahci_stop_engine(ai, p)) != 0) 971 971 { 972 DPRINTF(0,"error: failed to stop port HW engine (%d)\n", rc);972 dprintf(0,"error: failed to stop port HW engine (%d)\n", rc); 973 973 return(rc); 974 974 } … … 1632 1632 * reset, or worse. 1633 1633 */ 1634 ai->ports[p].error_count++; 1635 1634 1636 if (irq_stat & PORT_IRQ_UNK_FIS) 1635 1637 { … … 1642 1644 if (irq_stat & (PORT_IRQ_HBUS_ERR | PORT_IRQ_HBUS_DATA_ERR)) 1643 1645 { 1644 DPRINTF(0,"warning: host bus [data] error for port #%d\n", p);1646 dprintf(0,"warning: host bus [data] error for port #%d\n", p); 1645 1647 reset_port = 1; 1646 1648 } 1647 1649 if (irq_stat & PORT_IRQ_IF_ERR && !(ai->flags & AHCI_HFLAG_IGN_IRQ_IF_ERR)) 1648 1650 { 1649 DPRINTF(0,"warning: interface fatal error for port #%d\n", p);1651 dprintf(0,"warning: interface fatal error for port #%d\n", p); 1650 1652 reset_port = 1; 1651 1653 } … … 1661 1663 } 1662 1664 1663 DPRINTF(0,"port #%d interrupt error status: 0x%08lx; restarting port\n", p, irq_stat);1665 dprintf(0,"port #%d interrupt error status: 0x%08lx; restarting port\n", p, irq_stat); 1664 1666 1665 1667 /* Handle device-specific errors. Those errors typically involve restarting … … 1677 1679 void ahci_get_geometry(IORBH FAR16DATA *vIorb, IORBH *pIorb) 1678 1680 { 1679 #ifdef DEBUG1680 1681 DPRINTF(7,"ahci_get_geometry(%d.%d.%d)\n", iorb_unit_adapter(pIorb), 1681 1682 iorb_unit_port(pIorb), iorb_unit_device(pIorb)); 1682 #endif1683 1683 1684 1684 ahci_exec_iorb(vIorb, pIorb, 0, cmd_func(pIorb, get_geometry)); … … 1690 1690 void ahci_unit_ready(IORBH FAR16DATA *vIorb, IORBH *pIorb) 1691 1691 { 1692 #ifdef DEBUG1693 1692 DPRINTF(7,"ahci_unit_ready(%d.%d.%d)\n", iorb_unit_adapter(pIorb), 1694 1693 iorb_unit_port(pIorb), iorb_unit_device(pIorb)); 1695 #endif1696 1694 1697 1695 ahci_exec_iorb(vIorb, pIorb, 0, cmd_func(pIorb, unit_ready)); … … 1703 1701 void ahci_read(IORBH FAR16DATA *vIorb, IORBH *pIorb) 1704 1702 { 1705 #ifdef DEBUG1706 1703 DPRINTF(7,"ahci_read(%d.%d.%d, %d, %d)\n", iorb_unit_adapter(vIorb), 1707 1704 iorb_unit_port(pIorb), iorb_unit_device(pIorb), 1708 1705 ((IORB_EXECUTEIO *) pIorb)->RBA, 1709 1706 ((IORB_EXECUTEIO *) pIorb)->BlockCount); 1710 #endif1711 1707 1712 1708 ahci_exec_iorb(vIorb, pIorb, 1, cmd_func(pIorb, read)); … … 1718 1714 void ahci_verify(IORBH FAR16DATA *vIorb, IORBH *pIorb) 1719 1715 { 1720 #ifdef DEBUG1721 1716 DPRINTF(7,"ahci_verify(%d.%d.%d, %d, %d)\n", iorb_unit_adapter(pIorb), 1722 1717 iorb_unit_port(pIorb), iorb_unit_device(pIorb), 1723 1718 ((IORB_EXECUTEIO *)pIorb)->RBA, 1724 1719 ((IORB_EXECUTEIO *)pIorb)->BlockCount); 1725 #endif1726 1720 1727 1721 ahci_exec_iorb(vIorb, pIorb, 0, cmd_func(pIorb, verify)); … … 1733 1727 void ahci_write(IORBH FAR16DATA *vIorb, IORBH *pIorb) 1734 1728 { 1735 #ifdef DEBUG1736 1729 DPRINTF(7,"ahci_write(%d.%d.%d, %d, %d)\n", iorb_unit_adapter(pIorb), 1737 1730 iorb_unit_port(pIorb), iorb_unit_device(pIorb), 1738 1731 ((IORB_EXECUTEIO *)pIorb)->RBA, 1739 1732 ((IORB_EXECUTEIO *)pIorb)->BlockCount); 1740 #endif1741 1733 1742 1734 ahci_exec_iorb(vIorb, pIorb, 1, cmd_func(pIorb, write)); -
trunk/src/os2ahci/ata.c
r182 r184 136 136 if (ata_cmd.lba_l & 0xf0000000UL) 137 137 { 138 DPRINTF(0,"error: LBA-28 address %d has more than 28 bits\n", ata_cmd.lba_l);138 dprintf(0,"error: LBA-28 address %d has more than 28 bits\n", ata_cmd.lba_l); 139 139 return(ATA_CMD_INVALID_PARM); 140 140 } … … 187 187 188 188 default: 189 DPRINTF(0,"error: v_ata_cmd() called with invalid parameter type (%d)\n", (int) ap);189 dprintf(0,"error: v_ata_cmd() called with invalid parameter type (%d)\n", (int) ap); 190 190 return(ATA_CMD_INVALID_PARM); 191 191 } … … 267 267 { 268 268 /* couldn't store all S/G elements in our DMA buffer */ 269 DPRINTF(0,"ata_cmd(): too many S/G elements\n");269 dprintf(0,"ata_cmd(): too many S/G elements\n"); 270 270 return(i - 1); 271 271 } 272 272 if ((sg_addr & 1) || (chunk & 1)) 273 273 { 274 DPRINTF(0,"error: ata_cmd() called with unaligned S/G element(s)\n");274 dprintf(0,"error: ata_cmd() called with unaligned S/G element(s)\n"); 275 275 return(ATA_CMD_UNALIGNED_ADDR); 276 276 } … … 641 641 { 642 642 /* more than 32 bits for number of sectors */ 643 DPRINTF(0,"warning: limiting disk %d.%d.%d to 2TB\n",643 dprintf(0,"warning: limiting disk %d.%d.%d to 2TB\n", 644 644 iorb_unit_adapter(pIorb), iorb_unit_port(pIorb), 645 645 iorb_unit_device(pIorb)); … … 834 834 835 835 DPRINTF(7,"ata_read_unaligned(%d.%d.%d, %d)\n", ad_no(ai), p, d, sector); 836 ai->ports[p].unaligned_read_count++; 836 837 837 838 /* allocate transfer buffer */ -
trunk/src/os2ahci/atapi.c
r181 r184 175 175 SET_CDB_32(cdb.trans_len, 1UL); 176 176 177 ai->ports[p].unaligned_read_count++; 177 178 DPRINTF(4, "atapi_read_unaligned\n"); 178 179 -
trunk/src/os2ahci/ctxhook.c
r181 r184 94 94 IORBH FAR16DATA *vProblemIorb; 95 95 IORBH FAR16DATA *vIorb; 96 IORBH FAR16DATA *vNext = NULL;96 IORBH FAR16DATA *vNext; 97 97 u8 *port_mmio; 98 int rearm_ctx_hook = 0;98 int rearm_ctx_hook; 99 99 int need_reset; 100 100 int ccs; … … 103 103 104 104 D32ThunkStackTo32(); 105 106 vNext = NULL; 107 rearm_ctx_hook = 0; 105 108 106 109 DPRINTF(8,"restart_ctxhook() started\n"); … … 329 332 AD_INFO *ai; 330 333 IORBH FAR16DATA *vIorb; 331 IORBH FAR16DATA *vNext = NULL;332 int rearm_ctx_hook = 0;334 IORBH FAR16DATA *vNext; 335 int rearm_ctx_hook; 333 336 int a; 334 337 int p; 335 338 336 339 D32ThunkStackTo32(); 340 341 vNext = NULL; 342 rearm_ctx_hook = 0; 337 343 338 344 DPRINTF(8,"reset_ctxhook() started\n"); -
trunk/src/os2ahci/os2ahci.c
r181 r184 422 422 if (com_baud) InitComPort(com_baud); 423 423 424 NTPRINTF("BldLevel: %s\n", BldLevel);425 NTPRINTF("CmdLine: %s\n", cmd_line);424 dprintf(0,"BldLevel: %s\n", BldLevel); 425 dprintf(0,"CmdLine: %s\n", cmd_line); 426 426 /* 427 427 if (sizeof(ADD_WORKSPACE) > ADD_WORKSPACE_SIZE) … … 634 634 635 635 /* unit handle outside of the allowed range */ 636 DPRINTF(0,"warning: IORB for %d.%d.%d out of range\n", a, p, d);636 dprintf(0,"warning: IORB for %d.%d.%d out of range\n", a, p, d); 637 637 pIorb->Status = IORB_ERROR; 638 638 pIorb->ErrorCode = IOERR_CMD_SYNTAX; … … 1077 1077 if ((u32)(pPtr + 1) - (u32)pDt > pIorb_conf->DeviceTableLen) 1078 1078 { 1079 DPRINTF(0,"error: device table provided by DASD too small\n");1079 dprintf(0,"error: device table provided by DASD too small\n"); 1080 1080 iorb_seterr(pIorb, IOERR_CMD_SW_RESOURCE); 1081 1081 goto iocm_device_table_done; … … 1106 1106 if (ad_info->busy) 1107 1107 { 1108 DPRINTF(0,"error: port scan requested while adapter was busy\n");1108 dprintf(0,"error: port scan requested while adapter was busy\n"); 1109 1109 iorb_seterr(pIorb, IOERR_CMD_SW_RESOURCE); 1110 1110 goto iocm_device_table_done; … … 1118 1118 if (rc != 0) 1119 1119 { 1120 DPRINTF(0,"error: port scan failed on adapter #%d\n", dta);1120 dprintf(0,"error: port scan failed on adapter #%d\n", dta); 1121 1121 iorb_seterr(pIorb, IOERR_CMD_SW_RESOURCE); 1122 1122 goto iocm_device_table_done; … … 1312 1312 } 1313 1313 1314 #ifdef DEBUG 1314 1315 if (D32g_DbgLevel) 1315 1316 { … … 1347 1348 pIorb->Timeout); 1348 1349 } 1350 #endif 1349 1351 } 1350 1352 … … 1385 1387 } 1386 1388 1389 #ifdef DEBUG 1387 1390 if (found) 1388 1391 { … … 1393 1396 DPRINTF(2,"IORB %x not found in queue %x\n", vIorb, queue); 1394 1397 } 1398 #endif 1395 1399 1396 1400 return(!found); … … 1553 1557 1554 1558 Timer_CancelTimer(timer_handle); 1555 DPRINTF(0,"timeout for IORB %x\n", vIorb);1559 dprintf(0,"timeout for IORB %x\n", vIorb); 1556 1560 1557 1561 /* Move the timed-out IORB to the abort queue. Since it's possible that the … … 1606 1610 /* reset watchdog timer */ 1607 1611 Timer_CancelTimer(timer_handle); 1608 DPRINTF(0,"reset watchdog invoked\n");1612 dprintf(0,"reset watchdog invoked\n"); 1609 1613 1610 1614 /* call context hook manually */ … … 1639 1643 if ((u32)(pUi + 1) - (u32)pDt > pIorb_conf->DeviceTableLen) 1640 1644 { 1641 DPRINTF(0,"error: device table provided by DASD too small\n");1645 dprintf(0,"error: device table provided by DASD too small\n"); 1642 1646 iorb_seterr(&pIorb_conf->iorbh, IOERR_CMD_SW_RESOURCE); 1643 1647 return(-1); -
trunk/src/os2ahci/os2ahci.h
r183 r184 40 40 * Legacy APM support is not needed on eCS systems with ACPI and is more reliable without it enabled. 41 41 */ 42 #define DEBUG43 42 //#define LEGACY_APM 44 43 //#define DAZ_NEW_CODE … … 73 72 #define DPRINTF(a,b,...) dprintf(a, b, ##__VA_ARGS__) 74 73 #define DHEXDUMP(a,b,c,d,...) dHexDump(a, b, c, d, ##__VA_ARGS__) 75 #define NTPRINTF(...) dprintf(0, ##__VA_ARGS__)76 74 #define DUMP_HOST_REGS(l,a,b) {if (D32g_DbgLevel>=l) ahci_dump_host_regs(a,b);} 77 75 #define DUMP_PORT_REGS(l,a,b) {if (D32g_DbgLevel>=l) ahci_dump_port_regs(a,b);} … … 79 77 #define DPRINTF(a,b,...) 80 78 #define DHEXDUMP(a,b,c,d,...) 81 #define NTPRINTF(a,...) 82 #define DUMP_HOST_REGS(a,b) 79 #define DUMP_HOST_REGS(l,a,b) 83 80 #define DUMP_PORT_REGS(l,a,b) 84 81 #endif … … 268 265 DEV_INFO dev_info; 269 266 } devs[AHCI_MAX_DEVS]; 267 268 u32 unaligned_read_count; 269 u32 error_count; 270 270 } P_INFO; 271 271 -
trunk/src/os2ahci/pci.c
r183 r184 633 633 for (i = 0; i < ad_info->hw_ports; i++) 634 634 { 635 ad_info->ports[i].dma_buf = MemAlloc (AHCI_PORT_PRIV_DMA_SZ);635 ad_info->ports[i].dma_buf = MemAllocAlign(AHCI_PORT_PRIV_DMA_SZ, 1024); 636 636 ad_info->ports[i].dma_buf_phys = MemPhysAdr(ad_info->ports[i].dma_buf); 637 637 } -
trunk/src/os2ahci/trace.c
r181 r184 51 51 AD_INFO *ai = ad_infos + a; 52 52 53 NTPRINTF("Adapter %d: PCI=%d:%d:%d ID=%04x:%04x %s %s irq=%d addr=0x%x version=%x\n", a,53 dprintf(0,"Adapter %d: PCI=%d:%d:%d ID=%04x:%04x %s %s irq=%d addr=0x%x version=%x\n", a, 54 54 PCI_BUS_FROM_BDF(ai->bus_dev_func), PCI_DEV_FROM_BDF(ai->bus_dev_func), 55 55 PCI_FUNC_FROM_BDF(ai->bus_dev_func), … … 62 62 P_INFO *pi = &ai->ports[p]; 63 63 64 NTPRINTF(" Port %d:\n", p);64 dprintf(0," Port %d:\n", p); 65 65 66 66 for (d = 0; d <= pi->dev_max; d++) … … 68 68 if (!pi->devs[d].present) 69 69 { 70 NTPRINTF(" No drive present\n");70 dprintf(0," No drive present\n"); 71 71 } else { 72 NTPRINTF(" Drive %d:", d);73 if (pi->devs[d].atapi) NTPRINTF(" atapi");74 if (pi->devs[d].removable) NTPRINTF(" removable");72 dprintf(0," Drive %d:", d); 73 if (pi->devs[d].atapi) dprintf(0," atapi"); 74 if (pi->devs[d].removable) dprintf(0," removable"); 75 75 if (pi->devs[d].dev_info.Method != NULL) 76 76 { 77 NTPRINTF(" %d cylinders, %d heads, %d sectors per track (%dMB) (%s)",77 dprintf(0," %d cylinders, %d heads, %d sectors per track (%dMB) (%s)", 78 78 pi->devs[d].dev_info.Cylinders, pi->devs[d].dev_info.HeadsPerCylinder, pi->devs[d].dev_info.SectorsPerTrack, 79 79 pi->devs[d].dev_info.TotalSectors/2048, pi->devs[d].dev_info.Method); 80 80 } 81 NTPRINTF("\n");81 dprintf(0,"\n"); 82 82 } /* if */ 83 83 } /* for d */
Note:
See TracChangeset
for help on using the changeset viewer.