12 Dec, 2013

3 commits


11 Dec, 2013

18 commits

  • When adjusting the link speed, the target frequency is determined by a
    'swith (LINK_SPEED)' statement, that assigns the target rate only for
    valid and expected LINK_SPEED values. This incomplete switch statement
    leads to the following build warning:
    drivers/net/ethernet/cadence/macb.c: In function 'macb_handle_link_change':
    >> drivers/net/ethernet/cadence/macb.c:241:14: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
    netdev_warn(dev, "unable to generate target frequency: %ld Hz\n",
    ^
    drivers/net/ethernet/cadence/macb.c:215:13: note: 'rate' was declared here
    long ferr, rate, rate_rounded;

    Fixing this by bailing out of that function in the switch's default case
    before the rate variable is used.

    Reported-by: kbuild test robot
    Signed-off-by: Soren Brinkmann
    Signed-off-by: David S. Miller

    Soren Brinkmann
     
  • Adjust the ethernet clock according to the negotiated link speed.

    Signed-off-by: Soren Brinkmann
    Signed-off-by: David S. Miller

    Soren Brinkmann
     
  • Use the device managed interface to request the IRQ, simplifying error
    paths.

    Signed-off-by: Soren Brinkmann
    Acked-by: Nicolas Ferre
    Signed-off-by: David S. Miller

    Soren Brinkmann
     
  • Use the device managed version of ioremap to remap IO memory,
    simplifying error paths.

    Signed-off-by: Soren Brinkmann
    Acked-by: Nicolas Ferre
    Signed-off-by: David S. Miller

    Soren Brinkmann
     
  • Migrate to using the device managed interface for clocks and clean up
    the associated error paths.

    Signed-off-by: Soren Brinkmann
    Acked-by: Nicolas Ferre
    Signed-off-by: David S. Miller

    Soren Brinkmann
     
  • Migrate the suspend/resume functions to use the dev_pm_ops PM interface.

    Signed-off-by: Soren Brinkmann
    Acked-by: Nicolas Ferre
    Signed-off-by: David S. Miller

    Soren Brinkmann
     
  • The driver core clears the driver data to NULL after device_release
    or on probe failure. 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. 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. Thus, it is not needed to manually clear the
    device driver data to NULL.

    Signed-off-by: Jingoo Han
    Signed-off-by: Shreyas N Bhatewara
    Acked-by: Dmitry Torokhov
    Signed-off-by: David S. Miller

    Jingoo Han
     
  • The driver core clears the driver data to NULL after device_release
    or on probe failure. 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. 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
     
  • Signed-off-by: Stephen Hemminger
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • All the code passes NULL for the last sg list (in).
    Simplify by just removing it.

    Signed-off-by: Stephen Hemminger
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • This reverts commit 41e4af69a5984a3193ba3108fb4e067b0e34dc73.

    MSG_TRUNC handling was broken and is going to be fixed in the
    'net' tree, so revert this.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This reverts commit 73713357ab58aacda1af715bb5a623528dbbfd79.

    MSG_TRUNC handling was broken and is going to be fixed in
    the 'net' tree, so revert this.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Add support for yet another ARM member of the R-Car family, R-Car M2, also known
    as R8A7791 -- it will share the code and data with previously added R8A7790.
    Despite the Ether devices in these SoCs are indistinguishable at least from the
    driver's point of view, we do introduce a new platform device ID "r8a7791-ether"
    unlike the wildcard ID used for R8A7778/9 SoCs, due to newly established policy
    for the Renesas SoCs.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • Jeff Kirsher says:

    ====================
    Intel Wired LAN Driver Updates

    This series contains updates to i40e, igb, ixgbe and ixgbevf.

    Shannon provides a couple of i40e patches, first restricts the ethtool
    diag test messages by using netif_info() macro to when the hardware
    bit is enabled in the message level netdev message mask. Second
    provides a fix for when there is an out-of-range descriptor request.

    Kamil provides a fix for i40e by updating the loopback enum types and
    add information about the current loopback mode to data returned from
    get_link_info().

    Jesse provides a fix for i40e define name that was being mis-used.
    I40E_ITR_NONE was being used as an ITRN register index by accident
    because it was easily associated with the i40e Rx ITR and friends
    defines, when it should be associated with the DYN_CTL register sets.

    Jacob provides an update for ixgbevf Kconfig description since the VF
    driver supports more than just the 82599 device.

    Don and Alex provide a cleanup patch for ixgbe to make it where head,
    tail, next to clean and next to use are all reset in a single function
    for both Tx and Rx path. Before, the code for this was spread out over
    several areas which made it difficult to track what the values were for
    each of the values.

    Carolyn provides two igb patches to add a media switching feature for
    i354 PHY's and new Media Auto Sense for 82580 devices only.

    Aaron Sierra provides a fix for igb to resolve an issue with the 64-bit
    PCI addresses being truncated because the return values of
    pci_resource_start() and pci_resouce_end() were being cast to unsigned
    long.

    Guenter Roeck provides two igb patches, first simplifies the code by
    attaching the hwmon sysfs attributes to hwmon device instead of the
    PCI device. Second fixes the temperature sensor attribute index by
    setting it to 1 instead of 0 (per hwmon ABI).
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • I've realized that I need to call ethtool command to get Ethernet
    working after booting. Ex call: ethtool -s eth0 autoneg on
    It was fixing Ethernet even if auto-negotiation was already on.

    Adding calls to phy_start and phy_stop look like a real solution.

    Signed-off-by: Rafał Miłecki
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Rafał Miłecki
     

10 Dec, 2013

19 commits

  • Per hwmon ABI, temperature sensor attribute index starts with 1, not 0.

    Signed-off-by: Guenter Roeck
    Reviewed-by: Jean Delvare
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Guenter Roeck
     
  • Simplify the code. Attach hwmon sysfs attributes to hwmon device
    instead of pci device. Avoid race conditions caused by attributes
    being created after registration and provide mandatory 'name'
    attribute by using new hwmon API.

    Other cleanup:

    Instead of allocating memory for hwmon attributes, move attributes
    and all other hwmon related data into struct hwmon_buff and allocate
    the entire structure using devm_kzalloc.

    Check return value from calls to igb_add_hwmon_attr() one by one instead
    of logically combining them all together.

    Signed-off-by: Guenter Roeck
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Guenter Roeck
     
  • This patch adds support for the hardware feature Media Auto Sense. This
    feature requires a custom EEPROM image provided by our customer support
    team. The feature allows hardware designed with dual PHY's, fiber and
    copper to be used with either media without additional EEPROM changes.
    Fiber is preferred and driver will swap and configure for fiber media if
    sensed by the device at any time. Device will swap back to copper if it
    is the only media detected.

    Signed-off-by: Carolyn Wyborny
    Tested-by: Jeff Pieper
    Signed-off-by: Jeff Kirsher

    Carolyn Wyborny
     
  • This patch resolves an issue with 64-bit PCI addresses being truncated
    because the return values of pci_resource_start() and pci_resource_end()
    were being cast to unsigned long.

    Signed-off-by: Aaron Sierra
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Aaron Sierra
     
  • This patch adds a new feature which is supported in some PHY's on some i354
    devices. This feature is Auto Media Detect and allows which ever media is
    detected first by the PHY to be the media used and configured by the
    device. This is a media swapping feature that is wholly contained in the
    Marvell PHY.

    Signed-off-by: Carolyn Wyborny
    Signed-off-by: Jeff Kirsher

    Carolyn Wyborny
     
  • This patch makes it so that head, tail, next to clean, and next to use are
    all reset in a single function for the Tx or Rx path. Previously the code
    for this was spread out over several areas which could make it difficult to
    track what the values for these were.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Don Skidmore
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Don Skidmore
     
  • This patch updates the ixgbevf Kconfig description, as the VF driver supports
    more than just the 82599 device. This patch renames the config menu item, as
    well as updates the help description to make it more obvious that the driver
    supports more than just a single device group.

    Signed-off-by: Jacob Keller
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • Version updated to 0.3.13-k

    Signed-off-by: Catherine Sullivan
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Catherine Sullivan
     
  • I40E_ITR_NONE was being used as an ITRN register index by
    accident because it was easily associated with the I40E_RX_ITR
    and friends defines.

    Change the name slightly in order to make it clear that
    I40E_ITR_NONE is really associated with the DYN_CTL register
    sets.

    Change-Id: I04702c027c7495b90a8bf2db85d3e085a2c7d02a
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • Instead of silently clamping the descriptor change request into
    the proper range, fail the request and complain in the log file.

    Change-Id: Id55ef59255d93c04bedffa8e25fe7ea796c90f32
    Signed-off-by: Shannon Nelson
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Shannon Nelson
     
  • Add information about current loopback mode to data returned from
    get_link_info function. Minor fix in set_loopback function and
    update in loopback types enum.

    Change-Id: I9d1c540a84ab18eef5ea6429be6331f33fc06aca
    Signed-off-by: Kamil Krawczyk
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Kamil Krawczyk
     
  • Use the netif_info() macro to restrict messaging to when the HW
    bit is enabled in the msglvl netdev message mask.

    Change-Id: I83030d4402991cfb7da100da00f05ce502ada4ae
    Signed-off-by: Shannon Nelson
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Shannon Nelson
     
  • Commit f4ec9e9 "mlx4_core: Change bitmap allocator to work in round-robin fashion"
    introduced round-robin allocation (via bitmap) for all resources which allocate
    via a bitmap.

    Round robin allocation is desirable for mcgs, counters, pd's, UARs, and xrcds.
    These are simply numbers, with no involvement of ICM memory mapping.

    Round robin is required for QPs, since we had a problem with immediate
    reuse of a 24-bit QP number (commit f4ec9e9).

    However, for other resources which use the bitmap allocator and involve
    mapping ICM memory -- MPTs, CQs, SRQs -- round-robin is not desirable.

    What happens in these cases is the following:

    ICM memory is allocated and mapped in chunks of 256K.

    Since the resource allocation index goes up monotonically, the allocator
    will eventually require mapping a new chunk. Now, chunks are also unmapped
    when their reference count goes back to zero. Thus, if a single app is
    running and starts/exits frequently we will have the following situation:

    When the app starts, a new chunk must be allocated and mapped.

    When the app exits, the chunk reference count goes back to zero, and the
    chunk is unmapped and freed. Therefore, the app must pay the cost of allocation
    and mapping of ICM memory each time it runs (although the price is paid only when
    allocating the initial entry in the new chunk).

    For apps which allocate MPTs/SRQs/CQs and which operate as described above,
    this presented a performance problem.

    We therefore roll back the round-robin allocator modification for MPTs, CQs, SRQs.

    Reported-by: Matthew Finlay
    Signed-off-by: Jack Morgenstein
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Jack Morgenstein
     
  • We were already registering MDIO bus, but we were not connecting bgmac
    to the PHY. Add proper call and implement adjust link function to switch
    MAC into requested state.
    At the same time it's possible to drop our internal PHY management.
    This is a "standard" PHY, so the "Generic PHY" driver works perfectly
    fine with this. Don't duplicate the code.
    Finally make use of phy_ethtool_[gs]set functions instead implementing
    them from scratch.

    This change was successfully tested on BCM5357. I was able to
    autonegotiate 1000Mb/s full duplex, as well as force any of the
    10/100/1000 half/full modes.

    Signed-off-by: Rafał Miłecki
    Acked-by: Florian Fainelli
    Acked-by: Hauke Mehrtens
    Signed-off-by: David S. Miller

    Rafał Miłecki
     
  • The sh_eth driver issues an uncontrolled PHY reset through the MII
    register BMCR but fails to wait for the reset to complete, and will also
    implicitely wipe out all possible PHY fixups applied. Use phy_init_hw()
    which remedies both problems.

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

    Florian Fainelli
     
  • Instead of open-coding the PHY reset through MII BMCR, use phy_init_hw()
    which does that for us and also makes sure that any PHY specific fixups
    are applied.

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

    Florian Fainelli
     
  • Instead of open-coding a PHY reset through the MII BMCR register, use
    phy_init_hw() which does this for us and ensures that PHY device fixups
    are also applied. We also remove a call to ethernet_phy_reset() which is
    now unncessary since phy_attach() calls phy_attach_direct() which in
    turns calls phy_init_hw().

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

    Florian Fainelli
     
  • Instead of open-coding a PHY reset through the MII BMCR register, use
    phy_init_hw() which does that for us and will also make sure that PHY
    fixups are applied if required. We also remove a call to phy_reset()
    due to the following sequence of calls in the driver:

    phy_scan()
    -> phy_connect()
    -> phy_connect_direct()
    -> phy_attach_direct()
    -> phy_init_hw()

    and we only have a call to phy_init() after phy_scan().

    Signed-off-by: Florian Fainelli
    Tested-by: Sebastian Hesselbarth
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • There are quite a lot of drivers touching a PHY device MII_BMCR
    register to reset the PHY without taking care of:

    1) ensuring that BMCR_RESET is cleared after a given timeout
    2) the PHY state machine resuming to the proper state and re-applying
    potentially changed settings such as auto-negotiation

    Introduce phy_poll_reset() which will take care of polling the MII_BMCR
    for the BMCR_RESET bit to be cleared after a given timeout or return a
    timeout error code.

    In order to make sure the PHY is in a correct state, phy_init_hw() first
    issues a software reset through MII_BMCR and then applies any fixups.

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

    Florian Fainelli