1. 17 2月, 2021 11 次提交
  2. 11 2月, 2021 1 次提交
  3. 10 2月, 2021 2 次提交
    • F
      firmware_loader: align .builtin_fw to 8 · 793f49a8
      Fangrui Song 提交于
      arm64 references the start address of .builtin_fw (__start_builtin_fw)
      with a pair of R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_LDST64_ABS_LO12_NC
      relocations.  The compiler is allowed to emit the
      R_AARCH64_LDST64_ABS_LO12_NC relocation because struct builtin_fw in
      include/linux/firmware.h is 8-byte aligned.
      
      The R_AARCH64_LDST64_ABS_LO12_NC relocation requires the address to be a
      multiple of 8, which may not be the case if .builtin_fw is empty.
      Unconditionally align .builtin_fw to fix the linker error.  32-bit
      architectures could use ALIGN(4) but that would add unnecessary
      complexity, so just use ALIGN(8).
      
      Link: https://lkml.kernel.org/r/20201208054646.2913063-1-maskray@google.com
      Link: https://github.com/ClangBuiltLinux/linux/issues/1204
      Fixes: 5658c769 ("firmware: allow firmware files to be built into kernel image")
      Signed-off-by: NFangrui Song <maskray@google.com>
      Reported-by: Nkernel test robot <lkp@intel.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NNick Desaulniers <ndesaulniers@google.com>
      Tested-by: NNick Desaulniers <ndesaulniers@google.com>
      Tested-by: NDouglas Anderson <dianders@chromium.org>
      Acked-by: NNathan Chancellor <nathan@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      793f49a8
    • V
      net: dsa: felix: implement port flushing on .phylink_mac_link_down · eb4733d7
      Vladimir Oltean 提交于
      There are several issues which may be seen when the link goes down while
      forwarding traffic, all of which can be attributed to the fact that the
      port flushing procedure from the reference manual was not closely
      followed.
      
      With flow control enabled on both the ingress port and the egress port,
      it may happen when a link goes down that Ethernet packets are in flight.
      In flow control mode, frames are held back and not dropped. When there
      is enough traffic in flight (example: iperf3 TCP), then the ingress port
      might enter congestion and never exit that state. This is a problem,
      because it is the egress port's link that went down, and that has caused
      the inability of the ingress port to send packets to any other port.
      This is solved by flushing the egress port's queues when it goes down.
      
      There is also a problem when performing stream splitting for
      IEEE 802.1CB traffic (not yet upstream, but a sort of multicast,
      basically). There, if one port from the destination ports mask goes
      down, splitting the stream towards the other destinations will no longer
      be performed. This can be traced down to this line:
      
      	ocelot_port_writel(ocelot_port, 0, DEV_MAC_ENA_CFG);
      
      which should have been instead, as per the reference manual:
      
      	ocelot_port_rmwl(ocelot_port, 0, DEV_MAC_ENA_CFG_RX_ENA,
      			 DEV_MAC_ENA_CFG);
      
      Basically only DEV_MAC_ENA_CFG_RX_ENA should be disabled, but not
      DEV_MAC_ENA_CFG_TX_ENA - I don't have further insight into why that is
      the case, but apparently multicasting to several ports will cause issues
      if at least one of them doesn't have DEV_MAC_ENA_CFG_TX_ENA set.
      
      I am not sure what the state of the Ocelot VSC7514 driver is, but
      probably not as bad as Felix/Seville, since VSC7514 uses phylib and has
      the following in ocelot_adjust_link:
      
      	if (!phydev->link)
      		return;
      
      therefore the port is not really put down when the link is lost, unlike
      the DSA drivers which use .phylink_mac_link_down for that.
      
      Nonetheless, I put ocelot_port_flush() in the common ocelot.c because it
      needs to access some registers from drivers/net/ethernet/mscc/ocelot_rew.h
      which are not exported in include/soc/mscc/ and a bugfix patch should
      probably not move headers around.
      
      Fixes: bdeced75 ("net: dsa: felix: Add PCS operations for PHYLINK")
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eb4733d7
  4. 09 2月, 2021 2 次提交
  5. 06 2月, 2021 6 次提交
  6. 05 2月, 2021 1 次提交
  7. 02 2月, 2021 5 次提交
  8. 30 1月, 2021 2 次提交
  9. 28 1月, 2021 6 次提交
  10. 27 1月, 2021 2 次提交
    • X
      net: lapb: Add locking to the lapb module · b491e6a7
      Xie He 提交于
      In the lapb module, the timers may run concurrently with other code in
      this module, and there is currently no locking to prevent the code from
      racing on "struct lapb_cb". This patch adds locking to prevent racing.
      
      1. Add "spinlock_t lock" to "struct lapb_cb"; Add "spin_lock_bh" and
      "spin_unlock_bh" to APIs, timer functions and notifier functions.
      
      2. Add "bool t1timer_stop, t2timer_stop" to "struct lapb_cb" to make us
      able to ask running timers to abort; Modify "lapb_stop_t1timer" and
      "lapb_stop_t2timer" to make them able to abort running timers;
      Modify "lapb_t2timer_expiry" and "lapb_t1timer_expiry" to make them
      abort after they are stopped by "lapb_stop_t1timer", "lapb_stop_t2timer",
      and "lapb_start_t1timer", "lapb_start_t2timer".
      
      3. Let lapb_unregister wait for other API functions and running timers
      to stop.
      
      4. The lapb_device_event function calls lapb_disconnect_request. In
      order to avoid trying to hold the lock twice, add a new function named
      "__lapb_disconnect_request" which assumes the lock is held, and make
      it called by lapb_disconnect_request and lapb_device_event.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: Martin Schiller <ms@dev.tdt.de>
      Signed-off-by: NXie He <xie.he.0141@gmail.com>
      Link: https://lore.kernel.org/r/20210126040939.69995-1-xie.he.0141@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      b491e6a7
    • H
      media: v4l2-subdev.h: BIT() is not available in userspace · a53e3c18
      Hans Verkuil 提交于
      The BIT macro is not available in userspace, so replace BIT(0) by
      0x00000001.
      Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
      Fixes: 6446ec6c ("media: v4l2-subdev: add VIDIOC_SUBDEV_QUERYCAP ioctl")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      a53e3c18
  11. 26 1月, 2021 2 次提交