1. 25 1月, 2015 12 次提交
  2. 24 1月, 2015 4 次提交
  3. 20 1月, 2015 6 次提交
    • B
      mii: Handle link state changes for forced modes in mii_check_media() · 5bdc7380
      Ben Hutchings 提交于
      mii_check_media() does not update the link (carrier) state or log link
      changes when the link mode is forced.  Drivers using the mii library
      must do this themselves, but most of them do not.
      
      Instead of changing them all, provide a sensible default behaviour
      similar to mii_check_link() when the mode is forced.
      
      via-rhine depends on it being a no-op in this case, so make its call
      to mii_check_media() conditional.
      Signed-off-by: NBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5bdc7380
    • W
      net: netcp: Enhance GBE driver to support 10G Ethernet · 90cff9e2
      Wingman Kwok 提交于
      This patch enhances the NetCP gbe driver to support 10GbE subsystem
      available in Keystone NetCP. The 3-port 10GbE switch sub-module contains
      the following components:- 10GbE Switch, MDIO Module, 2 PCS-R Modules
      (10GBase-R) and 2 SGMII modules (10/100/1000Base-T). The GBE driver
      together with netcp core driver provides support for 10G Ethernet
      on Keystone SoCs.
      
      10GbE hardware spec is available at
      
      http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=spruhj5&fileType=pdf
      
       Cc: David Miller <davem@davemloft.net>
       Cc: Rob Herring <robh+dt@kernel.org>
       Cc: Grant Likely <grant.likely@linaro.org>
       Cc: Santosh Shilimkar <santosh.shilimkar@kernel.org>
       Cc: Pawel Moll <pawel.moll@arm.com>
       Cc: Mark Rutland <mark.rutland@arm.com>
       Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
       Cc: Kumar Gala <galak@codeaurora.org>
      Signed-off-by: NWingman Kwok <w-kwok2@ti.com>
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90cff9e2
    • W
      net: netcp: Add Keystone NetCP GbE driver · 6f8d3f33
      Wingman Kwok 提交于
      This patch add support for 1G Ethernet driver based on Keystone
      NetCP hardware. The gigabit Ethernet (GbE) switch subsystem is one of the main
      components of the network coprocessor (NETCP) peripheral. The purpose of the
      gigabit Ethernet switch subsystem in the NETCP is to provide an interface to
      transfer data between the host device and another connected device in
      compliance with the Ethernet protocol. GbE consists of 5 port Ethernet Switch
      module, 4 Serial Gigabit Media Independent Interface (SGMII) modules, MDIO
      module and SerDes.
      
      Driver for 5 port GbE switch and SGMII module is added in this patch. These
      hardware modules along with netcp core driver provides Network driver functions
      for 1G Ethernet.
      
      Detailed hardware spec is available at
      
      http://www.ti.com/lit/ug/sprugv9d/sprugv9d.pdf
      
       Cc: David Miller <davem@davemloft.net>
       Cc: Rob Herring <robh+dt@kernel.org>
       Cc: Grant Likely <grant.likely@linaro.org>
       Cc: Santosh Shilimkar <santosh.shilimkar@kernel.org>
       Cc: Pawel Moll <pawel.moll@arm.com>
       Cc: Mark Rutland <mark.rutland@arm.com>
       Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
       Cc: Kumar Gala <galak@codeaurora.org>
      Signed-off-by: NWingman Kwok <w-kwok2@ti.com>
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f8d3f33
    • K
      net: netcp: Add Keystone NetCP core ethernet driver · 84640e27
      Karicheri, Muralidharan 提交于
      The network coprocessor (NetCP) is a hardware accelerator available in
      Keystone SoCs that processes Ethernet packets. NetCP consists of following
      hardware components
      
       1 Gigabit Ethernet (GbE) subsystem with a Ethernet switch sub-module to
         send and receive packets.
       2 Packet Accelerator (PA) module to perform packet classification
         operations such as header matching, and packet modification operations
         such as checksum generation.
       3 Security Accelerator(SA) capable of performing IPSec operations on
         ingress/egress packets.
       4 An optional 10 Gigabit Ethernet Subsystem (XGbE) which includes a
         3-port Ethernet switch sub-module capable of 10Gb/s and 1Gb/s rates
         per Ethernet port.
       5 Packet DMA and Queue Management Subsystem (QMSS) to enqueue and dequeue
         packets and DMA the packets between memory and NetCP hardware components
         described above.
      
      NetCP core driver make use of the Keystone Navigator driver API to allocate
      DMA channel for the Ethenet device and to handle packet queue/de-queue,
      Please refer API's in include/linux/soc/ti/knav_dma.h and
      drivers/soc/ti/knav_qmss.h for details.
      
      NetCP driver consists of NetCP core driver and at a minimum Gigabit
      Ethernet (GBE) module (1) driver to implement the Network device function.
      Other modules (2,3) can be optionally added to achieve supported hardware
      acceleration function. The initial version of the driver include NetCP
      core driver and GBE driver modules.
      
      Please refer Documentation/devicetree/bindings/net/keystone-netcp.txt
      for design of the driver.
      
       Cc: David Miller <davem@davemloft.net>
       Cc: Rob Herring <robh+dt@kernel.org>
       Cc: Grant Likely <grant.likely@linaro.org>
       Cc: Santosh Shilimkar <santosh.shilimkar@kernel.org>
       Cc: Pawel Moll <pawel.moll@arm.com>
       Cc: Mark Rutland <mark.rutland@arm.com>
       Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
       Cc: Kumar Gala <galak@codeaurora.org>
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NWingman Kwok <w-kwok2@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84640e27
    • F
      net: ethernet: ti: cpsw: fix buld break when NET_POLL_CONTROLLER · 92cb13fb
      Felipe Balbi 提交于
      Commit c03abd84 (net: ethernet: cpsw: don't requests IRQs we don't
      use) left one build breakage when NET_POLL_CONTROLLER is enabled.
      
      Fix this build break by referring to the correct irqs_table array.
      
      Fixes: c03abd84 (net: ethernet: cpsw: don't requests IRQs we don't use)
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92cb13fb
    • N
      tunnels: advertise link netns via netlink · 1728d4fa
      Nicolas Dichtel 提交于
      Implement rtnl_link_ops->get_link_net() callback so that IFLA_LINK_NETNSID is
      added to rtnetlink messages.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1728d4fa
  4. 18 1月, 2015 6 次提交
    • D
      net: rocker: Add basic netdev counters - v2 · f2bbca51
      David Ahern 提交于
      Add packet and byte counters for RX and TX paths.
      
      $ ifconfig eth1
      eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet6 fe80::5054:ff:fe12:3501  prefixlen 64  scopeid 0x20<link>
              ether 52:54:00:12:35:01  txqueuelen 1000  (Ethernet)
              RX packets 63  bytes 15813 (15.4 KiB)
              RX errors 1  dropped 0  overruns 0  frame 0
              TX packets 79  bytes 17991 (17.5 KiB)
              TX errors 7  dropped 0 overruns 0  carrier 0  collisions 0
      
      Rx / Tx errors tested by injecting faults in qemu's hardware model for Rocker.
      
      v2:
      - moved counter locations to avoid potential use after free per Florian's comment
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Scott Feldman <sfeldma@gmail.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Acked-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2bbca51
    • F
      net: ethernet: cpsw: don't requests IRQs we don't use · c03abd84
      Felipe Balbi 提交于
      CPSW never uses RX_THRESHOLD or MISC interrupts. In
      fact, they are always kept masked in their appropriate
      IRQ Enable register.
      
      Instead of allocating an IRQ that never fires, it's best
      to remove that code altogether and let future patches
      implement it if anybody needs those.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c03abd84
    • F
      net: ethernet: cpsw: unroll IRQ request loop · 5087b915
      Felipe Balbi 提交于
      This patch is in preparation for a nicer IRQ
      handling scheme where we use different IRQ
      handlers for each IRQ line (as it should be).
      
      Later, we will also drop IRQs offset 0 and 3
      because they are always disabled in this driver.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5087b915
    • J
      netlink: make nlmsg_end() and genlmsg_end() void · 053c095a
      Johannes Berg 提交于
      Contrary to common expectations for an "int" return, these functions
      return only a positive value -- if used correctly they cannot even
      return 0 because the message header will necessarily be in the skb.
      
      This makes the very common pattern of
      
        if (genlmsg_end(...) < 0) { ... }
      
      be a whole bunch of dead code. Many places also simply do
      
        return nlmsg_end(...);
      
      and the caller is expected to deal with it.
      
      This also commonly (at least for me) causes errors, because it is very
      common to write
      
        if (my_function(...))
          /* error condition */
      
      and if my_function() does "return nlmsg_end()" this is of course wrong.
      
      Additionally, there's not a single place in the kernel that actually
      needs the message length returned, and if anyone needs it later then
      it'll be very easy to just use skb->len there.
      
      Remove this, and make the functions void. This removes a bunch of dead
      code as described above. The patch adds lines because I did
      
      -	return nlmsg_end(...);
      +	nlmsg_end(...);
      +	return 0;
      
      I could have preserved all the function's return values by returning
      skb->len, but instead I've audited all the places calling the affected
      functions and found that none cared. A few places actually compared
      the return value with <= 0 in dump functionality, but that could just
      be changed to < 0 with no change in behaviour, so I opted for the more
      efficient version.
      
      One instance of the error I've made numerous times now is also present
      in net/phonet/pn_netlink.c in the route_dumpit() function - it didn't
      check for <0 or <=0 and thus broke out of the loop every single time.
      I've preserved this since it will (I think) have caused the messages to
      userspace to be formatted differently with just a single message for
      every SKB returned to userspace. It's possible that this isn't needed
      for the tools that actually use this, but I don't even know what they
      are so couldn't test that changing this behaviour would be acceptable.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      053c095a
    • J
      net: replace br_fdb_external_learn_* calls with switchdev notifier events · 3aeb6617
      Jiri Pirko 提交于
      This patch benefits from newly introduced switchdev notifier and uses it
      to propagate fdb learn events from rocker driver to bridge. That avoids
      direct function calls and possible use by other listeners (ovs).
      Suggested-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3aeb6617
    • E
      niu: remove one compound_head() call · ff8b3356
      Eric Dumazet 提交于
      After a "page = alloc_page(mask);", we do not need to use
      compound_head() : page already points to the right place.
      
      This would be true even if using alloc_pages().
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff8b3356
  5. 17 1月, 2015 12 次提交