1. 27 9月, 2016 14 次提交
  2. 23 9月, 2016 2 次提交
  3. 22 9月, 2016 5 次提交
  4. 21 9月, 2016 8 次提交
    • M
      net: can: ifi: Configure transmitter delay · 8d58790b
      Marek Vasut 提交于
      Configure the transmitter delay register at +0x1c to correctly handle
      the CAN FD bitrate switch (BRS). This moves the SSP (secondary sample
      point) to a proper offset, so that the TDC mechanism works and won't
      generate error frames on the CAN link.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Oliver Hartkopp <socketcan@hartkopp.net>
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      8d58790b
    • H
      r8152: disable ALDPS and EEE before setting PHY · d768c61b
      hayeswang 提交于
      Disable ALDPS and EEE to avoid the possible failure when setting the PHY.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d768c61b
    • H
      r8152: remove r8153_enable_eee · af0287ec
      hayeswang 提交于
      Remove r8153_enable_eee().
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af0287ec
    • H
      r8152: move PHY settings to hw_phy_cfg · ef39df8e
      hayeswang 提交于
      Move the PHY relative settings together to hw_phy_cfg().
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef39df8e
    • H
      r8152: move enabling PHY · 2dd436da
      hayeswang 提交于
      Move enabling PHY to init(), otherwise some other settings may fail.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2dd436da
    • H
      r8152: move some functions · e6449539
      hayeswang 提交于
      Move the following functions forward.
      
      	r8152_mmd_indirect()
      	r8152_mmd_read()
      	r8152_mmd_write()
      	r8152_eee_en()
      	r8152b_enable_eee()
      	r8153_eee_en()
      	r8153_enable_eee()
      	r8152b_enable_fc()
      	r8153_aldps_en()
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6449539
    • H
      cxgb4/cxgb4vf: Allocate more queues for 25G and 100G adapter · 9b86a8d1
      Hariprasad Shenai 提交于
      We were missing check for 25G and 100G while checking port speed,
      which lead to less number of queues getting allocated for 25G & 100G
      adapters and leading to low throughput. Adding the missing check for
      both NIC and vNIC driver.
      
      Also fixes port advertisement for 25G and 100G in ethtool output.
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b86a8d1
    • P
      irqchip/mips-gic: Fix local interrupts · e875bd66
      Paul Burton 提交于
      Since the device hierarchy domain was added by commit c98c1822
      ("irqchip/mips-gic: Add device hierarchy domain"), GIC local interrupts
      have been broken.
      
      Users attempting to setup a per-cpu local IRQ, for example the GIC timer
      clock events code in drivers/clocksource/mips-gic-timer.c, the
      setup_percpu_irq function would refuse with -EINVAL because the GIC
      irqchip driver never called irq_set_percpu_devid so the
      IRQ_PER_CPU_DEVID flag was never set for the IRQ. This happens because
      irq_set_percpu_devid was being called from the gic_irq_domain_map
      function which is no longer called.
      
      Doing only that runs into further problems because gic_dev_domain_alloc
      set the struct irq_chip for all interrupts, local or shared, to
      gic_level_irq_controller despite that only being suitable for shared
      interrupts. The typical outcome of this is that gic_level_irq_controller
      callback functions are called for local interrupts, and then hwirq
      number calculations overflow & the driver ends up attempting to access
      some invalid register with an address calculated from an invalid hwirq
      number. Best case scenario is that this then leads to a bus error. This
      is fixed by abstracting the setup of the hwirq & chip to a new function
      gic_setup_dev_chip which is used by both the root GIC IRQ domain & the
      device domain.
      
      Finally, decoding local interrupts failed because gic_dev_domain_alloc
      only called irq_domain_alloc_irqs_parent for shared interrupts. Local
      ones were therefore never associated with hwirqs in the root GIC IRQ
      domain and the virq in gic_handle_local_int would always be 0. This is
      fixed by calling irq_domain_alloc_irqs_parent unconditionally & having
      gic_irq_domain_alloc handle both local & shared interrupts, which is
      easy due to the aforementioned abstraction of chip setup into
      gic_setup_dev_chip.
      
      This fixes use of the MIPS GIC timer for clock events, which has been
      broken since c98c1822 ("irqchip/mips-gic: Add device hierarchy
      domain") but hadn't been noticed due to a silent fallback to the MIPS
      coprocessor 0 count/compare clock events device.
      
      Fixes: c98c1822 ("irqchip/mips-gic: Add device hierarchy domain")
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Qais Yousef <qsyousef@gmail.com>
      Cc: stable@vger.kernel.org
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Link: http://lkml.kernel.org/r/20160913165335.31389-1-paul.burton@imgtec.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      e875bd66
  5. 20 9月, 2016 6 次提交
    • Y
      qed: Fix stack corruption on probe · 67a99b70
      Yuval Mintz 提交于
      Commit fe56b9e6 ("qed: Add module with basic common support")
      has introduced a stack corruption during probe, where filling a
      local struct with data to be sent to management firmware is incorrectly
      filled; The data is written outside of the struct and corrupts
      the stack.
      
      Changes from v1:
      ----------------
       - Correct the value written [Caught by David Laight]
      
      Fixes: fe56b9e6 ("qed: Add module with basic common support")
      Signed-off-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67a99b70
    • O
      net/mlx5: E-Switch, Handle mode change failures · 6c419ba8
      Or Gerlitz 提交于
      E-switch mode changes involve creating HW tables, potentially allocating
      netdevices, etc, and things can fail. Add an attempt to rollback to the
      existing mode when changing to the new mode fails. Only if rollback fails,
      getting proper SRIOV functionality requires module unload or sriov
      disablement/enablement.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c419ba8
    • O
      net/mlx5: E-Switch, Fix error flow in the SRIOV e-switch init code · 4eea37d7
      Or Gerlitz 提交于
      When enablement of the SRIOV e-switch in certain mode (switchdev or legacy)
      fails, we must set the mode to none. Otherwise, we'll run into double free
      based crashes when further attempting to deal with the e-switch (such
      as when disabling sriov or unloading the driver).
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4eea37d7
    • R
      net/mlx5: Fix flow counter bulk command out mailbox allocation · babd6134
      Roi Dayan 提交于
      The FW command output length should be only the length of struct
      mlx5_cmd_fc_bulk out field. Failing to do so will cause the memcpy
      call which is invoked later in the driver to write over wrong memory
      address and corrupt kernel memory which results in random crashes.
      
      This bug was found using the kernel address sanitizer (kasan).
      
      Fixes: a351a1b0 ('net/mlx5: Introduce bulk reading of flow counters')
      Signed-off-by: NRoi Dayan <roid@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      babd6134
    • J
      irqchip/gicv3: Silence noisy DEBUG_PER_CPU_MAPS warning · 727653d6
      James Morse 提交于
      gic_raise_softirq() walks the list of cpus using for_each_cpu(), it calls
      gic_compute_target_list() which advances the iterator by the number of
      CPUs in the cluster.
      
      If gic_compute_target_list() reaches the last CPU it leaves the iterator
      pointing at the last CPU. This means the next time round the for_each_cpu()
      loop cpumask_next() will be called with an invalid CPU.
      
      This triggers a warning when built with CONFIG_DEBUG_PER_CPU_MAPS:
      [    3.077738] GICv3: CPU1: found redistributor 1 region 0:0x000000002f120000
      [    3.077943] CPU1: Booted secondary processor [410fd0f0]
      [    3.078542] ------------[ cut here ]------------
      [    3.078746] WARNING: CPU: 1 PID: 0 at ../include/linux/cpumask.h:121 gic_raise_softirq+0x12c/0x170
      [    3.078812] Modules linked in:
      [    3.078869]
      [    3.078930] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.8.0-rc5+ #5188
      [    3.078994] Hardware name: Foundation-v8A (DT)
      [    3.079059] task: ffff80087a1a0080 task.stack: ffff80087a19c000
      [    3.079145] PC is at gic_raise_softirq+0x12c/0x170
      [    3.079226] LR is at gic_raise_softirq+0xa4/0x170
      [    3.079296] pc : [<ffff0000083ead24>] lr : [<ffff0000083eac9c>] pstate: 200001c9
      [    3.081139] Call trace:
      [    3.081202] Exception stack(0xffff80087a19fbe0 to 0xffff80087a19fd10)
      
      [    3.082269] [<ffff0000083ead24>] gic_raise_softirq+0x12c/0x170
      [    3.082354] [<ffff00000808e614>] smp_send_reschedule+0x34/0x40
      [    3.082433] [<ffff0000080e80a0>] resched_curr+0x50/0x88
      [    3.082512] [<ffff0000080e89d0>] check_preempt_curr+0x60/0xd0
      [    3.082593] [<ffff0000080e8a60>] ttwu_do_wakeup+0x20/0xe8
      [    3.082672] [<ffff0000080e8bb8>] ttwu_do_activate+0x90/0xc0
      [    3.082753] [<ffff0000080ea9a4>] try_to_wake_up+0x224/0x370
      [    3.082836] [<ffff0000080eabc8>] default_wake_function+0x10/0x18
      [    3.082920] [<ffff000008103134>] __wake_up_common+0x5c/0xa0
      [    3.083003] [<ffff0000081031f4>] __wake_up_locked+0x14/0x20
      [    3.083086] [<ffff000008103f80>] complete+0x40/0x60
      [    3.083168] [<ffff00000808df7c>] secondary_start_kernel+0x15c/0x1d0
      [    3.083240] [<00000000808911a4>] 0x808911a4
      [    3.113401] Detected PIPT I-cache on CPU2
      
      Avoid updating the iterator if the next call to cpumask_next() would
      cause the for_each_cpu() loop to exit.
      
      There is no change to gic_raise_softirq()'s behaviour, (cpumask_next()s
      eventual call to _find_next_bit() will return early as start >= nbits),
      this patch just silences the warning.
      
      Fixes: 021f6537 ("irqchip: gic-v3: Initial support for GICv3")
      Signed-off-by: NJames Morse <james.morse@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1474306155-3303-1-git-send-email-james.morse@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      727653d6
    • A
      rapidio/rio_cm: avoid GFP_KERNEL in atomic context · b92ae139
      Alexandre Bounine 提交于
      As reported by Alexey Khoroshilov (https://lkml.org/lkml/2016/9/9/737):
      riocm_send_close() is called from rio_cm_shutdown() under
      spin_lock_bh(idr_lock), but riocm_send_close() uses a GFP_KERNEL
      allocation.
      
      Fix by taking riocm_send_close() outside of spinlock protected code.
      
      [akpm@linux-foundation.org: remove unneeded `if (!list_empty())']
      Link: http://lkml.kernel.org/r/20160915175402.10122-1-alexandre.bounine@idt.comSigned-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Reported-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b92ae139
  6. 19 9月, 2016 5 次提交
    • H
      [media] cx23885/saa7134: assign q->dev to the PCI device · d8feef9b
      Hans Verkuil 提交于
      Fix a regression caused by commit 2bc46b3a ("[media] media/pci:
      convert drivers to use the new vb2_queue dev field").
      
      Three places where q->dev should be set were missed, causing
      a WARN.
      
      Fixes: 2bc46b3a ("[media] media/pci: convert drivers to use the new vb2_queue dev field").
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Reported-by: NMarton Balint <cus@passwd.hu>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      d8feef9b
    • F
      can: flexcan: fix resume function · 4de349e7
      Fabio Estevam 提交于
      On a imx6ul-pico board the following error is seen during system suspend:
      
      dpm_run_callback(): platform_pm_resume+0x0/0x54 returns -110
      PM: Device 2090000.flexcan failed to resume: error -110
      
      The reason for this suspend error is because when the CAN interface is not
      active the clocks are disabled and then flexcan_chip_enable() will
      always fail due to a timeout error.
      
      In order to fix this issue, only call flexcan_chip_enable/disable()
      when the CAN interface is active.
      
      Based on a patch from Dong Aisheng in the NXP kernel.
      Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      4de349e7
    • L
      mtd: nand: mxc: fix obiwan error in mxc_nand_v[12]_ooblayout_free() functions · 38178e7b
      Lothar Waßmann 提交于
      commit a894cf6c ("mtd: nand: mxc: switch to mtd_ooblayout_ops")
      introduced a regression accessing the OOB area from the mxc_nand
      driver due to an Obiwan error in the mxc_nand_v[12]_ooblayout_free()
      functions. They report a bogus oobregion { 64, 7 } which leads to
      errors accessing bogus data when reading the oob area.
      
      Prior to the commit the mtd-oobtest module could be run without any
      errors. With the offending commit, this test fails with results like:
      |Running mtd-oobtest
      |
      |=================================================
      |mtd_oobtest: MTD device: 5
      |mtd_oobtest: MTD device size 524288, eraseblock size 131072, page size 2048, count of eraseblocks 4, pages per eraseblock 64, OOB size 64
      |mtd_test: scanning for bad eraseblocks
      |mtd_test: scanned 4 eraseblocks, 0 are bad
      |mtd_oobtest: test 1 of 5
      |mtd_oobtest: writing OOBs of whole device
      |mtd_oobtest: written up to eraseblock 0
      |mtd_oobtest: written 4 eraseblocks
      |mtd_oobtest: verifying all eraseblocks
      |mtd_oobtest: error @addr[0x0:0x19] 0x9a -> 0x78 diff 0xe2
      |mtd_oobtest: error @addr[0x0:0x1a] 0xcc -> 0x0 diff 0xcc
      |mtd_oobtest: error @addr[0x0:0x1b] 0xe0 -> 0x85 diff 0x65
      |mtd_oobtest: error @addr[0x0:0x1c] 0x60 -> 0x62 diff 0x2
      |mtd_oobtest: error @addr[0x0:0x1d] 0x69 -> 0x45 diff 0x2c
      |mtd_oobtest: error @addr[0x0:0x1e] 0xcd -> 0xa0 diff 0x6d
      |mtd_oobtest: error @addr[0x0:0x1f] 0xf2 -> 0x60 diff 0x92
      |mtd_oobtest: error: verify failed at 0x0
      [...]
      Signed-off-by: NLothar Waßmann <LW@KARO-electronics.de>
      Fixes: a894cf6c ("mtd: nand: mxc: switch to mtd_ooblayout_ops")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      38178e7b
    • R
      mtd: nand: fix chances to create incomplete ECC data when writing · 559e58e7
      RogerCC Lin 提交于
      When mtk_nfc_do_write_page() comparing the sector number,because the
      sector number field is at the 12th-bit position of NFI_BYTELEN
      register,the masked register should be shifted 12 bits before being
      compared.The result of this bug may cause the second subpage has
      incomplete ECC parity bytes.
      Signed-off-by: NRogerCC Lin <rogercc.lin@mediatek.com>
      Fixes: 1d6b1e46 ("mtd: mediatek: driver for MTK Smart Device")
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      559e58e7
    • R
      mtd: nand: fix generating over-boundary ECC data when writing · 7a353289
      RogerCC Lin 提交于
      When mtk_ecc_encode() is writing the ECC parity data to the OOB
      region,because each register is 4 bytes in length,but the len's unit is
      in bytes,the operation in the for loop will cross the ECC's boundary.
      Signed-off-by: NRogerCC Lin <rogercc.lin@mediatek.com>
      Fixes: 1d6b1e46 ("mtd: mediatek: driver for MTK Smart Device")
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      7a353289