1. 27 3月, 2013 2 次提交
    • G
      stmmac: support extend descriptors · c24602ef
      Giuseppe CAVALLARO 提交于
      This patch is to support the extend descriptors available
      in the chips newer than the 3.50.
      
      In case of the extend descriptors cannot be supported,
      at runtime, the driver will continue to work using the old style.
      
      In detail, this support extends the main descriptor structure
      adding new descriptors: 4, 5, 6, 7. The desc4 gives us extra
      information about the received ethernet payload when it is
      carrying PTP packets or TCP/UDP/ICMP over IP packets.
      The descriptors 6 and 7 are used for saving HW L/H timestamps (PTP).
      
      V2: this new version removes the Koption added in the first implementation
      because all the checks now to verify if the extended descriptors are
      actually supported happen at probe time.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c24602ef
    • G
      stmmac: reorganize chain/ring modes removing Koptions · 4a7d666a
      Giuseppe CAVALLARO 提交于
      Previously we had two Koptions to decide if the stmmac
      had to use either a ring or a chain to manage its descriptors.
      This patch removes the Kernel configuration options and it allow us
      to use the chain mode by passing a module option.
      Ring mode continues to be the default.
      
      Also with this patch, it will be easier to validate the driver built and
      guarantee that all the two modes always compile fine.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a7d666a
  2. 05 4月, 2012 1 次提交
  3. 16 2月, 2012 1 次提交
  4. 20 10月, 2011 1 次提交
    • G
      stmmac: add CHAINED descriptor mode support (V4) · 286a8372
      Giuseppe CAVALLARO 提交于
      This patch enhances the STMMAC driver to support CHAINED mode of
      descriptor.
      
      STMMAC supports DMA descriptor to operate both in dual buffer(RING)
      and linked-list(CHAINED) mode. In RING mode (default) each descriptor
      points to two data buffer pointers whereas in CHAINED mode they point
      to only one data buffer pointer.
      
      In CHAINED mode each descriptor will have pointer to next descriptor in
      the list, hence creating the explicit chaining in the descriptor itself,
      whereas such explicit chaining is not possible in RING mode.
      
      First version of this work has been done by Rayagond.
      Then the patch has been reworked avoiding ifdef inside the C code.
      A new header file has been added to define all the functions needed for
      managing enhanced and normal descriptors.
      In fact, these have to be specialized according to the ring/chain usage.
      Two new C files have been also added to implement the helper routines
      needed to manage: jumbo frames, chain and ring setup (i.e. desc3).
      Signed-off-by: NRayagond Kokatanur <rayagond@vayavyalabs.com>
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      286a8372
  5. 12 8月, 2011 1 次提交
  6. 17 10月, 2010 1 次提交
  7. 18 9月, 2010 1 次提交
  8. 26 8月, 2010 1 次提交
  9. 28 7月, 2010 1 次提交
    • G
      stmmac: fix automatic PAD/FCS stripping · 3eeb2997
      Giuseppe CAVALLARO 提交于
      For Simple Ethernet frames (802.2 and 802.3) the GMAC Core
      never strips pad and fcs. This means the ACS has no effect
      on IPv4/6 frames.
      The FL bits, in the RDES0, include the FCS so the driver
      has to remove it in SW.
      For 802.3 frame format with LLC or LLC-SNAP, when set the ACS
      bit, the HW strips both PAD and FCS.
      The FL bits, in the RDES0, actually represents the frame length
      already stripped.
      This patch fixes this logic within the device driver that
      erroneously removed 4byte from 802.3 frames already stripped
      corrupting the payload.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3eeb2997
  10. 14 5月, 2010 1 次提交
    • J
      drivers/net: Remove unnecessary returns from void function()s · a4b77097
      Joe Perches 提交于
      This patch removes from drivers/net/ all the unnecessary
      return; statements that precede the last closing brace of
      void functions.
      
      It does not remove the returns that are immediately
      preceded by a label as gcc doesn't like that.
      
      It also does not remove null void functions with return.
      
      Done via:
      $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
        xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'
      
      with some cleanups by hand.
      
      Compile tested x86 allmodconfig only.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4b77097
  11. 14 4月, 2010 2 次提交