qemu-devel
[Top][All Lists]
Advanced

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

[FIXED] Re: [Qemu-devel] Multiple Ethernet interfaces for Gumstix connex


From: John W
Subject: [FIXED] Re: [Qemu-devel] Multiple Ethernet interfaces for Gumstix connex (NetDUO-mmc)
Date: Sat, 5 Jan 2008 22:12:37 -0800 (PST)

Andrzej,

Thanks for the tip, but it ended up that the IRQ was
being properly allocated by the kernel, but I did not
tell qemu the correct mapping between the IRQ and the
GPIO line.  Example:
eth0 uses IRQ 59 which maps to GPIO line 36
eth1 uses IRQ 50 which maps to GPIO line 27

The mapping between IRQ's and GPIO's can be easily
determined with a simple kernel module (running on
real hardware) that makes calls to gpio_to_irq()

I have included a patch that seems to safely patch
against the latest CVS snapshot
(qemu-snapshot-2008-01-06_05.tar.bz2), I hope you guys
consider merging it into the main branch/trunk.


wget
http://qemu-forum.ipi.fi/qemu-snapshots/qemu-snapshot-2008-01-06_05.tar.bz2

tar -xjvf qemu-snapshot-2008-01-06_05.tar.bz2

cd qemu-snapshot-2008-01-06-05

patch -p1 ~/qemu-connex-2008-01-03-05-add_eth1.patch

./configure --target-list=arm-softmmu
--host-cc=gcc-3.4 --cc=gcc-3.4 --disable-sdl
--disable-gfx-check

make

#Example:
#Invoke one interface
./arm-softmmu/qemu-system-arm -M connex -pflash
~/qemu/flash -net nic,vlan=0  -nographic

#Invoke two interface
./arm-softmmu/qemu-system-arm -M connex -pflash
~/qemu/flash -net nic,vlan=0 -net nic,vlan=1
-nographic

#Hooking eth0 and eth1 to tap interfaces:
./arm-softmmu/qemu-system-arm -M connex -pflash
~/qemu/flash -net nic,vlan=0 -net
tap,vlan=0,ifname=tap0,script=no -net nic,vlan=1 -net
tap,vlan=1,ifname=tap1,script=no -nographic


Thanks!!

-J
____________________________________
Hi,

On 04/01/2008, John W <address@hidden> wrote:
> 3.  gpio line 37, I took a stab in the dark.
>
> With this change, eth0 seemed to continue to work
> perfectly.
>
> As for Eth1:
> 1.  The Linux Kernel seemed to ALSO recognize eth1.
> (example: ifconfig eth1 seemed to work fine)
>
> 2.  Sending packets out the eth1 interface seemed
> "okay", since I could run tcpdump on the tap1 host
> interface and see packets coming from the
virtualized
> Connex eth1.
>
> 3.  Unfortunately, the eth1 device seems to have
> problems receiving packets due to some Interrupt
> conflict.  I seem to get a number of the following
> errors:
> NETDEV WATCHDOG: eth1: transmit timed out
>
>
>
> I was wondering if:
> 1. Anyone else out there was working on adding
support
> for another Ethernet interface for the Gumstix
connex
> (or Gumstix verdex)
> OR
> 2. Anyone could suggest some information on trying
to
> add in another Ethernet interface.

cat /proc/interrupts may yield some information on
which pin the
second NIC is connected to. The distance between the
interrupt numbers
for eth0 and eth1 should be the same as between eth0
GPIO and eth1
GPIO. In particular they may be using the same GPIO
with the two
signals being ORed or ANDed, or other combination,
this can be done in
qemu too.

Regards


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
--- qemu-snapshot-2008-01-03_05/hw/gumstix.c    2008-01-02 19:11:15.000000000 
-0800
+++ qemu-snapshot-2008-01-03_05.mod/hw/gumstix.c        2008-01-05 
21:46:30.000000000 -0800
@@ -76,9 +76,15 @@
 
     cpu->env->regs[15] = 0x00000000;
 
-    /* Interrupt line of NIC is connected to GPIO line 36 */
+    /* Interrupt of eth0 is 59, which is connected to GPIO line 36 */
     smc91c111_init(&nd_table[0], 0x04000300,
                     pxa2xx_gpio_in_get(cpu->gpio)[36]);
+    /* Interrupt of eth1 is 50, which is connected to GPIO line 27 */
+    if(nd_table[1].vlan)
+      {
+       smc91c111_init(&nd_table[1], 0x08000300,
+                    pxa2xx_gpio_in_get(cpu->gpio)[27]);
+     }
 }
 
 static void verdex_init(int ram_size, int vga_ram_size,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]