[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] minios: Fix netfront for ia64.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1170803579 0
# Node ID e1364f2c686794bb49fea511e0c49ea8e1c64986
# Parent  7379c1174155c3232ba12ff6e226c70b40cd71fa
minios: Fix netfront for ia64.
Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
---
 extras/mini-os/gnttab.c   |    5 +++++
 extras/mini-os/netfront.c |    4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff -r 7379c1174155 -r e1364f2c6867 extras/mini-os/gnttab.c
--- a/extras/mini-os/gnttab.c   Tue Feb 06 23:10:05 2007 +0000
+++ b/extras/mini-os/gnttab.c   Tue Feb 06 23:12:59 2007 +0000
@@ -21,7 +21,12 @@
 
 #define NR_RESERVED_ENTRIES 8
 
+/* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */
+#ifdef __ia64__
+#define NR_GRANT_FRAMES 1
+#else
 #define NR_GRANT_FRAMES 4
+#endif
 #define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
 
 static grant_entry_t *gnttab_table;
diff -r 7379c1174155 -r e1364f2c6867 extras/mini-os/netfront.c
--- a/extras/mini-os/netfront.c Tue Feb 06 23:10:05 2007 +0000
+++ b/extras/mini-os/netfront.c Tue Feb 06 23:12:59 2007 +0000
@@ -349,7 +349,9 @@ done:
     init_rx_buffers();
 
     unsigned char rawmac[6];
-    sscanf(mac,"%x:%x:%x:%x:%x:%x",
+        /* Special conversion specifier 'hh' needed for __ia64__. Without
+           this mini-os panics with 'Unaligned reference'. */
+    sscanf(mac,"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
             &rawmac[0],
             &rawmac[1],
             &rawmac[2],

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.