1. 10 1月, 2020 25 次提交
  2. 09 1月, 2020 15 次提交
    • R
      HID: steam: Fix input device disappearing · 20eee6e5
      Rodrigo Rivas Costa 提交于
      The `connected` value for wired devices was not properly initialized,
      it must be set to `true` upon creation, because wired devices do not
      generate connection events.
      
      When a raw client (the Steam Client) uses the device, the input device
      is destroyed. Then, when the raw client finishes, it must be recreated.
      But since the `connected` variable was false this never happended.
      Signed-off-by: NRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      20eee6e5
    • Y
      vmxnet3: Remove always false conditional statement · 4a4a52d4
      yuehaibing 提交于
      param->rx_mini_pending is __u32 variable, it will never
      be less than zero.
      Signed-off-by: Nyuehaibing <yuehaibing@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a4a52d4
    • A
      netronome: fix ipv6 link error · ea217e87
      Arnd Bergmann 提交于
      When the driver is built-in but ipv6 is a module, the flower
      support produces a link error:
      
      drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.o: In function `nfp_tunnel_keep_alive_v6':
      tunnel_conf.c:(.text+0x2aa8): undefined reference to `nd_tbl'
      
      Add a Kconfig dependency to avoid that configuration.
      
      Fixes: 9ea9bfa1 ("nfp: flower: support ipv6 tunnel keep-alive messages from fw")
      Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea217e87
    • A
      net: dsa: felix: fix link error · 112463dd
      Arnd Bergmann 提交于
      When the enetc driver is disabled, the mdio support fails to
      get built:
      
      drivers/net/dsa/ocelot/felix_vsc9959.o: In function `vsc9959_mdio_bus_alloc':
      felix_vsc9959.c:(.text+0x19c): undefined reference to `enetc_hw_alloc'
      felix_vsc9959.c:(.text+0x1d1): undefined reference to `enetc_mdio_read'
      felix_vsc9959.c:(.text+0x1d8): undefined reference to `enetc_mdio_write'
      
      Change the Makefile to enter the subdirectory for this as well.
      
      Fixes: bdeced75 ("net: dsa: felix: Add PCS operations for PHYLINK")
      Fixes: 6517798d ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      112463dd
    • H
      r8169: add constant EnAnaPLL · 09e65335
      Heiner Kallweit 提交于
      Use constant EnAnaPLL for bit 14 as in vendor driver. The vendor
      driver sets this bit for chip version 02 only, but I'm not aware of
      any issues, so better leave it as it is.
      In addition remove the useless debug message.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09e65335
    • D
      ethtool: potential NULL dereference in strset_prepare_data() · ac9c41d5
      Dan Carpenter 提交于
      Smatch complains that the NULL checking isn't done consistently:
      
          net/ethtool/strset.c:253 strset_prepare_data()
          error: we previously assumed 'dev' could be null (see line 233)
      
      It looks like there is a missing return on this path.
      
      Fixes: 71921690 ("ethtool: provide string sets with STRSET_GET request")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac9c41d5
    • D
      ethtool: fix ->reply_size() error handling · d97772db
      Dan Carpenter 提交于
      The "ret < 0" comparison is never true because "ret" is still zero.
      
      Fixes: 728480f1 ("ethtool: default handlers for GET requests")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d97772db
    • D
      ethtool: fix a memory leak in ethnl_default_start() · a6dd0480
      Dan Carpenter 提交于
      If ethnl_default_parse() fails then we need to free a couple
      memory allocations before returning.
      
      Fixes: 728480f1 ("ethtool: default handlers for GET requests")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6dd0480
    • D
      Merge branch 'Broadcom-tags-support-for-531x5-539x-families' · 78b6d073
      David S. Miller 提交于
      Florian Fainelli says:
      
      ====================
      Broadcom tags support for 531x5/539x families
      
      This patch series finally allows us to enable Broadcom tags on the
      BCM531x5/BCM539x switch series which are very often cascaded onto
      another on-chip Broadcom switch. Because of that we need to be able to
      detect that Broadcom tags are already enabled on our DSA master which
      happens to be a DSA slave in that case since they are not part of the
      same DSA switch tree, the protocol does not support that.
      
      Due to the way DSA works, get_tag_protocol() is called prior to
      ds->ops->setup and we do not have all data structures set-up (in
      particular dsa_port::cpu_dp is not filed yet) so doing this at the time
      get_tag_protocol() is called and without exporting a helper function is
      desirable to limit our footprint into the framework.
      
      Having the core (net/dsa/dsa2.c) return and enforce DSA_TAG_PROTO_NONE
      was considered and done initially but this leaves the driver outside of
      the decision to force/fallback to a particular protocol, instead of
      letting it in control. Also there is no reason to suspect that all
      tagging protocols are problematic, e.g.: "inner" Marvell EDSA with
      "outer" Broadcom tag may work just fine, and vice versa.
      
      This was tested on:
      
      - Lamobo R1 which now has working Broadcom tags for its external BCM53125 switch
      - BCM7445 which has a BCM53125 hanging off one of its internal switch
        port, the BCM53125 still works with DSA_TAG_PROTO_NONE
      - BCM7278 which has a peculiar dual CPU port set-up (so dual IMP mode
        needs to be enabled)
      - Northstar Plus with DSA_TAG_PROTO_BRCM_PREPEND and no external
        switches hanging off the internal switch
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      78b6d073
    • F
      net: dsa: b53: Enable Broadcom tags for 531x5/539x families · 8fab459e
      Florian Fainelli 提交于
      The BCM531x5 and BCM539x families require that the IMP port be enabled
      within the management page and that management mode (SM_SW_FWD_MODE) be
      turned on. Once this is done, everything works as expected, including
      multicast with standalone DSA devices or bridge devices.
      
      Because such switches are frequencly cascaded with other internal
      Broadcom switches on which we want to enable Broadcom tags, update
      b53_can_enable_brcm_tags() to check the kind of DSA master tagging
      protocol being used, if it is one of the two supported Broadcom tagging
      protocols, force DSA_TAG_PROTO_NONE.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8fab459e
    • F
      net: dsa: Get information about stacked DSA protocol · 4d776482
      Florian Fainelli 提交于
      It is possible to stack multiple DSA switches in a way that they are not
      part of the tree (disjoint) but the DSA master of a switch is a DSA
      slave of another. When that happens switch drivers may have to know this
      is the case so as to determine whether their tagging protocol has a
      remove chance of working.
      
      This is useful for specific switch drivers such as b53 where devices
      have been known to be stacked in the wild without the Broadcom tag
      protocol supporting that feature. This allows b53 to continue supporting
      those devices by forcing the disabling of Broadcom tags on the outermost
      switches if necessary.
      
      The get_tag_protocol() function is therefore updated to gain an
      additional enum dsa_tag_protocol argument which denotes the current
      tagging protocol used by the DSA master we are attached to, else
      DSA_TAG_PROTO_NONE for the top of the dsa_switch_tree.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d776482
    • T
      tipc: fix wrong connect() return code · 9546a0b7
      Tuong Lien 提交于
      The current 'tipc_wait_for_connect()' function does a wait-loop for the
      condition 'sk->sk_state != TIPC_CONNECTING' to conclude if the socket
      connecting has done. However, when the condition is met, it returns '0'
      even in the case the connecting is actually failed, the socket state is
      set to 'TIPC_DISCONNECTING' (e.g. when the server socket has closed..).
      This results in a wrong return code for the 'connect()' call from user,
      making it believe that the connection is established and go ahead with
      building, sending a message, etc. but finally failed e.g. '-EPIPE'.
      
      This commit fixes the issue by changing the wait condition to the
      'tipc_sk_connected(sk)', so the function will return '0' only when the
      connection is really established. Otherwise, either the socket 'sk_err'
      if any or '-ETIMEDOUT'/'-EINTR' will be returned correspondingly.
      Acked-by: NYing Xue <ying.xue@windriver.com>
      Acked-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NTuong Lien <tuong.t.lien@dektech.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9546a0b7
    • T
      tipc: fix link overflow issue at socket shutdown · 49afb806
      Tuong Lien 提交于
      When a socket is suddenly shutdown or released, it will reject all the
      unreceived messages in its receive queue. This applies to a connected
      socket too, whereas there is only one 'FIN' message required to be sent
      back to its peer in this case.
      
      In case there are many messages in the queue and/or some connections
      with such messages are shutdown at the same time, the link layer will
      easily get overflowed at the 'TIPC_SYSTEM_IMPORTANCE' backlog level
      because of the message rejections. As a result, the link will be taken
      down. Moreover, immediately when the link is re-established, the socket
      layer can continue to reject the messages and the same issue happens...
      
      The commit refactors the '__tipc_shutdown()' function to only send one
      'FIN' in the situation mentioned above. For the connectionless case, it
      is unavoidable but usually there is no rejections for such socket
      messages because they are 'dest-droppable' by default.
      
      In addition, the new code makes the other socket states clear
      (e.g.'TIPC_LISTEN') and treats as a separate case to avoid misbehaving.
      Acked-by: NYing Xue <ying.xue@windriver.com>
      Acked-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NTuong Lien <tuong.t.lien@dektech.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49afb806
    • D
      Merge branch 'Devlink-notification-after-recovery-complete-by-bnxt_en-driver' · 8d2ff126
      David S. Miller 提交于
      Vikas Gupta says:
      
      ====================
      Devlink notification after recovery complete by bnxt_en driver
      
       This patchset adds following feature in devlink
        1) Recovery complete direct call API to be used by drivers when it
           successfully completes. It is required as recovery triggered by
           devlink may return with EINPROGRESS and eventually recovery
           completes in different context.
        2) A notification when health status is updated by reporter.
      
       Patchset also contains required changes in bnxt_en driver to
       mark recovery in progress when recovery is triggered from kernel
       devlink.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d2ff126
    • V
      bnxt_en: Call recovery done after reset is successfully done · 737d7a6c
      Vikas Gupta 提交于
      Return EINPROGRESS to devlink health reporter recover as we are not yet
      done and call devlink_health_reporter_recovery_done once reset is
      successfully completed from workqueue context.
      Signed-off-by: NVikas Gupta <vikas.gupta@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      737d7a6c