This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem while sending packages with the Davicom DM9000 Driverfrom Redboot


On Mon, 2004-12-06 at 04:12, Stefan Rosinger wrote:
> Hi!
> 
> I use your Davicom DM9000 driver for eCos. For receiving it works really  
> fine!
> But when I want to transmit a package i get always a
> 	'NIC collision bug detected'
> 
> This is obviously a problem of the following routine in the poll()  
> function:
> 
>       if (getreg(priv, DM_TRPAL) & 3) {
> 		// NIC bug detected. Need to reset.
> 		priv->reset_pending = 1;
> 		diag_printf("NIC collision bug detected!\n");
> 	    }
> 
> Can you explain me what I do wrong with sending my packages?.
> 
> 
> Here a printout of a ping from redboot.
> I can sniff the right data on the host, the received there without errors!
> 
> Ethernet send:
> 000047C4: FF FF FF FF FF FF 00 60  6E 00 01 07 08 06         
> |.......`n.....  |
> 0000A2AC: 00 01 08 00 06 04 00 01  00 60 6E 00 01 07 C0 A8   
> |.........`n.....|
> 0000A2BC: 01 14 01 FF 00 8A 00 8A  C0 A8 01 02               
> |............    |
> TRPAL: 2a
> NIC collision bug detected!

The only h/w available I had for driver testing used 32-bit access on
the dma port. It does look like the above check is incorrect for DMA
ports using 8 or 16 bit interfaces. I'm guessing your hardware may
be using 8 or 16-bit DMA interface. Does everything work okay if you
comment out the above test for the bug condition? The dm9000 bug we
ran into would cause the dm9000 to get stuck under certain conditions
involving a collision. The above check was used to detect the hang
and reset the DM9000. The test may need further refinement so that
it only looks for a problem when the dm9000 is configured for 32-bit
dma port (as indicated by bits 7 and 6 of interrupt status register).

Its also interesting that eCos sent a short ethernet packet. I would
expect the packet to be padded to the ethernet minimum 60-byte
packet. I believe control for this in in the tx control register.
But I don't think that has anything to do with the main problem.

--Mark



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]