1. 18 10月, 2017 1 次提交
  2. 15 10月, 2017 1 次提交
  3. 01 10月, 2017 5 次提交
  4. 20 9月, 2017 3 次提交
  5. 29 8月, 2017 1 次提交
    • F
      net: dsa: Don't dereference dst->cpu_dp->netdev · c7848399
      Florian Fainelli 提交于
      If we do not have a master network device attached dst->cpu_dp will be
      NULL and accessing cpu_dp->netdev will create a trace similar to the one
      below. The correct check is on dst->cpu_dp period.
      
      [    1.004650] DSA: switch 0 0 parsed
      [    1.008078] Unable to handle kernel NULL pointer dereference at
      virtual address 00000010
      [    1.016195] pgd = c0003000
      [    1.018918] [00000010] *pgd=80000000004003, *pmd=00000000
      [    1.024349] Internal error: Oops: 206 [#1] SMP ARM
      [    1.029157] Modules linked in:
      [    1.032228] CPU: 0 PID: 1 Comm: swapper/0 Not tainted
      4.13.0-rc6-00071-g45b45afab9bd-dirty #7
      [    1.040772] Hardware name: Broadcom STB (Flattened Device Tree)
      [    1.046704] task: ee08f840 task.stack: ee090000
      [    1.051258] PC is at dsa_register_switch+0x5e0/0x9dc
      [    1.056234] LR is at dsa_register_switch+0x5d0/0x9dc
      [    1.061211] pc : [<c08fb28c>]    lr : [<c08fb27c>]    psr: 60000213
      [    1.067491] sp : ee091d88  ip : 00000000  fp : 0000000c
      [    1.072728] r10: 00000000  r9 : 00000001  r8 : ee208010
      [    1.077965] r7 : ee2b57b0  r6 : ee2b5780  r5 : 00000000  r4 :
      ee208e0c
      [    1.084506] r3 : 00000000  r2 : 00040d00  r1 : 2d1b2000  r0 :
      00000016
      [    1.091050] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
      Segment user
      [    1.098199] Control: 32c5387d  Table: 00003000  DAC: fffffffd
      [    1.103957] Process swapper/0 (pid: 1, stack limit = 0xee090210)
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Fixes: 6d3c8c0d ("net: dsa: Remove master_netdev and use dst->cpu_dp->netdev")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7848399
  6. 08 8月, 2017 2 次提交
  7. 25 7月, 2017 1 次提交
  8. 16 6月, 2017 1 次提交
  9. 14 6月, 2017 2 次提交
  10. 05 6月, 2017 4 次提交
  11. 02 6月, 2017 1 次提交
  12. 01 6月, 2017 1 次提交
  13. 18 5月, 2017 2 次提交
  14. 29 3月, 2017 2 次提交
  15. 09 2月, 2017 1 次提交
  16. 07 2月, 2017 2 次提交
    • F
      net: dsa: Add support for platform data · 71e0bbde
      Florian Fainelli 提交于
      Allow drivers to use the new DSA API with platform data. Most of the
      code in net/dsa/dsa2.c does not rely so much on device_nodes and can get
      the same information from platform_data instead.
      
      We purposely do not support distributed configurations with platform
      data, so drivers should be providing a pointer to a 'struct
      dsa_chip_data' structure if they wish to communicate per-port layout.
      
      Multiple CPUs port could potentially be supported and dsa_chip_data is
      extended to receive up to one reference to an upstream network device
      per port described by a dsa_chip_data structure.
      
      dsa_dev_to_net_device() increments the network device's reference count,
      so we intentionally call dev_put() to be consistent with the DT-enabled
      path, until we have a generic notifier based solution.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      71e0bbde
    • V
      net: dsa: add switch notifier · f515f192
      Vivien Didelot 提交于
      Add a notifier block per DSA switch, registered against a notifier head
      in the switch fabric they belong to.
      
      This infrastructure will allow to propagate fabric-wide events such as
      port bridging, VLAN configuration, etc. If a DSA switch driver cares
      about cross-chip configuration, such events can be caught.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f515f192
  17. 30 1月, 2017 3 次提交
  18. 27 1月, 2017 4 次提交
  19. 19 1月, 2017 2 次提交
  20. 11 1月, 2017 1 次提交
    • V
      net: dsa: make "label" property optional for dsa2 · 9f91484f
      Vivien Didelot 提交于
      In the new DTS bindings for DSA (dsa2), the "ethernet" and "link"
      phandles are respectively mandatory and exclusive to CPU port and DSA
      link device tree nodes.
      
      Simplify dsa2.c a bit by checking the presence of such phandle instead
      of checking the redundant "label" property.
      
      Then the Linux philosophy for Ethernet switch ports is to expose them to
      userspace as standard NICs by default. Thus use the standard enumerated
      "eth%d" device name if no "label" property is provided for a user port.
      This allows to save DTS files from subjective net device names.
      
      If one wants to rename an interface, udev rules can be used as usual.
      
      Of course the current behavior is unchanged, and the optional "label"
      property for user ports has precedence over the enumerated name.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Acked-by: NUwe Kleine-König <uwe@kleine-koenig.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9f91484f