1. 09 Mar, 2020 40 commits
    • Vlad Buslov's avatar
      net/mlx5e: Init ethtool steering for representors · 6783e8b2
      Vlad Buslov authored
      During transition to uplink representors the code responsible for
      initializing ethtool steering functionality wasn't added to representor
      init rx routine. This causes NULL pointer dereference during configuration
      of network flow classification rule with ethtool (only possible to
      reproduce with next commit in this series which registers necessary ethtool
      callbacks).
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      6783e8b2
    • Vlad Buslov's avatar
      net/mlx5e: Show/set Rx flow indir table and RSS hash key on ul rep · 01013ad3
      Vlad Buslov authored
      Reuse infrastructure that already exists for pf in legacy mode to show/set
      Rx flow hash indirection table and RSS hash key for uplink representors.
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      01013ad3
    • Saeed Mahameed's avatar
      net/mlx5e: Introduce root ft concept for representors netdevs · 20f7b37f
      Saeed Mahameed authored
      Uplink representor traffic will be redirected to an empty root ft rather
      than directly to a direct tir or ttc table, this root ft will be empty and
      will be used as a link for auto-chaining with ttc table or ethtool tables
      in downstream patches.
      
      On load, fs core will connect uplink rep root_ft with ttc table.  In case
      ethtool steering will be used, fs core will auto connect root_ft with
      the ethtool bypass tables, which will be connected with the ttc table.
      
      vport_rx_rule[uplink_rep]->root_ft->ethtool->ttc.
      
      For non-uplink representors, for simplicity root_ft will always point at
      ttc table, hence the replace vport_rx rule logic is removed.
      
      vport_rx_rule[non_uplink_rep]->root_ft(ttc).
      
      For now ethtool steering support can only be available on uplink rep.
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      20f7b37f
    • Parav Pandit's avatar
      net/mlx5: E-switch, make query inline mode a static function · cc617ced
      Parav Pandit authored
      mlx5_eswitch_inline_mode_get() is used only in eswitch_offloads.c.
      Hence, make it static and adjacent to its caller function.
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      Reviewed-by: default avatarBodong Wang <bodong@mellanox.com>
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      cc617ced
    • Paul Blakey's avatar
      net/mlx5: Allocate smaller size tables for ft offload · 891b8f33
      Paul Blakey authored
      Instead of giving ft tables one of the largest tables available - 4M,
      give it a more reasonable size - 64k. Especially since it will
      always be created as a miss hook in the following patch.
      Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
      Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      891b8f33
    • Dan Carpenter's avatar
      net/mlx5e: Fix an IS_ERR() vs NULL check · d9fb932f
      Dan Carpenter authored
      The esw_vport_tbl_get() function returns error pointers on error.
      
      Fixes: 96e32687 ("net/mlx5e: Eswitch, Use per vport tables for mirroring")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      d9fb932f
    • Eli Cohen's avatar
      net/mlx5: Verify goto chain offload support · 2fbbc30d
      Eli Cohen authored
      According to PRM, forward to flow table along with either packet
      reformat or decap is supported only if reformat_and_fwd_to_table
      capability is set for the flow table.
      
      Add dependency on the capability and pack all the conditions for "goto
      chain" in a single function.
      
      Fix language in error message in case of not supporting forward to a
      lower numbered flow table.
      Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      2fbbc30d
    • Majd Dibbiny's avatar
      net/mlx5: E-Switch, Use vport metadata matching only when mandatory · 1e62e222
      Majd Dibbiny authored
      Multi-port RoCE mode requires tagging traffic that passes through the
      vport.
      This matching can cause performance degradation, therefore disable it
      and use the legacy matching on vhca_id and source_port when possible.
      
      Fixes: 92ab1eb3 ("net/mlx5: E-Switch, Enable vport metadata matching if firmware supports it")
      Signed-off-by: default avatarMajd Dibbiny <majd@mellanox.com>
      Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      1e62e222
    • Mark Bloch's avatar
      net/mlx5: Tidy up and fix reverse christmas ordring · 2f5438ca
      Mark Bloch authored
      Use reverse chirstmas tree inside mlx5e_ethtool_get_link_ksettings.
      Signed-off-by: default avatarMark Bloch <markb@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      2f5438ca
    • Mark Bloch's avatar
      net/mlx5: Expose port speed when possible · c268ca60
      Mark Bloch authored
      When port speed can't be reported based on ext_eth_proto_capability
      or eth_proto_capability instead of reporting speed as unknown check
      if the port's speed can be inferred based on the data_rate_oper field.
      Signed-off-by: default avatarMark Bloch <markb@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      c268ca60
    • Saeed Mahameed's avatar
      Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux · a70ed9d8
      Saeed Mahameed authored
      This series adds some HW bits and definitions for mlx5 driver, to be
      used by downstream features in both rdma and netdev branches.
      
      * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux:
        net/mlx5: HW bit for goto chain offload support
        net/mlx5: Expose link speed directly
        net/mlx5: Introduce TLS and IPSec objects enums
        net/mlx5: Introduce egress acl forward-to-vport capability
        net/mlx5: Expose raw packet pacing APIs
        net/mlx5e: Replace zero-length array with flexible-array member
        net/mlx5: fix spelling mistake "reserverd" -> "reserved"
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      a70ed9d8
    • Thomas Bogendoerfer's avatar
      net: sgi: ioc3-eth: Remove phy workaround · 34a568a2
      Thomas Bogendoerfer authored
      Commit a8d0f11e ("MIPS: SGI-IP27: Enable ethernet phy on second
      Origin 200 module") fixes the root cause of not detected PHYs.
      Therefore the workaround can go away now.
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34a568a2
    • David S. Miller's avatar
      Merge branch 'net-introduce-Qualcomm-IPA-driver' · fbd43602
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: introduce Qualcomm IPA driver (UPDATED)
      
      This series presents the driver for the Qualcomm IP Accelerator (IPA).
      
      This is version 2 of this updated series.  It includes the following
      small changes since the previous version:
        - Now based on net-next instead of v5.6-rc
        - Config option now named CONFIG_QCOM_IPA
        - Some minor cleanup in the GSI code
        - Small change to replenish logic
        - No longer depends on remoteproc bug fixes
      What follows is the basically same explanation as was posted previously.
      
      					-Alex
      
      I have posted earlier versions of this code previously, but it has
      undergone quite a bit of development since the last time, so rather
      than calling it "version 3" I'm just treating it as a new series
      (indicating it's been updated in this message).  The fast/data path
      is the same as before.  But the driver now (nearly) supports a
      second platform, its transaction handling has been generalized
      and improved, and modem activities are now handled in a more
      unified way.
      
      This series is available (based on net-next in branch "ipa_updated-v2"
      in this git repository:
        https://git.linaro.org/people/alex.elder/linux.git
      
      The branch depends on other one other small patch that I sent out
      for review earlier.
        https://lore.kernel.org/lkml/20200306042302.17602-1-elder@linaro.org/
      
      I want to address some of the discussion that arose last time.
      
      First, there was the WWAN discussion.  Here's the history:
        - This was last posted nine months ago.
        - Reviewers at that time favored developing a new WWAN subsystem that
          would be used for managing devices like this.  And the suggestion
          was to not accept this driver until that could be developed.
        - Along the way, Apple acquired much of Intel's modem business.
          And as a result, the generic framework became less pressing.
        - I did participate in the WWAN subsystem design however, and
          although it went dormant for a while it's been resurrected:
            https://lore.kernel.org/netdev/20200225100053.16385-1-johannes@sipsolutions.net/
        - Unfortunately the proposed WWAN design was not an easy fit
          with Qualcomm's integrated modem interfaces.  Given that
          rmnet is a supported link type for in the upstream "iproute2"
          package (more on this below), I have opted not to integrate
          with any WWAN subsystem.
      
      So in summary, this driver does not integrate with a generic WWAN
      framework.  And I'd like it to be accepted upstream despite that.
      
      Next, Arnd Bergmann had some concerns about flow control.  (Note:
      some of my discussions with Arnd about this were offline.) The
      overall architecture here also involves the "rmnet" driver:
        drivers/net/ethernet/qualcomm/rmnet
      
      The rmnet driver presents a network device for use.  It connects
      with another network device presented, by the IPA driver.  The
      rmnet driver wraps (and unwraps) packets transferred to (and from)
      the IPA driver with QMAP headers.
      
         ---------------
         | rmnet_data0 |    <-- "real" netdev
         ---------------
                ||       }- QMAP spoken here
         --------------
         | rmnet_ipa0 |     <-- also netdev, transporting QMAP packets
         --------------
                ||
         --------------
        ( IPA hardware )
         --------------
      
      Arnd's concern was that the rmnet_data0 network device does not
      have the benefit of information about the state of the underlying
      IPA hardware in order to be effective in controlling TX flow.
      The feared result is over-buffering of TX packets (bufferbloat).
      I began working on some simple experiments to see whether (or how
      much) his concern was warranted.  But it turned out that completing
      these experiments was much more work than had been hoped.
      
      The rmnet driver is present in the upstream kernel.  There is also
      support for the rmnet link type in the upstream "ip" user space
      command in the "iproute2" package.  Changing the layering of rmnet
      over IPA likely involves deprecating the rmnet driver and its
      support in "iproute2".  I would really rather not go down that
      path.
      
      There is precedent for this sort of layering of network devices
      (L2TP, VLAN).  And any architecture like this would suffer the
      issues Arnd mentioned; the problem is not limited to rmnet and IPA.
      I do think this is a problem worth solving, but the prudent thing
      to do might be to try to solve it more generally.
      
      So to summarize on this issue, this driver does not attempt to
      change the way the rmnet and IPA drivers work together.  And even
      though I think Arnd's concerns warrant more investigation, I'd like
      this driver to to be accepted upstream without any change to this
      architecture.
      
      Finally, a more technical description for the series, and some
      acknowledgements to some people who contributed to it.
      
      The IPA is a component present in some Qualcomm SoCs that allows
      network functions such as aggregation, filtering, routing, and NAT
      to be performed without active involvement of the main application
      processor (AP).
      
      In this initial patch series these advanced features are not
      implemented.  The IPA driver simply provides a network interface
      that makes the modem's LTE network available in Linux.  This initial
      series supports only the Qualcomm SDM845 SoC.  The Qualcomm SC7180
      SoC is partially supported, and support for other platforms will
      follow.
      
      This code is derived from a driver developed by Qualcomm.  A version
      of the original source can be seen here:
        https://source.codeaurora.org/quic/la/kernel/msm-4.9/tree
      in the "drivers/platform/msm/ipa" directory.  Many were involved in
      developing this, but the following individuals deserve explicit
      acknowledgement for their substantial contributions:
      
          Abhishek Choubey
          Ady Abraham
          Chaitanya Pratapa
          David Arinzon
          Ghanim Fodi
          Gidon Studinski
          Ravi Gummadidala
          Shihuan Liu
          Skylar Chang
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fbd43602
    • Alex Elder's avatar
      arm64: dts: sdm845: add IPA information · 9cc5ae12
      Alex Elder authored
      Add IPA-related nodes and definitions to "sdm845.dtsi".
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9cc5ae12
    • Alex Elder's avatar
      MAINTAINERS: add entry for the Qualcomm IPA driver · aa302745
      Alex Elder authored
      Add an entry in the MAINTAINERS file for the Qualcomm IPA driver
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa302745
    • Alex Elder's avatar
      soc: qcom: ipa: support build of IPA code · 08120d23
      Alex Elder authored
      Add build and Kconfig support for the Qualcomm IPA driver.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      08120d23
    • Alex Elder's avatar
      soc: qcom: ipa: AP/modem communications · 530f9216
      Alex Elder authored
      This patch implements two forms of out-of-band communication between
      the AP and modem.
      
        - QMI is a mechanism that allows clients running on the AP
          interact with services running on the modem (and vice-versa).
          The AP IPA driver uses QMI to communicate with the corresponding
          IPA driver resident on the modem, to agree on parameters used
          with the IPA hardware and to ensure both sides are ready before
          entering operational mode.
      
        - SMP2P is a more primitive mechanism available for the modem and
          AP to communicate with each other.  It provides a means for either
          the AP or modem to interrupt the other, and furthermore, to provide
          32 bits worth of information.  The IPA driver uses SMP2P to tell
          the modem what the state of the IPA clock was in the event of a
          crash.  This allows the modem to safely access the IPA hardware
          (or avoid doing so) when a crash occurs, for example, to access
          information within the IPA hardware.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      530f9216
    • Alex Elder's avatar
      soc: qcom: ipa: modem and microcontroller · a646d6ec
      Alex Elder authored
      This patch includes code implementing the modem functionality.
      There are several communication paths between the AP and modem,
      separate from the main data path provided by IPA.  SMP2P provides
      primitive messaging and interrupt capability, and QMI allows more
      complex out-of-band messaging to occur between entities on the AP
      and modem.  (SMP2P and QMI support are added by the next patch.)
      Management of these (plus the network device implementing the data
      path) is done by code within "ipa_modem.c".
      
      Sort of unrelated, this patch also includes the code supporting the
      microcontroller CPU present on the IPA.  The microcontroller can be
      used to implement special handling of packets, but at this time we
      don't support that.  Still, it is a component that needs to be
      initialized, and in the event of a crash we need to do some
      synchronization between the AP and the microcontroller.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a646d6ec
    • Alex Elder's avatar
      soc: qcom: ipa: immediate commands · 731c46ed
      Alex Elder authored
      One TX endpoint (per EE) is used for issuing immediate commands to
      the IPA.  These commands request activites beyond simple data
      transfers to be done by the IPA hardware.  For example, the IPA is
      able to manage routing packets among endpoints, and immediate commands
      are used to configure tables used for that routing.
      
      Immediate commands are built on top of GSI transactions.  They are
      different from normal transfers (in that they use a special endpoint,
      and their "payload" is interpreted differently), so separate functions
      are used to issue immediate command transactions.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      731c46ed
    • Alex Elder's avatar
      soc: qcom: ipa: filter and routing tables · 2b9feef2
      Alex Elder authored
      This patch contains code implementing filter and routing tables for
      the IPA.  A filter table allows rules to be used for filtering
      packets that depart the AP at an endpoint.  A filter table entry
      contains the address of a set of rules to apply for each endpoint
      that supports filtering.
      
      A routing table allows packets to be routed to an endpoint based
      on packet metadata.  It is also a table whose entries each contain
      the address of a set of routing rules to apply.
      
      Neither filtering nor routing is supported by the current driver.
      All table entries refer to rules that mean "no filtering" and "no
      routing."
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b9feef2
    • Alex Elder's avatar
      soc: qcom: ipa: IPA endpoints · 84f9bd12
      Alex Elder authored
      This patch includes the code implementing an IPA endpoint.  This is
      the primary abstraction implemented by the IPA.  An endpoint is one
      end of a network connection between two entities physically
      connected to the IPA.  Specifically, the AP and the modem implement
      endpoints, and an (AP endpoint, modem endpoint) pair implements the
      transfer of network data in one direction between the AP and modem.
      
      Endpoints are built on top of GSI channels, but IPA endpoints
      represent the higher-level functionality that the IPA provides.
      Data can be sent through a GSI channel, but it is the IPA endpoint
      that represents what is on the "other end" to receive that data.
      Other functionality, including aggregation, checksum offload and
      (at some future date) IP routing and filtering are all associated
      with the IPA endpoint.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84f9bd12
    • Alex Elder's avatar
      soc: qcom: ipa: GSI transactions · 9dd441e4
      Alex Elder authored
      This patch implements GSI transactions.  A GSI transaction is a
      structure that represents a single request (consisting of one or
      more TREs) sent to the GSI hardware.  The last TRE in a transaction
      includes a flag requesting that the GSI interrupt the AP to notify
      that it has completed.
      
      TREs are executed and completed strictly in order.  For this reason,
      the completion of a single TRE implies that all previous TREs (in
      particular all of those "earlier" in a transaction) have completed.
      
      Whenever there is a need to send a request (a set of TREs) to the
      IPA, a GSI transaction is allocated, specifying the number of TREs
      that will be required.  Details of the request (e.g. transfer offsets
      and length) are represented by in a Linux scatterlist array that is
      incorporated in the transaction structure.
      
      Once all commands (TREs) are added to a transaction it is committed.
      When the hardware signals that the request has completed, a callback
      function allows for cleanup or followup activity to be performed
      before the transaction is freed.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9dd441e4
    • Alex Elder's avatar
      soc: qcom: ipa: IPA interface to GSI · c3f398b1
      Alex Elder authored
      This patch provides interface functions supplied by the IPA layer
      that are called from the GSI layer.  One function is called when a
      GSI transaction has completed.  The others allow the GSI layer to
      inform the IPA layer when the hardware has been told it has new TREs
      to execute, and when the hardware has indicated transactions have
      completed.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3f398b1
    • Alex Elder's avatar
      soc: qcom: ipa: the generic software interface · 650d1603
      Alex Elder authored
      This patch includes "gsi.c", which implements the generic software
      interface (GSI) for IPA.  The generic software interface abstracts
      channels, which provide a means of transferring data either from the
      AP to the IPA, or from the IPA to the AP.  A ring buffer of "transfer
      elements" (TREs) is used to describe data transfers to perform.  The
      AP writes a doorbell register associated with a channel to let it know
      it has added new entries (for an AP->IPA channel) or has finished
      processing entries (for an IPA->AP channel).
      
      Each channel also has an event ring buffer, used by the IPA to
      communicate information about events related to a channel (for
      example, the completion of TREs).  The IPA writes its own doorbell
      register, which triggers an interrupt on the AP, to signal that
      new event information has arrived.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      650d1603
    • Alex Elder's avatar
      soc: qcom: ipa: GSI headers · ca48b27b
      Alex Elder authored
      The Generic Software Interface is a layer of the IPA driver that
      abstracts the underlying hardware.  The next patch includes the
      main code for GSI (including some additional documentation).  This
      patch just includes three GSI header files.
      
        - "gsi.h" is the top-level GSI header file.  This structure is
          is embedded within the IPA structure.  The main abstraction
          implemented by the GSI code is the channel, and this header
          exposes several operations that can be performed on a GSI channel.
      
        - "gsi_private.h" exposes some definitions that are intended to be
          private, used only by the main GSI code and the GSI transaction
          code (defined in an upcoming patch).
      
        - Like "ipa_reg.h", "gsi_reg.h" defines the offsets of the 32-bit
          registers used by the GSI layer, along with masks that define the
          position and width of fields less than 32 bits located within
          these registers.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca48b27b
    • Alex Elder's avatar
      soc: qcom: ipa: clocking, interrupts, and memory · ba764c4d
      Alex Elder authored
      This patch incorporates three source files (and their headers).  They're
      grouped into one patch mainly for the purpose of making the number and
      size of patches in this series somewhat reasonable.
      
        - "ipa_clock.c" and "ipa_clock.h" implement clocking for the IPA device.
          The IPA has a single core clock managed by the common clock framework.
          In addition, the IPA has three buses whose bandwidth is managed by the
          Linux interconnect framework.  At this time the core clock and all
          three buses are either on or off; we don't yet do any more fine-grained
          management than that.  The core clock and interconnects are enabled
          and disabled as a unit, using a unified clock-like abstraction,
          ipa_clock_get()/ipa_clock_put().
      
        - "ipa_interrupt.c" and "ipa_interrupt.h" implement IPA interrupts.
          There are two hardware IRQs used by the IPA driver (the other is
          the GSI interrupt, described in a separate patch).  Several types
          of interrupt are handled by the IPA IRQ handler; these are not part
          of data/fast path.
      
        - The IPA has a region of local memory that is accessible by the AP
          (and modem).  Within that region are areas with certain defined
          purposes.  "ipa_mem.c" and "ipa_mem.h" define those regions, and
          implement their initialization.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba764c4d
    • Alex Elder's avatar
      soc: qcom: ipa: configuration data · 1ed7d0c0
      Alex Elder authored
      This patch defines configuration data that is used to specify some
      of the details of IPA hardware supported by the driver.  It is built
      as Device Tree match data, discovered at boot time.  The driver
      supports the Qualcomm SDM845 SoC.  Data for the Qualcomm SC7180 is
      also defined here, but it is not yet completely supported.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ed7d0c0
    • Alex Elder's avatar
      soc: qcom: ipa: main code · cdf2e941
      Alex Elder authored
      This patch includes three source files that represent some basic "main
      program" code for the IPA driver.  They are:
        - "ipa.h" defines the top-level IPA structure which represents an IPA
           device throughout the code.
        - "ipa_main.c" contains the platform driver probe function, along with
          some general code used during initialization.
        - "ipa_reg.h" defines the offsets of the 32-bit registers used for the
          IPA device, along with masks that define the position and width of
          fields within these registers.
        - "version.h" defines some symbolic IPA version numbers.
      
      Each file includes some documentation that provides a little more
      overview of how the code is organized and used.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cdf2e941
    • Alex Elder's avatar
      dt-bindings: soc: qcom: add IPA bindings · fc39c40a
      Alex Elder authored
      Add the binding definitions for the "qcom,ipa" device tree node.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc39c40a
    • Alex Elder's avatar
      remoteproc: add IPA notification to q6v5 driver · d7f5f3c8
      Alex Elder authored
      Set up a subdev in the q6v5 modem remoteproc driver that generates
      event notifications for the IPA driver to use for initialization and
      recovery following a modem shutdown or crash.
      
      A pair of new functions provides a way for the IPA driver to register
      and deregister a notification callback function that will be called
      whenever modem events (about to boot, running, about to shut down,
      etc.) occur.  A void pointer value (provided by the IPA driver at
      registration time) and an event type are supplied to the callback
      function.
      
      One event, MODEM_REMOVING, is signaled whenever the q6v5 driver is
      about to remove the notification subdevice.  It requires the IPA
      driver de-register its callback.
      
      This sub-device is only used by the modem subsystem (MSS) driver,
      so the code that adds the new subdev and allows registration and
      deregistration of the notifier is found in "qcom_q6v6_mss.c".
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7f5f3c8
    • David S. Miller's avatar
      Merge branch 'QorIQ-DPAA-Use-random-MAC-address-when-none-is-given' · e2f5cb72
      David S. Miller authored
      Sascha Hauer says:
      
      ====================
      QorIQ DPAA: Use random MAC address when none is given
      
      Use random MAC addresses when they are not provided in the device tree.
      Tested on LS1046ARDB.
      
      Changes in v3:
       addressed all MAC types, removed some redundant code in dtsec in
       the process
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2f5cb72
    • Madalin Bucur's avatar
      dpaa_eth: Use random MAC address when none is given · cbb961ca
      Madalin Bucur authored
      If there is no valid MAC address in the device tree, use a random
      MAC address.
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarMadalin Bucur <madalin.bucur@oss.nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cbb961ca
    • Madalin Bucur's avatar
      fsl/fman: tolerate missing MAC address in device tree · f3353b99
      Madalin Bucur authored
      Allow the initialization of the MAC to be performed even if the
      device tree does not provide a valid MAC address. Later a random
      MAC address should be assigned by the Ethernet driver.
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarMadalin Bucur <madalin.bucur@oss.nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f3353b99
    • Madalin Bucur's avatar
      fsl/fman: reuse set_mac_address() in dtsec init() · 6b995bde
      Madalin Bucur authored
      Reuse the set_mac_address() in the init() function.
      Signed-off-by: default avatarMadalin Bucur <madalin.bucur@oss.nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6b995bde
    • David S. Miller's avatar
      Merge branch 'bnxt_en-Updates' · 896328fe
      David S. Miller authored
      Michael Chan says:
      
      ====================
      bnxt_en: Updates.
      
      This series includes simplification and improvement of NAPI polling
      logic in bnxt_poll_p5().  The improvements will prevent starving the
      async events from firmware if we are in continuous NAPI polling.
      The rest of the patches include cleanups, a better return code for
      firmware busy, and to clear devlink port type more properly.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      896328fe
    • Vasundhara Volam's avatar
      bnxt_en: Call devlink_port_type_clear() in remove() · 0fcfc7a1
      Vasundhara Volam authored
      Similar to other drivers, properly clear the devlink port type when
      removing the device before unregistration.
      
      Cc: Jiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fcfc7a1
    • Vasundhara Volam's avatar
      bnxt_en: Return -EAGAIN if fw command returns BUSY · 3a707bed
      Vasundhara Volam authored
      If firmware command returns error code as HWRM_ERR_CODE_BUSY, which
      means it cannot handle the command due to a conflicting command
      from another function, convert it to -EAGAIN.  If it is an ethtool
      operation, this error code will be returned to userspace.
      Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3a707bed
    • Vasundhara Volam's avatar
      bnxt_en: Modify some bnxt_hwrm_*_free() functions to void. · 3d061591
      Vasundhara Volam authored
      Return code is not needed in some of these functions, as the return
      code from firmware message is ignored. Remove the unused rc variable
      and also convert functions to void.
      Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d061591
    • Vasundhara Volam's avatar
      bnxt_en: Remove unnecessary assignment of return code · 9f90445c
      Vasundhara Volam authored
      As part of converting error code in firmware message to standard
      code, checking for firmware return code is removed in most of the
      places. Remove the assignment of return code where the function
      can directly return.
      Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f90445c
    • Michael Chan's avatar
      bnxt_en: Clear DCB settings after firmware reset. · 843d699d
      Michael Chan authored
      The driver stores a copy of the DCB settings that have been applied to
      the firmware.  After firmware reset, the firmware settings are gone and
      will revert back to default.  Clear the driver's copy so that if there
      is a DCBNL request to get the settings, the driver will retrieve the
      current settings from the firmware.  lldpad keeps the DCB settings in
      userspace and will re-apply the settings if it is running.
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      843d699d