Skip to content
Permalink
Stephan-Gerhol…
Switch branches/tags

Commits on Jun 18, 2021

  1. net: wwan: Allow WWAN drivers to provide blocking tx and poll function

    At the moment, the WWAN core provides wwan_port_txon/off() to implement
    blocking writes. The tx() port operation should not block, instead
    wwan_port_txon/off() should be called when the TX queue is full or has
    free space again.
    
    However, in some cases it is not straightforward to make use of that
    functionality. For example, the RPMSG API used by rpmsg_wwan_ctrl.c
    does not provide any way to be notified when the TX queue has space
    again. Instead, it only provides the following operations:
    
      - rpmsg_send(): blocking write (wait until there is space)
      - rpmsg_trysend(): non-blocking write (return error if no space)
      - rpmsg_poll(): set poll flags depending on TX queue state
    
    Generally that's totally sufficient for implementing a char device,
    but it does not fit well to the currently provided WWAN port ops.
    
    Most of the time, using the non-blocking rpmsg_trysend() in the
    WWAN tx() port operation works just fine. However, with high-frequent
    writes to the char device it is possible to trigger a situation
    where this causes issues. For example, consider the following
    (somewhat unrealistic) example:
    
     # dd if=/dev/zero bs=1000 of=/dev/wwan0p2QMI
     dd: error writing '/dev/wwan0p2QMI': Resource temporarily unavailable
     1+0 records out
    
    This fails immediately after writing the first record. It's likely
    only a matter of time until this triggers issues for some real application
    (e.g. ModemManager sending a lot of large QMI packets).
    
    The rpmsg_char device does not have this problem, because it uses
    rpmsg_trysend() and rpmsg_poll() to support non-blocking operations.
    Make it possible to use the same in the RPMSG WWAN driver by extending
    the tx() operation with a "nonblock" parameter and adding an optional
    tx_poll() callback. This integrates nicely with the RPMSG API
    and does not break other WWAN drivers.
    
    With these changes, the dd example above blocks instead of exiting
    with an error.
    
    Cc: Loic Poulain <loic.poulain@linaro.org>
    Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
    stephan-gh authored and intel-lab-lkp committed Jun 18, 2021
  2. net: wwan: Add RPMSG WWAN CTRL driver

    The remote processor messaging (rpmsg) subsystem provides an interface
    to communicate with other remote processors. On many Qualcomm SoCs this
    is used to communicate with an integrated modem DSP that implements most
    of the modem functionality and provides high-level protocols like
    QMI or AT to allow controlling the modem.
    
    For QMI, most older Qualcomm SoCs (e.g. MSM8916/MSM8974) have
    a standalone "DATA5_CNTL" channel that allows exchanging QMI messages.
    Note that newer SoCs (e.g. SDM845) only allow exchanging QMI messages
    via a shared QRTR channel that is available via a socket API on Linux.
    
    For AT, the "DATA4" channel accepts at least a limited set of AT
    commands, on many older and newer Qualcomm SoCs, although QMI is
    typically the preferred control protocol.
    
    Note that the data path (network interface) is entirely separate
    from the control path and varies between Qualcomm SoCs, e.g. "IPA"
    on newer Qualcomm SoCs or "BAM-DMUX" on some older ones.
    
    The RPMSG WWAN CTRL driver exposes the QMI/AT control ports via the
    WWAN subsystem, and therefore allows userspace like ModemManager to
    set up the modem. Until now, ModemManager had to use the RPMSG-specific
    rpmsg-char where the channels must be explicitly exposed as a char
    device first and don't show up directly in sysfs.
    
    The driver is a fairly simple glue layer between WWAN and RPMSG
    and is mostly based on the existing mhi_wwan_ctrl.c and rpmsg_char.c.
    
    Cc: Loic Poulain <loic.poulain@linaro.org>
    Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
    stephan-gh authored and intel-lab-lkp committed Jun 18, 2021
  3. rpmsg: core: Add driver_data for rpmsg_device_id

    Most device_id structs provide a driver_data field that can be used
    by drivers to associate data more easily for a particular device ID.
    Add the same for the rpmsg_device_id.
    
    Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
    stephan-gh authored and intel-lab-lkp committed Jun 18, 2021

Commits on Jun 17, 2021

  1. Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/tnguy/next-queue
    
    Tony Nguyen says:
    
    ====================
    100GbE Intel Wired LAN Driver Updates 2021-06-17
    
    This series contains updates to ice driver only.
    
    Jake corrects a couple of entries in the PTYPE table to properly
    reflect the datasheet and removes unneeded NULL checks for some
    PTP calls.
    
    Paul reduces the scope of variables and removes the use of a local
    variable.
    
    Shaokun Zhang removes a duplicate function declaration.
    
    Lorenzo Bianconi fixes a compilation warning if PTP_1588_CLOCK is
    disabled.
    
    Colin Ian King changes a for loop to remove an unneeded 'continue'.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jun 17, 2021
  2. Merge branch 'hdlc_ppp-cleanups'

    Guangbin Huang says:
    
    ====================
    net: hdlc_ppp: clean up some code style issues
    
    This patchset clean up some code style issues.
    
    ---
    Change Log:
    V1 -> V2:
    1. remove patch "net: hdlc_ppp: fix the comments style issue" and
    patch "net: hdlc_ppp: remove redundant spaces" from this patchset.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jun 17, 2021
  3. net: hdlc_ppp: add required space

    Add space required after that ','.
    
    Signed-off-by: Peng Li <lipeng321@huawei.com>
    Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    321lipeng authored and davem330 committed Jun 17, 2021
  4. net: hdlc_ppp: remove unnecessary out of memory message

    This patch removes unnecessary out of memory message,
    to fix the following checkpatch.pl warning:
    "WARNING: Possible unnecessary 'out of memory' message"
    
    Signed-off-by: Peng Li <lipeng321@huawei.com>
    Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    321lipeng authored and davem330 committed Jun 17, 2021
  5. net: hdlc_ppp: move out assignment in if condition

    Should not use assignment in if condition.
    
    Signed-off-by: Peng Li <lipeng321@huawei.com>
    Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    321lipeng authored and davem330 committed Jun 17, 2021
  6. net: hdlc_ppp: fix the code style issue about "foo* bar"

    Fix the checkpatch error as "foo* bar" or "foo*bar" should be "foo *bar".
    
    Signed-off-by: Peng Li <lipeng321@huawei.com>
    Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    321lipeng authored and davem330 committed Jun 17, 2021
  7. net: hdlc_ppp: add blank line after declarations

    This patch fixes the checkpatch error about missing a blank line
    after declarations.
    
    Signed-off-by: Peng Li <lipeng321@huawei.com>
    Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    321lipeng authored and davem330 committed Jun 17, 2021
  8. net: hdlc_ppp: remove redundant blank lines

    This patch removes some redundant blank lines.
    
    Signed-off-by: Peng Li <lipeng321@huawei.com>
    Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    321lipeng authored and davem330 committed Jun 17, 2021
  9. Merge branch 'mdio-nodes'

    Ioana Ciornei says:
    
    ====================
    net: mdio: setup both fwnode and of_node
    
    The first patch in this series fixes a bug introduced by mistake in the
    previous ACPI MDIO patch set.
    
    The next two patches are adding a new helper which takes a device and a
    fwnode_handle and populates both the of_node and fwnode so that we make
    sure that a bug like this does not happen anymore.
    Also, the new helper is used in the MDIO area.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jun 17, 2021
  10. net: mdio: use device_set_node() to setup both fwnode and of

    Use the newly introduced helper to setup both the of_node and the
    fwnode for a given device.
    
    Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IoanaCiornei authored and davem330 committed Jun 17, 2021
  11. driver core: add a helper to setup both the of_node and fwnode of a d…

    …evice
    
    There are many places where both the fwnode_handle and the of_node of a
    device need to be populated. Add a function which does both so that we
    have consistency.
    
    Suggested-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IoanaCiornei authored and davem330 committed Jun 17, 2021
  12. net: mdio: setup of_node for the MDIO device

    By mistake, the of_node of the MDIO device was not setup in the patch
    linked below. As a consequence, any PHY driver that depends on the
    of_node in its probe callback was not be able to successfully finish its
    probe on a PHY, thus the Generic PHY driver was used instead.
    
    Fix this by actually setting up the of_node.
    
    Fixes: bc1bee3 ("net: mdiobus: Introduce fwnode_mdiobus_register_phy()")
    Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IoanaCiornei authored and davem330 committed Jun 17, 2021
  13. r8152: store the information of the pipes

    Store the information of the pipes to avoid calling usb_rcvctrlpipe(),
    usb_sndctrlpipe(), usb_rcvbulkpipe(), usb_sndbulkpipe(), and
    usb_rcvintpipe() frequently.
    
    Signed-off-by: Hayes Wang <hayeswang@realtek.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    hayesorz authored and davem330 committed Jun 17, 2021
  14. Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

    Daniel Borkmann says:
    
    ====================
    pull-request: bpf-next 2021-06-17
    
    The following pull-request contains BPF updates for your *net-next* tree.
    
    We've added 50 non-merge commits during the last 25 day(s) which contain
    a total of 148 files changed, 4779 insertions(+), 1248 deletions(-).
    
    The main changes are:
    
    1) BPF infrastructure to migrate TCP child sockets from a listener to another
       in the same reuseport group/map, from Kuniyuki Iwashima.
    
    2) Add a provably sound, faster and more precise algorithm for tnum_mul() as
       noted in https://arxiv.org/abs/2105.05398, from Harishankar Vishwanathan.
    
    3) Streamline error reporting changes in libbpf as planned out in the
       'libbpf: the road to v1.0' effort, from Andrii Nakryiko.
    
    4) Add broadcast support to xdp_redirect_map(), from Hangbin Liu.
    
    5) Extends bpf_map_lookup_and_delete_elem() functionality to 4 more map
       types, that is, {LRU_,PERCPU_,LRU_PERCPU_,}HASH, from Denis Salopek.
    
    6) Support new LLVM relocations in libbpf to make them more linker friendly,
       also add a doc to describe the BPF backend relocations, from Yonghong Song.
    
    7) Silence long standing KUBSAN complaints on register-based shifts in
       interpreter, from Daniel Borkmann and Eric Biggers.
    
    8) Add dummy PT_REGS macros in libbpf to fail BPF program compilation when
       target arch cannot be determined, from Lorenz Bauer.
    
    9) Extend AF_XDP to support large umems with 1M+ pages, from Magnus Karlsson.
    
    10) Fix two minor libbpf tc BPF API issues, from Kumar Kartikeya Dwivedi.
    
    11) Move libbpf BPF_SEQ_PRINTF/BPF_SNPRINTF macros that can be used by BPF
        programs to bpf_helpers.h header, from Florent Revest.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jun 17, 2021
  15. Merge branch 'gianfar-64-bit-stats'

    Esben Haabendal says:
    
    ====================
    net: gianfar: 64-bit statistics and rx_missed_errors counter
    
    This series replaces the legacy 32-bit statistics to proper 64-bit ditto,
    and implements rx_missed_errors counter on top of that.
    
    The device supports a 16-bit RDRP counter, and a related carry bit and
    interrupt, which allows implementation of a robust 64-bit counter.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jun 17, 2021
  16. net: gianfar: Implement rx_missed_errors counter

    Devices with RMON support has a 16-bit RDRP counter.  It provides: "Receive
    dropped packets counter. Increments for frames received which are streamed
    to system but are later dropped due to lack of system resources."
    
    To handle more than 2^16 dropped packets, a carry bit in CAR1 register is
    set on overflow, so we enable irq when this is set, extending the counter
    to 2^64 for handling situations where lots of packets are missed (e.g.
    during heavy network storms).
    
    Signed-off-by: Esben Haabendal <esben@geanix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    esben authored and davem330 committed Jun 17, 2021
  17. net: gianfar: Add definitions for CAR1 and CAM1 register bits

    These are for carry status and interrupt mask bits of statistics registers.
    
    Signed-off-by: Esben Haabendal <esben@geanix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    esben authored and davem330 committed Jun 17, 2021
  18. net: gianfar: Avoid 16 bytes of memset

    The memset on CAMx is wrong, as it actually unmasks all carry irq's,
    which we clearly are not interested in.
    
    The memset on CARx registers is just pointless, as they are W1C.
    
    So let's just stop the memset before CAR1.
    
    Signed-off-by: Esben Haabendal <esben@geanix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    esben authored and davem330 committed Jun 17, 2021
  19. net: gianfar: Clear CAR registers

    The CAR1 and CAR2 registers are W1C style registers, to the memset does not
    actually clear them.
    
    Signed-off-by: Esben Haabendal <esben@geanix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    esben authored and davem330 committed Jun 17, 2021
  20. net: gianfar: Extend statistics counters to 64-bit

    No reason to wrap counter values at 2^32.  Especially the bytes counters
    can wrap pretty fast on Gbit networks.
    
    Signed-off-by: Esben Haabendal <esben@geanix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    esben authored and davem330 committed Jun 17, 2021
  21. net: gianfar: Convert to ndo_get_stats64 interface

    No reason to produce the legacy net_device_stats struct, only to have it
    converted to rtnl_link_stats64.  And as a bonus, this allows for improving
    counter size to 64 bit.
    
    Signed-off-by: Esben Haabendal <esben@geanix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    esben authored and davem330 committed Jun 17, 2021
  22. net: sched: fix error return code in tcf_del_walker()

    When nla_put_u32() fails, 'ret' could be 0, it should
    return error code in tcf_del_walker().
    
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Yang Yingliang authored and davem330 committed Jun 17, 2021
  23. net: ipa: Add missing of_node_put() in ipa_firmware_load()

    This node pointer is returned by of_parse_phandle() with refcount
    incremented in this function. of_node_put() on it before exiting
    this function.
    
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
    Acked-by: Alex Elder <elder@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Yang Yingliang authored and davem330 committed Jun 17, 2021
  24. net: fix mistake path for netdev_features_strings

    Th_strings arrays netdev_features_strings, tunable_strings, and
    phy_tunable_strings has been moved to file net/ethtool/common.c.
    So fixes the comment.
    
    Signed-off-by: Jian Shen <shenjian15@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    IronShen authored and davem330 committed Jun 17, 2021
  25. documentation: networking: devlink: fix prestera.rst formatting that …

    …causes build warnings
    
    Fixes: 66826c4 ("documentation: networking: devlink: add prestera switched driver Documentation")
    
    Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Oleksandr Mazur authored and davem330 committed Jun 17, 2021
  26. net: pcs: xpcs: Fix a less than zero u16 comparison error

    Currently the check for the u16 variable val being less than zero is
    always false because val is unsigned. Fix this by using the int
    variable for the assignment and less than zero check.
    
    Addresses-Coverity: ("Unsigned compared against 0")
    Fixes: f7380bb ("net: pcs: xpcs: add support for NXP SJA1110")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Colin Ian King authored and davem330 committed Jun 17, 2021
  27. ice: remove redundant continue statement in a for-loop

    The continue statement in the for-loop is redundant. Re-work the hw_lock
    check to remove it.
    
    Addresses-Coverity: ("Continue has no effect")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Colin Ian King authored and anguy11 committed Jun 17, 2021
  28. net: ice: ptp: fix compilation warning if PTP_1588_CLOCK is disabled

    Fix the following compilation warning if PTP_1588_CLOCK is not enabled
    
    drivers/net/ethernet/intel/ice/ice_ptp.h:149:1:
       error: return type defaults to ‘int’ [-Werror=return-type]
       ice_ptp_request_ts(struct ice_ptp_tx *tx, struct sk_buff *skb)
    
    Fixes: ea9b847 ("ice: enable transmit timestamps for E810 devices")
    Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
    Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    LorenzoBianconi authored and anguy11 committed Jun 17, 2021
  29. ice: remove unnecessary NULL checks before ptp_read_system_*

    The ptp_read_system_prets and ptp_read_system_postts functions already
    check for the NULL value of the ptp_system_timestamp structure pointer.
    There is no need to check this manually in the ice driver code. Remove
    the checks.
    
    Reported-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    jacob-keller authored and anguy11 committed Jun 17, 2021
  30. ice: Remove the repeated declaration

    Function 'ice_is_vsi_valid' is declared twice, remove the
    repeated declaration.
    
    Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
    Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    zhangshk authored and anguy11 committed Jun 17, 2021
  31. ice: remove local variable

    Remove the local variable since it's only used once. Instead, use it
    directly.
    
    Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
    Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    pmstillw authored and anguy11 committed Jun 17, 2021
  32. ice: reduce scope of variables

    There are some places where the scope of a variable can
    be reduced so do that.
    
    Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
    Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    pmstillw authored and anguy11 committed Jun 17, 2021
Older