1. 10 Mar, 2021 40 commits
    • Maciej W. Rozycki's avatar
      FDDI: defxx: Use driver's name with resource requests · 4e052626
      Maciej W. Rozycki authored
      Replace repeated "defxx" strings with a reference to the DRV_NAME macro
      and then use the driver's name rather that the bus address with resource
      requests so as to have contents of /proc/iomem and /proc/ioports more
      meaningful to the user, in line with what drivers usually do.
      
      So rather than say:
      
      5000-50ff : DEC FDDIcontroller/EISA Adapter
        5000-503f : 00:05
        5040-5043 : 00:05
      5400-54ff : DEC FDDIcontroller/EISA Adapter
      5800-58ff : DEC FDDIcontroller/EISA Adapter
      5c00-5cff : DEC FDDIcontroller/EISA Adapter
        5c80-5cbf : 00:05
      
      or:
      
      620c080020000-620c08002007f : 0031:02:04.0
        620c080020000-620c08002007f : 0031:02:04.0
      620c080030000-620c08003ffff : 0031:02:04.0
      
      or:
      
      1f100000-1f10003f : tc2
      
      we report:
      
      5000-50ff : DEC FDDIcontroller/EISA Adapter
        5000-503f : defxx
        5040-5043 : defxx
      5400-54ff : DEC FDDIcontroller/EISA Adapter
      5800-58ff : DEC FDDIcontroller/EISA Adapter
      5c00-5cff : DEC FDDIcontroller/EISA Adapter
        5c80-5cbf : defxx
      
      and:
      
      620c080020000-620c08002007f : 0031:02:04.0
        620c080020000-620c08002007f : defxx
      620c080030000-620c08003ffff : 0031:02:04.0
      
      and:
      
      1f100000-1f10003f : defxx
      
      respectively for the DEFEA (EISA), DEFPA (PCI), and DEFTA (TURBOchannel)
      adapters.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e052626
    • Maciej W. Rozycki's avatar
      FDDI: defxx: Implement dynamic CSR I/O address space selection · 795e272e
      Maciej W. Rozycki authored
      Recent versions of the PCI Express specification have deprecated support
      for I/O transactions and actually some PCIe host bridges, such as Power
      Systems Host Bridge 4 (PHB4), do not implement them.  Conversely a DEFEA
      adapter can have its MMIO decoding disabled with ECU (EISA Configuration
      Utility) and therefore not available for us with the resource allocation
      infrastructure we implement.
      
      However either I/O address space will always be available for use with
      the DEFEA (EISA) and DEFPA (PCI) adapters and both have double address
      decoding implemented in hardware for Control and Status Register access.
      The two kinds of adapters can be present both at once in a single mixed
      PCI/EISA system.  For the DEFTA (TURBOchannel) variant there is no issue
      as there has been no port I/O address space defined for that bus.
      
      To make people's life easier and the driver more robust remove the
      DEFXX_MMIO configuration option so as to rather than making the choice
      for the I/O address space to use at build time for all the adapters
      installed in the system let the driver choose the most suitable address
      space dynamically on a case-by-case basis at run time.  Make MMIO the
      default and resort to port I/O should the default fail for some reason.
      
      This way multiple adapters installed in one system can use different I/O
      address spaces each, in particular in the presence of DEFEA adapters in
      a pure-EISA or a mixed EISA/PCI system (it is expected that DEFPA boards
      will use MMIO in normal circumstances).
      
      The choice of the I/O address space to use continues being reported by
      the driver on startup, e.g.:
      
      eisa 00:05: EISA: slot 5: DEC3002 detected
      defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
      00:05: DEFEA at I/O addr = 0x5000, IRQ = 10, Hardware addr = 00-00-f8-c8-b3-b6
      00:05: registered as fddi0
      
      and:
      
      defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
      0031:02:04.0: DEFPA at MMIO addr = 0x620c080020000, IRQ = 57, Hardware addr = 00-60-6d-93-91-98
      0031:02:04.0: registered as fddi0
      
      and:
      
      defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
      tc2: DEFTA at MMIO addr = 0x1f100000, IRQ = 21, Hardware addr = 08-00-2b-b0-8b-1e
      tc2: registered as fddi0
      
      so there is no need to add further information.
      
      The change is supposed to cause a negligible performance hit as I/O
      accessors will now have code executed conditionally at run time.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      795e272e
    • Maciej W. Rozycki's avatar
      FDDI: defxx: Make MMIO the configuration default except for EISA · 193ced4a
      Maciej W. Rozycki authored
      Recent versions of the PCI Express specification have deprecated support
      for I/O transactions and actually some PCIe host bridges, such as Power
      Systems Host Bridge 4 (PHB4), do not implement them.
      
      The default kernel configuration choice for the defxx driver is the use
      of I/O ports rather than MMIO for PCI and EISA systems.  It may have
      made sense as a conservative backwards compatible choice back when MMIO
      operation support was added to the driver as a part of TURBOchannel bus
      support.  However nowadays this configuration choice makes the driver
      unusable with systems that do not implement I/O transactions for PCIe.
      
      Make DEFXX_MMIO the configuration default then, except where configured
      for EISA.  This exception is because an EISA adapter can have its MMIO
      decoding disabled with ECU (EISA Configuration Utility) and therefore
      not available with the resource allocation infrastructure we implement,
      while port I/O is always readily available as it uses slot-specific
      addressing, directly mapped to the slot an option card has been placed
      in and handled with our EISA bus support core.  Conversely a kernel that
      supports modern systems which may not have I/O transactions implemented
      for PCIe will usually not be expected to handle legacy EISA systems.
      
      The change of the default will make it easier for people, including but
      not limited to distribution packagers, to make a working choice for the
      driver.
      
      Update the option description accordingly and while at it replace the
      potentially ambiguous PIO acronym with IOP for "port I/O" vs "I/O ports"
      according to our nomenclature used elsewhere.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
      Fixes: e89a2cfb ("[TC] defxx: TURBOchannel support")
      Cc: stable@vger.kernel.org # v2.6.21+
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      193ced4a
    • Maciej W. Rozycki's avatar
      FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR · f626ca68
      Maciej W. Rozycki authored
      Recent versions of the PCI Express specification have deprecated support
      for I/O transactions and actually some PCIe host bridges, such as Power
      Systems Host Bridge 4 (PHB4), do not implement them.
      
      For those systems the PCI BARs that request a mapping in the I/O space
      have the length recorded in the corresponding PCI resource set to zero,
      which makes it unassigned:
      
      # lspci -s 0031:02:04.0 -v
      0031:02:04.0 FDDI network controller: Digital Equipment Corporation PCI-to-PDQ Interface Chip [PFI] FDDI (DEFPA) (rev 02)
      	Subsystem: Digital Equipment Corporation FDDIcontroller/PCI (DEFPA)
      	Flags: bus master, medium devsel, latency 136, IRQ 57, NUMA node 8
      	Memory at 620c080020000 (32-bit, non-prefetchable) [size=128]
      	I/O ports at <unassigned> [disabled]
      	Memory at 620c080030000 (32-bit, non-prefetchable) [size=64K]
      	Capabilities: [50] Power Management version 2
      	Kernel driver in use: defxx
      	Kernel modules: defxx
      
      #
      
      Regardless the driver goes ahead and requests it (here observed with a
      Raptor Talos II POWER9 system), resulting in an odd /proc/ioport entry:
      
      # cat /proc/ioports
      00000000-ffffffffffffffff : 0031:02:04.0
      #
      
      Furthermore, the system gets confused as the driver actually continues
      and pokes at those locations, causing a flood of messages being output
      to the system console by the underlying system firmware, like:
      
      defxx: v1.11 2014/07/01  Lawrence V. Stefani and others
      defxx 0031:02:04.0: enabling device (0140 -> 0142)
      LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010000
      IPMI: dropping non severe PEL event
      LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010014
      IPMI: dropping non severe PEL event
      LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010014
      IPMI: dropping non severe PEL event
      
      and so on and so on (possibly intermixed actually, as there's no locking
      between the kernel and the firmware in console port access with this
      particular system, but cleaned up above for clarity), and once some 10k
      of such pairs of the latter two messages have been produced an interace
      eventually shows up in a useless state:
      
      0031:02:04.0: DEFPA at I/O addr = 0x0, IRQ = 57, Hardware addr = 00-00-00-00-00-00
      
      This was not expected to happen as resource handling was added to the
      driver a while ago, because it was not known at that time that a PCI
      system would be possible that cannot assign port I/O resources, and
      oddly enough `request_region' does not fail, which would have caught it.
      
      Correct the problem then by checking for the length of zero for the CSR
      resource and bail out gracefully refusing to register an interface if
      that turns out to be the case, producing messages like:
      
      defxx: v1.11 2014/07/01  Lawrence V. Stefani and others
      0031:02:04.0: Cannot use I/O, no address set, aborting
      0031:02:04.0: Recompile driver with "CONFIG_DEFXX_MMIO=y"
      
      Keep the original check for the EISA MMIO resource as implemented,
      because in that case the length is hardwired to 0x400 as a consequence
      of how the compare/mask address decoding works in the ESIC chip and it
      is only the base address that is set to zero if MMIO has been disabled
      for the adapter in EISA configuration, which in turn could be a valid
      bus address in a legacy-free system implementing PCI, especially for
      port I/O.
      
      Where the EISA MMIO resource has been disabled for the adapter in EISA
      configuration this arrangement keeps producing messages like:
      
      eisa 00:05: EISA: slot 5: DEC3002 detected
      defxx: v1.11 2014/07/01  Lawrence V. Stefani and others
      00:05: Cannot use MMIO, no address set, aborting
      00:05: Recompile driver with "CONFIG_DEFXX_MMIO=n"
      00:05: Or run ECU and set adapter's MMIO location
      
      with the last two lines now swapped for easier handling in the driver.
      
      There is no need to check for and catch the case of a port I/O resource
      not having been assigned for EISA as the adapter uses the slot-specific
      I/O space, which gets assigned by how EISA has been specified and maps
      directly to the particular slot an option card has been placed in.  And
      the EISA variant of the adapter has additional registers that are only
      accessible via the port I/O space anyway.
      
      While at it factor out the error message calls into helpers and fix an
      argument order bug with the `pr_err' call now in `dfx_register_res_err'.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
      Fixes: 4d0438e5 ("defxx: Clean up DEFEA resource management")
      Cc: stable@vger.kernel.org # v3.19+
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f626ca68
    • David S. Miller's avatar
      Merge branch 'mlxsw-misc-updates' · a3c39230
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Misc updates
      
      This patch set contains miscellaneous updates for mlxsw.
      
      Patches #1-#2 reword an extack message to make it clearer and fix a
      comment.
      
      Patch #3 bumps the minimum firmware version enforced by mlxsw. This is
      needed for two upcoming features: Resilient hashing and per-flow
      sampling.
      
      Patches #4-#6 improve the information reported via devlink-health for
      'fw_fatal' events.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a3c39230
    • Danielle Ratson's avatar
      mlxsw: Adjust some MFDE fields shift and size to fw implementation · 4734a750
      Danielle Ratson authored
      MFDE.irisc_id and MFDE.event_id were adjusted according to what is
      actually implemented in firmware.
      
      Adjust the shift and size of these fields in mlxsw as well.
      
      Note that the displacement of the first field is not a regression.
      It was always incorrect and therefore reported "0".
      Signed-off-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4734a750
    • Danielle Ratson's avatar
      mlxsw: core: Expose MFDE.log_ip to devlink health · 315afd20
      Danielle Ratson authored
      Add the MFDE.log_ip field to devlink health reporter in order to ease
      firmware debug. This field encodes the instruction pointer that triggered
      the CR space timeout.
      Signed-off-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      315afd20
    • Danielle Ratson's avatar
      mlxsw: reg: Extend MFDE register with new log_ip field · ff12ba3a
      Danielle Ratson authored
      Extend MFDE (Monitoring FW Debug) register with new field specifying the
      instruction pointer that triggered the CR space timeout.
      Signed-off-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff12ba3a
    • Petr Machata's avatar
      mlxsw: spectrum: Bump minimum FW version to xx.2008.2406 · 2ab781c2
      Petr Machata authored
      The indicated version fixes the following two issues:
      
      - MIRROR_SAMPLER_ACTION.mirror_probability_rate inverted. This has
        implication for per-flow sampling.
      
      - When adjacency is replaced-if-inactive (RATR.opcode=3), bad parameter
        was reported when replacing an active entry. This breaks offload of
        resilient next-hop groups.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ab781c2
    • Amit Cohen's avatar
      mlxsw: reg: Fix comment about slot_index field in PMAOS register · 675e5a1e
      Amit Cohen authored
      The comment did not include the register name.
      Add `pmaos` to align the comment with other comments.
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      675e5a1e
    • Danielle Ratson's avatar
      mlxsw: spectrum: Reword an error message for Q-in-Q veto · 825e8885
      Danielle Ratson authored
      'Uppers' is not clear enough for all users when referring to upper
      devices.
      
      Reword the error message so it will be clearer.
      Signed-off-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      825e8885
    • Shubhankar Kuranagatti's avatar
      net: ipv6: route.c:fix indentation · 13fdb940
      Shubhankar Kuranagatti authored
      The series of space has been replaced by tab space
      wherever required.
      Signed-off-by: default avatarShubhankar Kuranagatti <shubhankarvk@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13fdb940
    • Vladimir Oltean's avatar
      net: add a helper to avoid issues with HW TX timestamping and SO_TXTIME · 847cbfc0
      Vladimir Oltean authored
      As explained in commit 29d98f54 ("net: enetc: allow hardware
      timestamping on TX queues with tc-etf enabled"), hardware TX
      timestamping requires an skb with skb->tstamp = 0. When a packet is sent
      with SO_TXTIME, the skb->skb_mstamp_ns corrupts the value of skb->tstamp,
      so the drivers need to explicitly reset skb->tstamp to zero after
      consuming the TX time.
      
      Create a helper named skb_txtime_consumed() which does just that. All
      drivers which offload TC_SETUP_QDISC_ETF should implement it, and it
      would make it easier to assess during review whether they do the right
      thing in order to be compatible with hardware timestamping or not.
      Suggested-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Acked-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      847cbfc0
    • Maciej W. Rozycki's avatar
      FDDI: defza: Update my e-mail address · aa27b8f7
      Maciej W. Rozycki authored
      Following the recent update to MAINTAINERS update my e-mail address.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa27b8f7
    • Maciej W. Rozycki's avatar
      FDDI: defxx: Update my e-mail address · 4d248c0d
      Maciej W. Rozycki authored
      Following the recent update to MAINTAINERS update my e-mail address.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d248c0d
    • Maciej W. Rozycki's avatar
      FDDI: if_fddi.h: Update my e-mail address · e56763ee
      Maciej W. Rozycki authored
      Following the recent update to MAINTAINERS update my e-mail address.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e56763ee
    • Ido Schimmel's avatar
      sched: act_sample: Implement stats_update callback · 58c04397
      Ido Schimmel authored
      Implement this callback in order to get the offloaded stats added to the
      kernel stats.
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      58c04397
    • Yang Li's avatar
      isdn: mISDN: remove unneeded variable 'ret' · 762c1adb
      Yang Li authored
      Fix the following coccicheck warning:
      ./drivers/isdn/mISDN/dsp_core.c:956:6-9: Unneeded variable: "err".
      Return "0" on line 1001
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      762c1adb
    • Rafał Miłecki's avatar
      net: broadcom: bcm4908_enet: read MAC from OF · 3559c1ea
      Rafał Miłecki authored
      BCM4908 devices have MAC address accessible using NVMEM so it's needed
      to use OF helper for reading it.
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3559c1ea
    • Yunsheng Lin's avatar
      skbuff: remove some unnecessary operation in skb_segment_list() · 1ddc3229
      Yunsheng Lin authored
      gro list uses skb_shinfo(skb)->frag_list to link two skb together,
      and NAPI_GRO_CB(p)->last->next is used when there are more skb,
      see skb_gro_receive_list(). gso expects that each segmented skb is
      linked together using skb->next, so only the first skb->next need
      to set to skb_shinfo(skb)-> frag_list when doing gso list segment.
      
      It is the same reason that nskb->next does not need to be set to
      list_skb before goto the error handling, because nskb->next already
      pointers to list_skb.
      
      And nskb is also the last skb at the end of loop, so remove tail
      variable and use nskb instead.
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ddc3229
    • Gustavo A. R. Silva's avatar
      qed: Fix fall-through warnings for Clang · 134639e9
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
      warnings by explicitly adding a couple of break statements instead of
      just letting the code fall through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Reviewed-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      134639e9
    • Gustavo A. R. Silva's avatar
      net: plip: Fix fall-through warnings for Clang · 71ae2cb3
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
      warnings by explicitly adding multiple break statements instead of
      letting the code fall through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71ae2cb3
    • Gustavo A. R. Silva's avatar
      net: rose: Fix fall-through warnings for Clang · 90d181ca
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
      warnings by explicitly adding multiple break statements instead of
      letting the code fall through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90d181ca
    • Gustavo A. R. Silva's avatar
      net: core: Fix fall-through warnings for Clang · b1866bff
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of letting the code fall
      through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1866bff
    • Gustavo A. R. Silva's avatar
      net: bridge: Fix fall-through warnings for Clang · ecd1c6a5
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of letting the code fall
      through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ecd1c6a5
    • Gustavo A. R. Silva's avatar
      net: ax25: Fix fall-through warnings for Clang · 5646fba6
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of letting the code fall
      through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5646fba6
    • Gustavo A. R. Silva's avatar
      decnet: Fix fall-through warnings for Clang · 4cdbe58b
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of letting the code fall
      through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4cdbe58b
    • Gustavo A. R. Silva's avatar
      net: cassini: Fix fall-through warnings for Clang · 2a86b4a7
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of just letting the code
      fall through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a86b4a7
    • Gustavo A. R. Silva's avatar
      net: 3c509: Fix fall-through warnings for Clang · 097c8ff0
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of just letting the code
      fall through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      097c8ff0
    • Gustavo A. R. Silva's avatar
      net: mscc: ocelot: Fix fall-through warnings for Clang · fdeadd6e
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of just letting the code
      fall through to the next case.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdeadd6e
    • Gustavo A. R. Silva's avatar
      net: fddi: skfp: smt: Replace one-element array with flexible-array member · 537a0c5c
      Gustavo A. R. Silva authored
      There is a regular need in the kernel to provide a way to declare having
      a dynamically sized set of trailing elements in a structure. Kernel code
      should always use “flexible array members”[1] for these cases. The older
      style of one-element or zero-length arrays should no longer be used[2].
      
      Refactor the code according to the use of flexible-array members in
      smt_sif_operation structure, instead of one-element arrays. Also, make
      use of the struct_size() helper instead of the open-coded version
      to calculate the size of the struct-with-flex-array. Additionally, make
      use of the typeof operator to properly determine the object type to be
      passed to macro smtod().
      
      Also, this helps the ongoing efforts to enable -Warray-bounds by fixing
      the following warnings:
      
        CC [M]  drivers/net/fddi/skfp/smt.o
      drivers/net/fddi/skfp/smt.c: In function ‘smt_send_sif_operation’:
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
            |                   ^~~
      drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds]
       1084 |    smt_fill_lem(smc,&sif->lem[i],i) ;
            |                      ~~~~~~~~^~~
      In file included from drivers/net/fddi/skfp/h/smc.h:42,
                       from drivers/net/fddi/skfp/smt.c:15:
      drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’
        767 |  struct smt_p_lem lem[1] ; /* phy lem status */
      
      [1] https://en.wikipedia.org/wiki/Flexible_array_member
      [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays
      
      Link: https://github.com/KSPP/linux/issues/79
      Link: https://github.com/KSPP/linux/issues/109Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      537a0c5c
    • Yejune Deng's avatar
      net/rds: Drop duplicate sin and sin6 assignments · 3e6f20e0
      Yejune Deng authored
      There is no need to assign the msg->msg_name to sin or sin6,
      because there is DECLARE_SOCKADDR statement.
      Signed-off-by: default avatarYejune Deng <yejune.deng@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e6f20e0
    • Wang Qing's avatar
      net: ethernet: chelsiofix: spelling typo of 'rewriteing' · 4b18d5d1
      Wang Qing authored
      rewriteing -> rewriting
      Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b18d5d1
    • Wang Qing's avatar
      drivers: isdn: mISDN: fix spelling typo of 'wheter' · 67a580aa
      Wang Qing authored
      wheter -> whether
      Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67a580aa
    • Xuan Zhuo's avatar
      virtio-net: support XDP when not more queues · 97c2c69e
      Xuan Zhuo authored
      The number of queues implemented by many virtio backends is limited,
      especially some machines have a large number of CPUs. In this case, it
      is often impossible to allocate a separate queue for
      XDP_TX/XDP_REDIRECT, then xdp cannot be loaded to work, even xdp does
      not use the XDP_TX/XDP_REDIRECT.
      
      This patch allows XDP_TX/XDP_REDIRECT to run by reuse the existing SQ
      with __netif_tx_lock() hold when there are not enough queues.
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Reviewed-by: default avatarDust Li <dust.li@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      97c2c69e
    • Menglong Dong's avatar
      net: socket: use BIT() for MSG_* · 0bb3262c
      Menglong Dong authored
      The bit mask for MSG_* seems a little confused here. Replace it
      with BIT() to make it clear to understand.
      Signed-off-by: default avatarMenglong Dong <dong.menglong@zte.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0bb3262c
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · c1acda98
      David S. Miller authored
      Alexei Starovoitov says:
      
      ====================
      pull-request: bpf-next 2021-03-09
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      We've added 90 non-merge commits during the last 17 day(s) which contain
      a total of 114 files changed, 5158 insertions(+), 1288 deletions(-).
      
      The main changes are:
      
      1) Faster bpf_redirect_map(), from Björn.
      
      2) skmsg cleanup, from Cong.
      
      3) Support for floating point types in BTF, from Ilya.
      
      4) Documentation for sys_bpf commands, from Joe.
      
      5) Support for sk_lookup in bpf_prog_test_run, form Lorenz.
      
      6) Enable task local storage for tracing programs, from Song.
      
      7) bpf_for_each_map_elem() helper, from Yonghong.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1acda98
    • Linus Torvalds's avatar
      Merge git://git.kernel.org:/pub/scm/linux/kernel/git/netdev/net · 05a59d79
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix transmissions in dynamic SMPS mode in ath9k, from Felix Fietkau.
      
       2) TX skb error handling fix in mt76 driver, also from Felix.
      
       3) Fix BPF_FETCH atomic in x86 JIT, from Brendan Jackman.
      
       4) Avoid double free of percpu pointers when freeing a cloned bpf prog.
          From Cong Wang.
      
       5) Use correct printf format for dma_addr_t in ath11k, from Geert
          Uytterhoeven.
      
       6) Fix resolve_btfids build with older toolchains, from Kun-Chuan
          Hsieh.
      
       7) Don't report truncated frames to mac80211 in mt76 driver, from
          Lorenzop Bianconi.
      
       8) Fix watcdog timeout on suspend/resume of stmmac, from Joakim Zhang.
      
       9) mscc ocelot needs NET_DEVLINK selct in Kconfig, from Arnd Bergmann.
      
      10) Fix sign comparison bug in TCP_ZEROCOPY_RECEIVE getsockopt(), from
          Arjun Roy.
      
      11) Ignore routes with deleted nexthop object in mlxsw, from Ido
          Schimmel.
      
      12) Need to undo tcp early demux lookup sometimes in nf_nat, from
          Florian Westphal.
      
      13) Fix gro aggregation for udp encaps with zero csum, from Daniel
          Borkmann.
      
      14) Make sure to always use imp*_ndo_send when necessaey, from Jason A.
          Donenfeld.
      
      15) Fix TRSCER masks in sh_eth driver from Sergey Shtylyov.
      
      16) prevent overly huge skb allocationsd in qrtr, from Pavel Skripkin.
      
      17) Prevent rx ring copnsumer index loss of sync in enetc, from Vladimir
          Oltean.
      
      18) Make sure textsearch copntrol block is large enough, from Wilem de
          Bruijn.
      
      19) Revert MAC changes to r8152 leading to instability, from Hates Wang.
      
      20) Advance iov in 9p even for empty reads, from Jissheng Zhang.
      
      21) Double hook unregister in nftables, from PabloNeira Ayuso.
      
      22) Fix memleak in ixgbe, fropm Dinghao Liu.
      
      23) Avoid dups in pkt scheduler class dumps, from Maximilian Heyne.
      
      24) Various mptcp fixes from Florian Westphal, Paolo Abeni, and Geliang
          Tang.
      
      25) Fix DOI refcount bugs in cipso, from Paul Moore.
      
      26) One too many irqsave in ibmvnic, from Junlin Yang.
      
      27) Fix infinite loop with MPLS gso segmenting via virtio_net, from
          Balazs Nemeth.
      
      * git://git.kernel.org:/pub/scm/linux/kernel/git/netdev/net: (164 commits)
        s390/qeth: fix notification for pending buffers during teardown
        s390/qeth: schedule TX NAPI on QAOB completion
        s390/qeth: improve completion of pending TX buffers
        s390/qeth: fix memory leak after failed TX Buffer allocation
        net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0
        net: check if protocol extracted by virtio_net_hdr_set_proto is correct
        net: dsa: xrs700x: check if partner is same as port in hsr join
        net: lapbether: Remove netif_start_queue / netif_stop_queue
        atm: idt77252: fix null-ptr-dereference
        atm: uPD98402: fix incorrect allocation
        atm: fix a typo in the struct description
        net: qrtr: fix error return code of qrtr_sendmsg()
        mptcp: fix length of ADD_ADDR with port sub-option
        net: bonding: fix error return code of bond_neigh_init()
        net: enetc: allow hardware timestamping on TX queues with tc-etf enabled
        net: enetc: set MAC RX FIFO to recommended value
        net: davicom: Use platform_get_irq_optional()
        net: davicom: Fix regulator not turned off on driver removal
        net: davicom: Fix regulator not turned off on failed probe
        net: dsa: fix switchdev objects on bridge master mistakenly being applied on ports
        ...
      05a59d79
    • Linus Torvalds's avatar
      Merge git://git.kernel.org:/pub/scm/linux/kernel/git/davem/sparc · 6a30bedf
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
       "Fix opcode filtering for exceptions, and clean up defconfig"
      
      * git://git.kernel.org:/pub/scm/linux/kernel/git/davem/sparc:
        sparc: sparc64_defconfig: remove duplicate CONFIGs
        sparc64: Fix opcode filtering in handling of no fault loads
      6a30bedf
    • Corentin Labbe's avatar
      sparc: sparc64_defconfig: remove duplicate CONFIGs · 69264b4a
      Corentin Labbe authored
      After my patch there is CONFIG_ATA defined twice.
      Remove the duplicate one.
      Same problem for CONFIG_HAPPYMEAL, except I added as builtin for boot
      test with NFS.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Fixes: a57cdeb3 ("sparc: sparc64_defconfig: add necessary configs for qemu")
      Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69264b4a