Re: bogus packet in ei_receive of 8390.c

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

 



On 2/27/06, Atsushi Nemoto <anemo@xxxxxxxxxxxxx> wrote:
> >>>>> On Mon, 27 Feb 2006 09:29:23 +0800, zhuzhenhua <zzh.hust@xxxxxxxxx> said:
> zzh> our board is a FPGA board for embedded system, there is no ISA,
> zzh> and use memory map IO, is there anything need to configure?
>
> Even if it is not true ISA, your FPGA should drive ISA-like signals
> for the chip.  AC timings of these signals should meet the
> requirements of the chip.  I do not know they are configurable or not.
> Do cross-check the 8019 datasheet and the FPGA specification.
the ethernet just use the sram interface to control IO
>
> zzh> now i printk the ISR and RSR value when bogus packet accepted,
> zzh> are these two registers correct? messages as follow
>
> It seems correct.  So it would be something wrong with get_8390_hdr ...
the get_8390_hdr is very simple , as follow

static void my_enet_get_8390_hdr(struct net_device *dev,
				    struct e8390_pkt_hdr *hdr,
				    int ring_page)
{
	int cnt;
	unsigned char *ptrc;

	/* This *shouldn't* happen. If it does, it's the last thing you'll see */
	if (ei_status.dmaing) {
		printk("%s: DMAing conflict in ne_get_8390_hdr "
		       "[DMAstat:%d][irqlock:%d].\n", dev->name,
		       ei_status.dmaing, ei_status.irqlock);
		return;
	}

	ei_status.dmaing |= 0x01;
	writeb(E8390_NODMA + E8390_PAGE0 + E8390_START, iobase + NE_CMD);
	writeb(ENISR_RDC, iobase + NE_EN0_ISR);
	writeb(sizeof(struct e8390_pkt_hdr), iobase + NE_EN0_RCNTLO);
	writeb(0, iobase + NE_EN0_RCNTHI);
	writeb(0, iobase + NE_EN0_RSARLO);	/* On page boundary */
	writeb(ring_page, iobase + NE_EN0_RSARHI);
	writeb(E8390_RREAD + E8390_START, iobase + NE_CMD);

	ptrc = (unsigned char *) hdr;
	for (cnt = 0; cnt < sizeof(struct e8390_pkt_hdr); cnt++)
		*ptrc++ = readb(iobase + NE_DATAPORT);

	writeb(ENISR_RDC, iobase + NE_EN0_ISR);	/* Ack intr. */

	/* I am Little Endian, and received byte count is Little Endian. */
	hdr->count = le16_to_cpu(hdr->count);

	ei_status.dmaing &= ~0x01;
}

>
> ---
> Atsushi Nemoto
>

i have try to disable the check of status in ei_receive, as follow
...
#ifdef CONFIG_REDWOOD_4
		 else if ((pkt_stat & 0x1F) == ENRSR_RXOK)
#else
		 else if ( 1 || (pkt_stat & 0x0F) == ENRSR_RXOK)
#endif
		{
...
but the nfs still not accept the packet, it still have the messages
"nfs server xxxx not responding, still trying"


Best Regards
zhuzhenhua


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux