1. 01 5月, 2023 3 次提交
  2. 08 4月, 2023 1 次提交
    • D
      r8152: Add __GFP_NOWARN to big allocations · 5cc33f13
      Douglas Anderson 提交于
      When memory is a little tight on my system, it's pretty easy to see
      warnings that look like this.
      
        ksoftirqd/0: page allocation failure: order:3, mode:0x40a20(GFP_ATOMIC|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0
        ...
        Call trace:
         dump_backtrace+0x0/0x1e8
         show_stack+0x20/0x2c
         dump_stack_lvl+0x60/0x78
         dump_stack+0x18/0x38
         warn_alloc+0x104/0x174
         __alloc_pages+0x588/0x67c
         alloc_rx_agg+0xa0/0x190 [r8152 ...]
         r8152_poll+0x270/0x760 [r8152 ...]
         __napi_poll+0x44/0x1ec
         net_rx_action+0x100/0x300
         __do_softirq+0xec/0x38c
         run_ksoftirqd+0x38/0xec
         smpboot_thread_fn+0xb8/0x248
         kthread+0x134/0x154
         ret_from_fork+0x10/0x20
      
      On a fragmented system it's normal that order 3 allocations will
      sometimes fail, especially atomic ones. The driver handles these
      failures fine and the WARN just creates spam in the logs for this
      case. The __GFP_NOWARN flag is exactly for this situation, so add it
      to the allocation.
      
      NOTE: my testing is on a 5.15 system, but there should be no reason
      that this would be fundamentally different on a mainline kernel.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Acked-by: NHayes Wang <hayeswang@realtek.com>
      Link: https://lore.kernel.org/r/20230406171411.1.I84dbef45786af440fd269b71e9436a96a8e7a152@changeidSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      5cc33f13
  3. 21 1月, 2023 2 次提交
  4. 18 1月, 2023 1 次提交
  5. 12 1月, 2023 1 次提交
  6. 09 1月, 2023 1 次提交
    • B
      r8152: add USB device driver for config selection · ec51fbd1
      Bjørn Mork 提交于
      Subclassing the generic USB device driver to override the
      default configuration selection regardless of matching interface
      drivers.
      
      The r815x family devices expose a vendor specific function which
      the r8152 interface driver wants to handle.  This is the preferred
      device mode. Additionally one or more USB class functions are
      usually supported for hosts lacking a vendor specific driver. The
      choice is USB configuration based, with one alternate function per
      configuration.
      
      Example device with both NCM and ECM alternate cfgs:
      
      T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
      D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  3
      P:  Vendor=0bda ProdID=8156 Rev=31.00
      S:  Manufacturer=Realtek
      S:  Product=USB 10/100/1G/2.5G LAN
      S:  SerialNumber=001000001
      C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=256mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=r8152
      E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
      E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=128ms
      C:  #Ifs= 2 Cfg#= 2 Atr=a0 MxPwr=256mA
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=
      E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=128ms
      I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=
      E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
      C:  #Ifs= 2 Cfg#= 3 Atr=a0 MxPwr=256mA
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=
      E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=128ms
      I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
      E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
      
      A problem with this is that Linux will prefer class functions over
      vendor specific functions. Using the above example, Linux defaults
      to cfg #2, running the device in a sub-optimal NCM mode.
      
      Previously we've attempted to work around the problem by
      blacklisting the devices in the ECM class driver "cdc_ether", and
      matching on the ECM class function in the vendor specific interface
      driver. The latter has been used to switch back to the vendor
      specific configuration when the driver is probed for a class
      function.
      
      This workaround has several issues;
      - class driver blacklists is additional maintanence cruft in an
        unrelated driver
      - class driver blacklists prevents users from optionally running
        the devices in class mode
      - each device needs double match entries in the vendor driver
      - the initial probing as a class function slows down device
        discovery
      
      Now these issues have become even worse with the introduction of
      firmware supporting both NCM and ECM, where NCM ends up as the
      default mode in Linux. To use the same workaround, we now have
      to blacklist the devices in to two different class drivers and
      add yet another match entry to the vendor specific driver.
      
      This patch implements an alternative workaround strategy -
      independent of the interface drivers.  It avoids adding a
      blacklist to the cdc_ncm driver and will let us remove the
      existing blacklist from the cdc_ether driver.
      
      As an additional bonus, removing the blacklists allow users to
      select one of the other device modes if wanted.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec51fbd1
  7. 04 10月, 2022 1 次提交
  8. 03 9月, 2022 1 次提交
  9. 01 9月, 2022 2 次提交
  10. 27 8月, 2022 1 次提交
    • J
      r8152: add PID for the Lenovo OneLink+ Dock · 1bd3a383
      Jean-Francois Le Fillatre 提交于
      The Lenovo OneLink+ Dock contains an RTL8153 controller that behaves as
      a broken CDC device by default. Add the custom Lenovo PID to the r8152
      driver to support it properly.
      
      Also, systems compatible with this dock provide a BIOS option to enable
      MAC address passthrough (as per Lenovo document "ThinkPad Docking
      Solutions 2017"). Add the custom PID to the MAC passthrough list too.
      
      Tested on a ThinkPad 13 1st gen with the expected results:
      
      passthrough disabled: Invalid header when reading pass-thru MAC addr
      passthrough enabled:  Using pass-thru MAC addr XX:XX:XX:XX:XX:XX
      Signed-off-by: NJean-Francois Le Fillatre <jflf_kernel@gmx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1bd3a383
  11. 26 8月, 2022 1 次提交
    • J
      r8152: add PID for the Lenovo OneLink+ Dock · 76d7df94
      Jean-Francois Le Fillatre 提交于
      The Lenovo OneLink+ Dock contains an RTL8153 controller that behaves as
      a broken CDC device by default. Add the custom Lenovo PID to the r8152
      driver to support it properly.
      
      Also, systems compatible with this dock provide a BIOS option to enable
      MAC address passthrough (as per Lenovo document "ThinkPad Docking
      Solutions 2017"). Add the custom PID to the MAC passthrough list too.
      
      Tested on a ThinkPad 13 1st gen with the expected results:
      
      passthrough disabled: Invalid header when reading pass-thru MAC addr
      passthrough enabled:  Using pass-thru MAC addr XX:XX:XX:XX:XX:XX
      Signed-off-by: NJean-Francois Le Fillatre <jflf_kernel@gmx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      76d7df94
  12. 22 8月, 2022 2 次提交
  13. 20 7月, 2022 1 次提交
  14. 13 7月, 2022 1 次提交
  15. 20 5月, 2022 1 次提交
  16. 08 5月, 2022 1 次提交
  17. 06 5月, 2022 1 次提交
  18. 06 1月, 2022 1 次提交
  19. 24 12月, 2021 2 次提交
  20. 22 11月, 2021 1 次提交
  21. 17 11月, 2021 1 次提交
  22. 05 10月, 2021 2 次提交
  23. 02 10月, 2021 1 次提交
  24. 24 8月, 2021 1 次提交
  25. 19 8月, 2021 2 次提交
  26. 28 7月, 2021 1 次提交
    • A
      dev_ioctl: split out ndo_eth_ioctl · a7605370
      Arnd Bergmann 提交于
      Most users of ndo_do_ioctl are ethernet drivers that implement
      the MII commands SIOCGMIIPHY/SIOCGMIIREG/SIOCSMIIREG, or hardware
      timestamping with SIOCSHWTSTAMP/SIOCGHWTSTAMP.
      
      Separate these from the few drivers that use ndo_do_ioctl to
      implement SIOCBOND, SIOCBR and SIOCWANDEV commands.
      
      This is a purely cosmetic change intended to help readers find
      their way through the implementation.
      
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Vivien Didelot <vivien.didelot@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Vladimir Oltean <olteanv@gmail.com>
      Cc: Leon Romanovsky <leon@kernel.org>
      Cc: linux-rdma@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7605370
  27. 15 7月, 2021 2 次提交
  28. 18 6月, 2021 1 次提交
  29. 17 6月, 2021 1 次提交
  30. 02 6月, 2021 2 次提交