1. 11 Jan, 2023 12 commits
  2. 10 Jan, 2023 23 commits
  3. 09 Jan, 2023 5 commits
    • Jakub Kicinski's avatar
      net: skb: remove old comments about frag_size for build_skb() · 12c1604a
      Jakub Kicinski authored
      Since commit ce098da1 ("skbuff: Introduce slab_build_skb()")
      drivers trying to build skb around slab-backed buffers should
      go via slab_build_skb() rather than passing frag_size = 0 to
      the main build_skb().
      
      Remove the copy'n'pasted comments about 0 meaning slab.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12c1604a
    • David S. Miller's avatar
      Merge branch 'r8152-NCM-firmwares' · 0fd43d0c
      David S. Miller authored
      Bjørn Mork says:
      
      ====================
      r8152: allow firmwares with NCM support
      
      Some device and firmware combinations with NCM support will
      end up using the cdc_ncm driver by default.  This is sub-
      optimal for the same reasons we've previously accepted the
      blacklist hack in cdc_ether.
      
      The recent support for subclassing the generic USB device
      driver allows us to create a very slim driver with the same
      functionality.  This patch set uses that to implement a
      device specific configuration default which is independent
      of any USB interface drivers.  This means that it works
      equally whether the device initially ends up in NCM or ECM
      mode, without depending on any code in the respective class
      drivers.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fd43d0c
    • Bjørn Mork's avatar
      cdc_ether: no need to blacklist any r8152 devices · 69649ef8
      Bjørn Mork authored
      The r8152 driver does not need this anymore.
      
      Dropping blacklist entries adds optional support for these
      devices in ECM mode.
      
      The 8153 devices are handled by the r8153_ecm driver when
      in ECM mode, and must still be blacklisted here.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69649ef8
    • Bjørn Mork's avatar
      r8152: add USB device driver for config selection · ec51fbd1
      Bjørn Mork authored
      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: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec51fbd1
    • David S. Miller's avatar
      Merge branch 'mptcp-next' · 762405e3
      David S. Miller authored
      Mat Martineau says:
      
      ====================
      mptcp: Protocol in-use tracking and code cleanup
      
      Here's a collection of commits from the MPTCP tree:
      
      Patches 1-4 and 6 contain miscellaneous code cleanup for more consistent
      use of helper functions, existing local variables, and better naming.
      
      Patches 5, 7, and 9 add sock_prot_inuse tracking for MPTCP and an
      associated self test.
      
      Patch 8 modifies the mptcp_connect self test tool to exit on SIGUSR1
      when in "slow mode".
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      762405e3