[PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

Rasmus Villemoes rasmus.villemoes at prevas.dk
Sat Dec 5 14:17:23 EST 2020


While trying to figure out how to allow bumping the MTU with the
ucc_geth driver, I fell into a rabbit hole and stumbled on a whole
bunch of issues of varying importance - some are outright bug fixes,
while most are a matter of simplifying the code to make it more
accessible.

At the end of digging around the code and data sheet to figure out how
it all works, I think the MTU issue might be fixed by a one-liner, but
I'm not sure it can be that simple. It does seem to work (ping -s X
works for larger values of X, and wireshark confirms that the packets
are not fragmented).

Re patch 2, someone in NXP should check how the hardware actually
works and make an updated reference manual available.

Rasmus Villemoes (20):
  ethernet: ucc_geth: set dev->max_mtu to 1518
  ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram
  ethernet: ucc_geth: remove unused read of temoder field
  soc: fsl: qe: make cpm_muram_offset take a const void* argument
  soc: fsl: qe: store muram_vbase as a void pointer instead of u8
  soc: fsl: qe: add cpm_muram_free_addr() helper
  ethernet: ucc_geth: use qe_muram_free_addr()
  ethernet: ucc_geth: remove unnecessary memset_io() calls
  ethernet: ucc_geth: replace kmalloc+memset by kzalloc
  ethernet: ucc_geth: remove {rx,tx}_glbl_pram_offset from struct
    ucc_geth_private
  ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()
  ethernet: ucc_geth: factor out parsing of {rx,tx}-clock{,-name}
    properties
  ethernet: ucc_geth: constify ugeth_primary_info
  ethernet: ucc_geth: don't statically allocate eight ucc_geth_info
  ethernet: ucc_geth: use UCC_GETH_{RX,TX}_BD_RING_ALIGNMENT macros
    directly
  ethernet: ucc_geth: remove bd_mem_part and all associated code
  ethernet: ucc_geth: replace kmalloc_array()+for loop by kcalloc()
  ethernet: ucc_geth: add helper to replace repeated switch statements
  ethernet: ucc_geth: inform the compiler that numQueues is always 1
  ethernet: ucc_geth: simplify rx/tx allocations

 drivers/net/ethernet/freescale/ucc_geth.c | 553 ++++++++--------------
 drivers/net/ethernet/freescale/ucc_geth.h |  15 +-
 drivers/soc/fsl/qe/qe_common.c            |  20 +-
 include/soc/fsl/qe/qe.h                   |  15 +-
 include/soc/fsl/qe/ucc_fast.h             |   1 -
 5 files changed, 219 insertions(+), 385 deletions(-)

-- 
2.23.0




More information about the linux-arm-kernel mailing list