1. 26 3月, 2021 3 次提交
  2. 25 3月, 2021 2 次提交
  3. 23 3月, 2021 6 次提交
  4. 21 3月, 2021 1 次提交
  5. 20 3月, 2021 1 次提交
    • C
      net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes · 014dfa26
      Corentin Labbe 提交于
      MTU cannot be changed on dwmac-sun8i. (ip link set eth0 mtu xxx returning EINVAL)
      This is due to tx_fifo_size being 0, since this value is used to compute valid
      MTU range.
      Like dwmac-sunxi (with commit 806fd188 ("net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes"))
      dwmac-sun8i need to have tx and rx fifo sizes set.
      I have used values from datasheets.
      After this patch, setting a non-default MTU (like 1000) value works and network is still useable.
      
      Tested-on: sun8i-h3-orangepi-pc
      Tested-on: sun8i-r40-bananapi-m2-ultra
      Tested-on: sun50i-a64-bananapi-m64
      Tested-on: sun50i-h5-nanopi-neo-plus2
      Tested-on: sun50i-h6-pine-h64
      Fixes: 9f93ac8d ("net-next: stmmac: Add dwmac-sun8i")
      Reported-by: NBelisko Marek <marek.belisko@gmail.com>
      Signed-off-by: NCorentin Labbe <clabbe@baylibre.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      014dfa26
  6. 19 3月, 2021 13 次提交
  7. 18 3月, 2021 1 次提交
  8. 17 3月, 2021 4 次提交
  9. 13 3月, 2021 3 次提交
    • D
      ftgmac100: Restart MAC HW once · 68970873
      Dylan Hung 提交于
      The interrupt handler may set the flag to reset the mac in the future,
      but that flag is not cleared once the reset has occurred.
      
      Fixes: 10cbd640 ("ftgmac100: Rework NAPI & interrupts handling")
      Signed-off-by: NDylan Hung <dylan_hung@aspeedtech.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Reviewed-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68970873
    • R
      net: axienet: Fix probe error cleanup · 59cd4f19
      Robert Hancock 提交于
      The driver did not always clean up all allocated resources when probe
      failed. Fix the probe cleanup path to clean up everything that was
      allocated.
      
      Fixes: 57baf8cc ("net: axienet: Handle deferred probe on clock properly")
      Signed-off-by: NRobert Hancock <robert.hancock@calian.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59cd4f19
    • L
      igb: avoid premature Rx buffer reuse · 98dfb02a
      Li RongQing 提交于
      Igb needs a similar fix as commit 75aab4e1 ("i40e: avoid
      premature Rx buffer reuse")
      
      The page recycle code, incorrectly, relied on that a page fragment
      could not be freed inside xdp_do_redirect(). This assumption leads to
      that page fragments that are used by the stack/XDP redirect can be
      reused and overwritten.
      
      To avoid this, store the page count prior invoking xdp_do_redirect().
      
      Longer explanation:
      
      Intel NICs have a recycle mechanism. The main idea is that a page is
      split into two parts. One part is owned by the driver, one part might
      be owned by someone else, such as the stack.
      
      t0: Page is allocated, and put on the Rx ring
                    +---------------
      used by NIC ->| upper buffer
      (rx_buffer)   +---------------
                    | lower buffer
                    +---------------
        page count  == USHRT_MAX
        rx_buffer->pagecnt_bias == USHRT_MAX
      
      t1: Buffer is received, and passed to the stack (e.g.)
                    +---------------
                    | upper buff (skb)
                    +---------------
      used by NIC ->| lower buffer
      (rx_buffer)   +---------------
        page count  == USHRT_MAX
        rx_buffer->pagecnt_bias == USHRT_MAX - 1
      
      t2: Buffer is received, and redirected
                    +---------------
                    | upper buff (skb)
                    +---------------
      used by NIC ->| lower buffer
      (rx_buffer)   +---------------
      
      Now, prior calling xdp_do_redirect():
        page count  == USHRT_MAX
        rx_buffer->pagecnt_bias == USHRT_MAX - 2
      
      This means that buffer *cannot* be flipped/reused, because the skb is
      still using it.
      
      The problem arises when xdp_do_redirect() actually frees the
      segment. Then we get:
        page count  == USHRT_MAX - 1
        rx_buffer->pagecnt_bias == USHRT_MAX - 2
      
      From a recycle perspective, the buffer can be flipped and reused,
      which means that the skb data area is passed to the Rx HW ring!
      
      To work around this, the page count is stored prior calling
      xdp_do_redirect().
      
      Fixes: 9cbc948b ("igb: add XDP support")
      Signed-off-by: NLi RongQing <lirongqing@baidu.com>
      Reviewed-by: NAlexander Duyck <alexanderduyck@fb.com>
      Tested-by: NVishakha Jambekar <vishakha.jambekar@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      98dfb02a
  10. 12 3月, 2021 6 次提交