Skip to content
  1. Nov 16, 2021
  2. Nov 15, 2021
    • Jakub Kicinski's avatar
      Revert "Merge branch 'mctp-i2c-driver'" · 2f6a470d
      Jakub Kicinski authored
      This reverts commit 71812af7, reversing
      changes made to cc0be1ad.
      
      Wolfram Sang says:
      
      Please revert. Besides the driver in net, it modifies the I2C core
      code. This has not been acked by the I2C maintainer (in this case me).
      So, please don't pull this in via the net tree. The question raised here
      (extending SMBus calls to 255 byte) is complicated because we need ABI
      backwards compatibility.
      
      Link: https://lore.kernel.org/all/YZJ9H4eM%2FM7OXVN0@shikoro/
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2f6a470d
    • David S. Miller's avatar
      Merge branch 'generic-phylink-validation' · 6d3b1b06
      David S. Miller authored
      
      
      Russell King says:
      
      ====================
      introduce generic phylink validation
      
      The various validate method implementations we have in phylink users
      have been quite repetitive but also prone to bugs. These patches
      introduce a generic implementation which relies solely on the
      supported_interfaces bitmap introduced during last cycle, and in the
      first patch, a bit array of MAC capabilities.
      
      MAC drivers are free to continue to do their own thing if they have
      special requirements - such as mvneta and mvpp2 which do not support
      1000base-X without AN enabled. Most implementations currently in the
      kernel can be converted to call phylink_generic_validate() directly
      from the phylink MAC operations structure once they fill in the
      supported_interfaces and mac_capabilities members of phylink_config.
      
      This series introduces the generic implementation, and converts mvneta
      and mvpp2 to use it.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d3b1b06
    • Russell King (Oracle)'s avatar
      net: mvpp2: use phylink_generic_validate() · 5038ffea
      Russell King (Oracle) authored
      
      
      Convert mvpp2 to use phylink_generic_validate() for the bulk of its
      validate() implementation. This network adapter has a restriction
      that for 802.3z links, autonegotiation must be enabled.
      
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5038ffea
    • Russell King (Oracle)'s avatar
      net: mvneta: use phylink_generic_validate() · 02a0988b
      Russell King (Oracle) authored
      
      
      Convert mvneta to use phylink_generic_validate() for the bulk of its
      validate() implementation. This network adapter has a restriction
      that for 802.3z links, autonegotiation must be enabled.
      
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      02a0988b
    • Russell King (Oracle)'s avatar
      net: phylink: add generic validate implementation · 34ae2c09
      Russell King (Oracle) authored
      
      
      Add a generic validate() implementation using the supported_interfaces
      and a bitmask of MAC pause/speed/duplex capabilities. This allows us
      to entirely eliminate many driver private validate() implementations.
      
      We expose the underlying phylink_get_linkmodes() function so that
      drivers which have special needs can still benefit from conversion.
      
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34ae2c09
    • Christophe Leroy's avatar
      net/wan/fsl_ucc_hdlc: fix sparse warnings · 5cf46d8e
      Christophe Leroy authored
      
      
      CHECK   drivers/net/wan/fsl_ucc_hdlc.c
      drivers/net/wan/fsl_ucc_hdlc.c:309:57: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:309:57:    expected void [noderef] __iomem *
      drivers/net/wan/fsl_ucc_hdlc.c:309:57:    got restricted __be16 *
      drivers/net/wan/fsl_ucc_hdlc.c:311:46: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:311:46:    expected void [noderef] __iomem *
      drivers/net/wan/fsl_ucc_hdlc.c:311:46:    got restricted __be32 *
      drivers/net/wan/fsl_ucc_hdlc.c:320:57: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:320:57:    expected void [noderef] __iomem *
      drivers/net/wan/fsl_ucc_hdlc.c:320:57:    got restricted __be16 *
      drivers/net/wan/fsl_ucc_hdlc.c:322:46: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:322:46:    expected void [noderef] __iomem *
      drivers/net/wan/fsl_ucc_hdlc.c:322:46:    got restricted __be32 *
      drivers/net/wan/fsl_ucc_hdlc.c:372:29: warning: incorrect type in assignment (different base types)
      drivers/net/wan/fsl_ucc_hdlc.c:372:29:    expected unsigned short [usertype]
      drivers/net/wan/fsl_ucc_hdlc.c:372:29:    got restricted __be16 [usertype]
      drivers/net/wan/fsl_ucc_hdlc.c:379:36: warning: restricted __be16 degrades to integer
      drivers/net/wan/fsl_ucc_hdlc.c:402:12: warning: incorrect type in assignment (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:402:12:    expected struct qe_bd [noderef] __iomem *bd
      drivers/net/wan/fsl_ucc_hdlc.c:402:12:    got struct qe_bd *curtx_bd
      drivers/net/wan/fsl_ucc_hdlc.c:425:20: warning: incorrect type in assignment (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:425:20:    expected struct qe_bd [noderef] __iomem *[assigned] bd
      drivers/net/wan/fsl_ucc_hdlc.c:425:20:    got struct qe_bd *tx_bd_base
      drivers/net/wan/fsl_ucc_hdlc.c:427:16: error: incompatible types in comparison expression (different address spaces):
      drivers/net/wan/fsl_ucc_hdlc.c:427:16:    struct qe_bd [noderef] __iomem *
      drivers/net/wan/fsl_ucc_hdlc.c:427:16:    struct qe_bd *
      drivers/net/wan/fsl_ucc_hdlc.c:462:33: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:506:41: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:528:33: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:552:38: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:596:67: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:611:41: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:851:38: warning: incorrect type in initializer (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:854:40: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:855:40: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:858:39: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:861:37: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:866:38: warning: incorrect type in initializer (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:868:21: warning: incorrect type in argument 1 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:870:40: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:871:40: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:873:39: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:993:57: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:995:46: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:1004:57: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:1006:46: warning: incorrect type in argument 2 (different address spaces)
      drivers/net/wan/fsl_ucc_hdlc.c:412:35: warning: dereference of noderef expression
      drivers/net/wan/fsl_ucc_hdlc.c:412:35: warning: dereference of noderef expression
      drivers/net/wan/fsl_ucc_hdlc.c:724:29: warning: dereference of noderef expression
      drivers/net/wan/fsl_ucc_hdlc.c:815:21: warning: dereference of noderef expression
      drivers/net/wan/fsl_ucc_hdlc.c:1021:29: warning: dereference of noderef expression
      
      Most of the warnings are due to DMA memory being incorrectly handled as IO memory.
      Fix it by doing direct read/write and doing proper dma_rmb() / dma_wmb().
      
      Other problems are type mismatches or lack of use of IO accessors.
      
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Link: https://lkml.org/lkml/2021/11/12/647
      
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5cf46d8e
    • Yihao Han's avatar
      net: fddi: use swap() to make code cleaner · 311107bd
      Yihao Han authored
      
      
      Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
      opencoding it.
      
      Signed-off-by: default avatarYihao Han <hanyihao@vivo.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      311107bd