
On Tuesday, March 01, 2011 03:37:30 Michal Simek wrote:
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?
looking at net/eth.c, -1 is an error return value. add in current docs which says 0 is a success return value. that leaves all other values as currently undocumented. if a driver survey suggested that returning the length was useful info, then perhaps the documentation could be updated. but as you noted, that return value isnt currently checked.
so for now, you could change the recv func to return the length rather than 0 and i wouldnt complain, but always returning 1 is wrong. -mike