Changeset 184


Ignore:
Timestamp:
Dec 15, 2016, 12:31:51 AM (9 years ago)
Author:
David Azarewicz
Message:

Reworked makefile
Fixed context hook logic.

Location:
trunk/src/os2ahci
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/Makefile

    r180 r184  
    1414BLD_MINOR=01 # must be 2 digits
    1515BLD_REV=0 # not used at this time
    16 FIXPACK=Test Build
    1716
    1817!ifndef %ROOT
    19 ROOT=$+$(%cwd)$-
    20 !else
     18!error ROOT must be set in the environment.
     19!endif
    2120ROOT=$(%ROOT)
    22 !endif
    2321
    2422!ifndef %WATCOM # if not defined in the environment
     
    5149!endif
    5250
     51!ifdef %FIXPACK
     52FIXPACK=$(%FIXPACK)
     53!endif
     54
    5355VERSION=$(BLD_MAJOR).$(BLD_MINOR)
    5456ZIPDIR=$(ROOT)\tmp
     
    7375
    7476!ifdef __LOADDLL__
    75 !loaddll wcc   $(WATCOM)\BINP\DLL\wccd.dll
     77!loaddll wcc386   $(WATCOM)\BINP\DLL\wccd386.dll
    7678!loaddll wlink $(WATCOM)\BINP\DLL\wlinkd.dll
    7779!endif
     
    8082AFLAGS=-q -6p -bt=os2 -wx -d1
    8183CFLAGS =-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
     86CDEFS=-DDEBUG
     87O=Debug
     88!else
     89CDEFS=
     90O=Retail
    8591!endif
    8692
    87 ###############################################################################
    88 # Main dependencies
     93!ifneq FIXPACK
     94CDEFS+= -DTESTVER
     95!endif
    8996
    9097LIBS = $(DRV32KIT)\Drv32.lib $(DDK)\base32\lib\kee.lib
    9198
    92 OBJS = os2ahci.obj pci.obj ahci.obj ata.obj atapi.obj &
    93        ctxhook.obj trace.obj ioctl.obj apm.obj thunk.obj
     99OBJS = $(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
    94101
    95 INCS = os2ahci.h ahci.h
     102.asm.obj: .autodepend
     103  $(AS) $(AFLAGS) -fo=$^@ $[@
     104  #wdis -l $^@
    96105
    97 all: os2ahci.add os2ahci.sym
     106.c.obj: .autodepend
     107  $(CC) $(CFLAGS) $(CDEFS) -fo=$^@ $[@
     108  wdis -l $^@
    98109
    99 clean: .symbolic
    100   rm -f $(OBJS) os2ahci.add *.cod *.lst *.def *.map *.sym *.err *.lnk version.h
     110all: directory $(O)\os2ahci.add $(O)\os2ahci.sym
    101111
    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)
     112directory: .symbolic
     113  $(ROOT)\Tools\createpath.cmd $(O)
    125114
    126115version.h: Makefile .always
     
    135124  @AddToFile $^@,$#define BLDLEVEL,BLDLEVEL2,$(VENDOR),$(VERSION),AHCI Driver (c) %Y $(VENDOR),$(FIXPACK)
    136125
    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
    146127  @%create $^&.lrf
    147128  @%append $^&.lrf format os2 lx phys
     
    168149  @%erase $^&.lrf
    169150
    170 os2ahci.sym: os2ahci.map
     151$(O)\os2ahci.sym: $(O)\os2ahci.map
    171152  wat2map.cmd $[@ $^*.ma1
    172   $(MAPSYM) $^*.ma1
    173   @%erase $^*.ma1
     153  cd $(O)
     154  $(MAPSYM) $^&.ma1
     155  @%erase $^&.ma1
     156  cd ..
    174157
    175 release: os2ahci.add os2ahci.sym .symbolic
     158release: $(O)\os2ahci.add $(O)\os2ahci.sym .symbolic
    176159  @if exist $(WPIFILE) @del $(WPIFILE)
    177160  @!rm -rf $(ZIPDIR)
     
    180163
    181164  @md $(ZIPDIR)\pkg1
    182   @copy /b $(ROOT)\src\os2ahci\os2ahci.add $(ZIPDIR)\pkg1 >NUL
    183   @copy /b $(ROOT)\src\os2ahci\os2ahci.sym $(ZIPDIR)\pkg1 >NUL
     165  @copy /b $(ROOT)\src\os2ahci\$(O)\os2ahci.add $(ZIPDIR)\pkg1 >NUL
     166  @copy /b $(ROOT)\src\os2ahci\$(O)\os2ahci.sym $(ZIPDIR)\pkg1 >NUL
    184167
    185168  @md $(ZIPDIR)\pkg2
     
    200183  @!rm -rf $(ZIPDIR)
    201184
     185clean: .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  
    148148    if (i == HOST_VERSION) version = val;
    149149
    150     NTPRINTF(" %02x: %08lx", i, val);
     150    dprintf(0," %02x: %08lx", i, val);
    151151
    152152    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);
    173173    } 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");
    178178    } 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");
    185185  }
    186186}
     
    228228  if (ai->pci->board >= sizeof(initial_flags) / sizeof(*initial_flags))
    229229  {
    230     DPRINTF(0,"error: invalid board index in PCI info\n");
     230    dprintf(0,"error: invalid board index in PCI info\n");
    231231    return(-1);
    232232  }
     
    446446    while (((tmp = readl(ai->mmio + HOST_CTL)) & HOST_RESET) != 0) {
    447447      if (TimerCheckAndBlock(&Timer)) {
    448         DPRINTF(0,"controller reset failed (0x%x)\n", tmp);
     448        dprintf(0,"controller reset failed (0x%x)\n", tmp);
    449449        return(-1);
    450450      }
     
    558558
    559559  /* 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));
    561561  return(1);
    562562}
     
    635635
    636636      #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);
    638638      ai->ports[p].dma_buf_phys = MemPhysAdr(ai->ports[p].dma_buf);
    639639      #endif
     
    714714      if (Dev32Help_SetIRQ(irq_handlers[irq_map_cnt], ai->irq, 0) != 0)
    715715      {
    716         DPRINTF(0,"failed to register exclusive interrupt\n");
     716        dprintf(0,"failed to register exclusive interrupt\n");
    717717        return(-1);
    718718      }
     
    963963  if ((rc = ahci_stop_fis_rx(ai, p)) != 0)
    964964  {
    965     DPRINTF(0,"error: failed to stop FIS receive (%d)\n", rc);
     965    dprintf(0,"error: failed to stop FIS receive (%d)\n", rc);
    966966    return(rc);
    967967  }
     
    970970  if ((rc = ahci_stop_engine(ai, p)) != 0)
    971971  {
    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);
    973973    return(rc);
    974974  }
     
    16321632   * reset, or worse.
    16331633   */
     1634  ai->ports[p].error_count++;
     1635
    16341636  if (irq_stat & PORT_IRQ_UNK_FIS)
    16351637  {
     
    16421644  if (irq_stat & (PORT_IRQ_HBUS_ERR | PORT_IRQ_HBUS_DATA_ERR))
    16431645  {
    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);
    16451647    reset_port = 1;
    16461648  }
    16471649  if (irq_stat & PORT_IRQ_IF_ERR && !(ai->flags & AHCI_HFLAG_IGN_IRQ_IF_ERR))
    16481650  {
    1649     DPRINTF(0,"warning: interface fatal error for port #%d\n", p);
     1651    dprintf(0,"warning: interface fatal error for port #%d\n", p);
    16501652    reset_port = 1;
    16511653  }
     
    16611663  }
    16621664
    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);
    16641666
    16651667  /* Handle device-specific errors. Those errors typically involve restarting
     
    16771679void ahci_get_geometry(IORBH FAR16DATA *vIorb, IORBH *pIorb)
    16781680{
    1679   #ifdef DEBUG
    16801681  DPRINTF(7,"ahci_get_geometry(%d.%d.%d)\n", iorb_unit_adapter(pIorb),
    16811682          iorb_unit_port(pIorb), iorb_unit_device(pIorb));
    1682   #endif
    16831683
    16841684  ahci_exec_iorb(vIorb, pIorb, 0, cmd_func(pIorb, get_geometry));
     
    16901690void ahci_unit_ready(IORBH FAR16DATA *vIorb, IORBH *pIorb)
    16911691{
    1692   #ifdef DEBUG
    16931692  DPRINTF(7,"ahci_unit_ready(%d.%d.%d)\n", iorb_unit_adapter(pIorb),
    16941693          iorb_unit_port(pIorb), iorb_unit_device(pIorb));
    1695   #endif
    16961694
    16971695  ahci_exec_iorb(vIorb, pIorb, 0, cmd_func(pIorb, unit_ready));
     
    17031701void ahci_read(IORBH FAR16DATA *vIorb, IORBH *pIorb)
    17041702{
    1705   #ifdef DEBUG
    17061703  DPRINTF(7,"ahci_read(%d.%d.%d, %d, %d)\n", iorb_unit_adapter(vIorb),
    17071704          iorb_unit_port(pIorb), iorb_unit_device(pIorb),
    17081705          ((IORB_EXECUTEIO *) pIorb)->RBA,
    17091706          ((IORB_EXECUTEIO *) pIorb)->BlockCount);
    1710   #endif
    17111707
    17121708  ahci_exec_iorb(vIorb, pIorb, 1, cmd_func(pIorb, read));
     
    17181714void ahci_verify(IORBH FAR16DATA *vIorb, IORBH *pIorb)
    17191715{
    1720   #ifdef DEBUG
    17211716  DPRINTF(7,"ahci_verify(%d.%d.%d, %d, %d)\n", iorb_unit_adapter(pIorb),
    17221717          iorb_unit_port(pIorb), iorb_unit_device(pIorb),
    17231718          ((IORB_EXECUTEIO *)pIorb)->RBA,
    17241719          ((IORB_EXECUTEIO *)pIorb)->BlockCount);
    1725   #endif
    17261720
    17271721  ahci_exec_iorb(vIorb, pIorb, 0, cmd_func(pIorb, verify));
     
    17331727void ahci_write(IORBH FAR16DATA *vIorb, IORBH *pIorb)
    17341728{
    1735   #ifdef DEBUG
    17361729  DPRINTF(7,"ahci_write(%d.%d.%d, %d, %d)\n", iorb_unit_adapter(pIorb),
    17371730          iorb_unit_port(pIorb), iorb_unit_device(pIorb),
    17381731          ((IORB_EXECUTEIO *)pIorb)->RBA,
    17391732          ((IORB_EXECUTEIO *)pIorb)->BlockCount);
    1740   #endif
    17411733
    17421734  ahci_exec_iorb(vIorb, pIorb, 1, cmd_func(pIorb, write));
  • trunk/src/os2ahci/ata.c

    r182 r184  
    136136      if (ata_cmd.lba_l & 0xf0000000UL)
    137137      {
    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);
    139139        return(ATA_CMD_INVALID_PARM);
    140140      }
     
    187187
    188188    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);
    190190      return(ATA_CMD_INVALID_PARM);
    191191    }
     
    267267      {
    268268        /* 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");
    270270        return(i - 1);
    271271      }
    272272      if ((sg_addr & 1) || (chunk & 1))
    273273      {
    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");
    275275        return(ATA_CMD_UNALIGNED_ADDR);
    276276      }
     
    641641    {
    642642      /* 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",
    644644              iorb_unit_adapter(pIorb), iorb_unit_port(pIorb),
    645645              iorb_unit_device(pIorb));
     
    834834
    835835  DPRINTF(7,"ata_read_unaligned(%d.%d.%d, %d)\n", ad_no(ai), p, d, sector);
     836  ai->ports[p].unaligned_read_count++;
    836837
    837838  /* allocate transfer buffer */
  • trunk/src/os2ahci/atapi.c

    r181 r184  
    175175  SET_CDB_32(cdb.trans_len, 1UL);
    176176
     177  ai->ports[p].unaligned_read_count++;
    177178  DPRINTF(4, "atapi_read_unaligned\n");
    178179
  • trunk/src/os2ahci/ctxhook.c

    r181 r184  
    9494  IORBH FAR16DATA *vProblemIorb;
    9595  IORBH FAR16DATA *vIorb;
    96   IORBH FAR16DATA *vNext = NULL;
     96  IORBH FAR16DATA *vNext;
    9797  u8 *port_mmio;
    98   int rearm_ctx_hook = 0;
     98  int rearm_ctx_hook;
    9999  int need_reset;
    100100  int ccs;
     
    103103
    104104  D32ThunkStackTo32();
     105
     106  vNext = NULL;
     107  rearm_ctx_hook = 0;
    105108
    106109  DPRINTF(8,"restart_ctxhook() started\n");
     
    329332  AD_INFO *ai;
    330333  IORBH FAR16DATA *vIorb;
    331   IORBH FAR16DATA *vNext = NULL;
    332   int rearm_ctx_hook = 0;
     334  IORBH FAR16DATA *vNext;
     335  int rearm_ctx_hook;
    333336  int a;
    334337  int p;
    335338
    336339  D32ThunkStackTo32();
     340
     341  vNext = NULL;
     342  rearm_ctx_hook = 0;
    337343
    338344  DPRINTF(8,"reset_ctxhook() started\n");
  • trunk/src/os2ahci/os2ahci.c

    r181 r184  
    422422  if (com_baud) InitComPort(com_baud);
    423423
    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);
    426426  /*
    427427  if (sizeof(ADD_WORKSPACE) > ADD_WORKSPACE_SIZE)
     
    634634
    635635        /* 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);
    637637        pIorb->Status = IORB_ERROR;
    638638        pIorb->ErrorCode = IOERR_CMD_SYNTAX;
     
    10771077    if ((u32)(pPtr + 1) - (u32)pDt > pIorb_conf->DeviceTableLen)
    10781078    {
    1079       DPRINTF(0,"error: device table provided by DASD too small\n");
     1079      dprintf(0,"error: device table provided by DASD too small\n");
    10801080      iorb_seterr(pIorb, IOERR_CMD_SW_RESOURCE);
    10811081      goto iocm_device_table_done;
     
    11061106        if (ad_info->busy)
    11071107        {
    1108           DPRINTF(0,"error: port scan requested while adapter was busy\n");
     1108          dprintf(0,"error: port scan requested while adapter was busy\n");
    11091109          iorb_seterr(pIorb, IOERR_CMD_SW_RESOURCE);
    11101110          goto iocm_device_table_done;
     
    11181118        if (rc != 0)
    11191119        {
    1120           DPRINTF(0,"error: port scan failed on adapter #%d\n", dta);
     1120          dprintf(0,"error: port scan failed on adapter #%d\n", dta);
    11211121          iorb_seterr(pIorb, IOERR_CMD_SW_RESOURCE);
    11221122          goto iocm_device_table_done;
     
    13121312  }
    13131313
     1314  #ifdef DEBUG
    13141315  if (D32g_DbgLevel)
    13151316  {
     
    13471348           pIorb->Timeout);
    13481349  }
     1350  #endif
    13491351}
    13501352
     
    13851387  }
    13861388
     1389  #ifdef DEBUG
    13871390  if (found)
    13881391  {
     
    13931396    DPRINTF(2,"IORB %x not found in queue %x\n", vIorb, queue);
    13941397  }
     1398  #endif
    13951399
    13961400  return(!found);
     
    15531557
    15541558  Timer_CancelTimer(timer_handle);
    1555   DPRINTF(0,"timeout for IORB %x\n", vIorb);
     1559  dprintf(0,"timeout for IORB %x\n", vIorb);
    15561560
    15571561  /* Move the timed-out IORB to the abort queue. Since it's possible that the
     
    16061610  /* reset watchdog timer */
    16071611  Timer_CancelTimer(timer_handle);
    1608   DPRINTF(0,"reset watchdog invoked\n");
     1612  dprintf(0,"reset watchdog invoked\n");
    16091613
    16101614  /* call context hook manually */
     
    16391643  if ((u32)(pUi + 1) - (u32)pDt > pIorb_conf->DeviceTableLen)
    16401644  {
    1641     DPRINTF(0,"error: device table provided by DASD too small\n");
     1645    dprintf(0,"error: device table provided by DASD too small\n");
    16421646    iorb_seterr(&pIorb_conf->iorbh, IOERR_CMD_SW_RESOURCE);
    16431647    return(-1);
  • trunk/src/os2ahci/os2ahci.h

    r183 r184  
    4040 *   Legacy APM support is not needed on eCS systems with ACPI and is more reliable without it enabled.
    4141 */
    42 #define DEBUG
    4342//#define LEGACY_APM
    4443//#define DAZ_NEW_CODE
     
    7372#define DPRINTF(a,b,...) dprintf(a, b, ##__VA_ARGS__)
    7473#define DHEXDUMP(a,b,c,d,...) dHexDump(a, b, c, d, ##__VA_ARGS__)
    75 #define NTPRINTF(...) dprintf(0, ##__VA_ARGS__)
    7674#define DUMP_HOST_REGS(l,a,b) {if (D32g_DbgLevel>=l) ahci_dump_host_regs(a,b);}
    7775#define DUMP_PORT_REGS(l,a,b) {if (D32g_DbgLevel>=l) ahci_dump_port_regs(a,b);}
     
    7977#define DPRINTF(a,b,...)
    8078#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)
    8380#define DUMP_PORT_REGS(l,a,b)
    8481#endif
     
    268265    DEV_INFO dev_info;
    269266  } devs[AHCI_MAX_DEVS];
     267
     268  u32 unaligned_read_count;
     269  u32 error_count;
    270270} P_INFO;
    271271
  • trunk/src/os2ahci/pci.c

    r183 r184  
    633633  for (i = 0; i < ad_info->hw_ports; i++)
    634634  {
    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);
    636636    ad_info->ports[i].dma_buf_phys = MemPhysAdr(ad_info->ports[i].dma_buf);
    637637  }
  • trunk/src/os2ahci/trace.c

    r181 r184  
    5151    AD_INFO *ai = ad_infos + a;
    5252
    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,
    5454      PCI_BUS_FROM_BDF(ai->bus_dev_func), PCI_DEV_FROM_BDF(ai->bus_dev_func),
    5555      PCI_FUNC_FROM_BDF(ai->bus_dev_func),
     
    6262      P_INFO *pi = &ai->ports[p];
    6363
    64       NTPRINTF("  Port %d:\n", p);
     64      dprintf(0,"  Port %d:\n", p);
    6565
    6666      for (d = 0; d <= pi->dev_max; d++)
     
    6868        if (!pi->devs[d].present)
    6969        {
    70           NTPRINTF("    No drive present\n");
     70          dprintf(0,"    No drive present\n");
    7171        } 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");
    7575          if (pi->devs[d].dev_info.Method != NULL)
    7676          {
    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)",
    7878              pi->devs[d].dev_info.Cylinders, pi->devs[d].dev_info.HeadsPerCylinder, pi->devs[d].dev_info.SectorsPerTrack,
    7979              pi->devs[d].dev_info.TotalSectors/2048, pi->devs[d].dev_info.Method);
    8080          }
    81           NTPRINTF("\n");
     81          dprintf(0,"\n");
    8282        } /* if */
    8383      } /* for d */
Note: See TracChangeset for help on using the changeset viewer.