RTL8139 driver problm(pc locks up on starting a PCI DMA opn)

Hi,

I am using the QNX Momentics NC 6.2.1.

I am trying to write a driver for rtl8139. I am able to read/write to the PCI I/O registers. I allocated DMA safe memory using the mmap call with the appropriate flags (given in the documentation), then got the page’s physical memory with mem_offset( ) call. When I initiate a trasmit, my PC locks up. The RTL8139 uses DMA to get the packet transferred from
RAM to on chip 2k buffer.
I think I am configuring the config regs properly. I even tried a page below 16Mb and wrote its physical address to the Tx DMA address
register on the RTL8139.

Am I missing a step here … Is there any need for programming any register of the 810 chipset before using PCI DMA ?
My pc has a pentium 3 on a i810E chipset. I have 128 Mb Ram.

I am testing my driver after disabling the installed network drivers on bootup.
My NIC works as I am able to access the internet when I don;t disable the installed driver.
Finally, I decided to read the RTL8139 registers with internet traffic going through the NIC.
When I read the Tx Buffer address register contents (which contains the physical address of the Buffer in RAM where the the driver has copied the packet to be Txed), I got addresses below 1Mb, nothing unexpected.

I will appreciate any help.
Thanks
Ram

Why don’t you use driver shipped with OS?