1. 04 8月, 2020 1 次提交
  2. 21 7月, 2020 1 次提交
  3. 23 6月, 2020 3 次提交
  4. 05 6月, 2020 1 次提交
    • M
      net: dsa: qca8k: Fix "Unexpected gfp" kernel exception · 67122a79
      Michal Vokáč 提交于
      Commit 7e99e347 ("net: dsa: remove dsa_switch_alloc helper")
      replaced the dsa_switch_alloc helper by devm_kzalloc in all DSA
      drivers. Unfortunately it introduced a typo in qca8k.c driver and
      wrong argument is passed to the devm_kzalloc function.
      
      This fix mitigates the following kernel exception:
      
        Unexpected gfp: 0x6 (__GFP_HIGHMEM|GFP_DMA32). Fixing up to gfp: 0x101 (GFP_DMA|__GFP_ZERO). Fix your code!
        CPU: 1 PID: 44 Comm: kworker/1:1 Not tainted 5.5.9-yocto-ua #1
        Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
        Workqueue: events deferred_probe_work_func
        [<c0014924>] (unwind_backtrace) from [<c00123bc>] (show_stack+0x10/0x14)
        [<c00123bc>] (show_stack) from [<c04c8fb4>] (dump_stack+0x90/0xa4)
        [<c04c8fb4>] (dump_stack) from [<c00e1b10>] (new_slab+0x20c/0x214)
        [<c00e1b10>] (new_slab) from [<c00e1cd0>] (___slab_alloc.constprop.0+0x1b8/0x540)
        [<c00e1cd0>] (___slab_alloc.constprop.0) from [<c00e2074>] (__slab_alloc.constprop.0+0x1c/0x24)
        [<c00e2074>] (__slab_alloc.constprop.0) from [<c00e4538>] (__kmalloc_track_caller+0x1b0/0x298)
        [<c00e4538>] (__kmalloc_track_caller) from [<c02cccac>] (devm_kmalloc+0x24/0x70)
        [<c02cccac>] (devm_kmalloc) from [<c030d888>] (qca8k_sw_probe+0x94/0x1ac)
        [<c030d888>] (qca8k_sw_probe) from [<c0304788>] (mdio_probe+0x30/0x54)
        [<c0304788>] (mdio_probe) from [<c02c93bc>] (really_probe+0x1e0/0x348)
        [<c02c93bc>] (really_probe) from [<c02c9884>] (driver_probe_device+0x60/0x16c)
        [<c02c9884>] (driver_probe_device) from [<c02c7fb0>] (bus_for_each_drv+0x70/0x94)
        [<c02c7fb0>] (bus_for_each_drv) from [<c02c9708>] (__device_attach+0xb4/0x11c)
        [<c02c9708>] (__device_attach) from [<c02c8148>] (bus_probe_device+0x84/0x8c)
        [<c02c8148>] (bus_probe_device) from [<c02c8cec>] (deferred_probe_work_func+0x64/0x90)
        [<c02c8cec>] (deferred_probe_work_func) from [<c0033c14>] (process_one_work+0x1d4/0x41c)
        [<c0033c14>] (process_one_work) from [<c00340a4>] (worker_thread+0x248/0x528)
        [<c00340a4>] (worker_thread) from [<c0039148>] (kthread+0x124/0x150)
        [<c0039148>] (kthread) from [<c00090d8>] (ret_from_fork+0x14/0x3c)
        Exception stack(0xee1b5fb0 to 0xee1b5ff8)
        5fa0:                                     00000000 00000000 00000000 00000000
        5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
        5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
        qca8k 2188000.ethernet-1:0a: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
        qca8k 2188000.ethernet-1:0a eth2 (uninitialized): PHY [2188000.ethernet-1:01] driver [Generic PHY]
        qca8k 2188000.ethernet-1:0a eth1 (uninitialized): PHY [2188000.ethernet-1:02] driver [Generic PHY]
      
      Fixes: 7e99e347 ("net: dsa: remove dsa_switch_alloc helper")
      Signed-off-by: NMichal Vokáč <michal.vokac@ysoft.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67122a79
  5. 09 1月, 2020 1 次提交
    • 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
  6. 05 11月, 2019 1 次提交
    • A
      net: of_get_phy_mode: Change API to solve int/unit warnings · 0c65b2b9
      Andrew Lunn 提交于
      Before this change of_get_phy_mode() returned an enum,
      phy_interface_t. On error, -ENODEV etc, is returned. If the result of
      the function is stored in a variable of type phy_interface_t, and the
      compiler has decided to represent this as an unsigned int, comparision
      with -ENODEV etc, is a signed vs unsigned comparision.
      
      Fix this problem by changing the API. Make the function return an
      error, or 0 on success, and pass a pointer, of type phy_interface_t,
      where the phy mode should be stored.
      
      v2:
      Return with *interface set to PHY_INTERFACE_MODE_NA on error.
      Add error checks to all users of of_get_phy_mode()
      Fixup a few reverse christmas tree errors
      Fixup a few slightly malformed reverse christmas trees
      
      v3:
      Fix 0-day reported errors.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c65b2b9
  7. 29 10月, 2019 1 次提交
  8. 23 10月, 2019 2 次提交
  9. 01 10月, 2019 1 次提交
  10. 27 9月, 2019 1 次提交
  11. 07 8月, 2019 1 次提交
    • N
      net: dsa: qca8k: Add of_node_put() in qca8k_setup_mdio_bus() · f26e0cca
      Nishka Dasgupta 提交于
      Each iteration of for_each_available_child_of_node() puts the previous
      node, but in the case of a return from the middle of the loop, there
      is no put, thus causing a memory leak. Hence add an of_node_put() before
      the return.
      Additionally, the local variable ports in the function
      qca8k_setup_mdio_bus() takes the return value of of_get_child_by_name(),
      which gets a node but does not put it. If the function returns without
      putting ports, it may cause a memory leak. Hence put ports before the
      mid-loop return statement, and also outside the loop after its last usage
      in this function.
      Issues found with Coccinelle.
      Signed-off-by: NNishka Dasgupta <nishkadg.linux@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f26e0cca
  12. 31 7月, 2019 1 次提交
  13. 13 7月, 2019 1 次提交
  14. 28 6月, 2019 1 次提交
  15. 27 3月, 2019 2 次提交
  16. 25 2月, 2019 1 次提交
  17. 20 2月, 2019 1 次提交
  18. 23 1月, 2019 1 次提交
  19. 22 10月, 2018 1 次提交
  20. 24 5月, 2018 6 次提交
  21. 27 4月, 2018 1 次提交
  22. 05 3月, 2018 1 次提交
  23. 13 11月, 2017 1 次提交
  24. 27 10月, 2017 2 次提交
  25. 18 10月, 2017 1 次提交
  26. 22 9月, 2017 1 次提交
  27. 30 8月, 2017 1 次提交
  28. 08 8月, 2017 3 次提交