Index: trunk/src/os2ahci/Makefile
===================================================================
--- trunk/src/os2ahci/Makefile	(revision 202)
+++ trunk/src/os2ahci/Makefile	(revision 204)
@@ -12,5 +12,5 @@
 # Define default build version if not specified in environment
 BLD_MAJOR=2
-BLD_MINOR=07 # must be 2 digits
+BLD_MINOR=08 # must be 2 digits
 BLD_REV=0 # not used at this time
 
@@ -116,6 +116,6 @@
   @%create $^@
   @%append $^@ /* Autogenerated by Makefile */
-  @%append $^@ $#define DMAJOR $(BLD_MAJOR)
-  @%append $^@ $#define DMINOR $(BLD_MINOR)
+  @AddToFile $^@,$#define DMAJOR,VERSIONMAJOR,$(VERSION)
+  @AddToFile $^@,$#define DMINOR,VERSIONMINOR,$(VERSION)
   @%append $^@ $#define DVENDOR "$(VENDOR)"
   @AddToFile $^@,$#define BLD_YEAR,DATEYEAR
Index: trunk/src/os2ahci/ahci.c
===================================================================
--- trunk/src/os2ahci/ahci.c	(revision 202)
+++ trunk/src/os2ahci/ahci.c	(revision 204)
@@ -1718,5 +1718,5 @@
     ADD_WORKSPACE *aws = (ADD_WORKSPACE *) &pIorb->ADDWorkSpace;
 
-    vNext = pIorb->pNxtIORB;
+    vNext = pIorb->f16NxtIORB;
     if (aws->queued_hw && (done_mask & (1UL << aws->cmd_slot)))
     {
@@ -1746,5 +1746,5 @@
     IORBH *pIorb = Far16ToFlat(vIorb);
 
-    vNext = pIorb->pNxtIORB;
+    vNext = pIorb->f16NxtIORB;
 
     iorb_complete(vIorb, pIorb);
@@ -1884,5 +1884,5 @@
   int d = iorb_unit_device(pIorb);
 
-  DHEXDUMP(5,Far16ToFlat(((IORB_ADAPTER_PASSTHRU *)pIorb)->pControllerCmd),
+  DHEXDUMP(5,Far16ToFlat(((IORB_ADAPTER_PASSTHRU *)pIorb)->f16ControllerCmd),
         ((IORB_ADAPTER_PASSTHRU *)pIorb)->ControllerCmdLen,
         "ahci_execute_cdb(%d.%d.%d): ", a, p, d);
@@ -1910,5 +1910,5 @@
   int d = iorb_unit_device(pIorb);
 
-  DHEXDUMP(5,Far16ToFlat(((IORB_ADAPTER_PASSTHRU *)pIorb)->pControllerCmd),
+  DHEXDUMP(5,Far16ToFlat(((IORB_ADAPTER_PASSTHRU *)pIorb)->f16ControllerCmd),
         ((IORB_ADAPTER_PASSTHRU *)pIorb)->ControllerCmdLen,
         "ahci_execute_ata(%d.%d.%d): ", a, p, d);
Index: trunk/src/os2ahci/ata.c
===================================================================
--- trunk/src/os2ahci/ata.c	(revision 202)
+++ trunk/src/os2ahci/ata.c	(revision 204)
@@ -361,5 +361,5 @@
 {
   ULONG offset = io->BlocksXferred * io->BlockSize;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList);
   USHORT i;
 
@@ -403,5 +403,5 @@
   ULONG offset = 0;
   USHORT i;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList);
 
   for (i = sg_indx; i < io->cSGList; i++)
@@ -532,5 +532,5 @@
   DLA_Table_Sector *pDLA = (DLA_Table_Sector*)add_workspace(pIorb)->buf;
   AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb);
-  GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->pGeometry;
+  GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->f16Geometry;
   int p = iorb_unit_port(pIorb);
   int rc;
@@ -567,5 +567,5 @@
 int is_lvm_geometry(IORBH *pIorb)
 {
-  GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->pGeometry;
+  GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->f16Geometry;
   ULONG sector;
 
@@ -597,5 +597,5 @@
 void ata_get_geometry_pp(IORBH FAR16DATA *vIorb, IORBH *pIorb)
 {
-  GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->pGeometry;
+  GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->f16Geometry;
   USHORT geometry_len =  ((IORB_GEOMETRY *)pIorb)->GeometryLen;
   u16 *id_buf = add_workspace(pIorb)->buf;
@@ -750,5 +750,5 @@
 {
   IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList);
   AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb);
   ULONG sector = io->RBA + io->BlocksXferred;
@@ -875,5 +875,5 @@
 {
   IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList);
   ADD_WORKSPACE *aws = add_workspace(pIorb);
 
@@ -948,5 +948,5 @@
 {
   IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList);
   AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb);
   ULONG sector = io->RBA + io->BlocksXferred;
@@ -1015,5 +1015,5 @@
 {
   IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList);
   ADD_WORKSPACE *aws = add_workspace(pIorb);
   AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb);
@@ -1092,5 +1092,5 @@
 {
   IORB_ADAPTER_PASSTHRU *apt = (IORB_ADAPTER_PASSTHRU *)pIorb;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(apt->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(apt->f16SGList);
   AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb);
   int p = iorb_unit_port(pIorb);
@@ -1106,5 +1106,5 @@
   rc = ata_cmd(ai, p, d, slot, 0,
                AP_SGLIST,   pSGList, apt->cSGList,
-               AP_ATA_CMD,  Far16ToFlat(apt->pControllerCmd),
+               AP_ATA_CMD,  Far16ToFlat(apt->f16ControllerCmd),
                AP_WRITE,    !(apt->Flags & PT_DIRECTION_IN),
                AP_END);
@@ -1148,5 +1148,5 @@
 
   /* map D2H FIS to the original ATA controller command structure */
-  cmd = (ATA_CMD *)Far16ToFlat(((IORB_ADAPTER_PASSTHRU*)pIorb)->pControllerCmd);
+  cmd = (ATA_CMD *)Far16ToFlat(((IORB_ADAPTER_PASSTHRU*)pIorb)->f16ControllerCmd);
 
   cmd->cmd      = fis[2];
Index: trunk/src/os2ahci/atapi.c
===================================================================
--- trunk/src/os2ahci/atapi.c	(revision 202)
+++ trunk/src/os2ahci/atapi.c	(revision 204)
@@ -72,5 +72,5 @@
 {
   IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList);
   ATAPI_CDB_12 cdb;
   AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb);
@@ -238,5 +238,5 @@
 {
   IORB_ADAPTER_PASSTHRU *pt = (IORB_ADAPTER_PASSTHRU *)pIorb;
-  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(pt->pSGList);
+  SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(pt->f16SGList);
   int rc;
   u8 cdb[ATAPI_MAX_CDB_LEN];
@@ -249,5 +249,5 @@
   }
   /* AHCI requires 12 or 16 byte commands */
-  atapi_pad_cdb(Far16ToFlat(pt->pControllerCmd), pt->ControllerCmdLen, cdb, &cdb_len);
+  atapi_pad_cdb(Far16ToFlat(pt->f16ControllerCmd), pt->ControllerCmdLen, cdb, &cdb_len);
 
   if (cdb[0] == 0x12 || cdb[0] == 0x5a)
@@ -318,5 +318,5 @@
     /* if the sense buffer requested is larger than our default, adjust
      * the length accordingly to satisfy the caller's requirements. */
-    if (ssb->SenseData != NULL && ssb->ReqSenseLen > sense_buf_len)
+    if (ssb->f16SenseData != FAR16NULL && ssb->ReqSenseLen > sense_buf_len)
     {
       sense_buf_len = ssb->ReqSenseLen;
@@ -388,7 +388,7 @@
     memset(ssb->AdapterDiagInfo, 0x00, sizeof(ssb->AdapterDiagInfo));
 
-    if (ssb->SenseData != NULL)
+    if (ssb->f16SenseData != FAR16NULL)
     {
-      memcpy(Far16ToFlat(ssb->SenseData), psd, ssb->ReqSenseLen);
+      memcpy(Far16ToFlat(ssb->f16SenseData), psd, ssb->ReqSenseLen);
       ssb->Flags |= STATUS_SENSEDATA_VALID;
     }
Index: trunk/src/os2ahci/ctxhook.c
===================================================================
--- trunk/src/os2ahci/ctxhook.c	(revision 202)
+++ trunk/src/os2ahci/ctxhook.c	(revision 204)
@@ -144,5 +144,5 @@
           IORBH *pIorb = Far16ToFlat(vIorb);
           ADD_WORKSPACE *aws = add_workspace(pIorb);
-          vNext = pIorb->pNxtIORB;
+          vNext = pIorb->f16NxtIORB;
 
           if (aws->queued_hw)
@@ -274,5 +274,5 @@
   {
     IORBH *pIorb = Far16ToFlat(vIorb);
-    vNext = pIorb->pNxtIORB;
+    vNext = pIorb->f16NxtIORB;
 
     spin_lock(drv_lock);
@@ -358,5 +358,5 @@
   {
     IORBH *pIorb = Far16ToFlat(vIorb);
-    vNext = pIorb->pNxtIORB;
+    vNext = pIorb->f16NxtIORB;
     a = iorb_unit_adapter(pIorb);
     p = iorb_unit_port(pIorb);
@@ -422,5 +422,5 @@
           IORBH *pIorb = Far16ToFlat(vIorb);
           ADD_WORKSPACE *aws = add_workspace(pIorb);
-          vNext = pIorb->pNxtIORB;
+          vNext = pIorb->f16NxtIORB;
 
           if (aws->queued_hw)
@@ -452,5 +452,5 @@
   {
     IORBH *pIorb = Far16ToFlat(vIorb);
-    vNext = pIorb->pNxtIORB;
+    vNext = pIorb->f16NxtIORB;
 
     spin_lock(drv_lock);
Index: trunk/src/os2ahci/ioctl.c
===================================================================
--- trunk/src/os2ahci/ioctl.c	(revision 202)
+++ trunk/src/os2ahci/ioctl.c	(revision 204)
@@ -187,13 +187,13 @@
   ic->iorb.iorbh.RequestControl   = IORB_ASYNC_POST;
   ic->iorb.iorbh.Timeout          = req->timeout;
-  ic->iorb.iorbh.NotifyAddress    = Far16AdrOfIoctlWakeup16;
+  ic->iorb.iorbh.f16NotifyAddress    = Far16AdrOfIoctlWakeup16;
 
   ic->iorb.cSGList = ic->sg_cnt;
-  ic->iorb.pSGList = MemFar16Adr(ic->sg_lst);
+  ic->iorb.f16SGList = MemFar16Adr(ic->sg_lst);
   ic->iorb.ppSGLIST = MemPhysAdr(ic->sg_lst);
 
   memcpy(ic->cmd, req->cmd.cdb, sizeof(ic->cmd));
   ic->iorb.ControllerCmdLen = req->cmdlen;
-  ic->iorb.pControllerCmd   = MemFar16Adr(ic->cmd);
+  ic->iorb.f16ControllerCmd   = MemFar16Adr(ic->cmd);
   ic->iorb.Flags            = (req->flags & PT_WRITE) ? 0 : PT_DIRECTION_IN;
 
@@ -203,5 +203,5 @@
     ic->iorb.iorbh.pStatusBlock     = CastFar16ToULONG(MemFar16Adr(&ic->ssb));
     ic->iorb.iorbh.StatusBlockLen   = sizeof(ic->ssb);
-    ic->ssb.SenseData               = MemFar16Adr(ic->sense);
+    ic->ssb.f16SenseData            = MemFar16Adr(ic->sense);
     ic->ssb.ReqSenseLen             = sizeof(ic->sense);
     ic->iorb.iorbh.RequestControl  |= IORB_REQ_STATUSBLOCK;
Index: trunk/src/os2ahci/os2ahci.c
===================================================================
--- trunk/src/os2ahci/os2ahci.c	(revision 202)
+++ trunk/src/os2ahci/os2ahci.c	(revision 204)
@@ -68,5 +68,4 @@
 int verbosity = 0;     /* default is quiet. 1=show sign on banner, >1=show adapter info during boot */
 int use_mbr_test = 1;
-long com_baud = 0;
 
 HDRIVER rm_drvh;           /* resource manager driver handle */
@@ -225,5 +224,5 @@
     {
       pszCmdLine += 2;
-      com_baud = strtol(pszCmdLine, &pszCmdLine, 0);
+      InitComPort(strtol(pszCmdLine, &pszCmdLine, 0));
       continue;
     }
@@ -234,4 +233,7 @@
       /* set COM port base address for debug messages */
       D32g_ComBase = strtol(pszCmdLine, &pszCmdLine, 0);
+      #ifdef TESTVER
+      if (D32g_ComBase == 0) SetPsdPutc();
+      #endif
       if (D32g_ComBase == 1) D32g_ComBase = 0x3f8;
       if (D32g_ComBase == 2) D32g_ComBase = 0x2f8;
@@ -419,6 +421,4 @@
   if (iStatus) goto init_fail;
 
-  if (com_baud) InitComPort(com_baud);
-
   dprintf(0,"BldLevel: %s\n", BldLevel);
   dprintf(0,"CmdLine: %s\n", cmd_line);
@@ -602,5 +602,5 @@
      * link in 'vNext'.
      */
-    if (pIorb->RequestControl & IORB_CHAIN) vNext = pIorb->pNxtIORB;
+    if (pIorb->RequestControl & IORB_CHAIN) vNext = pIorb->f16NxtIORB;
     else vNext = (IORBH FAR16DATA *)0;
 
@@ -767,5 +767,5 @@
         pIorb = Far16ToFlat(vIorb);
 
-        vNext = pIorb->pNxtIORB;
+        vNext = pIorb->f16NxtIORB;
         if (!add_workspace(pIorb)->processing)
         {
@@ -911,5 +911,5 @@
       IORBH *pPtr = Far16ToFlat(vPtr);
 
-      vNext = pPtr->pNxtIORB;
+      vNext = pPtr->f16NxtIORB;
       /* move all matching IORBs to the abort queue */
       if (vPtr != vIorb && iorb_unit_device(pPtr) == d)
@@ -1002,5 +1002,5 @@
       break;
     }
-    ad_infos[a].ports[p].devs[d].unit_info = pIorb_uc->pUnitInfo;
+    ad_infos[a].ports[p].devs[d].unit_info = pIorb_uc->f16UnitInfo;
     break;
 
@@ -1052,5 +1052,5 @@
 
   pIorb_conf = (IORB_CONFIGURATION *)pIorb;
-  vDt = pIorb_conf->pDeviceTable;
+  vDt = pIorb_conf->f16DeviceTable;
   pDt = Far16ToFlat(vDt);
 
@@ -1079,5 +1079,5 @@
     }
 
-    pDt->pAdapter[dta] = MakeNear16PtrFromDiff(pIorb_conf->pDeviceTable, pDt, pPtr);
+    pDt->pAdapter[dta] = MakeNear16PtrFromDiff(pIorb_conf->f16DeviceTable, pDt, pPtr);
 
     //DPRINTF(2,"iocm_device_table: ptr=%x dta=%x pAdapter[dta]=%x pDeviceTable=%x\n",
@@ -1290,5 +1290,5 @@
   {
     /* priority IORB; insert at first position */
-    pIorb->pNxtIORB = queue->vRoot;
+    pIorb->f16NxtIORB = queue->vRoot;
     queue->vRoot = vIorb;
   }
@@ -1296,5 +1296,5 @@
   {
     /* append IORB to end of queue */
-    pIorb->pNxtIORB = FAR16NULL;
+    pIorb->f16NxtIORB = FAR16NULL;
 
     if (queue->vRoot == FAR16NULL)
@@ -1304,5 +1304,5 @@
     else
     {
-      ((IORBH *)Far16ToFlat(queue->vTail))->pNxtIORB = vIorb;
+      ((IORBH *)Far16ToFlat(queue->vTail))->f16NxtIORB = vIorb;
     }
     queue->vTail = vIorb;
@@ -1363,9 +1363,9 @@
       if (_vPrev != FAR16NULL)
       {
-        ((IORBH*)Far16ToFlat(_vPrev))->pNxtIORB = _pIorb->pNxtIORB;
+        ((IORBH*)Far16ToFlat(_vPrev))->f16NxtIORB = _pIorb->f16NxtIORB;
       }
       else
       {
-        queue->vRoot = _pIorb->pNxtIORB;
+        queue->vRoot = _pIorb->f16NxtIORB;
       }
       if (_vIorb == queue->vTail)
@@ -1377,5 +1377,5 @@
     }
     _vPrev = _vIorb;
-    _vIorb = _pIorb->pNxtIORB;
+    _vIorb = _pIorb->f16NxtIORB;
   }
 
@@ -1461,5 +1461,5 @@
   if (pIorb->RequestControl & IORB_ASYNC_POST)
   {
-    Dev32Help_CallFar16((PFNFAR16)pIorb->NotifyAddress, vIorb);
+    Dev32Help_CallFar16((PFNFAR16)pIorb->f16NotifyAddress, vIorb);
   }
 }
@@ -1630,10 +1630,10 @@
                          int a, int p, int d, int scsi_id)
 {
-  DEVICETABLE *pDt = Far16ToFlat(pIorb_conf->pDeviceTable);
+  DEVICETABLE *pDt = Far16ToFlat(pIorb_conf->f16DeviceTable);
   ADAPTERINFO *pPtr;
   UNITINFO *pUi;
   AD_INFO *ai = ad_infos + a;
 
-  pPtr = (ADAPTERINFO *)MakeFlatFromNear16(pIorb_conf->pDeviceTable, pDt->pAdapter[dta]);
+  pPtr = (ADAPTERINFO *)MakeFlatFromNear16(pIorb_conf->f16DeviceTable, pDt->pAdapter[dta]);
   //DPRINTF(2,"add_unit_info: ptr=%x dta=%x pAdapter[dta]=%x pDeviceTable=%x\n",
   //    ptr, dta, dt->pAdapter[dta], iorb_conf->pDeviceTable);
Index: trunk/src/os2ahci/trace.c
===================================================================
--- trunk/src/os2ahci/trace.c	(revision 202)
+++ trunk/src/os2ahci/trace.c	(revision 204)
@@ -83,7 +83,7 @@
   dprintf(0,"  CmdMod=%x ReqCtrl=%x Status=%x ErrorCode=%x\n",
       pIorb->CommandModifier, pIorb->RequestControl, pIorb->Status, pIorb->ErrorCode);
-  dprintf(0,"  Timeout=%x StatusBlkLen=%x pStatusBlk=%x Res=%x pNxtIORB=%x\n",
+  dprintf(0,"  Timeout=%x StatusBlkLen=%x pStatusBlk=%x Res=%x f16NxtIORB=%x\n",
       pIorb->Timeout, pIorb->StatusBlockLen, pIorb->pStatusBlock, pIorb->Reserved_1,
-      pIorb->pNxtIORB);
+      pIorb->f16NxtIORB);
 }
 #endif
