1. 03 8月, 2014 1 次提交
  2. 01 8月, 2014 3 次提交
    • V
      net: stmmac: Support devicetree configs for mcast and ucast filter entries · 3b57de95
      Vince Bridgers 提交于
      This patch adds and modifies code to support multiple Multicast and Unicast
      Synopsys MAC filter configurations. The default configuration is defined to
      support legacy driver behavior, which is 64 Multicast bins. The Unicast
      filter code previously assumed all controllers support 32 or 16 Unicast
      addresses based on controller version number, but this has been corrected
      to support a default of 1 Unicast address. The filter configuration may
      be specified through the devicetree using a Synopsys specific device tree
      entry. This information was verified with Synopsys through
      Synopsys Support Case #8000684337 and shared with the maintainer.
      Signed-off-by: NVince Bridgers <vbridgers2013@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b57de95
    • V
      net: stmmac: Correct set_filter for multicast and unicast cases · aefef4c1
      Vince Bridgers 提交于
      This patch removes the check for the number of mulitcast addresses
      when using hash based filtering since it's not necessary. If the number
      of multicast addresses in the list exceeds the number of multicast hash
      bins, the bins will "fold" over into one of the bins configured and
      enabled for the particular component instance.
      
      The default number of maximum unicast addresses was changed from 32 to 1
      since this number is not dependent on the component revision. The maximum
      number of multicast and unicast addresses is dependent on the configuration
      of the Synopsys EMAC configured by the SOC architect at the time the
      features were selected and configured for a particular component. Sadly,
      Synopsys does not provide a way to query the precise number supported
      by a particular component, so we must fall back on a devicetree entry.
      This configuration could vary from vendor to vendor (such as STMicro,
      Altera, etc).
      
      The multicast bins are set for every possible filtering case (including
      no entries) - previously the bits were set only if multicast filter entries
      were present.
      Signed-off-by: NVince Bridgers <vbridgers2013@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aefef4c1
    • V
      net: stmmac: Change MAC interface to support multiple filter configurations · 7ed24bbe
      Vince Bridgers 提交于
      The synopsys EMAC can be configured for different numbers of multicast hash
      bins and perfect filter entries at device creation time and there's no way
      to query this configuration information at runtime. As a result, a devicetree
      parameter is required in order for the driver to program these filters
      correctly for a particular device instance. This patch modifies the
      10/100/1000 MAC software interface such that these configuration parameters
      can be set at initialization time.
      Signed-off-by: NVince Bridgers <vbridgers2013@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ed24bbe
  3. 31 7月, 2014 11 次提交
  4. 30 7月, 2014 5 次提交
  5. 29 7月, 2014 1 次提交
  6. 26 7月, 2014 12 次提交
  7. 25 7月, 2014 7 次提交
    • D
      bnx2x: fix crash during TSO tunneling · fe26566d
      Dmitry Kravkov 提交于
      When TSO packet is transmitted additional BD w/o mapping is used
      to describe the packed. The BD needs special handling in tx
      completion.
      
      kernel: Call Trace:
      kernel: <IRQ>  [<ffffffff815e19ba>] dump_stack+0x19/0x1b
      kernel: [<ffffffff8105dee1>] warn_slowpath_common+0x61/0x80
      kernel: [<ffffffff8105df5c>] warn_slowpath_fmt+0x5c/0x80
      kernel: [<ffffffff814a8c0d>] ? find_iova+0x4d/0x90
      kernel: [<ffffffff814ab0e2>] intel_unmap_page.part.36+0x142/0x160
      kernel: [<ffffffff814ad0e6>] intel_unmap_page+0x26/0x30
      kernel: [<ffffffffa01f55d7>] bnx2x_free_tx_pkt+0x157/0x2b0 [bnx2x]
      kernel: [<ffffffffa01f8dac>] bnx2x_tx_int+0xac/0x220 [bnx2x]
      kernel: [<ffffffff8101a0d9>] ? read_tsc+0x9/0x20
      kernel: [<ffffffffa01f8fdb>] bnx2x_poll+0xbb/0x3c0 [bnx2x]
      kernel: [<ffffffff814d041a>] net_rx_action+0x15a/0x250
      kernel: [<ffffffff81067047>] __do_softirq+0xf7/0x290
      kernel: [<ffffffff815f3a5c>] call_softirq+0x1c/0x30
      kernel: [<ffffffff81014d25>] do_softirq+0x55/0x90
      kernel: [<ffffffff810673e5>] irq_exit+0x115/0x120
      kernel: [<ffffffff815f4358>] do_IRQ+0x58/0xf0
      kernel: [<ffffffff815e94ad>] common_interrupt+0x6d/0x6d
      kernel: <EOI>  [<ffffffff810bbff7>] ? clockevents_notify+0x127/0x140
      kernel: [<ffffffff814834df>] ? cpuidle_enter_state+0x4f/0xc0
      kernel: [<ffffffff81483615>] cpuidle_idle_call+0xc5/0x200
      kernel: [<ffffffff8101bc7e>] arch_cpu_idle+0xe/0x30
      kernel: [<ffffffff810b4725>] cpu_startup_entry+0xf5/0x290
      kernel: [<ffffffff815cfee1>] start_secondary+0x265/0x27b
      kernel: ---[ end trace 11aa7726f18d7e80 ]---
      
      Fixes: a848ade4 ("bnx2x: add CSUM and TSO support for encapsulation protocols")
      Reported-by: NYulong Pei <ypei@redhat.com>
      Cc: Michal Schmidt <mschmidt@redhat.com>
      Signed-off-by: NDmitry Kravkov <Dmitry.Kravkov@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe26566d
    • C
    • C
      net/macb: add RX checksum offload feature · 924ec53c
      Cyrille Pitchen 提交于
      When RX checksum offload is enabled at GEM level (bit 24 set in the Network
      Control Register), frames with invalid IP, TCP or UDP checksums are
      discarted even if promiscuous mode is enabled (bit 4 set in the Network Control
      Register).
      
      This was verified with a simple userspace program, which corrupts UDP checksum
      using libnetfilter_queue.
      
      Then both IFF_PROMISC bit must be clear in dev->flags and NETIF_F_RXCSUM bit
      must be set in dev->features to enable RX checksum offload at GEM level. This
      way tcpdump is still able to capture corrupted frames.
      
      Also skb->ip_summed is set to CHECKSUM_UNNECESSARY only when both TCP/IP or
      UDP/IP checksums were verified by the GEM. Indeed the GEM may verify only IP
      checksum but not the one for ICMP (or other protocol than TCP or UDP).
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      924ec53c
    • C
      85ff3d87
    • C
      net/macb: add scatter-gather hw feature · a4c35ed3
      Cyrille Pitchen 提交于
      The scatter-gather feature will allow to enable the Generic Segmentation Offload.
      Generic Segmentation Offload can be enabled/disabled using ethtool -K DEVNAME gso on|off.
      
      e.g:
      ethtool -K eth0 gso off
      
      When enabled, the driver may be provided with socket buffers splitted into many fragments.
      These fragments need to be queued into the TX ring in reverse order, starting from to the
      last one down to the first one, to avoid a race condition with the MAC.
      Especially the 'TX_USED' bit in word 1 of the transmit buffer descriptor of the
      first fragment should be cleared at the very final step of the queueing algorithm.
      This will tell the hardware that fragments are ready to be sent.
      
      Also since the MAC only update the status word of the first buffer descriptor of the
      ethernet frame, the queueing algorithm can no longer expect a 'TX_USED' bit to be set by
      the MAC into the buffer descriptor following the one for last fragment of the skb.
      This is why the driver sets the 'TX_USED' bit before queueing any fragment, so the end of
      queue position is well defined for the MAC.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4c35ed3
    • N
      net/macb: configure for FIFO mode and non-gigabit · e175587f
      Nicolas Ferre 提交于
      This addition will also allow to configure DMA burst length.
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e175587f
    • M
      drivers: net: cpsw: cleanup: remove unused function · ef492001
      Mugunthan V N 提交于
      removing unused function as part of driver cleanup.`
      Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef492001