1. 03 7月, 2016 2 次提交
  2. 29 6月, 2016 1 次提交
  3. 28 6月, 2016 12 次提交
  4. 24 6月, 2016 1 次提交
  5. 18 6月, 2016 1 次提交
    • I
      net: ethernet: ti: cpsw: remove rx_descs property · 1793331e
      Ivan Khoronzhuk 提交于
      There is no reason in rx_descs property because davinici_cpdma
      driver splits pool of descriptors equally between tx and rx channels.
      That is, if number of descriptors 256, 128 of them are for rx
      channels. While receiving, the descriptor is freed to the pool and
      then allocated with new skb. And if in DT the "rx_descs" is set to
      64, then 128 - 64 = 64 descriptors are always in the pool and cannot
      be used, for tx, for instance. It's not correct resource usage,
      better to set it to half of pool, then the rx pool can be used in
      full. It will not have any impact on performance, as anyway, the
      "redundant" descriptors were unused.
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1793331e
  6. 17 6月, 2016 1 次提交
    • A
      net: tlan: don't set unused function argument · 40309d26
      Arnd Bergmann 提交于
      We get a warning for tlan_handle_tx_eoc when building with "make W=1"
      
      drivers/net/ethernet/ti/tlan.c: In function 'tlan_handle_tx_eoc':
      drivers/net/ethernet/ti/tlan.c:1647:59: error: parameter 'host_int' set but not used [-Werror=unused-but-set-parameter]
       static u32 tlan_handle_tx_eoc(struct net_device *dev, u16 host_int)
      
      This is harmless, but removing the unused assignment lets us avoid
      the warning with no downside.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      40309d26
  7. 13 6月, 2016 1 次提交
  8. 04 6月, 2016 2 次提交
  9. 05 5月, 2016 1 次提交
  10. 29 4月, 2016 5 次提交
  11. 22 4月, 2016 3 次提交
    • N
      net: ethernet: davinci_emac: Fix platform_data overwrite · 210990b0
      Neil Armstrong 提交于
      When the DaVinci emac driver is removed and re-probed, the actual
      pdev->dev.platform_data is populated with an unwanted valid pointer saved by
      the previous davinci_emac_of_get_pdata() call, causing a kernel crash when
      calling priv->int_disable() in emac_int_disable().
      
      Unable to handle kernel paging request at virtual address c8622a80
      ...
      [<c0426fb4>] (emac_int_disable) from [<c0427700>] (emac_dev_open+0x290/0x5f8)
      [<c0427700>] (emac_dev_open) from [<c04c00ec>] (__dev_open+0xb8/0x120)
      [<c04c00ec>] (__dev_open) from [<c04c0370>] (__dev_change_flags+0x88/0x14c)
      [<c04c0370>] (__dev_change_flags) from [<c04c044c>] (dev_change_flags+0x18/0x48)
      [<c04c044c>] (dev_change_flags) from [<c052bafc>] (devinet_ioctl+0x6b4/0x7ac)
      [<c052bafc>] (devinet_ioctl) from [<c04a1428>] (sock_ioctl+0x1d8/0x2c0)
      [<c04a1428>] (sock_ioctl) from [<c014f054>] (do_vfs_ioctl+0x41c/0x600)
      [<c014f054>] (do_vfs_ioctl) from [<c014f2a4>] (SyS_ioctl+0x6c/0x7c)
      [<c014f2a4>] (SyS_ioctl) from [<c000ff60>] (ret_fast_syscall+0x0/0x1c)
      
      Fixes: 42f59967 ("net: ethernet: davinci_emac: add OF support")
      Cc: Brian Hutchinson <b.hutchman@gmail.com>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      210990b0
    • N
      net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable · 99164f9e
      Neil Armstrong 提交于
      In order to avoid an Unbalanced pm_runtime_enable in the DaVinci
      emac driver when the device is removed and re-probed, and a
      pm_runtime_disable() call in davinci_emac_remove().
      
      Actually, using unbind/bind on a TI DM8168 SoC gives :
      $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/unbind
      net eth1: DaVinci EMAC: davinci_emac_remove()
      $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/bind
      davinci_emac 4a120000.ethernet: Unbalanced pm_runtime_enable
      
      Cc: Brian Hutchinson <b.hutchman@gmail.com>
      Fixes: 3ba97381 ("net: ethernet: davinci_emac: add pm_runtime support")
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      99164f9e
    • G
      drivers: net: cpsw: fix wrong regs access in cpsw_ndo_open · 3fa88c51
      Grygorii Strashko 提交于
      The cpsw_ndo_open() could try to access CPSW registers before
      calling pm_runtime_get_sync(). This will trigger L3 error:
      
       WARNING: CPU: 0 PID: 21 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x220/0x34c()
       44000000.ocp:L3 Custom Error: MASTER M2 (64-bit) TARGET L4_FAST (Idle): Data Access in Supervisor mode during Functional access
      
      and CPSW will stop functioning.
      
      Hence, fix it by moving pm_runtime_get_sync() before the first access
      to CPSW registers in cpsw_ndo_open().
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3fa88c51
  12. 21 4月, 2016 1 次提交
  13. 16 4月, 2016 1 次提交
    • A
      cpsw: Prevent NUll pointer dereference with two PHYs · cfe25560
      Andrew Goodbody 提交于
      Adding a 2nd PHY to cpsw results in a NULL pointer dereference
      as below. Fix by maintaining a reference to each PHY node in slave
      struct instead of a single reference in the priv struct which was
      overwritten by the 2nd PHY.
      
      [   17.870933] Unable to handle kernel NULL pointer dereference at virtual address 00000180
      [   17.879557] pgd = dc8bc000
      [   17.882514] [00000180] *pgd=9c882831, *pte=00000000, *ppte=00000000
      [   17.889213] Internal error: Oops: 17 [#1] ARM
      [   17.893838] Modules linked in:
      [   17.897102] CPU: 0 PID: 1657 Comm: connmand Not tainted 4.5.0-ge463dfb-dirty #11
      [   17.904947] Hardware name: Cambrionix whippet
      [   17.909576] task: dc859240 ti: dc968000 task.ti: dc968000
      [   17.915339] PC is at phy_attached_print+0x18/0x8c
      [   17.920339] LR is at phy_attached_info+0x14/0x18
      [   17.925247] pc : [<c042baec>]    lr : [<c042bb74>]    psr: 600f0113
      [   17.925247] sp : dc969cf8  ip : dc969d28  fp : dc969d18
      [   17.937425] r10: dda7a400  r9 : 00000000  r8 : 00000000
      [   17.942971] r7 : 00000001  r6 : ddb00480  r5 : ddb8cb34  r4 : 00000000
      [   17.949898] r3 : c0954cc0  r2 : c09562b0  r1 : 00000000  r0 : 00000000
      [   17.956829] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      [   17.964401] Control: 10c5387d  Table: 9c8bc019  DAC: 00000051
      [   17.970500] Process connmand (pid: 1657, stack limit = 0xdc968210)
      [   17.977059] Stack: (0xdc969cf8 to 0xdc96a000)
      [   17.981692] 9ce0:                                                       dc969d28 dc969d08
      [   17.990386] 9d00: c038f9bc c038f6b4 ddb00480 dc969d34 dc969d28 c042bb74 c042bae4 00000000
      [   17.999080] 9d20: c09562b0 c0954cc0 dc969d5c dc969d38 c043ebfc c042bb6c 00000007 00000003
      [   18.007773] 9d40: ddb00000 ddb8cb58 ddb00480 00000001 dc969dec dc969d60 c0441614 c043ea68
      [   18.016465] 9d60: 00000000 00000003 00000000 fffffff4 dc969df4 0000000d 00000000 00000000
      [   18.025159] 9d80: dc969db4 dc969d90 c005dc08 c05839e0 dc969df4 0000000d ddb00000 00001002
      [   18.033851] 9da0: 00000000 00000000 dc969dcc dc969db8 c005ddf4 c005dbc8 00000000 00000118
      [   18.042544] 9dc0: dc969dec dc969dd0 ddb00000 c06db27c ffff9003 00001002 00000000 00000000
      [   18.051237] 9de0: dc969e0c dc969df0 c057c88c c04410dc dc969e0c ddb00000 ddb00000 00000001
      [   18.059930] 9e00: dc969e34 dc969e10 c057cb44 c057c7d8 ddb00000 ddb00138 00001002 beaeda20
      [   18.068622] 9e20: 00000000 00000000 dc969e5c dc969e38 c057cc28 c057cac0 00000000 dc969e80
      [   18.077315] 9e40: dda7a40c beaeda20 00000000 00000000 dc969ecc dc969e60 c05e36d0 c057cc14
      [   18.086007] 9e60: dc969e84 00000051 beaeda20 00000000 dda7a40c 00000014 ddb00000 00008914
      [   18.094699] 9e80: 30687465 00000000 00000000 00000000 00009003 00000000 00000000 00000000
      [   18.103391] 9ea0: 00001002 00008914 dd257ae0 beaeda20 c098a428 beaeda20 00000011 00000000
      [   18.112084] 9ec0: dc969edc dc969ed0 c05e4e54 c05e3030 dc969efc dc969ee0 c055f5ac c05e4cc4
      [   18.120777] 9ee0: beaeda20 dd257ae0 dc8ab4c0 00008914 dc969f7c dc969f00 c010b388 c055f45c
      [   18.129471] 9f00: c071ca40 dd257ac0 c00165e8 dc968000 dc969f3c dc969f20 dc969f64 dc969f28
      [   18.138164] 9f20: c0115708 c0683ec8 dd257ac0 dd257ac0 dc969f74 dc969f40 c055f350 c00fc66c
      [   18.146857] 9f40: dd82e4d0 00000011 00000000 00080000 dd257ac0 00000000 dc8ab4c0 dc8ab4c0
      [   18.155550] 9f60: 00008914 beaeda20 00000011 00000000 dc969fa4 dc969f80 c010bc34 c010b2fc
      [   18.164242] 9f80: 00000000 00000011 00000002 00000036 c00165e8 dc968000 00000000 dc969fa8
      [   18.172935] 9fa0: c00163e0 c010bbcc 00000000 00000011 00000011 00008914 beaeda20 00009003
      [   18.181628] 9fc0: 00000000 00000011 00000002 00000036 00081018 00000001 00000000 beaedc10
      [   18.190320] 9fe0: 00083188 beaeda1c 00043a5d b6d29c0c 600b0010 00000011 00000000 00000000
      [   18.198989] Backtrace:
      [   18.201621] [<c042bad8>] (phy_attached_print) from [<c042bb74>] (phy_attached_info+0x14/0x18)
      [   18.210664]  r3:c0954cc0 r2:c09562b0 r1:00000000
      [   18.215588]  r4:ddb00480
      [   18.218322] [<c042bb60>] (phy_attached_info) from [<c043ebfc>] (cpsw_slave_open+0x1a0/0x280)
      [   18.227293] [<c043ea5c>] (cpsw_slave_open) from [<c0441614>] (cpsw_ndo_open+0x544/0x674)
      [   18.235874]  r7:00000001 r6:ddb00480 r5:ddb8cb58 r4:ddb00000
      [   18.241944] [<c04410d0>] (cpsw_ndo_open) from [<c057c88c>] (__dev_open+0xc0/0x128)
      [   18.249972]  r9:00000000 r8:00000000 r7:00001002 r6:ffff9003 r5:c06db27c r4:ddb00000
      [   18.258255] [<c057c7cc>] (__dev_open) from [<c057cb44>] (__dev_change_flags+0x90/0x154)
      [   18.266745]  r5:00000001 r4:ddb00000
      [   18.270575] [<c057cab4>] (__dev_change_flags) from [<c057cc28>] (dev_change_flags+0x20/0x50)
      [   18.279523]  r9:00000000 r8:00000000 r7:beaeda20 r6:00001002 r5:ddb00138 r4:ddb00000
      [   18.287811] [<c057cc08>] (dev_change_flags) from [<c05e36d0>] (devinet_ioctl+0x6ac/0x76c)
      [   18.296483]  r9:00000000 r8:00000000 r7:beaeda20 r6:dda7a40c r5:dc969e80 r4:00000000
      [   18.304762] [<c05e3024>] (devinet_ioctl) from [<c05e4e54>] (inet_ioctl+0x19c/0x1c8)
      [   18.312882]  r10:00000000 r9:00000011 r8:beaeda20 r7:c098a428 r6:beaeda20 r5:dd257ae0
      [   18.321235]  r4:00008914
      [   18.323956] [<c05e4cb8>] (inet_ioctl) from [<c055f5ac>] (sock_ioctl+0x15c/0x2d8)
      [   18.331829] [<c055f450>] (sock_ioctl) from [<c010b388>] (do_vfs_ioctl+0x98/0x8d0)
      [   18.339765]  r7:00008914 r6:dc8ab4c0 r5:dd257ae0 r4:beaeda20
      [   18.345822] [<c010b2f0>] (do_vfs_ioctl) from [<c010bc34>] (SyS_ioctl+0x74/0x84)
      [   18.353573]  r10:00000000 r9:00000011 r8:beaeda20 r7:00008914 r6:dc8ab4c0 r5:dc8ab4c0
      [   18.361924]  r4:00000000
      [   18.364653] [<c010bbc0>] (SyS_ioctl) from [<c00163e0>] (ret_fast_syscall+0x0/0x3c)
      [   18.372682]  r9:dc968000 r8:c00165e8 r7:00000036 r6:00000002 r5:00000011 r4:00000000
      [   18.380960] Code: e92dd810 e24cb010 e24dd010 e59b4004 (e5902180)
      [   18.387580] ---[ end trace c80529466223f3f3 ]---
      Signed-off-by: NAndrew Goodbody <andrew.goodbody@cambrionix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cfe25560
  14. 12 4月, 2016 2 次提交
  15. 04 3月, 2016 1 次提交
    • J
      net: relax setup_tc ndo op handle restriction · 5eb4dce3
      John Fastabend 提交于
      I added this check in setup_tc to multiple drivers,
      
       if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
      
      Unfortunately restricting to TC_H_ROOT like this breaks the old
      instantiation of mqprio to setup a hardware qdisc. This patch
      relaxes the test to only check the type to make it equivalent
      to the check before I broke it. With this the old instantiation
      continues to work.
      
      A good smoke test is to setup mqprio with,
      
      # tc qdisc add dev eth4 root mqprio num_tc 8 \
        map 0 1 2 3 4 5 6 7 \
        queues 0@0 1@1 2@2 3@3 4@4 5@5 6@6 7@7
      
      Fixes: e4c6734e ("net: rework ndo tc op to consume additional qdisc handle paramete")
      Reported-by: NSingh Krishneil <krishneil.k.singh@intel.com>
      Reported-by: NJake Keller <jacob.e.keller@intel.com>
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Shradha Shah <sshah@solarflare.com>
      CC: Or Gerlitz <ogerlitz@mellanox.com>
      CC: Ariel Elior <ariel.elior@qlogic.com>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: Bruce Allan <bruce.w.allan@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      CC: Don Skidmore <donald.c.skidmore@intel.com>
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5eb4dce3
  16. 23 2月, 2016 1 次提交
    • S
      netcp: use pointer to fix build fail · 0c71de66
      Sudip Mukherjee 提交于
      While building keystone_defconfig of arm we are getting build failure
      with the error:
      
      drivers/net/ethernet/ti/netcp_core.c:1846:31: error: invalid type argument of '->' (have 'struct tc_to_netdev')
        if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
                                     ^
      drivers/net/ethernet/ti/netcp_core.c:1851:35: error: invalid type argument of '->' (have 'struct tc_to_netdev')
            (dev->real_num_tx_queues < tc->tc))
                                         ^
      drivers/net/ethernet/ti/netcp_core.c:1855:8: error: invalid type argument of '->' (have 'struct tc_to_netdev')
        if (tc->tc) {
              ^
      drivers/net/ethernet/ti/netcp_core.c:1856:28: error: invalid type argument of '->' (have 'struct tc_to_netdev')
         netdev_set_num_tc(dev, tc->tc);
                                  ^
      drivers/net/ethernet/ti/netcp_core.c:1857:21: error: invalid type argument of '->' (have 'struct tc_to_netdev')
         for (i = 0; i < tc->tc; i++)
                           ^
      drivers/net/ethernet/ti/netcp_core.c: At top level:
      drivers/net/ethernet/ti/netcp_core.c:1879:2: warning: initialization from incompatible pointer type
        .ndo_setup_tc  = netcp_setup_tc,
        ^
      
      The callback of ndo_setup_tc should be:
      int (*ndo_setup_tc)(struct net_device *dev, u32 handle, __be16 protocol,
                          struct tc_to_netdev *tc);
      
      But we missed marking the last argument as a pointer.
      
      Fixes: 16e5cc64 ("net: rework setup_tc ndo op to consume general tc operand")
      CC: John Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c71de66
  17. 22 2月, 2016 3 次提交
  18. 17 2月, 2016 1 次提交