diff options
author | Claudiu Manoil <claudiu.manoil@freescale.com> | 2014-02-17 11:53:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-18 21:03:01 +0100 |
commit | 208627883ecfaa182c266eb67178bb71d392af54 (patch) | |
tree | 92514547385e7083c09cd05c247a59a29662a614 /Documentation | |
parent | net: i40evf: Remove duplicate include (diff) | |
download | linux-208627883ecfaa182c266eb67178bb71d392af54.tar.xz linux-208627883ecfaa182c266eb67178bb71d392af54.zip |
gianfar: Cleanup/Fix gfar_probe and the hw init code
Factor out gfar_hw_init() to contain all the controller hw
initialization steps for a better control of register writes,
and to significantly simplify the tangled code from gfar_probe().
This results in code size and stack usage reduction (besides
code readability).
Fix memory leak on device removal, by freeing the rx_/tx_queue
structures.
Replace custom bit swapping function with a library one (bitrev8).
Move allocation of rx_/tx_queue struct arrays before the group
structure init, because in order to assign Rx/Tx queues
to groups we need to have the queues first. This also allows
earlier bail out of gfar_probe(), in case the memory allocation
fails.
The flow control checks for maccfg1 were removed from gfar_probe(),
since flow control is disabled at probe time (priv->rx_/tx_pause_en
are 0). Redundant initializations (by 0) also removed.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions