1. 01 Jul, 2020 37 commits
    • Alex Elder's avatar
      net: ipa: HOL_BLOCK_EN_FMASK is a 1-bit mask · 547c8788
      Alex Elder authored
      The convention throughout the IPA driver is to directly use
      single-bit field mask values, rather than using (for example)
      u32_encode_bits() to set or clear them.
      
      Fix the one place that doesn't follow that convention, which sets
      HOL_BLOCK_EN_FMASK in ipa_endpoint_init_hol_block_enable().
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      547c8788
    • Alex Elder's avatar
      net: ipa: clarify endpoint register macro constraints · 8b97bcb7
      Alex Elder authored
      A handful of registers are valid only for RX endpoints, and some
      others are valid only for TX endpoints.  For these endpoints, add
      a comment above their defined offset macro that indicates the
      endpoints to which they apply.
      
      Extend the endpoint parameter naming convention as well, to make
      these constraints more explicit.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b97bcb7
    • Alex Elder's avatar
      net: ipa: mode register is TX only · 00b9102a
      Alex Elder authored
      The INIT_MODE endpoint configuration register is only valid for TX
      endpoints.  Rather than writing a zero to that register for RX
      endpoints, avoid writing the register at all.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00b9102a
    • Alex Elder's avatar
      net: ipa: metadata_mask register is RX only · 9b63f093
      Alex Elder authored
      The INIT_HDR_METADATA_MASK endpoint configuration register is only
      valid for RX endpoints.  Rather than writing a zero to that register
      for TX endpoints, avoid writing the register at all.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9b63f093
    • Alex Elder's avatar
      net: ipa: head-of-line block registers are RX only · f8d34dfd
      Alex Elder authored
      The INIT_HOL_BLOCK_EN and INIT_HOL_BLOCK_TIMER endpoint registers
      are only valid for RX endpoints.
      
      Have ipa_endpoint_modem_hol_block_clear_all() skip writing these
      registers for TX endpoints.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8d34dfd
    • David S. Miller's avatar
      Merge branch 'net-ipa-small-improvements' · 21ddff5c
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: ipa: small improvements
      
      This series contains two patches that improve the error output
      that's reported when an error occurs while changing the state of a
      GSI channel or event ring.  The first ensures all such error
      conditions report an error, and the second simplifies the messages a
      little and ensures they are all consistent.
      
      A third (independent) patch gets rid of an unused symbol in the
      microcontroller code.
      
      Version 2 fixes two alignment problems pointed out by checkpatch.pl,
      as requested by Jakub Kicinski.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21ddff5c
    • Alex Elder's avatar
      net: ipa: kill IPA_MEM_UC_OFFSET · 722208ea
      Alex Elder authored
      The microcontroller shared memory area is at the beginning of the
      IPA resident memory.  IPA_MEM_UC_OFFSET was defined as the offset
      within that region where it's found, but it's 0, and it's never
      actually used.  Just get rid of the definition, and move some of the
      description it had to be above the definition of the ipa_uc_mem_area
      structure.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      722208ea
    • Alex Elder's avatar
      net: ipa: standarize more GSI error messages · 8463488a
      Alex Elder authored
      Make minor updates to error messages reported in "gsi.c":
        - Use local variables to reduce multi-line function calls
        - Don't use parentheses in messages
        - Do some slight rewording in a few cases
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8463488a
    • Alex Elder's avatar
      net: ipa: always report GSI state errors · a442b3c7
      Alex Elder authored
      We check the state of an event ring or channel both before and after
      any GSI command issued that will change that state.  In most--but
      not all--cases, if the state is something different than expected we
      report an error message.
      
      Add error messages where missing, so that all unexpected states
      provide information about what went wrong.  Drop the parentheses
      around the state value shown in all cases.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a442b3c7
    • David S. Miller's avatar
      Merge branch 'net-ipa-simple-refactorizations' · 6f6746d7
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: ipa: simple refactorizations
      
      This series makes three small changes to some endpoint configuration
      code.  The first uses a constant to represent the frequency of an
      internal clock used for timers in the IPA.  The second modifies a
      limit used so it matches Qualcomm's internal code.  And the third
      reworks a few lines of code, eliminating a multi-line function call.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f6746d7
    • Alex Elder's avatar
      net: ipa: reuse a local variable in ipa_endpoint_init_aggr() · 9e88cb5f
      Alex Elder authored
      Reuse the "limit" local variable in ipa_endpoint_init_aggr() when
      setting the aggregation size limit.  Simple cleanup.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e88cb5f
    • Alex Elder's avatar
      net: ipa: reduce aggregation time limit · 1d86652b
      Alex Elder authored
      Halve the time limit used when aggregation is enabled on an RX
      endpoint, to half a millisecond.
      
      Use DIV_ROUND_CLOSEST() to compute the value that represents the
      time period, to get better accuracy in the event the time limit is
      not an even multiple of the granularity.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d86652b
    • Alex Elder's avatar
      net: ipa: rework ipa_aggr_granularity_val() · 317a5740
      Alex Elder authored
      The timer used for aggregation makes use of an internal 32 KHz clock.
      The granularity of the timer is programmed by a field whose value is
      computed by ipa_aggr_granularity_val().  Redefine the way that value
      is computed by using a new TIMER_FREQUENCY constant representing the
      underlying clock frequency.
      
      Add two BUILD_BUG_ON() calls to ensure the value used is valid.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      317a5740
    • David S. Miller's avatar
      Merge branch 'add-XDP-support-to-xen-netfront' · 8c964397
      David S. Miller authored
      Denis Kirjanov says:
      
      ====================
      xen networking: add XDP support to xen-netfront
      
      The first patch adds a new extra type to enable proper synchronization
      between an RX request/response pair.
      The second patch implements BFP interface for xen-netfront.
      The third patch enables extra space for XDP processing.
      
      v14:
      - fixed compilation warnings
      
      v13:
      - fixed compilation due to previous rename
      
      v12:
      - xen-netback: rename netfront_xdp_headroom to xdp_headroom
      
      v11:
      - add the new headroom constant to netif.h
      - xenbus_scanf check
      - lock a bulk of puckets in xennet_xdp_xmit()
      
      v10:
      - add a new xen_netif_extra_info type to enable proper synchronization
       between an RX request/response pair.
      - order local variable declarations
      
      v9:
      - assign an xdp program before switching to Reconfiguring
      - minor cleanups
      - address checkpatch issues
      
      v8:
      - add PAGE_POOL config dependency
      - keep the state of XDP processing in netfront_xdp_enabled
      - fixed allocator type in xdp_rxq_info_reg_mem_model()
      - minor cleanups in xen-netback
      
      v7:
      - use page_pool_dev_alloc_pages() on page allocation
      - remove the leftover break statement from netback_changed
      
      v6:
      - added the missing SOB line
      - fixed subject
      
      v5:
      - split netfront/netback changes
      - added a sync point between backend/frontend on switching to XDP
      - added pagepool API
      
      v4:
      - added verbose patch descriprion
      - don't expose the XDP headroom offset to the domU guest
      - add a modparam to netback to toggle XDP offset
      - don't process jumbo frames for now
      
      v3:
      - added XDP_TX support (tested with xdping echoserver)
      - added XDP_REDIRECT support (tested with modified xdp_redirect_kern)
      - moved xdp negotiation to xen-netback
      
      v2:
      - avoid data copying while passing to XDP
      - tell xen-netback that we need the headroom space
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c964397
    • Denis Kirjanov's avatar
      xen networking: add XDP offset adjustment to xen-netback · 1c9535c7
      Denis Kirjanov authored
      the patch basically adds the offset adjustment and netfront
      state reading to make XDP work on netfront side.
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      Signed-off-by: default avatarDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c9535c7
    • Denis Kirjanov's avatar
      xen networking: add basic XDP support for xen-netfront · 6c5aa6fc
      Denis Kirjanov authored
      The patch adds a basic XDP processing to xen-netfront driver.
      
      We ran an XDP program for an RX response received from netback
      driver. Also we request xen-netback to adjust data offset for
      bpf_xdp_adjust_head() header space for custom headers.
      
      synchronization between frontend and backend parts is done
      by using xenbus state switching:
      Reconfiguring -> Reconfigured- > Connected
      
      UDP packets drop rate using xdp program is around 310 kpps
      using ./pktgen_sample04_many_flows.sh and 160 kpps without the patch.
      Signed-off-by: default avatarDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c5aa6fc
    • Denis Kirjanov's avatar
      xen: netif.h: add a new extra type for XDP · 2cef30d7
      Denis Kirjanov authored
      The patch adds a new extra type to be able to diffirentiate
      between RX responses on xen-netfront side with the adjusted offset
      required for XDP processing.
      
      The offset value from a guest is passed via xenstore.
      Signed-off-by: default avatarDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2cef30d7
    • David S. Miller's avatar
      Merge branch 'net-ethernet-use-generic-power-management' · 6d79dc67
      David S. Miller authored
      Vaibhav Gupta says:
      
      ====================
      net: ethernet: use generic power management
      
      Linux Kernel Mentee: Remove Legacy Power Management.
      
      The purpose of this patch series is to remove legacy power management callbacks
      from net ethernet drivers.
      
      The callbacks performing suspend() and resume() operations are still calling
      pci_save_state(), pci_set_power_state(), etc. and handling the power management
      themselves, which is not recommended.
      
      The conversion requires the removal of the those function calls and change the
      callback definition accordingly and make use of dev_pm_ops structure.
      
      All patches are compile-tested only.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d79dc67
    • Vaibhav Gupta's avatar
      natsemi: use generic power management · 40c1b1ee
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable_device, which is not recommended. Hence, removed.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40c1b1ee
    • Vaibhav Gupta's avatar
      vxge: use generic power management · 4c2ad126
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Use "struct dev_pm_ops" variable to bind the callbacks.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c2ad126
    • Vaibhav Gupta's avatar
      ksz884x: use generic power management · 64120615
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable_wake(), pci_save/restore_sate() and
      pci_set_power_state().
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64120615
    • Vaibhav Gupta's avatar
      mlx4: use generic power management · 0e3e206a
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Use "struct dev_pm_ops" variable to bind the callbacks.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e3e206a
    • Vaibhav Gupta's avatar
      benet: use generic power management · e9a7f8c5
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable/disable_device(), pci_save/restore_sate() and
      pci_set_power_state().
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9a7f8c5
    • Vaibhav Gupta's avatar
      sundance: use generic power management · 78cad4ce
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable/disable_device(), pci_save/restore_sate() and
      pci_set_power_state().
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78cad4ce
    • Vaibhav Gupta's avatar
      liquidio: use generic power management · 1c2e4839
      Vaibhav Gupta authored
      Drivers should not use legacy power management as they have to manage power
      states and related operations, for the device, themselves. This driver was
      handling them with the help of PCI helper functions.
      
      With generic PM, all essentials will be handled by the PCI core. Driver
      needs to do only device-specific operations.
      
      The driver defined empty-body .suspend() and .resume() callbacks earlier.
      They can now be define NULL and bind with "struct dev_pm_ops" variable.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c2e4839
    • Vaibhav Gupta's avatar
      ena_netdev: use generic power management · 817a89ae
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      817a89ae
    • Vaibhav Gupta's avatar
      starfire: use generic power management · a7c48c72
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_save/restore_sate() and pci_set_power_state().
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7c48c72
    • Vaibhav Gupta's avatar
      ne2k-pci: use generic power management · 33b7a252
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable/disable_device(), pci_save/restore_sate() and
      pci_set_power_state().
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33b7a252
    • Vaibhav Gupta's avatar
      typhoon: use generic power management · 7b46681c
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states. And they use PCI
      helper functions to do it.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      In this driver:
      typhoon_resume() calls typhoon_wakeup() which then calls PCI helper
      functions pci_set_power_state() and pci_restore_state(). The only other
      function, using typhoon_wakeup() is typhoon_open().
      
      Thus remove the pci_*() calls from tyhpoon_wakeup() and place them in
      typhoon_open(), maintaining the order, to retain the normal behavior of
      the function
      
      Now, typhoon_suspend() calls typhoon_sleep() which then calls PCI helper
      functions pci_enable_wake(), pci_disable_device() and
      pci_set_power_state(). Other functions:
       - typhoon_open()
       - typhoon_close()
       - typhoon_init_one()
      are also invoking typhoon_sleep(). Thus, in this case, cannot simply
      move PCI helper functions call.
      
      Hence, define a new function typhoon_sleep_early() which will do all the
      operations, which typhoon_sleep() was doing before calling PCI helper
      functions. Now typhoon_sleep() will call typhoon_sleep_early() to do
      those tasks, hence, the behavior for _open(), _close and _init_one() remain
      unchanged. And typhon_suspend() only requires typhoon_sleep_early().
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b46681c
    • Hulk Robot's avatar
      qed: Make symbol 'qed_hw_err_type_descr' static · 4f195d28
      Hulk Robot authored
      Fix sparse build warning:
      
      drivers/net/ethernet/qlogic/qed/qed_main.c:2480:6: warning:
       symbol 'qed_hw_err_type_descr' was not declared. Should it be static?
      Signed-off-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f195d28
    • Colin Ian King's avatar
      net/packet: remove redundant initialization of variable err · 2a6d6c31
      Colin Ian King authored
      The variable err is being initialized with a value that is never read
      and it is being updated later with a new value.  The initialization is
      redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a6d6c31
    • David S. Miller's avatar
      Merge branch 'cxgb4-add-mirror-action-support-for-TC-MATCHALL' · 2b04a661
      David S. Miller authored
      Rahul Lakkireddy says:
      
      ====================
      cxgb4: add mirror action support for TC-MATCHALL
      
      This series of patches add support to mirror all ingress traffic
      for TC-MATCHALL ingress offload.
      
      Patch 1 adds support to dynamically create a mirror Virtual Interface
      (VI) that accepts all mirror ingress traffic when mirror action is
      set in TC-MATCHALL offload.
      
      Patch 2 adds support to allocate mirror Rxqs and setup RSS for the
      mirror VI.
      
      Patch 3 adds support to replicate all the main VI configuration to
      mirror VI. This includes replicating MTU, promiscuous mode,
      all-multicast mode, and enabled netdev Rx feature offloads.
      
      v3:
      - Replace mirror VI refcount_t with normal u32 variable in all patches.
      - Add back calling cxgb4_port_mirror_start() in cxgb_open(), which
        was there in v1, but got missed in v2 during refactoring, in patch
        3.
      
      v2:
      - Add mutex to protect all mirror VI data, instead of just
        mirror Rxqs, in patch 1 and 2.
      - Remove the un-needed mirror Rxq mutex in patch 2.
      - Simplify the replication code by refactoring t4_set_rxmode()
        to handle mirror VI, instead of duplicating the t4_set_rxmode()
        calls in multiple places in patch 3.
      ====================
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b04a661
    • Rahul Lakkireddy's avatar
      cxgb4: add main VI to mirror VI config replication · 696c278f
      Rahul Lakkireddy authored
      When mirror VI is enabled, replicate various VI config params
      enabled on main VI to mirror VI. These include replicating MTU,
      promiscuous mode, all-multicast mode, and enabled netdev Rx
      feature offloads.
      
      v3:
      - Replace mirror VI refcount_t with normal u32 variable.
      - Add back calling cxgb4_port_mirror_start() in cxgb_open(), which
        was there in v1, but got missed in v2 during refactoring.
      
      v2:
      - Simplify the replication code by refactoring t4_set_rxmode()
        to handle mirror VI, instead of duplicating the t4_set_rxmode()
        calls in multiple places.
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      696c278f
    • Rahul Lakkireddy's avatar
      cxgb4: add support for mirror Rxqs · 2b465ed0
      Rahul Lakkireddy authored
      When mirror VI is enabled, allocate the mirror Rxqs and setup the
      mirror VI RSS table. The mirror Rxqs are allocated/freed when
      the mirror VI is created/destroyed or when underlying port is
      brought up/down, respectively.
      
      v3:
      - Replace mirror VI refcount_t with normal u32 variable.
      
      v2:
      - Use mutex to protect all mirror VI data, instead of just
        mirror Rxqs.
      - Remove the un-needed mirror Rxq mutex.
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b465ed0
    • Rahul Lakkireddy's avatar
      cxgb4: add mirror action to TC-MATCHALL offload · fd2261d8
      Rahul Lakkireddy authored
      Add mirror Virtual Interface (VI) support to receive all ingress
      mirror traffic from the underlying device. The mirror VI is
      created dynamically, if the TC-MATCHALL rule has a corresponding
      mirror action. Also request MSI-X vectors needed for the mirror VI
      Rxqs. If no vectors are available, then disable mirror VI support.
      
      v3:
      - Replace mirror VI refcount_t with normal u32 variable.
      
      v2:
      - Add mutex to protect all mirror VI data, instead of just
        mirror Rxqs.
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd2261d8
    • Nathan Chancellor's avatar
      pcnet32: Mark PM functions as __maybe_unused · 75603a31
      Nathan Chancellor authored
      In certain configurations without power management support, the
      following warnings happen:
      
      ../drivers/net/ethernet/amd/pcnet32.c:2928:12: warning:
      'pcnet32_pm_resume' defined but not used [-Wunused-function]
       2928 | static int pcnet32_pm_resume(struct device *device_d)
            |            ^~~~~~~~~~~~~~~~~
      ../drivers/net/ethernet/amd/pcnet32.c:2916:12: warning:
      'pcnet32_pm_suspend' defined but not used [-Wunused-function]
       2916 | static int pcnet32_pm_suspend(struct device *device_d)
            |            ^~~~~~~~~~~~~~~~~~
      
      Mark these functions as __maybe_unused to make it clear to the compiler
      that this is going to happen based on the configuration, which is the
      standard for these types of functions.
      
      Fixes: a86688fb ("pcnet32: Convert to generic power management")
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      75603a31
    • Nathan Chancellor's avatar
      amd8111e: Mark PM functions as __maybe_unused · 0adcd298
      Nathan Chancellor authored
      In certain configurations without power management support, the
      following warnings happen:
      
      ../drivers/net/ethernet/amd/amd8111e.c:1623:12: warning:
      'amd8111e_resume' defined but not used [-Wunused-function]
       1623 | static int amd8111e_resume(struct device *dev_d)
            |            ^~~~~~~~~~~~~~~
      ../drivers/net/ethernet/amd/amd8111e.c:1584:12: warning:
      'amd8111e_suspend' defined but not used [-Wunused-function]
       1584 | static int amd8111e_suspend(struct device *dev_d)
            |            ^~~~~~~~~~~~~~~~
      
      Mark these functions as __maybe_unused to make it clear to the compiler
      that this is going to happen based on the configuration, which is the
      standard for these types of functions.
      
      Fixes: 2caf751f ("amd8111e: Convert to generic power management")
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0adcd298
  2. 30 Jun, 2020 3 commits