My NIC driver cannot send and recieve in parallel!

Hi, all:

My writed NIC driver for rtl8139d adapter on linux 3.0.4 cannot send and recieve simultaneously but is able to send or recieve in parallel respectively. As soon as it send and recieve at the same time, the transmmition rate on both directions gradually decrease to zero b/s and report "stalled" at the end. One interesting phenomenon is that when sending and recieving in parallel the packet size is ofen very small such as 66 bytes, 140bytes and so on. Is this a clue to find the bug?

At beginning I suspect something wrong in the use of spinlock, after my carefully check, however, I could not find any problem. I use two spinlocks, one is for sending the other is for recieving in the interrupt handler.

So, what and where is the cause of this problem? Could anybody give me some idea?

li,kunlun

It's not that it can't work in "parallel", it's that your code is deadlocking...

We cannot possibly say without seeing your code...