27 Sep, 2013

8 commits

  • coccicheck shows:

    drivers/net/ethernet/intel/i40e/i40e_adminq.c:704:2-8: Replace memcpy
    with struct assignment
    drivers/net/ethernet/intel/i40e/i40e_adminq.c:763:1-7: Replace memcpy
    with struct assignment
    drivers/net/ethernet/intel/i40e/i40e_adminq.c:810:2-8: Replace memcpy
    with struct assignment
    drivers/net/ethernet/intel/i40e/i40e_common.c:510:2-8: Replace memcpy
    with struct assignment

    Fix each of them with a *a = *b;

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

    Jesse Brandeburg
     
  • As mentioned by Joe Perches, clean up return values in some functions
    making sure to have consistent return types, not mixing types.

    A couple of Joe's comments suggested returning void, but since
    the functions in question are ndo defined, the return values are fixed.
    So make a comment in the header that notes this is a function called by
    net_device_ops.

    v2: fix post increment bug in return

    CC: Joe Perches
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • When calling admin queue functions the driver should use aq_ret
    variable to help make clear that the return value is not a regular
    return variable.

    This allows for clean up of the return types that were previously
    converted to int.

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

    Jesse Brandeburg
     
  • As mentioned by Joe Perches clean up a loop flow.

    Signed-off-by: Jesse Brandeburg
    CC: Joe Perches
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • As mentioned by Joe Perches, we should be using
    foo = alloc(...)
    if (!foo)
    return -ENOMEM;

    return 0;

    Signed-off-by: Jesse Brandeburg
    CC: Joe Perches
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • Add back 82580 loopback tests to ethtool.

    Signed-off-by: Todd Fujinaka
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Todd Fujinaka
     
  • David S. Miller
     
  • Outgoing packets sent by via-rhine have their VLAN PCP field off by one
    (when hardware acceleration is enabled). The TX descriptor expects only VID
    and PCP (without a CFI/DEI bit).

    Peter Boström noticed and reported the bug.

    Signed-off-by: Roger Luethi
    Cc: Peter Boström
    Signed-off-by: David S. Miller

    Roger Luethi
     

24 Sep, 2013

14 commits

  • In the following scenario the socket is corked:
    If the first UDP packet is larger then the mtu we try to append it to the
    write queue via ip6_ufo_append_data. A following packet, which is smaller
    than the mtu would be appended to the already queued up gso-skb via
    plain ip6_append_data. This causes random memory corruptions.

    In ip6_ufo_append_data we also have to be careful to not queue up the
    same skb multiple times. So setup the gso frame only when no first skb
    is available.

    This also fixes a shortcoming where we add the current packet's length to
    cork->length but return early because of a packet > mtu with dontfrag set
    (instead of sutracting it again).

    Found with trinity.

    Cc: YOSHIFUJI Hideaki
    Signed-off-by: Hannes Frederic Sowa
    Reported-by: Dmitry Vyukov
    Signed-off-by: David S. Miller

    Hannes Frederic Sowa
     
  • Also changed a log message to indicate that memory was not allocated
    instead of memory not available!

    Signed-off-by: Malahal Naineni
    Acked-by: Jitendra Kalsaria
    Signed-off-by: David S. Miller

    malahal@us.ibm.com
     
  • In my patch c194992cbe71c20bb3623a566af8d11b0bfaa721 ("skge: fix
    broken driver") I didn't fix the skge bug correctly. The value of the
    new mapping (not old) was passed to pci_unmap_single.

    If we enable CONFIG_DMA_API_DEBUG, it results in this warning:
    WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:986 check_sync+0x4c4/0x580()
    skge 0000:02:07.0: DMA-API: device driver tries to sync DMA memory it has
    not allocated [device address=0x000000023a0096c0] [size=1536 bytes]

    This patch makes the skge driver pass the correct value to
    pci_unmap_single and fixes the warning. It copies the old descriptor to
    on-stack variable "ee" and unmaps it if mapping of the new descriptor
    succeeded.

    This patch should be backported to 3.11-stable.

    Signed-off-by: Mikulas Patocka
    Reported-by: Francois Romieu
    Tested-by: Mikulas Patocka
    Signed-off-by: David S. Miller

    Mikulas Patocka
     
  • Redirect isn't an error condition, it should leave
    the error handler without touching the socket.

    Signed-off-by: Duan Jiong
    Signed-off-by: David S. Miller

    Duan Jiong
     
  • Redirect isn't an error condition, it should leave
    the error handler without touching the socket.

    Signed-off-by: Duan Jiong
    Signed-off-by: David S. Miller

    Duan Jiong
     
  • MRP doesn't implement the periodictimer in 802.1Q, so it never retries
    if packets get lost. I ran into this problem when MRP sent a MVRP
    JoinIn before the interface was fully up. The JoinIn was lost, MRP
    didn't retry, and MVRP registration failed.

    Tested against Juniper QFabric switches

    Signed-off-by: Noel Burton-Krahn
    Acked-by: David Ward
    Signed-off-by: David S. Miller

    Noel Burton-Krahn
     
  • Actually re-send packets when the T1 timer runs out. This fixes a bug
    where packets are waiting on the write queue until disconnection when
    no other traffic is outstanding.

    Signed-off-by: Josselin Costanzi
    Signed-off-by: Maxime Jayat
    Signed-off-by: David S. Miller

    josselin.costanzi@mobile-devices.fr
     
  • Yuval Mintz says:

    ====================
    This patch contains various bug fixes, half of which are SR-IOV related
    (some fixing issues in the recently added VF RSS support), while the other fix
    a wide assortments of issues in the driver.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Commit b9871bcf "bnx2x: VF RSS support - PF side" has deprecated one of
    the previous existing messages. If an old VF driver were to send this message
    to the PF then the PF will not reply and leave the mailbox in an unsteady
    state (and cause a timeout on the VF side).

    Wait until firmware ack is written before unlocking channel

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

    Ariel Elior
     
  • During flows which mask block attentions (e.g., register dump) all parities
    are masked. However, unlike other blocks the MCP's attention is not masked
    inside the block but rather the indication to the driver. If another attention
    (e.g., link change) will occour while there's an MCP parity, the driver will
    ignore the fact that the parity is masked and erroneously report a parity.

    This patch forces the driver to read the MCP masking while checking for
    parities.

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

    Yuval Mintz
     
  • During error flows while loading cnic the return value was incorrectly replaced
    by that of bnx2x_set_real_num_queues(); If that function was to finish
    successfully then the cnic would have mistakenly thought the load ended
    successfully, causing issues (& panics) later on.

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

    Yuval Mintz
     
  • bnx2x_iov_static_resc() should be called after IGU was read for information on
    the number of available VFs, so that resources will be correctly set.

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

    Ariel Elior
     
  • Due to incorrect usage of PF macros when reading information relating to
    interrupts, some PFs were erroneously unable to support VFs.

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

    Ariel Elior
     
  • When system CPU is stressed it's possible that the driver will not be able
    to pulse the FW every second, which will cause the log to be filled with
    error messages.

    Increasing the threshold to 5 seconds seems to be enough to eliminate the
    issue.

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

    Eilon Greenstein
     

23 Sep, 2013

5 commits

  • On 848xx PHY (10G-baseT), half-duplex was always advertised regardless of the
    actual configuration. Change the 848xx duplex settings to advertise half-duplex
    only if configured.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Fix Warpcore mode setting when active DAC (Direct Attached Cable) is detected.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • when 1G-optic module was plugged in, internal loopback test failed because the
    driver used to check the optic module (with no need), and for 1G optic module,
    the link speed was forced down to 1G, while the XMAC (10G MAC) was enabled.
    This patch avoid accessing optic module in case internal loopback was selected,
    and update the link speed in case 1G optic module was detected during init
    stage.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Relocate bnx2x_disable_kr2 function, and use it to disable KR2 in case it is not
    configured in order to clear it's configuration, otherwise the link may come up
    at 20G instead of the requested 10G-KR. In addition, restart AN after
    disabling KR2 as part of the KR2 work-around.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Previously, in case of KR link down, the driver would reset the PHY and restart
    auto negotiation only when old Warpcore microcode was used (below D108).
    This patch comes to generalize this by keep trying to restart KR link,
    regardless of Warpcore microcode, since it was found that it solves another link
    issue which source is a link-partner. As part of this change, the signal
    detect is no longer a condition to apply the work-around to cover this new case.
    Like before, as long as the link is down, AN will be restarted every 2 seconds.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     

22 Sep, 2013

1 commit


21 Sep, 2013

6 commits

  • The old implementation was heavy on str* functions and sprintf calls.
    This version is more manual, but faster.

    Profiling just the printing of a 3 char CAN-id resulted in 60 instructions
    for the manual method and over 2000 for the sprintf method. Bear in
    mind the profiling was done against libc and not the kernel sprintf.

    Together with this rewrite an issue with sending and receiving of RTR frames
    has been fixed by Oliver for the cases that the DLC is not zero.

    Signed-off-by: Andre Naujoks
    Tested-by: Oliver Hartkopp
    Acked-by: Oliver Hartkopp
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Andre Naujoks
     
  • To be able to use the hex ascii functions in case sensitive environments
    the array hex_asc_upper[] and the needed functions for hex_byte_pack_upper()
    are introduced.

    Signed-off-by: Andre Naujoks
    Signed-off-by: David S. Miller

    Andre Naujoks
     
  • The locking is needed, since the the internal buffer for the CAN frames is
    changed during the wakeup call. This could cause buffer inconsistencies
    under high loads, especially for the outgoing short CAN packet skbuffs.

    The needed locks led to deadlocks before commit
    "5ede52538ee2b2202d9dff5b06c33bfde421e6e4 tty: Remove extra wakeup from pty
    write() path", which removed the direct callback to the wakeup function from the
    tty layer.

    As slcan.c is based on slip.c the issue in the original code is fixed, too.

    Signed-off-by: Andre Naujoks
    Acked-by: Oliver Hartkopp
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Andre Naujoks
     
  • Tx and rx urbs are not deallocated if something goes wrong in peak_usb_start().
    The patch fixes error handling to deallocate all the resources.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov
    Acked-by: Stephane Grosjean
    Signed-off-by: Marc Kleine-Budde

    Alexey Khoroshilov
     
  • The SFC9120 MC firmware often takes longer than 20ms to reboot and
    update the warm boot count in BIU_MC_SFT_STATUS_REG. A timeout of
    250ms is very generous for an MC reboot.

    Signed-off-by: Ben Hutchings

    Daniel Pieczko
     
  • Scheduling a reset following an MC reboot event before waiting for
    reboot to complete results in a race that can lead to a state where
    must_realloc_vis is false in efx_ef10_fini_dmaq() but the VIs have
    been destroyed during the MC reboot.

    To avoid MC errors when trying to remove VIs that do not exist, wait
    for the MC reboot to complete before scheduling the reset.

    Signed-off-by: Ben Hutchings

    Daniel Pieczko
     

20 Sep, 2013

6 commits

  • Pull ARM64 fixes from Catalin Marinas:
    - Compat register fault reporting fix
    - Documentation clarification on tagged pointers
    - hwcap widened to 64-bit (user space already reading it as 64-bit)

    * tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
    arm64: Widen hwcap to be 64 bit
    arm64: Correctly report LR and SP for compat tasks
    arm64: documentation: tighten up tagged pointer documentation
    arm64: Make do_bad_area() function static

    Linus Torvalds
     
  • Under arm64 elf_hwcap is a 32 bit quantity, but it is stored in
    a 64 bit auxiliary ELF field and glibc reads hwcap as 64 bit.

    This patch widens elf_hwcap to be 64 bit.

    Signed-off-by: Steve Capper
    Signed-off-by: Catalin Marinas

    Steve Capper
     
  • When a task crashes and we print debugging information, ensure that
    compat tasks show the actual AArch32 LR and SP registers rather than the
    AArch64 ones.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     
  • Commit d50240a5f6ce ("arm64: mm: permit use of tagged pointers at EL0")
    added support for tagged pointers in userspace, but the corresponding
    update to Documentation/ contained some imprecise statements.

    This patch fixes up some minor ambiguities in the text, hopefully making
    it more clear about exactly what the kernel expects from user virtual
    addresses.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • This function is only called from arch/arm64/mm/fault.c.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     
  • Pull ARM SoC fixes from Olof Johansson:
    "A set of fixes for ARM platforms for 3.12. Among them:

    - A fix for build breakage in the MTD subsystem for some PXA devices.
    David Woodhouse has this patch in his for-next branch but has not
    been responding to our requests to send it up so here it is. I
    should have amended the commit message to describe the build
    failure for CONFIG_OF=n setups, but forgot and now it's down in the
    stack of commits.

    - Added device-tree for the BeagleBone Black. Turns out people have
    been using the older "regualar" bone DT for the newer boards, and
    there's risk of damaging hardware that way.

    - Misc DT and regular fixes for OMAP.

    - Fix to make the ST-Ericsson "snowball" boards boot with
    multi_v7_defconfig, and enable one of the ST-E reference boards on
    the same config.

    - Kconfig cleanup for u300 to hide submenus when the platform isn't
    enabled.

    - Enable ARM_ATAG_DTB_COMPAT to let firmware override command line
    when booting with an appended devicetree on non-DT-enabled firmware
    (needed to boot snowball)"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (26 commits)
    ARM: multi_v7: add HREFv60 to multi_v7 defconfig
    ARM: OMAP2+: mux: fix trivial typo in name
    ARM: OMAP4 SMP: Corrected a typo fucntions to functions
    ARM: OMAP4: cpuidle: fix: call cpu_cluster_pm_exit conditionally
    mailbox: remove unnecessary platform_set_drvdata()
    ARM: mach-omap2: gpmc: Fix warning when CONFIG_ARM_LPAE=y
    ARM: OMAP: fix return value check in omap_device_build_from_dt()
    ARM: OMAP4: Fix clock_get error for GPMC during boot
    ARM: sa1100: collie.c: fall back to jedec_probe flash detection
    ARM: u300: hide submenus
    ARM: dts: igep00x0: Add pinmux configuration for MCBSP2
    ARM: dts: Fix muxing and regulator for wl12xx on the SDIO bus for blaze
    ARM: dts: Fix muxing and regulator for wl12xx on the SDIO bus for pandaboard
    mtd: nand: pxa3xx: Remove unneeded ifdef CONFIG_OF
    ARM: multi_v7_defconfig: enable ARM_ATAG_DTB_COMPAT
    ARM: ux500: disable outer cache debug
    ARM: dts: OMAP5: fix ocp2scp DTS data
    ARM: dts: OMAP5: fix reg property size
    ARM: dts: am335x-bone*: add DT for BeagleBone Black
    ARM: dts: omap3-beagle-xm: fix string error in compatible property
    ...

    Linus Torvalds