1. Jun 17, 2022
  2. Jun 16, 2022
  3. Jun 15, 2022
    • Duoming Zhou's avatar
      net: ax25: Fix deadlock caused by skb_recv_datagram in ax25_recvmsg · 219b51a6
      Duoming Zhou authored
      The skb_recv_datagram() in ax25_recvmsg() will hold lock_sock
      and block until it receives a packet from the remote. If the client
      doesn`t connect to server and calls read() directly, it will not
      receive any packets forever. As a result, the deadlock will happen.
      
      The fail log caused by deadlock is shown below:
      
      [  369.606973] INFO: task ax25_deadlock:157 blocked for more than 245 seconds.
      [  369.608919] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      [  369.613058] Call Trace:
      [  369.613315]  <TASK>
      [  369.614072]  __schedule+0x2f9/0xb20
      [  369.615029]  schedule+0x49/0xb0
      [  369.615734]  __lock_sock+0x92/0x100
      [  369.616763]  ? destroy_sched_domains_rcu+0x20/0x20
      [  369.617941]  lock_sock_nested+0x6e/0x70
      [  369.618809]  ax25_bind+0xaa/0x210
      [  369.619736]  __sys_bind+0xca/0xf0
      [  369.620039]  ? do_futex+0xae/0x1b0
      [  369.620387]  ? __x64_sys_futex+0x7c/0x1c0
      [  369.620601]  ? fpregs_assert_state_consistent+0x19/0x40
      [  369.620613]  __x64_sys_bind+0x11/0x20
      [  369.621791]  do_syscall_64+0x3b/0x90
      [  369.622423]  entry_SYSCALL_64_after_hwframe+0x46/0xb0
      [  369.623319] RIP: 0033:0x7f43c8aa8af7
      [  369.624301] RSP: 002b:00007f43c8197ef8 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
      [  369.625756] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f43c8aa8af7
      [  369.626724] RDX: 0000000000000010 RSI: 000055768e2021d0 RDI: 0000000000000005
      [  369.628569] RBP: 00007f43c8197f00 R08: 0000000000000011 R09: 00007f43c8198700
      [  369.630208] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff845e6afe
      [  369.632240] R13: 00007fff845e6aff R14: 00007f43c8197fc0 R15: 00007f43c8198700
      
      This patch replaces skb_recv_datagram() with an open-coded variant of it
      releasing the socket lock before the __skb_wait_for_more_packets() call
      and re-acquiring it after such call in order that other functions that
      need socket lock could be executed.
      
      what's more, the socket lock will be released only when recvmsg() will
      block and that should produce nicer overall behavior.
      
      Fixes: 1da177e4
      
       ("Linux-2.6.12-rc2")
      Suggested-by: default avatarThomas Osterried <thomas@osterried.de>
      Signed-off-by: default avatarDuoming Zhou <duoming@zju.edu.cn>
      Reported-by: Thomas Habets <thomas@@habets.se>
      Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      219b51a6
    • Jose Alonso's avatar
      net: usb: ax88179_178a needs FLAG_SEND_ZLP · 36a15e1c
      Jose Alonso authored
      
      
      The extra byte inserted by usbnet.c when
       (length % dev->maxpacket == 0) is causing problems to device.
      
      This patch sets FLAG_SEND_ZLP to avoid this.
      
      Tested with: 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
      
      Problems observed:
      ======================================================================
      1) Using ssh/sshfs. The remote sshd daemon can abort with the message:
         "message authentication code incorrect"
         This happens because the tcp message sent is corrupted during the
         USB "Bulk out". The device calculate the tcp checksum and send a
         valid tcp message to the remote sshd. Then the encryption detects
         the error and aborts.
      2) NETDEV WATCHDOG: ... (ax88179_178a): transmit queue 0 timed out
      3) Stop normal work without any log message.
         The "Bulk in" continue receiving packets normally.
         The host sends "Bulk out" and the device responds with -ECONNRESET.
         (The netusb.c code tx_complete ignore -ECONNRESET)
      Under normal conditions these errors take days to happen and in
      intense usage take hours.
      
      A test with ping gives packet loss, showing that something is wrong:
      ping -4 -s 462 {destination}	# 462 = 512 - 42 - 8
      Not all packets fail.
      My guess is that the device tries to find another packet starting
      at the extra byte and will fail or not depending on the next
      bytes (old buffer content).
      ======================================================================
      
      Signed-off-by: default avatarJose Alonso <joalonsof@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36a15e1c
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 371de1aa
      David S. Miller authored
      
      
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2022-06-14
      
      This series contains updates to ice driver only.
      
      Michal fixes incorrect Tx timestamp offset calculation for E822 devices.
      
      Roman enforces required VLAN filtering settings for double VLAN mode.
      
      Przemyslaw fixes memory corruption issues with VFs by ensuring
      queues are disabled in the error path of VF queue configuration and to
      disabled VFs during reset.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      371de1aa
    • Lukas Bulwahn's avatar
      MAINTAINERS: add include/dt-bindings/net to NETWORKING DRIVERS · b60377de
      Lukas Bulwahn authored
      
      
      Maintainers of the directory Documentation/devicetree/bindings/net
      are also the maintainers of the corresponding directory
      include/dt-bindings/net.
      
      Add the file entry for include/dt-bindings/net to the appropriate
      section in MAINTAINERS.
      
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Link: https://lore.kernel.org/r/20220613121826.11484-1-lukas.bulwahn@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b60377de
    • Oleksij Rempel's avatar
      ARM: dts: at91: ksz9477_evb: fix port/phy validation · 56315b6b
      Oleksij Rempel authored
      Latest drivers version requires phy-mode to be set. Otherwise we will
      use "NA" mode and the switch driver will invalidate this port mode.
      
      Fixes: 65ac79e1
      
       ("net: dsa: microchip: add the phylink get_caps")
      Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Link: https://lore.kernel.org/r/20220610081621.584393-1-o.rempel@pengutronix.de
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      56315b6b
    • Christophe JAILLET's avatar
      net: bgmac: Fix an erroneous kfree() in bgmac_remove() · d7dd6ecc
      Christophe JAILLET authored
      'bgmac' is part of a managed resource allocated with bgmac_alloc(). It
      should not be freed explicitly.
      
      Remove the erroneous kfree() from the .remove() function.
      
      Fixes: 34a5102c
      
       ("net: bgmac: allocate struct bgmac just once & don't copy it")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/a026153108dd21239036a032b95c25b5cece253b.1655153616.git.christophe.jaillet@wanadoo.fr
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d7dd6ecc
    • Linus Torvalds's avatar
      netfs: fix up netfs_inode_init() docbook comment · 018ab4fa
      Linus Torvalds authored
      Commit e81fb419 ("netfs: Further cleanups after struct netfs_inode
      wrapper introduced") changed the argument types and names, and actually
      updated the comment too (although that was thanks to David Howells, not
      me: my original patch only changed the code).
      
      But the comment fixup didn't go quite far enough, and didn't change the
      argument name in the comment, resulting in
      
        include/linux/netfs.h:314: warning: Function parameter or member 'ctx' not described in 'netfs_inode_init'
        include/linux/netfs.h:314: warning: Excess function parameter 'inode' description in 'netfs_inode_init'
      
      during htmldoc generation.
      
      Fixes: e81fb419
      
       ("netfs: Further cleanups after struct netfs_inode wrapper introduced")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      018ab4fa
    • Przemyslaw Patynowski's avatar
      ice: Fix memory corruption in VF driver · efe41860
      Przemyslaw Patynowski authored
      Disable VF's RX/TX queues, when it's disabled. VF can have queues enabled,
      when it requests a reset. If PF driver assumes that VF is disabled,
      while VF still has queues configured, VF may unmap DMA resources.
      In such scenario device still can map packets to memory, which ends up
      silently corrupting it.
      Previously, VF driver could experience memory corruption, which lead to
      crash:
      [ 5119.170157] BUG: unable to handle kernel paging request at 00001b9780003237
      [ 5119.170166] PGD 0 P4D 0
      [ 5119.170173] Oops: 0002 [#1] PREEMPT_RT SMP PTI
      [ 5119.170181] CPU: 30 PID: 427592 Comm: kworker/u96:2 Kdump: loaded Tainted: G        W I      --------- -  - 4.18.0-372.9.1.rt7.166.el8.x86_64 #1
      [ 5119.170189] Hardware name: Dell Inc. PowerEdge R740/014X06, BIOS 2.3.10 08/15/2019
      [ 5119.170193] Workqueue: iavf iavf_adminq_task [iavf]
      [ 5119.170219] RIP: 0010:__page_frag_cache_drain+0x5/0x30
      [ 5119.170238] Code: 0f 0f b6 77 51 85 f6 74 07 31 d2 e9 05 df ff ff e9 90 fe ff ff 48 8b 05 49 db 33 01 eb b4 0f 1f 80 00 00 00 00 0f 1f 44 00 00 <f0> 29 77 34 74 01 c3 48 8b 07 f6 c4 80 74 0f 0f b6 77 51 85 f6 74
      [ 5119.170244] RSP: 0018:ffffa43b0bdcfd78 EFLAGS: 00010282
      [ 5119.170250] RAX: ffffffff896b3e40 RBX: ffff8fb282524000 RCX: 0000000000000002
      [ 5119.170254] RDX: 0000000049000000 RSI: 0000000000000000 RDI: 00001b9780003203
      [ 5119.170259] RBP: ffff8fb248217b00 R08: 0000000000000022 R09: 0000000000000009
      [ 5119.170262] R10: 2b849d6300000000 R11: 0000000000000020 R12: 0000000000000000
      [ 5119.170265] R13: 0000000000001000 R14: 0000000000000009 R15: 0000000000000000
      [ 5119.170269] FS:  0000000000000000(0000) GS:ffff8fb1201c0000(0000) knlGS:0000000000000000
      [ 5119.170274] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 5119.170279] CR2: 00001b9780003237 CR3: 00000008f3e1a003 CR4: 00000000007726e0
      [ 5119.170283] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 5119.170286] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [ 5119.170290] PKRU: 55555554
      [ 5119.170292] Call Trace:
      [ 5119.170298]  iavf_clean_rx_ring+0xad/0x110 [iavf]
      [ 5119.170324]  iavf_free_rx_resources+0xe/0x50 [iavf]
      [ 5119.170342]  iavf_free_all_rx_resources.part.51+0x30/0x40 [iavf]
      [ 5119.170358]  iavf_virtchnl_completion+0xd8a/0x15b0 [iavf]
      [ 5119.170377]  ? iavf_clean_arq_element+0x210/0x280 [iavf]
      [ 5119.170397]  iavf_adminq_task+0x126/0x2e0 [iavf]
      [ 5119.170416]  process_one_work+0x18f/0x420
      [ 5119.170429]  worker_thread+0x30/0x370
      [ 5119.170437]  ? process_one_work+0x420/0x420
      [ 5119.170445]  kthread+0x151/0x170
      [ 5119.170452]  ? set_kthread_struct+0x40/0x40
      [ 5119.170460]  ret_from_fork+0x35/0x40
      [ 5119.170477] Modules linked in: iavf sctp ip6_udp_tunnel udp_tunnel mlx4_en mlx4_core nfp tls vhost_net vhost vhost_iotlb tap tun xt_CHECKSUM ipt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink bridge stp llc rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache sunrpc intel_rapl_msr iTCO_wdt iTCO_vendor_support dell_smbios wmi_bmof dell_wmi_descriptor dcdbas kvm_intel kvm irqbypass intel_rapl_common isst_if_common skx_edac irdma nfit libnvdimm x86_pkg_temp_thermal i40e intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ib_uverbs rapl ipmi_ssif intel_cstate intel_uncore mei_me pcspkr acpi_ipmi ib_core mei lpc_ich i2c_i801 ipmi_si ipmi_devintf wmi ipmi_msghandler acpi_power_meter xfs libcrc32c sd_mod t10_pi sg mgag200 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ice ahci drm libahci crc32c_intel libata tg3 megaraid_sas
      [ 5119.170613]  i2c_algo_bit dm_mirror dm_region_hash dm_log dm_mod fuse [last unloaded: iavf]
      [ 5119.170627] CR2: 00001b9780003237
      
      Fixes: ec4f5a43
      
       ("ice: Check if VF is disabled for Opcode and other operations")
      Signed-off-by: default avatarPrzemyslaw Patynowski <przemyslawx.patynowski@intel.com>
      Co-developed-by: default avatarSlawomir Laba <slawomirx.laba@intel.com>
      Signed-off-by: default avatarSlawomir Laba <slawomirx.laba@intel.com>
      Signed-off-by: default avatarMateusz Palczewski <mateusz.palczewski@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      efe41860
    • Przemyslaw Patynowski's avatar
      ice: Fix queue config fail handling · be2af714
      Przemyslaw Patynowski authored
      Disable VF's RX/TX queues, when VIRTCHNL_OP_CONFIG_VSI_QUEUES fail.
      Not disabling them might lead to scenario, where PF driver leaves VF
      queues enabled, when VF's VSI failed queue config.
      In this scenario VF should not have RX/TX queues enabled. If PF failed
      to set up VF's queues, VF will reset due to TX timeouts in VF driver.
      Initialize iterator 'i' to -1, so if error happens prior to configuring
      queues then error path code will not disable queue 0. Loop that
      configures queues will is using same iterator, so error path code will
      only disable queues that were configured.
      
      Fixes: 77ca27c4
      
       ("ice: add support for virtchnl_queue_select.[tx|rx]_queues bitmap")
      Suggested-by: default avatarSlawomir Laba <slawomirx.laba@intel.com>
      Signed-off-by: default avatarPrzemyslaw Patynowski <przemyslawx.patynowski@intel.com>
      Signed-off-by: default avatarMateusz Palczewski <mateusz.palczewski@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      be2af714
    • Roman Storozhenko's avatar
      ice: Sync VLAN filtering features for DVM · 9542ef4f
      Roman Storozhenko authored
      VLAN filtering features, that is C-Tag and S-Tag, in DVM mode must be
      both enabled or disabled.
      In case of turning off/on only one of the features, another feature must
      be turned off/on automatically with issuing an appropriate message to
      the kernel log.
      
      Fixes: 1babaf77
      
       ("ice: Advertise 802.1ad VLAN filtering and offloads for PF netdev")
      Signed-off-by: default avatarRoman Storozhenko <roman.storozhenko@intel.com>
      Co-developed-by: default avatarAnatolii Gerasymenko <anatolii.gerasymenko@intel.com>
      Signed-off-by: default avatarAnatolii Gerasymenko <anatolii.gerasymenko@intel.com>
      Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      9542ef4f
    • Michal Michalik's avatar
      ice: Fix PTP TX timestamp offset calculation · 71a579f0
      Michal Michalik authored
      The offset was being incorrectly calculated for E822 - that led to
      collisions in choosing TX timestamp register location when more than
      one port was trying to use timestamping mechanism.
      
      In E822 one quad is being logically split between ports, so quad 0 is
      having trackers for ports 0-3, quad 1 ports 4-7 etc. Each port should
      have separate memory location for tracking timestamps. Due to error for
      example ports 1 and 2 had been assigned to quad 0 with same offset (0),
      while port 1 should have offset 0 and 1 offset 16.
      
      Fix it by correctly calculating quad offset.
      
      Fixes: 3a749623
      
       ("ice: implement basic E822 PTP support")
      Signed-off-by: default avatarMichal Michalik <michal.michalik@intel.com>
      Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      71a579f0
  4. Jun 14, 2022
  5. Jun 13, 2022
    • Suman Ghosh's avatar
      octeontx2-vf: Add support for adaptive interrupt coalescing · 619c010a
      Suman Ghosh authored
      Fixes: 6e144b47
      
       (octeontx2-pf: Add support for adaptive interrupt coalescing)
      Added support for VF interfaces as well.
      
      Signed-off-by: default avatarSuman Ghosh <sumang@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      619c010a
    • David S. Miller's avatar
      xilinx: Fix build on x86. · 5f7b8415
      David S. Miller authored
      CONFIG_64BIT is not sufficient for checking for availability of
      iowrite64() and friends.
      
      Also, the out_addr helpers need to be inline.
      
      Fixes: b690f8df
      
       ("net: axienet: Use iowrite64 to write all 64b descriptor pointers")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f7b8415
    • David S. Miller's avatar
      Merge branch 'axienet-fixes' · a7ffce95
      David S. Miller authored
      
      
      Andy Chiu says:
      
      ====================
      net: axienet: fix DMA Tx error
      
      We ran into multiple DMA TX errors while writing files over a network
      block device running on top of a DMA-connected AXI Ethernet device on
      64-bit RISC-V machines. The errors indicated that the DMA had fetched a
      null descriptor and we found that the reason for this is that AXI DMA had
      unexpectedly processed a partially updated tail descriptor pointer. To
      fix it, we suggest that the driver should use one 64-bit write instead
      of two 32-bit writes to perform such update if possible. For those
      archectures where double-word load/stores are unavailable, e.g. 32-bit
      archectures, force a driver probe failure if the driver finds 64-bit
      capability on DMA.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7ffce95
    • Andy Chiu's avatar
      net: axienet: Use iowrite64 to write all 64b descriptor pointers · b690f8df
      Andy Chiu authored
      According to commit f735c40e
      
       ("net: axienet: Autodetect 64-bit DMA
      capability") and AXI-DMA spec (pg021), on 64-bit capable dma, only
      writing MSB part of tail descriptor pointer causes DMA engine to start
      fetching descriptors. However, we found that it is true only if dma is in
      idle state. In other words, dma would use a tailp even if it only has LSB
      updated, when the dma is running.
      
      The non-atomicity of this behavior could be problematic if enough
      delay were introduced in between the 2 writes. For example, if an
      interrupt comes right after the LSB write and the cpu spends long
      enough time in the handler for the dma to get back into idle state by
      completing descriptors, then the seconcd write to MSB would treat dma
      to start fetching descriptors again. Since the descriptor next to the
      one pointed by current tail pointer is not filled by the kernel yet,
      fetching a null descriptor here causes a dma internal error and halt
      the dma engine down.
      
      We suggest that the dma engine should start process a 64-bit MMIO write
      to the descriptor pointer only if ONE 32-bit part of it is written on all
      states. Or we should restrict the use of 64-bit addressable dma on 32-bit
      platforms, since those devices have no instruction to guarantee the write
      to LSB and MSB part of tail pointer occurs atomically to the dma.
      
      initial condition:
      curp =  x-3;
      tailp = x-2;
      LSB = x;
      MSB = 0;
      
      cpu:                       |dma:
       iowrite32(LSB, tailp)     |  completes #(x-3) desc, curp = x-3
       ...                       |  tailp updated
       => irq                    |  completes #(x-2) desc, curp = x-2
          ...                    |  completes #(x-1) desc, curp = x-1
          ...                    |  ...
          ...                    |  completes #x desc, curp = tailp = x
       <= irqreturn              |  reaches tailp == curp = x, idle
       iowrite32(MSB, tailp + 4) |  ...
                                 |  tailp updated, starts fetching...
                                 |  fetches #(x + 1) desc, sees cntrl = 0
                                 |  post Tx error, halt
      
      Signed-off-by: default avatarAndy Chiu <andy.chiu@sifive.com>
      Reported-by: default avatarMax Hsu <max.hsu@sifive.com>
      Reviewed-by: default avatarGreentime Hu <greentime.hu@sifive.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b690f8df
    • Andy Chiu's avatar
      net: axienet: make the 64b addresable DMA depends on 64b archectures · 00be43a7
      Andy Chiu authored
      
      
      Currently it is not safe to config the IP as 64-bit addressable on 32-bit
      archectures, which cannot perform a double-word store on its descriptor
      pointers. The pointer is 64-bit wide if the IP is configured as 64-bit,
      and the device would process the partially updated pointer on some
      states if the pointer was updated via two store-words. To prevent such
      condition, we force a probe fail if we discover that the IP has 64-bit
      capability but it is not running on a 64-Bit kernel.
      
      This is a series of patch (1/2). The next patch must be applied in order
      to make 64b DMA safe on 64b archectures.
      
      Signed-off-by: default avatarAndy Chiu <andy.chiu@sifive.com>
      Reported-by: default avatarMax Hsu <max.hsu@sifive.com>
      Reviewed-by: default avatarGreentime Hu <greentime.hu@sifive.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00be43a7
    • David S. Miller's avatar
      Merge branch 'hns3-fixres' · a5b00f5b
      David S. Miller authored
      
      
      Guangbin Huang says:
      
      ====================
      net: hns3: add some fixes for -net
      
      This series adds some fixes for the HNS3 ethernet driver.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a5b00f5b
    • Guangbin Huang's avatar
      net: hns3: fix tm port shapping of fibre port is incorrect after driver initialization · 12a36708
      Guangbin Huang authored
      Currently in driver initialization process, driver will set shapping
      parameters of tm port to default speed read from firmware. However, the
      speed of SFP module may not be default speed, so shapping parameters of
      tm port may be incorrect.
      
      To fix this problem, driver sets new shapping parameters for tm port
      after getting exact speed of SFP module in this case.
      
      Fixes: 88d10bd6
      
       ("net: hns3: add support for multiple media type")
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12a36708
    • Jie Wang's avatar
      net: hns3: fix PF rss size initialization bug · 71b215f3
      Jie Wang authored
      Currently hns3 driver misuses the VF rss size to initialize the PF rss size
      in hclge_tm_vport_tc_info_update. So this patch fix it by checking the
      vport id before initialization.
      
      Fixes: 7347255e
      
       ("net: hns3: refactor PF rss get APIs with new common rss get APIs")
      Signed-off-by: default avatarJie Wang <wangjie125@huawei.com>
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71b215f3
    • Guangbin Huang's avatar
      net: hns3: restore tm priority/qset to default settings when tc disabled · e93530ae
      Guangbin Huang authored
      Currently, settings parameters of schedule mode, dwrr, shaper of tm
      priority or qset of one tc are only be set when tc is enabled, they are
      not restored to the default settings when tc is disabled. It confuses
      users when they cat tm_priority or tm_qset files of debugfs. So this
      patch fixes it.
      
      Fixes: 84844054
      
       ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e93530ae