29 May, 2013

14 commits


28 May, 2013

26 commits

  • As Stephen proposed:
    Since bonding supports configuration via iproute (netlink) and sysfs, I think
    it is time to purge the old ifenslave code out of Documentation/networking
    and update the documentation.

    Suggested-by: Stephen Hemminger
    Cc: Stephen Hemminger
    Cc: Jay Vosburgh
    Cc: "David S. Miller"
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     
  • Correct spelling typo

    Signed-off-by: Masanari Iida
    Signed-off-by: David S. Miller

    Masanari Iida
     
  • Since the xmit_hash_policy pointer is always valid and not dependent on
    anything, we can change it while the bond device is up and running. The
    only downside would be the out of order packets but that is a small price
    to pay.

    Signed-off-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Nikolay Aleksandrov
     
  • module_spi_driver() removes some boilerplate and makes the code
    simpler.

    Signed-off-by: Sachin Kamat
    Signed-off-by: David S. Miller

    Sachin Kamat
     
  • The netpoll_rx_disable() will always return 0, it is no use and looks wordy,
    so remove the unnecessary code and get rid of it in _dev_open and _dev_close.

    Signed-off-by: Ding Tianhong
    Signed-off-by: David S. Miller

    dingtianhong
     
  • Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Jean-Christophe PLAGNIOL-VILLARD
     
  • Simon Horman says:

    ====================
    In the case where a non-MPLS packet is received and an MPLS stack is
    added it may well be the case that the original skb is GSO but the
    NIC used for transmit does not support GSO of MPLS packets.

    The aim of this short series is to provide GSO in software for MPLS packets
    whose skbs are GSO.

    Change since v4:

    Update first patch of the series to use 16 bits for all *_headers
    rather than just inner_*_headers

    Simon Horman (2):
    net: Use 16bits for *_headers fields of struct skbuff
    MPLS: Add limited GSO support
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • In the case where a non-MPLS packet is received and an MPLS stack is
    added it may well be the case that the original skb is GSO but the
    NIC used for transmit does not support GSO of MPLS packets.

    The aim of this code is to provide GSO in software for MPLS packets
    whose skbs are GSO.

    SKB Usage:

    When an implementation adds an MPLS stack to a non-MPLS packet it should do
    the following to skb metadata:

    * Set skb->inner_protocol to the old non-MPLS ethertype of the packet.
    skb->inner_protocol is added by this patch.

    * Set skb->protocol to the new MPLS ethertype of the packet.

    * Set skb->network_header to correspond to the
    end of the L3 header, including the MPLS label stack.

    I have posted a patch, "[PATCH v3.29] datapath: Add basic MPLS support to
    kernel" which adds MPLS support to the kernel datapath of Open vSwtich.
    That patch sets the above requirements in datapath/actions.c:push_mpls()
    and was used to exercise this code. The datapath patch is against the Open
    vSwtich tree but it is intended that it be added to the Open vSwtich code
    present in the mainline Linux kernel at some point.

    Features:

    I believe that the approach that I have taken is at least partially
    consistent with the handling of other protocols. Jesse, I understand that
    you have some ideas here. I am more than happy to change my implementation.

    This patch adds dev->mpls_features which may be used by devices
    to advertise features supported for MPLS packets.

    A new NETIF_F_MPLS_GSO feature is added for devices which support
    hardware MPLS GSO offload. Currently no devices support this
    and MPLS GSO always falls back to software.

    Alternate Implementation:

    One possible alternate implementation is to teach netif_skb_features()
    and skb_network_protocol() about MPLS, in a similar way to their
    understanding of VLANs. I believe this would avoid the need
    for net/mpls/mpls_gso.c and in particular the calls to
    __skb_push() and __skb_push() in mpls_gso_segment().

    I have decided on the implementation in this patch as it should
    not introduce any overhead in the case where mpls_gso is not compiled
    into the kernel or inserted as a module.

    MPLS GSO suggested by Jesse Gross.
    Based in part on "v4 GRE: Add TCP segmentation offload for GRE"
    by Pravin B Shelar.

    Cc: Jesse Gross
    Cc: Pravin B Shelar
    Signed-off-by: Simon Horman
    Signed-off-by: David S. Miller

    Simon Horman
     
  • In order to mitigate ongoing incresase in the size of struct skbuff
    use 16 bit integer offsets rather than pointers for inner_*_headers.

    This appears to reduce the size of struct skbuff from 0xd0 to 0xc0
    bytes on x86_64 with the following all unset.

    CONFIG_XFRM
    CONFIG_NF_CONNTRACK
    CONFIG_NF_CONNTRACK_MODULE
    NET_SKBUFF_NF_DEFRAG_NEEDED
    CONFIG_BRIDGE_NETFILTER
    CONFIG_NET_SCHED
    CONFIG_IPV6_NDISC_NODETYPE
    CONFIG_NET_DMA
    CONFIG_NETWORK_SECMARK

    Signed-off-by: Simon Horman
    Signed-off-by: David S. Miller

    Simon Horman
     
  • The Broadcom BCM63xx PHY driver is for the SoC internal PHYs, flag these
    as internal PHY devices.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • libphy currently always reports a PHY as an external transceiver from
    the ethtool output. This is inaccurate, because some drivers should be
    able to tell that a PHY device is an internal transceiver of an Ethernet
    MAC. Add a new flag (PHY_IS_INTERNAL) which can be set by PHY drivers
    just like other flags, and a corresponding helper: phy_is_internal()
    which can be used by networking drivers to query if a given
    PHY device is internal.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Add a comment which explains the real meaning of XCVR_INTERNAL (PHY and
    Ethernet MAC in the same package/die) and XCVR_EXTERNAL (PHY and
    Ethernet MAC in a different package/die). Most if not all of the drivers
    setting their transceiver type already do it the way the comment
    describes it.

    Signed-off-by: Florian Fainelli
    Reviewed-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • The driver core clears the driver data to NULL after device_release
    or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound).
    Thus, it is not needed to manually clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Signed-off-by: David S. Miller

    Jingoo Han
     
  • The driver core clears the driver data to NULL after device_release
    or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound).
    Thus, it is not needed to manually clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Signed-off-by: David S. Miller

    Jingoo Han
     
  • The driver core clears the driver data to NULL after device_release
    or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound).
    Thus, it is not needed to manually clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Acked-by: Kuninori Morimoto
    Signed-off-by: David S. Miller

    Jingoo Han
     
  • The driver core clears the driver data to NULL after device_release
    or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound).
    Thus, it is not needed to manually clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Acked-by: Nicolas Ferre
    Acked-by: Rob Herring
    Acked-by: Roland Stigge
    Acked-by: Mugunthan V N
    Reviewed-by: H Hartley Sweeten
    Tested-by: Roland Stigge
    Signed-off-by: David S. Miller

    Jingoo Han
     
  • Fabio Estevam says:

    ====================
    This series provides support for controlling the PHY regulator in suspend/resume.

    Fabio Estevam (5):
    fec: Place the phy regulator in the private structure
    fec: Invert the order of error path sequence
    fec: Disable the PHY regulator on error and removal
    fec: Remove irqs first
    fec: Handle the regulator in suspend/resume
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • In order to save power, let's disable the regulator in the suspend function and
    enable it in resume.

    Tested on a mx28evk board.

    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • During probe the clocks are enabled prior than the acquiring the interrupts.

    In the remove function we need to do the opposite: first remove the interrupts
    and then disable the clocks.

    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • In the case of error during probe, disable the PHY regulator.

    Do the same in fec_drv_remove().

    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • Currently when fec_enet_init fails it jumps to 'failed_init' error path, which
    will attemp to free the interrupts.

    This is wrong because at this point the interrupts have not even been acquired.

    Swap failed_init/failed_irq to fix the error path.

    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • Instead of using a local reg_phy structure, let's put it inside the private
    structure, so that we are able to have access to the regulator structure even
    when we are outside fec_probe().

    This is in preparation for controlling the FEC PHY regulator in the suspend and
    resume functions.

    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • For padded packets, Lancer computes incorrect checksum. The workaround is
    to trim such packets. This workaround is mainly for IPv4 packets.

    Signed-off-by: Kalesh AP
    Signed-off-by: Somnath Kotur
    Signed-off-by: David S. Miller

    Somnath Kotur
     
  • In Lancer, packets that are 32 bytes or less may cause a transmit stall.
    The work-around is to pad such packets to a 36 byte length.

    Signed-off-by: Kalesh AP
    Signed-off-by: Somnath Kotur
    Signed-off-by: David S. Miller

    Somnath Kotur
     
  • Removing the be_cmd_get_fw_ver() query from be_get_drvinfo() and invoking
    the same from be_setup() and/or post firmware download.

    Signed-off-by: Kalesh AP
    Signed-off-by: Somnath Kotur
    Signed-off-by: David S. Miller

    Somnath Kotur
     
  • This changes the PCI power management scheme of the bnx2x driver to be similar
    to those of most network drivers - the driver will now changes the power state
    into D3hot whenever the driver will be removed, instead of whenever an
    interface is unloaded.

    This change enables the driver to access its eeprom via ethtool callbacks
    even when interfaces are unloaded (such access requires the function to be
    in D0active).

    Signed-off-by: Yuval Mintz
    Signed-off-by: Ariel Elior
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yuval Mintz