From: Michael Janssen <jamuraa@base0.net>
Date: Sat, 4 Dec 2010 02:28:05 -0600
Subject: [PATCH] Fix FTBS on armel, alpha and ia64
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix FTBS on armel, alpha and ia64 by using non-paused port io
operations instead of the “_p” onces not defined on this architectures

Thanks to Daniel Hess for this patch
---
 server/drivers/dio/portio/portio.cc |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/server/drivers/dio/portio/portio.cc b/server/drivers/dio/portio/portio.cc
index eb32cbc..f5ec06c 100644
--- a/server/drivers/dio/portio/portio.cc
+++ b/server/drivers/dio/portio/portio.cc
@@ -179,8 +179,12 @@ void PortIO::MainQuit()
 #ifdef __QNXNTO__
   out8(this->portptr, this->init_val);
 #else
+#if defined(__alpha__) || defined(__arm__) || defined(__ia64__)
+  outb(this->init_val, this->port);
+#else
   outb_p(this->init_val, this->port);
 #endif
+#endif
 }
 
 void PortIO::Main()
@@ -191,8 +195,12 @@ void PortIO::Main()
 #ifdef __QNXNTO__
   this->init_val = in8(this->portptr);
 #else
+#if defined(__alpha__) || defined(__arm__) || defined(__ia64__)
+  this->init_val = inb(this->port);
+#else
   this->init_val = inb_p(this->port);
 #endif
+#endif
   for (;;)
   {
     pthread_testcancel();
@@ -208,8 +216,12 @@ void PortIO::Main()
 #ifdef __QNXNTO__
     data.bits = in8(this->portptr);
 #else
+#if defined(__alpha__) || defined(__arm__) || defined(__ia64__)
+    data.bits = inb(this->port);
+#else
     data.bits = inb_p(this->port);
 #endif
+#endif
     this->Publish(this->dio_provided_addr, PLAYER_MSGTYPE_DATA, PLAYER_DIO_DATA_VALUES, reinterpret_cast<void *>(&data), 0, NULL);
   }
 }
@@ -236,16 +248,24 @@ int PortIO::ProcessMessage(QueuePointer & resp_queue, player_msghdr * hdr, void
 #ifdef __QNXNTO__
     u = in8(this->portptr);
 #else
+#if defined(__alpha__) || defined(__arm__) || defined(__ia64__)
+    u = inb(this->port);
+#else
     u = inb_p(this->port);
 #endif
+#endif
     v = (u & (~(masks[digits - 1]))) | (cmd.digout & (masks[digits - 1]));
     if (u != v)
     {
 #ifdef __QNXNTO__
       out8(this->portptr, v);
 #else
+#if defined(__alpha__) || defined(__arm__) || defined(__ia64__)
+      outb(v, this->port);
+#else
       outb_p(v, this->port);
 #endif
+#endif
     }
     return 0;
   }
-- 
