1. 06 11月, 2013 1 次提交
    • J
      net: Explicitly initialize u64_stats_sync structures for lockdep · 827da44c
      John Stultz 提交于
      In order to enable lockdep on seqcount/seqlock structures, we
      must explicitly initialize any locks.
      
      The u64_stats_sync structure, uses a seqcount, and thus we need
      to introduce a u64_stats_init() function and use it to initialize
      the structure.
      
      This unfortunately adds a lot of fairly trivial initialization code
      to a number of drivers. But the benefit of ensuring correctness makes
      this worth while.
      
      Because these changes are required for lockdep to be enabled, and the
      changes are quite trivial, I've not yet split this patch out into 30-some
      separate patches, as I figured it would be better to get the various
      maintainers thoughts on how to best merge this change along with
      the seqcount lockdep enablement.
      
      Feedback would be appreciated!
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: James Morris <jmorris@namei.org>
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Roger Luethi <rl@hellgate.ch>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Wensong Zhang <wensong@linux-vs.org>
      Cc: netdev@vger.kernel.org
      Link: http://lkml.kernel.org/r/1381186321-4906-2-git-send-email-john.stultz@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      827da44c
  2. 23 10月, 2013 2 次提交
  3. 22 10月, 2013 11 次提交
    • M
      davinci_emac.c: Fix IFF_ALLMULTI setup · d69e0f7e
      Mariusz Ceier 提交于
      When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
      emac_dev_mcast_set should only enable RX of multicasts and reset
      MACHASH registers.
      
      It does this, but afterwards it either sets up multicast MACs
      filtering or disables RX of multicasts and resets MACHASH registers
      again, rendering IFF_ALLMULTI flag useless.
      
      This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
      disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
      
      Tested with kernel 2.6.37.
      Signed-off-by: NMariusz Ceier <mceier+kernel@gmail.com>
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d69e0f7e
    • M
      bnx2x: Set NETIF_F_HIGHDMA unconditionally · edd31476
      Merav Sicron 提交于
      Current driver implementation incorrectly sets the flag only if 64-bit
      DMA mask succeeded.
      Signed-off-by: NMerav Sicron <meravs@broadcom.com>
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      edd31476
    • D
      bnx2x: Don't pretend during register dump · 4293b9f5
      Dmitry Kravkov 提交于
      As part of a register dump, the interface pretends to have the identity
      of other interfaces of the same physical device in order to perform
      HW configuration for them - specifically, it needs to prevent attentions
      from generating on those functions as the register dump accesses registers
      in common blocks which whose reading might generate an attention.
      
      However, such pretension is unsafe - unlike other flows in which the driver
      uses pretend, during register dump there is no guarantee no other HW access
      will take place (by other flows). If such access will take place, the HW will
      be accessed by the wrong interface, and leave both functions in an incorrect
      state.
      
      This patch removes all pretensions from the register dump flow. Instead, it
      changes initial configuration of attentions such that no fatal attention will
      be generated for other functions as a result of the register dump
      (notice however, a debug print claiming an attention from other functions IS
      possible during the register dump)
      Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com>
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4293b9f5
    • A
      bnx2x: Lock DMAE when used by statistic flow · 32316a46
      Ariel Elior 提交于
      bnx2x has several clients to its DMAE machines - all of them with the exception
      of the statistics flow used the same locking mechanisms to synchronize the DMAE
      machines' usage.
      
      Since statistics (which are periodically entered) use DMAE without taking the
      locks, they may erase the commands which were previously set -
      e.g., it may cause a VF to timeout while waiting for a PF answer on the VF-PF
      channel as that command header would have been overwritten by the statistics'
      header.
      
      This patch makes certain that all flows utilizing DMAE will use the same
      API, assuring that the locking scheme will be kept by all said flows.
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32316a46
    • Y
      bnx2x: Prevent null pointer dereference on error flow · 6b991c37
      Yuval Mintz 提交于
      If debug message is open and bnx2x_vfop_qdtor_cmd() were to fail,
      the resulting print would have caused a null pointer dereference.
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b991c37
    • A
      bnx2x: Fix config when SR-IOV and iSCSI are enabled · 0907f34c
      Ariel Elior 提交于
      Starting with commit b9871bcf "bnx2x: VF RSS support - PF side", if a PF will
      have SR-IOV supported in its PCI configuration space, storage drivers will not
      work for that interface.
      
      This patch fixes the resource calculation to allow such a configuration to
      properly work.
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0907f34c
    • D
      bnx2x: Fix Coalescing configuration · 6802516e
      Dmitry Kravkov 提交于
      bnx2x drivers configure coalescing incorrectly (e.g., as a result of a call
      to 'ethtool -c'). Although this is almost invisible to the user (due to NAPI)
      designated tests will show the configuration is incorrect.
      Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com>
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6802516e
    • A
      bnx2x: Unlock VF-PF channel on MAC/VLAN config error · 31329afd
      Ariel Elior 提交于
      Current code returns upon failure, leaving the VF-PF in an unusable state;
      This patch adds the missing release so further commands could pass between
      PF and VF.
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31329afd
    • Y
      bnx2x: Prevent an illegal pointer dereference during panic · 1a6974b2
      Yuval Mintz 提交于
      During a panic, the driver tries to print the Management FW buffer of recent
      commands. To do so, the driver reads the address of that buffer from a known
      address. If the buffer is unavailable (e.g., PCI reads don't work, MCP is
      failing, etc.), the driver will try to access the address it has read, possibly
      causing a kernel panic.
      
      This check 'sanitizes' the access, validating the read value is indeed a valid
      address inside the management FW's buffers.
      The patch also removes a read outside the scope of the buffer, which resulted
      in some unrelated chraracters appearing in the log.
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a6974b2
    • Y
      bnx2x: Fix Maximum CoS estimation for VFs · b1239723
      Yuval Mintz 提交于
      bnx2x VFs do not support Multi-CoS; Current implementation
      erroneously sets the VFs maximal number of CoS to be > 1.
      
      This will cause the driver to call alloc_etherdev_mqs() with
      a number of queues it cannot possibly support and reflects
      in 'odd' driver prints.
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b1239723
    • M
      drivers: net: cpsw: fix kernel warn during iperf test with interrupt pacing · 49595b7b
      Mugunthan V N 提交于
      When interrupt pacing is enabled, receive/transmit statistics are not
      updated properly by hardware which leads to ISR return with IRQ_NONE
      and inturn kernel disables the interrupt. This patch removed the checking
      of receive/transmit statistics from ISR.
      
      This patch is verified with AM335x Beagle Bone Black and below is the
      kernel warn when interrupt pacing is enabled.
      
      [  104.298254] irq 58: nobody cared (try booting with the "irqpoll" option)
      [  104.305356] CPU: 0 PID: 1073 Comm: iperf Not tainted 3.12.0-rc3-00342-g77d4015b #3
      [  104.313284] [<c001bb84>] (unwind_backtrace+0x0/0xf0) from [<c0017db0>] (show_stack+0x10/0x14)
      [  104.322282] [<c0017db0>] (show_stack+0x10/0x14) from [<c0507920>] (dump_stack+0x78/0x94)
      [  104.330816] [<c0507920>] (dump_stack+0x78/0x94) from [<c0088c1c>] (__report_bad_irq+0x20/0xc0)
      [  104.339889] [<c0088c1c>] (__report_bad_irq+0x20/0xc0) from [<c008912c>] (note_interrupt+0x1dc/0x23c)
      [  104.349505] [<c008912c>] (note_interrupt+0x1dc/0x23c) from [<c0086d74>] (handle_irq_event_percpu+0xc4/0x238)
      [  104.359851] [<c0086d74>] (handle_irq_event_percpu+0xc4/0x238) from [<c0086f24>] (handle_irq_event+0x3c/0x5c)
      [  104.370198] [<c0086f24>] (handle_irq_event+0x3c/0x5c) from [<c008991c>] (handle_level_irq+0xac/0x10c)
      [  104.379907] [<c008991c>] (handle_level_irq+0xac/0x10c) from [<c00866d8>] (generic_handle_irq+0x20/0x30)
      [  104.389812] [<c00866d8>] (generic_handle_irq+0x20/0x30) from [<c0014ce8>] (handle_IRQ+0x4c/0xb0)
      [  104.399066] [<c0014ce8>] (handle_IRQ+0x4c/0xb0) from [<c000856c>] (omap3_intc_handle_irq+0x60/0x74)
      [  104.408598] [<c000856c>] (omap3_intc_handle_irq+0x60/0x74) from [<c050d8e4>] (__irq_svc+0x44/0x5c)
      [  104.418021] Exception stack(0xde4f7c00 to 0xde4f7c48)
      [  104.423345] 7c00: 00000001 00000000 00000000 dd002140 60000013 de006e54 00000002 00000000
      [  104.431952] 7c20: de345748 00000040 c11c8588 00018ee0 00000000 de4f7c48 c009dfc8 c050d300
      [  104.440553] 7c40: 60000013 ffffffff
      [  104.444237] [<c050d8e4>] (__irq_svc+0x44/0x5c) from [<c050d300>] (_raw_spin_unlock_irqrestore+0x34/0x44)
      [  104.454220] [<c050d300>] (_raw_spin_unlock_irqrestore+0x34/0x44) from [<c00868c0>] (__irq_put_desc_unlock+0x14/0x38)
      [  104.465295] [<c00868c0>] (__irq_put_desc_unlock+0x14/0x38) from [<c0088068>] (enable_irq+0x4c/0x74)
      [  104.474829] [<c0088068>] (enable_irq+0x4c/0x74) from [<c03abd24>] (cpsw_poll+0xb8/0xdc)
      [  104.483276] [<c03abd24>] (cpsw_poll+0xb8/0xdc) from [<c044ef68>] (net_rx_action+0xc0/0x1e8)
      [  104.492085] [<c044ef68>] (net_rx_action+0xc0/0x1e8) from [<c0048a90>] (__do_softirq+0x100/0x27c)
      [  104.501338] [<c0048a90>] (__do_softirq+0x100/0x27c) from [<c0048cd0>] (do_softirq+0x68/0x70)
      [  104.510224] [<c0048cd0>] (do_softirq+0x68/0x70) from [<c0048e8c>] (local_bh_enable+0xd0/0xe4)
      [  104.519211] [<c0048e8c>] (local_bh_enable+0xd0/0xe4) from [<c048c774>] (tcp_rcv_established+0x450/0x648)
      [  104.529201] [<c048c774>] (tcp_rcv_established+0x450/0x648) from [<c0494904>] (tcp_v4_do_rcv+0x154/0x474)
      [  104.539195] [<c0494904>] (tcp_v4_do_rcv+0x154/0x474) from [<c043d750>] (release_sock+0xac/0x1ac)
      [  104.548448] [<c043d750>] (release_sock+0xac/0x1ac) from [<c04844e8>] (tcp_recvmsg+0x4d0/0xa8c)
      [  104.557528] [<c04844e8>] (tcp_recvmsg+0x4d0/0xa8c) from [<c04a8720>] (inet_recvmsg+0xcc/0xf0)
      [  104.566507] [<c04a8720>] (inet_recvmsg+0xcc/0xf0) from [<c0439744>] (sock_recvmsg+0x90/0xb0)
      [  104.575394] [<c0439744>] (sock_recvmsg+0x90/0xb0) from [<c043b778>] (SyS_recvfrom+0x88/0xd8)
      [  104.584280] [<c043b778>] (SyS_recvfrom+0x88/0xd8) from [<c043b7e0>] (sys_recv+0x18/0x20)
      [  104.592805] [<c043b7e0>] (sys_recv+0x18/0x20) from [<c0013da0>] (ret_fast_syscall+0x0/0x48)
      [  104.601587] handlers:
      [  104.603992] [<c03acd94>] cpsw_interrupt
      [  104.608040] Disabling IRQ #58
      
      Cc: Sebastian Siewior <bigeasy@linutronix.de>
      Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49595b7b
  4. 19 10月, 2013 3 次提交
  5. 18 10月, 2013 11 次提交
  6. 15 10月, 2013 2 次提交
  7. 12 10月, 2013 3 次提交
  8. 11 10月, 2013 6 次提交
  9. 10 10月, 2013 1 次提交
    • M
      can: at91-can: fix device to driver data mapping for platform devices · 5abbeea5
      Marc Kleine-Budde 提交于
      In commit:
      
          3078cde7 can: at91_can: add dt support
      
      device tree support was added to the at91_can driver. In this commit the
      mapping of device to driver data was mixed up. This results in the sam9x5
      parameters being used for the sam9263 and the workaround for the broken mailbox
      0 on the sam9263 not being activated.
      
      This patch fixes the broken platform_device_id table.
      
      Cc: linux-stable <stable@vger.kernel.org>
      Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      5abbeea5