Skip to contentSkip to conversation

AGAIN: need help for LAN91C111 driver

U-Boot-Users Stephan Linz 1 participant 1 message Oct 28, 2003

lore
Share & tools
lore
#0 lore raw

Hi all,

I've found unexpected code inside of smc_send_packet() in file drivers/smc91111.c (near line 585-590):

	/* send the packet length ( +6 for status, length and ctl byte )
	   and the status word ( set to zeros ) */
#ifdef USE_32_BIT
	SMC_outl ((length + 6) << 16, SMC91111_DATA_REG);
#else
	SMC_outw (0, SMC91111_DATA_REG);
	/* send the packet length ( +6 for status words, length, and ctl */
	SMC_outw ((length + 6), SMC91111_DATA_REG);

#endif

This code assembles the header of a data frame for transmission. My SMSC manual says about the BYTE COUNTER: "... alway even ...", Hmm , this code will put in even and odd length arguments. "length" should be replaced with "(length & 0xfffe)", the same code at top of function for page number calculation.

What's your opinion?

Best regards

Signature · 15 lines
Mit freundlichen Gruessen
Stephan Linz



======================================================================
Stephan Linz
Softwareentwicklung

MAZeT GmbH                   Email: mailto:[email protected]
G?schwitzer Str. 32          Tel. : (3641) 2809-55
D-07745 Jena                 Fax  : (3641) 2809-12

Besuchen Sie bitte unsere Web-Seiten: http://www.MAZeT.de
======================================================================