1. 18 Oct, 2014 12 commits
  2. 17 Oct, 2014 8 commits
  3. 16 Oct, 2014 10 commits
  4. 15 Oct, 2014 10 commits
    • Claudiu Manoil's avatar
      gianfar: Add FCS to rx buffer size (fix) · f5b720b8
      Claudiu Manoil authored
      For each Rx frame the eTSEC writes its FCS (Frame Check Sequence)
      to the Rx buffer.
      
      The eTSEC h/w manual states in the "Receive Buffer Descriptor Field
      Descriptions" table:
      "Data length is the number of octets written by the eTSEC into this BD's
      data buffer if L is cleared (the value is equal to MRBLR), or, if L is
      set, the length of the frame including *CRC*, FCB (if RCTRL[PRSDEP > 00),
      preamble (if MACCFG2[PreAmRxEn]=1), time stamp (if RCTRL[TS] = 1) and
      any padding (RCTRL[PAL])."
      
      Though the FCS bytes are removed by the driver before passing the skb
      to the net stack, the Rx buffer size computation does not currently
      take into account the FCS bytes (4 bytes).
      Because the Rx buffer size is multiple of 512 bytes, leaving out the
      FCS is not a problem for the default MTU of 1500, as the Rx buffer size
      is 1536 in this case.  However, for custom MTUs, where the difference
      between the MTU size and the Rx buffer size is less, this can be a
      problem as the computed Rx buffer size won't be enough to accomodate
      the FCS for a received frame that is big enough (close to MTU size).
      In such case the received frame is considered to be incomplete (L flag
      not set in the RxBD status) and silently dropped.
      
      Note that the driver does not currently support S/G on Rx, so it has to
      compute its Rx buffer size based on the MTU of the device.
      Reported-by: default avatarKristian Otnes <kotnes@cisco.com>
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5b720b8
    • Michael S. Tsirkin's avatar
      virtio_net: fix use after free · 4b7fd2e6
      Michael S. Tsirkin authored
      commit 0b725a2c
          net: Remove ndo_xmit_flush netdev operation, use signalling instead.
      
      added code that looks at skb->xmit_more after the skb has
      been put in TX VQ. Since some paths process the ring and free the skb
      immediately, this can cause use after free.
      
      Fix by storing xmit_more in a local variable.
      
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b7fd2e6
    • Nimrod Andy's avatar
      net: fec: ptp: fix convergence issue to support LinuxPTP stack · 28b5f058
      Nimrod Andy authored
      iMX6SX IEEE 1588 module has one hw issue in capturing the ATVR register.
      The current SW flow is:
      		ENET0->ATCR |= ENET_ATCR_CAPTURE_MASK;
      		ts_counter_ns = ENET0->ATVR;
      The ATVR value is not expected value that cause LinuxPTP stack cannot be convergent.
      
      ENET Block Guide/ Chapter for the iMX6SX (PELE) address the issue:
      After set ENET_ATCR[Capture], there need some time cycles before the counter
      value is capture in the register clock domain. The wait-time-cycles is at least
      6 clock cycles of the slower clock between the register clock and the 1588 clock.
      So need something like:
      		ENET0->ATCR |= ENET_ATCR_CAPTURE_MASK;
      		wait();
      		ts_counter_ns = ENET0->ATVR;
      
      For iMX6SX, the 1588 ts_clk is fixed to 25Mhz, register clock is 66Mhz, so the
      wait-time-cycles must be greater than 240ns (40ns * 6). The patch add 1us delay
      before cpu read ATVR register.
      
      Changes V2:
      Modify the commit/comments log to describe the issue clearly.
      Signed-off-by: default avatarFugang Duan <B38611@freescale.com>
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      28b5f058
    • Anish Bhatt's avatar
      cxgb4i : Fix -Wmaybe-uninitialized warning. · 001586a7
      Anish Bhatt authored
      Identified by kbuild test robot. csk family is always set to be AF_INET or
      AF_INET6, so skb will always be initialized to some value but there is no harm
      in silencing the warning anyways.
      Signed-off-by: default avatarAnish Bhatt <anish@chelsio.com>
      Fixes : f42bb57c ('cxgb4i : Fix -Wunused-function warning')
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      001586a7
    • Tom Herbert's avatar
      net: Add ndo_gso_check · 04ffcb25
      Tom Herbert authored
      Add ndo_gso_check which a device can define to indicate whether is
      is capable of doing GSO on a packet. This funciton would be called from
      the stack to determine whether software GSO is needed to be done. A
      driver should populate this function if it advertises GSO types for
      which there are combinations that it wouldn't be able to handle. For
      instance a device that performs UDP tunneling might only implement
      support for transparent Ethernet bridging type of inner packets
      or might have limitations on lengths of inner headers.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      04ffcb25
    • Giuseppe CAVALLARO's avatar
      stmmac: fix sti compatibililies · 71ae8f52
      Giuseppe CAVALLARO authored
      this patch is to fix the stmmac data compatibilities for
      all the SoCs inside the platform file.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71ae8f52
    • David S. Miller's avatar
      Merge branch 'cxgb4' · 2ef1e9ef
      David S. Miller authored
      Anish Bhatt says:
      
      ====================
      ipv6 and related cleanup for cxgb4/cxgb4i
      
      This patch set removes some duplicated/extraneous code from cxgb4i, guards
      cxgb4 against compilation failure based on ipv6 tristate, make ipv6 related
      code no longer be enabled by default irrespective of ipv6 tristate and fixes
      a refcnt issue.
      -Anish
      
      v2 : Provide more detailed commit messages, make subject more concise as
      recommended by Dave Miller.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ef1e9ef
    • Anish Bhatt's avatar
      cxgb4i: Remove duplicate call to dst_neigh_lookup() · c5bbcb58
      Anish Bhatt authored
      There is an extra call to dst_neigh_lookup() leftover in cxgb4i that can cause
      an unreleased refcnt issue. Remove extraneous call.
      Signed-off-by: default avatarAnish Bhatt <anish@chelsio.com>
      
      Fixes : 759a0cc5 ('cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6 api')
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c5bbcb58
    • Anish Bhatt's avatar
      cxgb4i : Fix -Wunused-function warning · f42bb57c
      Anish Bhatt authored
      A bunch of ipv6 related code is left on by default. While this causes no
      compilation issues, there is no need to have this enabled by default. Guard
      with an ipv6 check, which also takes care of a -Wunused-function warning.
      Signed-off-by: default avatarAnish Bhatt <anish@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f42bb57c
    • Anish Bhatt's avatar
      cxgb4 : Fix build failure in cxgb4 when ipv6 is disabled/not in-built · 1bb60376
      Anish Bhatt authored
      cxgb4 ipv6 does not guard against ipv6 being disabled, or the standard
      ipv6 module vs inbuilt tri-state issue. This was fixed for cxgb4i & iw_cxgb4
      but missed for cxgb4.
      Signed-off-by: default avatarAnish Bhatt <anish@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1bb60376