From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Tue, 01 Mar 2011 09:37:30 +0100 Subject: [U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot In-Reply-To: <201102281429.02326.vapier@gentoo.org> References: <1298886033-3350-1-git-send-email-monstr@monstr.eu> <201102281236.29967.vapier@gentoo.org> <4D6BEE8F.3050900@monstr.eu> <201102281429.02326.vapier@gentoo.org> Message-ID: <4D6CB04A.1040002@monstr.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Mike Frysinger wrote: > On Monday, February 28, 2011 13:50:55 Michal Simek wrote: >> Mike Frysinger wrote: >>> On Monday, February 28, 2011 04:40:33 Michal Simek wrote: >>>> + return 1; >>> a bunch of these funcs return 1 when i'm pretty sure they should be 0 >> init function is called from eth.c:eth_init(). From the code below you see >> that return can be >=0. > > funny enough, that func in your patch is returning 0 when it should be 1. it > doesnt explain why your recv/send are returning 1 when it should be 0. BTW: blackin emac recv functions return 0, -1 and length values. Is it correct? static int bfin_EMAC_recv(struct eth_device *dev) { int length = 0; for (;;) { if ((rxbuf[rxIdx]->StatusWord & RX_COMP) == 0) { length = -1; break; } ... return length; } Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian