1. 12 Dec, 2015 5 commits
    • Hariprasad Shenai's avatar
      cxgb4: Handle clip return values · eb72f74f
      Hariprasad Shenai authored
      Add a warn message when clip table overflows. If clip table isn't
      allocated, return from cxgb4_clip_release() to avoid panic.
      Disable offload if clip isn't enabled in the hardware.
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb72f74f
    • Dan Carpenter's avatar
      mlxsw: core: remove an unneeded condition · 515123e2
      Dan Carpenter authored
      We already know "err" is zero so there is no need to check.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      515123e2
    • Dan Carpenter's avatar
      mlxsw: spectrum: fix some error handling · 82a06429
      Dan Carpenter authored
      The "err = " assignment is missing here.
      
      Fixes: 0d65fc13 ('mlxsw: spectrum: Implement LAG port join/leave')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82a06429
    • Arnd Bergmann's avatar
      netcp: add more __le32 annotations · 9dd2d6c5
      Arnd Bergmann authored
      The handling of epib and psdata remains a bit unclear in the driver,
      as we access the same fields both as CPU-endian and through DMA
      from the device.
      
      Sparse warns about this:
      ti/netcp_core.c:1147:21: warning: incorrect type in assignment (different base types)
      ti/netcp_core.c:1147:21:    expected unsigned int [usertype] *[assigned] epib
      ti/netcp_core.c:1147:21:    got restricted __le32 *<noident>
      
      This uses __le32 types in a few places and uses __force where the code
      looks fishy. The previous patch should really have produced the correct
      behavior, but this second patch is needed to shut up the warnings about
      it. Ideally it would be slightly rewritten to not need those casts,
      but I don't dare do that without access to the hardware for proper
      testing.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9dd2d6c5
    • Arnd Bergmann's avatar
      netcp: try to reduce type confusion in descriptors · 89907779
      Arnd Bergmann authored
      The netcp driver produces tons of warnings when CONFIG_LPAE is enabled
      on ARM:
      
      drivers/net/ethernet/ti/netcp_core.c: In function 'netcp_tx_map_skb':
      drivers/net/ethernet/ti/netcp_core.c:1084:13: warning: passing argument 1 of 'set_words' from incompatible pointer type [-Wincompatible-pointer-types]
      
      This is the result of trying to pass a pointer to a dma_addr_t to
      a function that expects a u32 pointer to copy that into a DMA descriptor.
      
      Looking at that code in more detail to fix the warnings, I see multiple
      related problems:
      
      * The conversion functions are not endian-safe, as the DMA descriptors
        are almost certainly fixed-endian, but the CPU is not.
      
      * On 64-bit machines, passing a pointer through a u32 variable is a
        bug, accessing an indirect pointer as a u32 pointer even more so.
      
      * The handling of epib and psdata mixes native-endian and device-endian
        data.
      
      In this patch, I try to sort out the types for most accesses here,
      adding le32_to_cpu/cpu_to_le32 where appropriate, and passing pointers
      through two 32-bit words in the descriptor padding, to make it plausible
      that the driver does the right thing if compiled for big-endian or
      64-bit systems.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      89907779
  2. 09 Dec, 2015 24 commits
  3. 08 Dec, 2015 2 commits
  4. 07 Dec, 2015 9 commits