This is the mail archive of the ecos-patches@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: Re: PATCH eth/powerpc fec/quicc RX routine


The powerpc fec and scc ethernet drivers (as well as the scc hdlc driver) always include the CRC to the received data.
There is no setting which inhibits this.
So we need to remove that form the packet.

Regards
harald

P.S.: The linux drivers and the ECOS quicc2 drivers do the same.


>>> Andrew Lunn <andrew@lunn.ch> 13.10.04 09:52:36 >>>
On Mon, Oct 11, 2004 at 10:09:24AM +0200, Harald K?the wrote:
> Hello,
> 
> during my bridging tests I found out that the packet which is passed to the upper layer contains the CRC.
> This causes packets which use the full ethernet length will not be forwarded.
> 
> This patch removes the CRC.
> 
> A further patch which adds setting the promiscuous mode to the FEC can be provided.
> 
> Regards
> Harald

I know nothing about this specifi hardware, but normally there is a
bit you can set in the ethernet controller to make it either pass or
drop the CRC. It makes more sense to change this bit than to stip the
CRC.

Could you check the documentation to see if such a bit exists.

        Andrew


> 
> 
> diff -urN packages.orig/devs/eth/powerpc/fec/current/ChangeLog packages/devs/eth/powerpc/fec/current/ChangeLog
> --- packages.orig/devs/eth/powerpc/fec/current/ChangeLog	2003-12-21 14:46:52.000000000 +0100
> +++ packages/devs/eth/powerpc/fec/current/ChangeLog	2004-10-11 09:59:51.000000000 +0200
> @@ -1,3 +1,7 @@
> +2004-10-11  Harald Kuethe  <hkuethe@controlware.de>
> +
> +	* src/if_fec.c (fec_eth_RxEvent): remove crc from packet.
> +
>  2003-12-21  Gary Thomas  <gary@mlbassoc.com>
>  
>  	* src/if_fec.c (fec_eth_RxEvent): Clean up some unused variables.
> diff -urN packages.orig/devs/eth/powerpc/fec/current/src/if_fec.c packages/devs/eth/powerpc/fec/current/src/if_fec.c
> --- packages.orig/devs/eth/powerpc/fec/current/src/if_fec.c	2003-12-21 14:46:54.000000000 +0100
> +++ packages/devs/eth/powerpc/fec/current/src/if_fec.c	2004-10-11 09:55:35.000000000 +0200
> @@ -678,7 +678,7 @@
>          if ((rxbd->ctrl & FEC_BD_Rx_Empty) == 0) {
>              qi->rxbd = rxbd;  // Save for callback
>              set_led(LED_RxACTIVE);
> -            (sc->funs->eth_drv->recv)(sc, rxbd->length);
> +            (sc->funs->eth_drv->recv)(sc, rxbd->length - 4); // remove CRC 
>          }
>          if (rxbd->ctrl & FEC_BD_Rx_Wrap) {
>              rxbd = qi->rbase;
> diff -urN packages.orig/devs/eth/powerpc/quicc/current/ChangeLog packages/devs/eth/powerpc/quicc/current/ChangeLog
> --- packages.orig/devs/eth/powerpc/quicc/current/ChangeLog	2003-08-19 19:29:44.000000000 +0200
> +++ packages/devs/eth/powerpc/quicc/current/ChangeLog	2004-10-11 09:59:44.000000000 +0200
> @@ -1,3 +1,7 @@
> +2004-10-11  Harald Kuethe  <hkuethe@controlware.de>
> +
> +	* src/if_quicc.c (quicc_eth_RxEvent): remove crc from packet.
> +
>  2003-08-19  Gary Thomas  <gary@mlbassoc.com>
>  
>  	* src/if_quicc.c (quicc_eth_init): Use 'quicc_eth_command()'
> diff -urN packages.orig/devs/eth/powerpc/quicc/current/src/if_quicc.c packages/devs/eth/powerpc/quicc/current/src/if_quicc.c
> --- packages.orig/devs/eth/powerpc/quicc/current/src/if_quicc.c	2003-08-19 19:29:44.000000000 +0200
> +++ packages/devs/eth/powerpc/quicc/current/src/if_quicc.c	2004-10-11 09:59:02.000000000 +0200
> @@ -646,7 +646,7 @@
>              qi->rxbd = rxbd;  // Save for callback
>              set_led(LED_RxACTIVE);
>  			
> -            (sc->funs->eth_drv->recv)(sc, rxbd->length);
> +            (sc->funs->eth_drv->recv)(sc, rxbd->length - 4); // remove CRC
>  			
>              clear_led(LED_RxACTIVE);
>          } 
> 


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