RE: [Possible spam] Re: Driver for via-velocity gigabit NIC

"Timothy Legge" <[email protected]> Wed, 8 Mar 2006 10:12:31 -0400
Newsgroups gmane.network.etherboot.devel
Message-ID <[email protected]>
 

> -----Original Message-----
> From: Marty Connor [mailto:[email protected]] 
> Sent: Wednesday, March 08, 2006 10:00 AM
> To: Etherboot developers list
> Subject: [Possible spam] Re: [Etherboot-developers] Driver 
> for via-velocity gigabit NIC

> Show the code.  Justify your choices.
> 
> >   I did not need to change the
> > transmit and poll or anything other than the specific 
> section that did 
> > at 64-byte alignment of the rings and buffers (in all probably less 
> > than 30 lines of code).
> 
> Until you understand and can explain this code clearly, 
> please do not commit it.

I can clearly explain how the code I committed works.  It is very
similar to the following from r8168.c:

	/* Rx Desscriptor needs 256 bytes alignment; */
	RxPhyAddr = virt_to_bus(tpc->RxDescArrays);
	diff = 256 - (RxPhyAddr - ((RxPhyAddr >> 8) << 8));
	RxPhyAddr += diff;
	tpc->RxDescArray = (struct RxDesc *) (tpc->RxDescArrays + diff);

It essentially create a temporary pointer to the ring in this case and
calculates the difference between the addres of that pointe and the next
highest address that is aligned on a 256 byte (via-velocity requires 64
byte).  It then add the difference to the temporary pointer to align the
ring and finally the aligned ring is assigned to the pointer kept in the
drivers structure for use later.  I essentially do that 4 times, once
for each ring and buffer.

I cannot explain at present why the code that I *did not* commit did not
work.  I can post it and embarrass myself if you would like but I cannot
get it till later today.

Tim


**********************************************************************
This E-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary, confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this E-mail message immediately. 

Le present message electronique (y compris les pieces qui y sont annexees, le cas echeant) s'addresse au destinataire indique et peut contenir des renseignements de caractere prive ou confidentiel. Si vous n'etes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. Si ce message vous a ete transmis par erreur, veuillez en informer l'expediteur et le  supprimer immediatement.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642