1. 07 4月, 2021 8 次提交
    • Q
      net: ethernet: mtk_eth_soc: remove unneeded semicolon · 3b2c32f9
      Qiheng Lin 提交于
      Eliminate the following coccicheck warning:
       drivers/net/ethernet/mediatek/mtk_ppe.c:270:2-3: Unneeded semicolon
      Signed-off-by: NQiheng Lin <linqiheng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b2c32f9
    • W
      nfc: s3fwrn5: remove unnecessary label · b58c4649
      wengjianfeng 提交于
      In function s3fwrn5_nci_post_setup, the variable ret is assigned then
      goto out label, which just return ret, so we use return to replace it.
      Other goto sentences are similar, we use return sentences to replace
      goto sentences and delete out label.
      Signed-off-by: Nwengjianfeng <wengjianfeng@yulong.com>
      Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b58c4649
    • D
      Merge branch 'usbnet-speed' · b3feb439
      David S. Miller 提交于
      Grant Grundler says:
      
      ====================
      usbnet: speed reporting for devices without MDIO
      
      This series introduces support for USB network devices that report
      speed as a part of their protocol, not emulating an MII to be accessed
      over MDIO.
      
      v2: rebased on recent upstream changes
      v3: incorporated hints on naming and comments
      v4: fix misplaced hunks; reword some commit messages;
          add same change for cdc_ether
      v4-repost: added "net-next" to subject and Andrew Lunn's Reviewed-by
      
      I'm reposting Oliver Neukum's <oneukum@suse.com> patch series with
      fix ups for "misplaced hunks" (landed in the wrong patches).
      Please fixup the "author" if "git am" fails to attribute the
      patches 1-3 (of 4) to Oliver.
      
      I've tested v4 series with "5.12-rc3+" kernel on Intel NUC6i5SYB
      and + Sabrent NT-S25G. Google Pixelbook Go (chromeos-4.4 kernel)
      + Alpha Network AUE2500C were connected directly to the NT-S25G
      to get 2.5Gbps link rate:
      Settings for enx002427880815:
              Supported ports: [  ]
              Supported link modes:   Not reported
              Supported pause frame use: No
              Supports auto-negotiation: No
              Supported FEC modes: Not reported
              Advertised link modes:  Not reported
              Advertised pause frame use: No
              Advertised auto-negotiation: No
              Advertised FEC modes: Not reported
              Speed: 2500Mb/s
              Duplex: Half
              Auto-negotiation: off
              Port: Twisted Pair
              PHYAD: 0
              Transceiver: internal
              MDI-X: Unknown
              Current message level: 0x00000007 (7)
                                     drv probe link
              Link detected: yes
      
      "Duplex" is a lie since we get no information about it.
      
      I expect "Auto-Negotiation" is always true for cdc_ncm and
      cdc_ether devices and perhaps someone knows offhand how
      to have ethtool report "true" instead.
      
      But this is good step in the right direction.
      
      base-commit: 1c273e10
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3feb439
    • G
      net: cdc_ether: record speed in status method · d42ebcbb
      Grant Grundler 提交于
      Until very recently, the usbnet framework only had support functions
      for devices which reported the link speed by explicitly querying the
      PHY over a MDIO interface. However, the cdc_ether devices send
      notifications when the link state or link speeds change and do not
      expose the PHY (or modem) directly.
      
      Support funtions (e.g. usbnet_get_link_ksettings_internal()) to directly
      query state recorded by the cdc_ether driver were added in a previous patch.
      
      Instead of cdc_ether spewing the link speed into the dmesg buffer,
      record the link speed encoded in these notifications and tell the
      usbnet framework to use the new functions to get link speed/state.
      
      User space can now get the most recent link speed/state using ethtool.
      
      v4: added to series since cdc_ether uses same notifications
          as cdc_ncm driver.
      Signed-off-by: NGrant Grundler <grundler@chromium.org>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d42ebcbb
    • O
      net: cdc_ncm: record speed in status method · eb47c274
      Oliver Neukum 提交于
      Until very recently, the usbnet framework only had support functions
      for devices which reported the link speed by explicitly querying the
      PHY over a MDIO interface. However, the cdc_ncm devices send
      notifications when the link state or link speeds change and do not
      expose the PHY (or modem) directly.
      
      Support funtions (e.g. usbnet_get_link_ksettings_internal()) to directly
      query state recorded by the cdc_ncm driver were added in a previous patch.
      
      So instead of cdc_ncm spewing the link speed into the dmesg buffer,
      record the link speed encoded in these notifications and tell the
      usbnet framework to use the new functions to get link speed/state.
      Link speed/state is now available via ethtool.
      
      This is especially useful given all current RTL8156 devices emit
      a connection/speed status notification every 32ms and this would
      fill the dmesg buffer. This implementation replaces the one
      recently submitted in de658a19 :
         "net: usb: cdc_ncm: don't spew notifications"
      
      v2: rebased on upstream
      v3: changed variable names
      v4: rewrote commit message
      Signed-off-by: NOliver Neukum <oneukum@suse.com>
      Tested-by: NRoland Dreier <roland@kernel.org>
      Signed-off-by: NGrant Grundler <grundler@chromium.org>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eb47c274
    • O
      usbnet: add method for reporting speed without MII · 956baa99
      Oliver Neukum 提交于
      The old method for reporting link speed assumed a driver uses the
      generic phy (mii) MDIO read/write functions. CDC devices don't
      expose the phy.
      
      Add a primitive internal version reporting back directly what
      the CDC notification/status operations recorded.
      
      v2: rebased on upstream
      v3: changed names and made clear which units are used
      v4: moved hunks to correct patch; rewrote commmit messages
      Signed-off-by: NOliver Neukum <oneukum@suse.com>
      Tested-by: NRoland Dreier <roland@kernel.org>
      Reviewed-by: NGrant Grundler <grundler@chromium.org>
      Tested-by: NGrant Grundler <grundler@chromium.org>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      956baa99
    • O
      usbnet: add _mii suffix to usbnet_set/get_link_ksettings · 77651900
      Oliver Neukum 提交于
      The generic functions assumed devices provided an MDIO interface (accessed
      via older mii code, not phylib). This is true only for genuine ethernet.
      
      Devices with a higher level of abstraction or based on different
      technologies do not have MDIO. To support this case, first rename
      the existing functions with _mii suffix.
      
      v2: rebased on changed upstream
      v3: changed names to clearly say that this does NOT use phylib
      v4: moved hunks to correct patch; reworded commmit messages
      
      Signed-off-by : Oliver Neukum <oneukum@suse.com>
      Tested-by: NRoland Dreier <roland@kernel.org>
      Reviewed-by: NGrant Grundler <grundler@chromium.org>
      Tested-by: NGrant Grundler <grundler@chromium.org>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77651900
    • M
      tcp: Reset tcp connections in SYN-SENT state · e880f8b3
      Manoj Basapathi 提交于
      Userspace sends tcp connection (sock) destroy on network switch
      i.e switching the default network of the device between multiple
      networks(Cellular/Wifi/Ethernet).
      
      Kernel though doesn't send reset for the connections in SYN-SENT state
      and these connections continue to remain.
      Even as per RFC 793, there is no hard rule to not send RST on ABORT in
      this state.
      
      Modify tcp_abort and tcp_disconnect behavior to send RST for connections
      in syn-sent state to avoid lingering connections on network switch.
      Signed-off-by: NManoj Basapathi <manojbm@codeaurora.org>
      Signed-off-by: NSauvik Saha <ssaha@codeaurora.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e880f8b3
  2. 06 4月, 2021 12 次提交
  3. 04 4月, 2021 9 次提交
  4. 03 4月, 2021 11 次提交