====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
soc:2008:mdeck:journal:week5 [2008/06/27 06:41] mdeck |
soc:2008:mdeck:journal:week5 [2008/07/02 09:50] (current) mdeck |
||
---|---|---|---|
Line 67: | Line 67: | ||
outw ( intr_status, ioaddr + SCBStatus ); | outw ( intr_status, ioaddr + SCBStatus ); | ||
inw ( ioaddr + SCBStatus ); | inw ( ioaddr + SCBStatus ); | ||
+ | |||
+ | |||
+ | |||
+ | |||
Line 121: | Line 125: | ||
Had the weekly meeting today. Marty suggested reworking my error handling technique. He also pointed me to this [[http://lxr.linux.no/linux/Documentation/CodingStyle|Linux coding style guide]]. So the code will be getting a style upgrade ;) | Had the weekly meeting today. Marty suggested reworking my error handling technique. He also pointed me to this [[http://lxr.linux.no/linux/Documentation/CodingStyle|Linux coding style guide]]. So the code will be getting a style upgrade ;) | ||
+ | |||
+ | === 28 & 29 June === | ||
+ | |||
+ | * [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commitdiff;h=feb5f34d4c1d83e175aba47603e9842acbe2cf98|[Drivers-eepro100] Formatting, code modularizing, etc.]] | ||
+ | |||
+ | Formatting changes were made throughout the code to conform with the aforementioned style guide. Multiple variable declarations on a single line were separated. Multiple assignments on a line were separated. if-statements on a single line were split. Large comments were moved to function comments or to the header. | ||
+ | |||
+ | In ''ifec_net_open()'', the ''struct ifec_cfg'' code was redundant. The struct's data declaration and the run-time modification were not necessary. I moved most of the assignments into the data declaration for the struct. Also, Individual Address Setup (ias) command references were coalesced into one sequence for code clarity. | ||
+ | |||
+ | In ''ifec_net_poll()'', tx processing and rx processing were separated into ''ifec_tx_process()'' and ''ifec_rx_process()''. In ''ifec_net_transmit()'', the switch statement responsible for issuing resume commands as necessary was moved into ''ifec_tx_wake()''. | ||
+ | |||
+ | Also, a pointer check was added in ''ifec_net_close()'' and error handline in ''ifec_net_open()'' was cleaned up. | ||
+ | |||
+ | The code segment at the beginning of ''ifec_net_open()'' is currently commented out. I don't believe this is needed, as it was added while trying to debug earlier. I will do more thorough testing before removing it completely. |