1. 11 Aug, 2014 21 commits
    • Zoltan Kiss's avatar
      xen-netfront: Fix handling packets on compound pages with skb_linearize · 97a6d1bb
      Zoltan Kiss authored
      There is a long known problem with the netfront/netback interface: if the guest
      tries to send a packet which constitues more than MAX_SKB_FRAGS + 1 ring slots,
      it gets dropped. The reason is that netback maps these slots to a frag in the
      frags array, which is limited by size. Having so many slots can occur since
      compound pages were introduced, as the ring protocol slice them up into
      individual (non-compound) page aligned slots. The theoretical worst case
      scenario looks like this (note, skbs are limited to 64 Kb here):
      linear buffer: at most PAGE_SIZE - 17 * 2 bytes, overlapping page boundary,
      using 2 slots
      first 15 frags: 1 + PAGE_SIZE + 1 bytes long, first and last bytes are at the
      end and the beginning of a page, therefore they use 3 * 15 = 45 slots
      last 2 frags: 1 + 1 bytes, overlapping page boundary, 2 * 2 = 4 slots
      Although I don't think this 51 slots skb can really happen, we need a solution
      which can deal with every scenario. In real life there is only a few slots
      overdue, but usually it causes the TCP stream to be blocked, as the retry will
      most likely have the same buffer layout.
      This patch solves this problem by linearizing the packet. This is not the
      fastest way, and it can fail much easier as it tries to allocate a big linear
      area for the whole packet, but probably easier by an order of magnitude than
      anything else. Probably this code path is not touched very frequently anyway.
      Signed-off-by: default avatarZoltan Kiss <zoltan.kiss@citrix.com>
      Cc: Wei Liu <wei.liu2@citrix.com>
      Cc: Ian Campbell <Ian.Campbell@citrix.com>
      Cc: Paul Durrant <paul.durrant@citrix.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: xen-devel@lists.xenproject.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      97a6d1bb
    • Uwe Kleine-König's avatar
      net: fec: Support phys probed from devicetree and fixed-link · 407066f8
      Uwe Kleine-König authored
      This adds support for specifying the phy to be used with the fec in the
      devicetree using the standard phy-handle property and also supports
      fixed-link.
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      407066f8
    • Sanjeev Sharma's avatar
      smsc: replace WARN_ON() with WARN_ON_SMP() · 200d7db7
      Sanjeev Sharma authored
      spin_is_locked() always return false in uniprocessor configuration and therefore it
      would be advise to repalce with WARN_ON_SMP().
      Signed-off-by: default avatarSanjeev Sharma <Sanjeev_Sharma@mentor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      200d7db7
    • Zoltan Kiss's avatar
      xen-netback: Don't deschedule NAPI when carrier off · 2561cc15
      Zoltan Kiss authored
      In the patch called "xen-netback: Turn off the carrier if the guest is not able
      to receive" NAPI was descheduled when the carrier was set off. That's
      not what most of the drivers do, and we don't have any specific reason to do so
      as well, so revert that change.
      Signed-off-by: default avatarZoltan Kiss <zoltan.kiss@citrix.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: xen-devel@lists.xenproject.org
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2561cc15
    • Andreas Ruprecht's avatar
      net: ethernet: qlogic: qlcnic: Remove duplicate object file from Makefile · 7a6cdb8c
      Andreas Ruprecht authored
      In the Makefile, qlcnic_minidump.o is included twice in the list of
      object files linked into qlcnic.o.
      
      This change removes the superfluous include.
      Signed-off-by: default avatarAndreas Ruprecht <rupran@einserver.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7a6cdb8c
    • Himangi Saraogi's avatar
      wan: wanxl: Remove typedefs from struct names · db569581
      Himangi Saraogi authored
      The Linux kernel coding style guidelines suggest not using typedefs
      for structure types. This patch gets rid of the typedefs for
      port_t, card_status_t and card_t. Also, the names of the structs
      are changed to drop the _t, to make the name look less typedef-like.
      
      The following Coccinelle semantic patch detects two cases and a
      similar one detects the case for card_t.
      
      @tn1@
      type td;
      @@
      
      typedef struct { ... } td;
      
      @script:python tf@
      td << tn1.td;
      tdres;
      @@
      
      coccinelle.tdres = td;
      
      @@
      type tn1.td;
      identifier tf.tdres;
      @@
      
      -typedef
       struct
      +  tdres
         { ... }
      -td
       ;
      
      @@
      type tn1.td;
      identifier tf.tdres;
      @@
      
      -td
      + struct tdres
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db569581
    • Michael Schmitz's avatar
      m68k/atari: EtherNEC - ethernet support (ne) · 65eca28d
      Michael Schmitz authored
      Support for Atari EtherNEC ROM port adapters in ne.c
      Signed-off-by: default avatarMichael Schmitz <schmitz@debian.org>
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      65eca28d
    • Rickard Strandqvist's avatar
      net: ethernet: ti: cpmac.c: Cleaning up missing null-terminate after strncpy call · 9951e048
      Rickard Strandqvist authored
      Added a guaranteed null-terminate after call to strncpy.
      Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9951e048
    • Himangi Saraogi's avatar
      hdlc: Remove typedefs from struct names · 3fadb06d
      Himangi Saraogi authored
      The Linux kernel coding style guidelines suggest not using typedefs
      for structure types. This patch gets rid of the typedefs for
      fr_hdr and pvc_device. Also, the names of the structs are changed to
      drop the _t, to make the name look less typedef-like.
      
      The following Coccinelle semantic patch detects the case fr_hdr and a
      similar one detects the case for pvc_device.
      
      @tn1@
      type td;
      @@
      
      typedef struct { ... } td;
      
      @script:python tf@
      td << tn1.td;
      tdres;
      @@
      
      coccinelle.tdres = td;
      
      @@
      type tn1.td;
      identifier tf.tdres;
      @@
      
      -typedef
       struct
      +  tdres
         { ... }
      -td
       ;
      
      @@
      type tn1.td;
      identifier tf.tdres;
      @@
      
      -td
      + struct tdres
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3fadb06d
    • Himangi Saraogi's avatar
      airo_cs: Remove typedef local_info_t · 61ecba64
      Himangi Saraogi authored
      The Linux kernel coding style guidelines suggest not using typedefs
      for structure types. This patch gets rid of the typedef for
      local_info_t. Also, the name of the struct is changed to drop the _t,
      to make the name look less typedef-like.
      
      The following Coccinelle semantic patch detects the case:
      
      @tn@
      identifier i;
      type td;
      @@
      
      -typedef
       struct i { ... }
      -td
       ;
      
      @@
      type tn.td;
      identifier tn.i;
      @@
      
      -td
      + struct i
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61ecba64
    • Himangi Saraogi's avatar
      atmel: Remove typedef atmel_priv_ioctl · f0db82a5
      Himangi Saraogi authored
      The Linux kernel coding style guidelines suggest not using typedefs
      for structure types. This patch gets rid of the typedef for
      atmel_priv_ioctl.
      
      The following Coccinelle semantic patch detects the case:
      
      @tn@
      identifier i;
      type td;
      @@
      
      -typedef
       struct i { ... }
      -td
       ;
      
      @@
      type tn.td;
      identifier tn.i;
      @@
      
      -td
      + struct i
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f0db82a5
    • Himangi Saraogi's avatar
      com20020_cs: Remove typedef com20020_dev_t · 2dfd2533
      Himangi Saraogi authored
      The Linux kernel coding style guidelines suggest not using typedefs
      for structure types. This patch gets rid of the typedef for
      com20020_dev_t. Also, the name of the struct is changed to drop the
      _t, to make the name look less typedef-like.
      
      The following Coccinelle semantic patch detects the case:
      
      @tn@
      identifier i;
      type td;
      @@
      
      -typedef
       struct i { ... }
      -td
       ;
      
      @@
      type tn.td;
      identifier tn.i;
      @@
      
      -td
      + struct i
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2dfd2533
    • Himangi Saraogi's avatar
      ethernet: amd: Remove typedef local_info_t · f8653464
      Himangi Saraogi authored
      The Linux kernel coding style guidelines suggest not using typedefs
      for structure types. This patch gets rid of the typedef for local_info_t.
      Also, the name of the struct is changed to drop the _t, to make the
      name look less typedef-like.
      
      The following Coccinelle semantic patch detects the case:
      
      @tn@
      identifier i;
      type td;
      @@
      
      -typedef
       struct i { ... }
      -td
       ;
      
      @@
      type tn.td;
      identifier tn.i;
      @@
      
      -td
      + struct i
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8653464
    • Vlad Yasevich's avatar
      net: Always untag vlan-tagged traffic on input. · 0d5501c1
      Vlad Yasevich authored
      Currently the functionality to untag traffic on input resides
      as part of the vlan module and is build only when VLAN support
      is enabled in the kernel.  When VLAN is disabled, the function
      vlan_untag() turns into a stub and doesn't really untag the
      packets.  This seems to create an interesting interaction
      between VMs supporting checksum offloading and some network drivers.
      
      There are some drivers that do not allow the user to change
      tx-vlan-offload feature of the driver.  These drivers also seem
      to assume that any VLAN-tagged traffic they transmit will
      have the vlan information in the vlan_tci and not in the vlan
      header already in the skb.  When transmitting skbs that already
      have tagged data with partial checksum set, the checksum doesn't
      appear to be updated correctly by the card thus resulting in a
      failure to establish TCP connections.
      
      The following is a packet trace taken on the receiver where a
      sender is a VM with a VLAN configued.  The host VM is running on
      doest not have VLAN support and the outging interface on the
      host is tg3:
      10:12:43.503055 52:54:00:ae:42:3f > 28:d2:44:7d:c2:de, ethertype 802.1Q
      (0x8100), length 78: vlan 100, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 27243,
      offset 0, flags [DF], proto TCP (6), length 60)
          10.0.100.1.58545 > 10.0.100.10.ircu-2: Flags [S], cksum 0xdc39 (incorrect
      -> 0x48d9), seq 1069378582, win 29200, options [mss 1460,sackOK,TS val
      4294837885 ecr 0,nop,wscale 7], length 0
      10:12:44.505556 52:54:00:ae:42:3f > 28:d2:44:7d:c2:de, ethertype 802.1Q
      (0x8100), length 78: vlan 100, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 27244,
      offset 0, flags [DF], proto TCP (6), length 60)
          10.0.100.1.58545 > 10.0.100.10.ircu-2: Flags [S], cksum 0xdc39 (incorrect
      -> 0x44ee), seq 1069378582, win 29200, options [mss 1460,sackOK,TS val
      4294838888 ecr 0,nop,wscale 7], length 0
      
      This connection finally times out.
      
      I've only access to the TG3 hardware in this configuration thus have
      only tested this with TG3 driver.  There are a lot of other drivers
      that do not permit user changes to vlan acceleration features, and
      I don't know if they all suffere from a similar issue.
      
      The patch attempt to fix this another way.  It moves the vlan header
      stipping code out of the vlan module and always builds it into the
      kernel network core.  This way, even if vlan is not supported on
      a virtualizatoin host, the virtual machines running on top of such
      host will still work with VLANs enabled.
      
      CC: Patrick McHardy <kaber@trash.net>
      CC: Nithin Nayak Sujir <nsujir@broadcom.com>
      CC: Michael Chan <mchan@broadcom.com>
      CC: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
      Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d5501c1
    • David S. Miller's avatar
      Merge branch 'apm_xgene' · 217e606b
      David S. Miller authored
      Iyappan Subramanian says:
      
      ====================
      net: Add APM X-Gene SoC Ethernet driver support
      
      Adding APM X-Gene SoC Ethernet driver.
      
      v10: Address comments from v9 review
      * Documentation: aligned descriptions
      * simplified struct platform_driver initialization
      * fixed xgene_enet_mdio_config error path
      * fixed xgene_enet_init_hw error path
      * removed statistics spin_lock as it is not required
      * changed raw_desc fields to type __le64
      * defined helper macros for set/get raw_descriptor fields
      
      v9: Address comments from v8 review
      * changed to direct read/write, byteswap into raw descriptor
      * fixed xgene_enet_create_desc_ring() error handling
      * removed references to IS_ERR_OR_NULL
      * disabled half duplex on phy_devce supported/advertising
      * simplified xgene_enet_adjust_link() function
      * fixed sparse tool compilation warnings
      
      v8: Address comments from v7 review
      * changed angle bracket to double quotes in header file include.
      
      v7: Address comments from v6 review
      * fixed skb memory leak when dma_map_single fails in xmit.
      
      v6: Address comments from v5 review
      * added basic ethtool support
      * added ndo_get_stats64 call back
      * deleted priting Rx error messages
      * renamed set_bits to xgene_set_bits to fix kbuild error (make ARCH=powerpc)
      
      v5: Address comments from v4 review
      * Documentation: Added phy-handle, reg-names and changed mdio part
      * dtb: Added reg-names supplemental property
      * changed platform_get_resource to platform_get_resource_byname
      * added separate tx/rx set_desc/get_desc functions to do raw_write/raw_read
      * removed set_desc/get_desc table lookup logic
      * added error handling logic based on per packet descriptor bits
      * added software managed Rx packet and error counters
      * added busy wait for register read/writes
      * changed mdio_bus->id to avoid conflict
      * fixed mdio_bus leak in case of mdio_config error
      * changed phy reg hard coded value to MII_BMSR
      * changed phy addr hard coded value to phy_device->addr
      * added paranthesis around macro arguments
      * converted helper macros to inline functions
      * changed use of goto's only to common work such as cleanup
      
      v4: Address comments from v3 review
      * MAINTAINERS: changed status to supported
      * Kconfig: made default to no
      * changed to bool data type wherever applicable
      * cleaned up single bit set and masking code
      * removed statistics counters masking
      * removed unnecessary OOM message printing
      * fixed dma_map_single and dma_unmap_single size parameter
      * changed set bits macro body using new set_bits function
      
      v3: Address comments from v2 review
      * cleaned up set_desc and get_desc functions
      * added dtb mdio node and phy-handle subnode
      * renamed dtb phy-mode to phy-connection-type
      * added of_phy_connect call to connec to PHY
      * added empty line after last local variable declaration
      * removed type casting when not required
      * removed inline keyword from source files
      * removed CONFIG_CPU_BIG_ENDIAN ifdef
      
      v2
      * Completely redesigned ethernet driver
      * Added support to work with big endian kernel
      * Renamed dtb phyid entry to phy_addr
      * Changed dtb local-mac-address entry to byte string format
      * Renamed dtb eth8clk entry to menetclk
      
      v1
      * Initial version
      ====================
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarRavi Patel <rapatel@apm.com>
      Signed-off-by: default avatarKeyur Chudgar <kchudgar@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      217e606b
    • Iyappan Subramanian's avatar
      drivers: net: Add APM X-Gene SoC ethernet driver support. · e6ad7673
      Iyappan Subramanian authored
      This patch adds network driver for APM X-Gene SoC ethernet.
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarRavi Patel <rapatel@apm.com>
      Signed-off-by: default avatarKeyur Chudgar <kchudgar@apm.com>
      Signed-off-by: default avatarDean Nelson <dnelson@redhat.com>
      Reviewed-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6ad7673
    • Iyappan Subramanian's avatar
      dts: Add bindings for APM X-Gene SoC ethernet driver · 3d390425
      Iyappan Subramanian authored
      This patch adds bindings for APM X-Gene SoC ethernet driver.
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarRavi Patel <rapatel@apm.com>
      Signed-off-by: default avatarKeyur Chudgar <kchudgar@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d390425
    • Iyappan Subramanian's avatar
      Documentation: dts: Add bindings for APM X-Gene SoC ethernet driver · ff4ee1ab
      Iyappan Subramanian authored
      This patch adds documentation for APM X-Gene SoC ethernet DTS binding.
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarRavi Patel <rapatel@apm.com>
      Signed-off-by: default avatarKeyur Chudgar <kchudgar@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff4ee1ab
    • Iyappan Subramanian's avatar
      MAINTAINERS: Add entry for APM X-Gene SoC ethernet driver · 24299502
      Iyappan Subramanian authored
      This patch adds a MAINTAINERS entry for APM X-Gene SoC
      ethernet driver.
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarRavi Patel <rapatel@apm.com>
      Signed-off-by: default avatarKeyur Chudgar <kchudgar@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      24299502
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · f00439e2
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains fixes for your net tree, they are:
      
      1) Unitialize the set element key and data from the commit path,
         otherwise this leaks chain refcount if the transaction is aborted,
         reported by Thomas Graf.
      
      2) Fix crash when updating chains without no counters in nf_tables,
         this slipped through in the new transaction infrastructure, reported
         by Matteo Croce.
      
      3) Replace all mutex_lock_interruptible() by mutex_lock() in the Netfilter
         tree, suggested by Patrick McHardy. This implicitly fixes the problem
         that Eric Dumazet reported in: http://patchwork.ozlabs.org/patch/373076/
      
      4) Fix error return code in nf_tables when deleting set element in
         nf_tables if the transaction cannot be allocated, from Julia Lawall.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f00439e2
    • Uwe Kleine-König's avatar
      net: ucc_geth: fix build failure · 4da5e6a0
      Uwe Kleine-König authored
      My series to fix the reference counting of dt nodes introduced a build
      failure. Fix it.
      
      Fixes: fa310789 ("net: ucc_geth: drop acquired references in probe error path and remove")
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4da5e6a0
  2. 08 Aug, 2014 10 commits
  3. 07 Aug, 2014 9 commits