Skip to content
Permalink
Thomas-Bogendo…
Switch branches/tags

Commits on Apr 13, 2021

  1. net: korina: Make driver COMPILE_TESTable

    Move structs/defines for ethernet/dma register into driver, since they
    are only used for this driver and remove any MIPS specific includes.
    This makes it possible to COMPILE_TEST the driver.
    
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    tsbogend authored and intel-lab-lkp committed Apr 13, 2021
  2. net: korina: Only pass mac address via platform data

    Get rid of access to struct korina_device by just passing the mac
    address via platform data and use drvdata for passing netdev to remove
    function.
    
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    tsbogend authored and intel-lab-lkp committed Apr 13, 2021
  3. net: korina: Use DMA API

    Instead of messing with MIPS specific macros use DMA API for mapping
    descriptors and skbs.
    
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    tsbogend authored and intel-lab-lkp committed Apr 13, 2021
  4. net: korina: Remove nested helpers

    Remove helpers, which are only used in one call site.
    
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    tsbogend authored and intel-lab-lkp committed Apr 13, 2021
  5. net: korina: Remove not needed cache flushes

    Descriptors are mapped uncached so there is no need to do any cache
    handling for them.
    
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    tsbogend authored and intel-lab-lkp committed Apr 13, 2021
  6. net: korina: Use devres functions

    Simplify probe/remove code by using devm_ functions.
    
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    tsbogend authored and intel-lab-lkp committed Apr 13, 2021
  7. net: korina: Fix MDIO functions

    Fixed MDIO functions to work reliable and not just by accident.
    
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    tsbogend authored and intel-lab-lkp committed Apr 13, 2021

Commits on Apr 12, 2021

  1. net: ethernet: ravb: Enable optional refclk

    For devices that use a programmable clock for the AVB reference clock,
    the driver may need to enable them.  Add code to find the optional clock
    and enable it when available.
    
    Signed-off-by: Adam Ford <aford173@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    aford173 authored and davem330 committed Apr 12, 2021
  2. dt-bindings: net: renesas,etheravb: Add additional clocks

    The AVB driver assumes there is an external crystal, but it could
    be clocked by other means.  In order to enable a programmable
    clock, it needs to be added to the clocks list and enabled in the
    driver.  Since there currently only one clock, there is no
    clock-names list either.
    
    Update bindings to add the additional optional clock, and explicitly
    name both of them.
    
    Signed-off-by: Adam Ford <aford173@gmail.com>
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Acked-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    aford173 authored and davem330 committed Apr 12, 2021
  3. Merge branch 'enetc-ptp'

    Yangbo Lu says:
    
    ====================
    enetc: support PTP Sync packet one-step timestamping
    
    This patch-set is to add support for PTP Sync packet one-step timestamping.
    Since ENETC single-step register has to be configured dynamically per
    packet for correctionField offeset and UDP checksum update, current
    one-step timestamping packet has to be sent only when the last one
    completes transmitting on hardware. So, on the TX, this patch handles
    one-step timestamping packet as below:
    
    - Trasmit packet immediately if no other one in transfer, or queue to
      skb queue if there is already one in transfer.
      The test_and_set_bit_lock() is used here to lock and check state.
    - Start a work when complete transfer on hardware, to release the bit
      lock and to send one skb in skb queue if has.
    
    Changes for v2:
    	- Rebased.
    	- Fixed issues from patchwork checks.
    	- netif_tx_lock for one-step timestamping packet sending.
    Changes for v3:
    	- Used system workqueue.
    	- Set bit lock when transmitted one-step packet, and scheduled
    	  work when completed. The worker cleared the bit lock, and
    	  transmitted one skb in skb queue if has, instead of a loop.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 12, 2021
  4. enetc: support PTP Sync packet one-step timestamping

    This patch is to add support for PTP Sync packet one-step timestamping.
    Since ENETC single-step register has to be configured dynamically per
    packet for correctionField offeset and UDP checksum update, current
    one-step timestamping packet has to be sent only when the last one
    completes transmitting on hardware. So, on the TX, this patch handles
    one-step timestamping packet as below:
    
    - Trasmit packet immediately if no other one in transfer, or queue to
      skb queue if there is already one in transfer.
      The test_and_set_bit_lock() is used here to lock and check state.
    - Start a work when complete transfer on hardware, to release the bit
      lock and to send one skb in skb queue if has.
    
    And the configuration for one-step timestamping on ENETC before
    transmitting is,
    
    - Set one-step timestamping flag in extension BD.
    - Write 30 bits current timestamp in tstamp field of extension BD.
    - Update PTP Sync packet originTimestamp field with current timestamp.
    - Configure single-step register for correctionField offeset and UDP
      checksum update.
    
    Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
    Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    yangbolu1991 authored and davem330 committed Apr 12, 2021
  5. enetc: mark TX timestamp type per skb

    Mark TX timestamp type per skb on skb->cb[0], instead of
    global variable for all skbs. This is a preparation for
    one step timestamp support.
    
    For one-step timestamping enablement, there will be both
    one-step and two-step PTP messages to transfer. And a skb
    queue is needed for one-step PTP messages making sure
    start to send current message only after the last one
    completed on hardware. (ENETC single-step register has to
    be dynamically configured per message.) So, marking TX
    timestamp type per skb is required.
    
    Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
    Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    yangbolu1991 authored and davem330 committed Apr 12, 2021
  6. Merge branch 'ibmvnic-errors'

    Lijun Pan says:
    
    ====================
    ibmvnic: improve error printing
    
    Patch 1 prints reset reason as a string.
    Patch 2 prints adapter state as a string.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 12, 2021
  7. ibmvnic: print adapter state as a string

    The adapter state can be added or deleted over different versions
    of the source code. Print a string instead of a number.
    
    Signed-off-by: Lijun Pan <lijunp213@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Lijun Pan authored and davem330 committed Apr 12, 2021
  8. ibmvnic: print reset reason as a string

    The reset reason can be added or deleted over different versions
    of the source code. Print a string instead of a number.
    
    Signed-off-by: Lijun Pan <lijunp213@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Lijun Pan authored and davem330 committed Apr 12, 2021
  9. ibmvnic: clean up the remaining debugfs data structures

    Commit e704f04 ("ibmvnic: Remove debugfs support") did not
    clean up everything. Remove the remaining code.
    
    Signed-off-by: Lijun Pan <lijunp213@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Lijun Pan authored and davem330 committed Apr 12, 2021
  10. Merge branch 'netns-sysctl-isolation'

    Jonathon Reinhart says:
    
    ====================
    Ensuring net sysctl isolation
    
    This patchset is the result of an audit of /proc/sys/net to prove that
    it is safe to be mouted read-write in a container when a net namespace
    is in use. See [1].
    
    The first commit adds code to detect sysctls which are not netns-safe,
    and can "leak" changes to other net namespaces.
    
    My manual audit found, and the above feature confirmed, that there are
    two nf_conntrack sysctls which are in fact not netns-safe.
    
    I considered sending the latter to netfilter-devel, but I think it's
    better to have both together on net-next: Adding only the former causes
    undesirable warnings in the kernel log.
    
    [1]: opencontainers/runc#2826
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 12, 2021
  11. netfilter: conntrack: Make global sysctls readonly in non-init netns

    These sysctls point to global variables:
    - NF_SYSCTL_CT_MAX (&nf_conntrack_max)
    - NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max)
    - NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user)
    
    Because their data pointers are not updated to point to per-netns
    structures, they must be marked read-only in a non-init_net ns.
    Otherwise, changes in any net namespace are reflected in (leaked into)
    all other net namespaces. This problem has existed since the
    introduction of net namespaces.
    
    The current logic marks them read-only only if the net namespace is
    owned by an unprivileged user (other than init_user_ns).
    
    Commit d0febd8 ("netfilter: conntrack: re-visit sysctls in
    unprivileged namespaces") "exposes all sysctls even if the namespace is
    unpriviliged." Since we need to mark them readonly in any case, we can
    forego the unprivileged user check altogether.
    
    Fixes: d0febd8 ("netfilter: conntrack: re-visit sysctls in unprivileged namespaces")
    Signed-off-by: Jonathon Reinhart <Jonathon.Reinhart@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    JonathonReinhart authored and davem330 committed Apr 12, 2021
  12. net: Ensure net namespace isolation of sysctls

    This adds an ensure_safe_net_sysctl() check during register_net_sysctl()
    to validate that sysctl table entries for a non-init_net netns are
    sufficiently isolated. To be netns-safe, an entry must adhere to at
    least (and usually exactly) one of these rules:
    
    1. It is marked read-only inside the netns.
    2. Its data pointer does not point to kernel/module global data.
    
    An entry which fails both of these checks is indicative of a bug,
    whereby a child netns can affect global net sysctl values.
    
    If such an entry is found, this code will issue a warning to the kernel
    log, and force the entry to be read-only to prevent a leak.
    
    To test, simply create a new netns:
    
        $ sudo ip netns add dummy
    
    As it sits now, this patch will WARN for two sysctls which will be
    addressed in a subsequent patch:
    - /proc/sys/net/netfilter/nf_conntrack_max
    - /proc/sys/net/netfilter/nf_conntrack_expect_max
    
    Signed-off-by: Jonathon Reinhart <Jonathon.Reinhart@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    JonathonReinhart authored and davem330 committed Apr 12, 2021
  13. nfc: pn533: remove redundant assignment

    In many places,first assign a value to a variable and then return
    the variable. which is redundant, we should directly return the value.
    in pn533_rf_field funciton,return rc also in the if statement, so we
    use return 0 to replace the last return rc.
    
    Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    wengjianfeng authored and davem330 committed Apr 12, 2021
  14. Merge branch 'bnxt_en-error-recovery'

    Michael Chan says:
    
    ====================
    bnxt_en: Error recovery fixes.
    
    This series adds some fixes and enhancements to the error recovery
    logic.  The health register logic is improved and we also add missing
    code to free and re-create VF representors in the firmware after
    error recovery.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 12, 2021
  15. bnxt_en: Free and allocate VF-Reps during error recovery.

    During firmware recovery, VF-Rep configuration in the firmware is lost.
    Fix it by freeing and (re)allocating VF-Reps in FW at relevant points
    during the error recovery process.
    
    Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    sbasavapatna authored and davem330 committed Apr 12, 2021
  16. bnxt_en: Refactor __bnxt_vf_reps_destroy().

    Add a new helper function __bnxt_free_one_vf_rep() to free one VF rep.
    We also reintialize the VF rep fields to proper initial values so that
    the function can be used without freeing the VF rep data structure.  This
    will be used in subsequent patches to free and recreate VF reps after
    error recovery.
    
    Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
    Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Michael Chan authored and davem330 committed Apr 12, 2021
  17. bnxt_en: Refactor bnxt_vf_reps_create().

    Add a new function bnxt_alloc_vf_rep() to allocate a VF representor.
    This function will be needed in subsequent patches to recreate the
    VF reps after error recovery.
    
    Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    sbasavapatna authored and davem330 committed Apr 12, 2021
  18. bnxt_en: Invalidate health register mapping at the end of probe.

    After probe is successful, interface may not be bought up in all
    the cases and health register mapping could be invalid if firmware
    undergoes reset. Fix it by invalidating the health register at the
    end of probe. It will be remapped during ifup.
    
    Fixes: 43a440c ("bnxt_en: Improve the status_reliable flag in bp->fw_health.")
    Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Vasundhara Volam authored and davem330 committed Apr 12, 2021
  19. bnxt_en: Treat health register value 0 as valid in bnxt_try_reover_fw().

    The retry loop in bnxt_try_recover_fw() should not abort when the
    health register value is 0.  It is a valid value that indicates the
    firmware is booting up.
    
    Fixes: 861aae7 ("bnxt_en: Enhance retry of the first message to the firmware.")
    Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Michael Chan authored and davem330 committed Apr 12, 2021
  20. net: seg6: trivial fix of a spelling mistake in comment

    There is a comment spelling mistake "interfarence" -> "interference" in
    function parse_nla_action(). Fix it.
    
    Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    skorpion17 authored and davem330 committed Apr 12, 2021
  21. net: hns3: Fix potential null pointer defererence of null ae_dev

    The reset_prepare and reset_done calls have a null pointer check
    on ae_dev however ae_dev is being dereferenced via the call to
    ns3_is_phys_func with the ae->pdev argument. Fix this by performing
    a null pointer check on ae_dev and hence short-circuiting the
    dereference to ae_dev on the call to ns3_is_phys_func.
    
    Addresses-Coverity: ("Dereference before null check")
    Fixes: 715c58e ("net: hns3: add suspend and resume pm_ops")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Colin Ian King authored and davem330 committed Apr 12, 2021
  22. net: thunderx: Fix unintentional sign extension issue

    The shifting of the u8 integers rq->caching by 26 bits to
    the left will be promoted to a 32 bit signed int and then
    sign-extended to a u64. In the event that rq->caching is
    greater than 0x1f then all then all the upper 32 bits of
    the u64 end up as also being set because of the int
    sign-extension. Fix this by casting the u8 values to a
    u64 before the 26 bit left shift.
    
    Addresses-Coverity: ("Unintended sign extension")
    Fixes: 4863dea ("net: Adding support for Cavium ThunderX network controller")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Colin Ian King authored and davem330 committed Apr 12, 2021
  23. cxgb4: Fix unintentional sign extension issues

    The shifting of the u8 integers f->fs.nat_lip[] by 24 bits to
    the left will be promoted to a 32 bit signed int and then
    sign-extended to a u64. In the event that the top bit of the u8
    is set then all then all the upper 32 bits of the u64 end up as
    also being set because of the sign-extension. Fix this by
    casting the u8 values to a u64 before the 24 bit left shift.
    
    Addresses-Coverity: ("Unintended sign extension")
    Fixes: 12b276f ("cxgb4: add support to create hash filters")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Colin Ian King authored and davem330 committed Apr 12, 2021

Commits on Apr 11, 2021

  1. Merge branch 'ipa-next'

    Alex Elder says:
    
    ====================
    net: ipa: support two more platforms
    
    This series adds IPA support for two more Qualcomm SoCs.
    
    The first patch updates the DT binding to add compatible strings.
    
    The second temporarily disables checksum offload support for IPA
    version 4.5 and above.  Changes are required to the RMNet driver
    to support the "inline" checksum offload used for IPA v4.5+, and
    once those are present this capability will be enabled for IPA.
    
    The third and fourth patches add configuration data for IPA versions
    4.5 (used for the SDX55 SoC) and 4.11 (used for the SD7280 SoC).
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Apr 11, 2021
  2. net: ipa: add IPA v4.11 configuration data

    Add support for the SC7280 SoC, which includes IPA version 4.11.
    
    Signed-off-by: Alex Elder <elder@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    alexelder authored and davem330 committed Apr 11, 2021
  3. net: ipa: add IPA v4.5 configuration data

    Add support for the SDX55 SoC, which includes IPA version 4.5.
    
    Starting with IPA v4.5, a few of the memory regions have a different
    number of "canary" values; update comments in the where the region
    identifers are defined to accurately reflect that.
    
    I'll note three differences in SDX55 versus the other two existing
    platforms (SDM845 and SC7180):
      - SDX55 uses a 32-bit Linux kernel
      - SDX55 has four interconnects rather than three
      - SDX55 uses IPA v4.5, which uses inline checksum offload
    
    Signed-off-by: Alex Elder <elder@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    alexelder authored and davem330 committed Apr 11, 2021
  4. net: ipa: disable checksum offload for IPA v4.5+

    Checksum offload for IPA v4.5+ is implemented differently, using
    "inline" offload (which uses a common header format for both upload
    and download offload).
    
    The IPA hardware must be programmed to enable MAP checksum offload,
    but the RMNet driver is responsible for interpreting checksum
    metadata supplied with messages.
    
    Currently, the RMNet driver does not support inline checksum offload.
    This support is imminent, but until it is available, do not allow
    newer versions of IPA to specify checksum offload for endpoints.
    
    Signed-off-by: Alex Elder <elder@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    alexelder authored and davem330 committed Apr 11, 2021
  5. dt-bindings: net: qcom,ipa: add some compatible strings

    Add existing supported platform "qcom,sc7180-ipa" to the set of IPA
    compatible strings.  Also add newly-supported "qcom,sdx55-ipa",
    "qcom,sc7280-ipa".
    
    Signed-off-by: Alex Elder <elder@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    alexelder authored and davem330 committed Apr 11, 2021
Older