1. 01 4月, 2014 16 次提交
    • J
      ixgbe: never generate both software and hardware timestamps · ff29a86e
      Jakub Kicinski 提交于
      skb_tx_timestamp() does not report software time stamp
      if SKBTX_IN_PROGRESS is set. According to timestamping.txt
      software time stamps are a fallback and should not be
      generated if hardware time stamp is provided.
      
      Move call to skb_tx_timestamp() after setting
      SKBTX_IN_PROGRESS.
      Signed-off-by: NJakub Kicinski <kubakici@wp.pl>
      Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ff29a86e
    • J
      ixgbe: remove redundant if clause from PTP work · 181e7d5d
      Jakub Kicinski 提交于
      ptp_tx_skb is always set before work is scheduled,
      work is cancelled before ptp_tx_skb is set to NULL.
      PTP work cannot ever see ptp_tx_skb set to NULL.
      Signed-off-by: NJakub Kicinski <kubakici@wp.pl>
      Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      181e7d5d
    • D
      e1000e: Fix no connectivity when driver loaded with cable out · b20a7744
      David Ertman 提交于
      In commit da1e2046, the flow for enabling/disabling an Si errata
      workaround (e1000_lv_jumbo_workaround_ich8lan) was changed to fix a problem
      with iAMT connections dropping on interface down with jumbo frames set.
      Part of this change was to move the function call disabling the workaround
      to e1000e_down() from the e1000_setup_rctl() function.  The mechanic for
      disabling of this workaround involves writing several MAC and PHY registers
      back to hardware defaults.
      
      After this commit, when the driver is loaded with the cable out, the PHY
      registers are not programmed with the correct default values.  This causes
      the device to be capable of transmitting packets, but is unable to recieve
      them until this workaround is called.
      
      The flow of e1000e's open code relies upon calling the above workaround to
      expicitly program these registers either with jumbo frame appropriate settings
      or h/w defaults on 82579 and newer hardware.
      
      Fix this issue by adding logic to e1000_setup_rctl() that not only calls
      e1000_lv_jumbo_workaround_ich8lan() when jumbo frames are set, to enable the
      workaround, but also calls this function to explicitly disable the workaround
      in the case that jumbo frames are not set.
      Signed-off-by: NDave Ertman <davidx.m.ertman@intel.com>
      Tested-by: NJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      b20a7744
    • A
      at86rf230: mask irq's before deregister device · 17e84a92
      Alexander Aring 提交于
      While transmit over a at86rf231 device and unloading the module I got:
      
      [   29.643073] WARNING: CPU: 0 PID: 3 at kernel/workqueue.c:1335 __queue_work+0xb4/0x224()
      [   29.651457] Modules linked in: at86rf230(-) autofs4
      [   29.656612] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G        W    3.14.0-rc6-01602-g902659e-dirty #294
      [   29.666490] [<c00124f0>] (unwind_backtrace) from [<c0010ad0>] (show_stack+0x10/0x14)
      [   29.674628] [<c0010ad0>] (show_stack) from [<c0032c80>] (warn_slowpath_common+0x60/0x80)
      [   29.683116] [<c0032c80>] (warn_slowpath_common) from [<c0032d30>] (warn_slowpath_null+0x18/0x20)
      [   29.692329] [<c0032d30>] (warn_slowpath_null) from [<c0045b08>] (__queue_work+0xb4/0x224)
      [   29.700906] [<c0045b08>] (__queue_work) from [<c0045cc8>] (queue_work_on+0x50/0x78)
      [   29.708944] [<c0045cc8>] (queue_work_on) from [<c05669cc>] (mac802154_tx+0x1e4/0x240)
      [   29.717164] [<c05669cc>] (mac802154_tx) from [<c0471814>] (dev_hard_start_xmit+0x2f0/0x43c)
      [   29.725926] [<c0471814>] (dev_hard_start_xmit) from [<c04878d0>] (sch_direct_xmit+0x64/0x2a0)
      [   29.734867] [<c04878d0>] (sch_direct_xmit) from [<c0487c38>] (__qdisc_run+0x12c/0x18c)
      [   29.743169] [<c0487c38>] (__qdisc_run) from [<c046e1b0>] (net_tx_action+0xe0/0x178)
      [   29.751205] [<c046e1b0>] (net_tx_action) from [<c0036690>] (__do_softirq+0x100/0x264)
      [   29.759420] [<c0036690>] (__do_softirq) from [<c0036818>] (run_ksoftirqd+0x24/0x4c)
      [   29.767453] [<c0036818>] (run_ksoftirqd) from [<c005232c>] (smpboot_thread_fn+0x128/0x13c)
      [   29.776121] [<c005232c>] (smpboot_thread_fn) from [<c004c3fc>] (kthread+0xd0/0xe4)
      [   29.784061] [<c004c3fc>] (kthread) from [<c000da88>] (ret_from_fork+0x14/0x2c)
      [   29.791628] ---[ end trace 3406ff24bd973834 ]---
      
      The problem is there are still interrupts after deregister ieee802154
      device. This patch mask all interrupts in the at86rf2xx chips before
      deregister the device.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      17e84a92
    • L
      net: fec: make sure to init MAC address · 44934fac
      Lucas Stach 提交于
      Though we made sure to acquire a valid MAC for
      the netdevice we never actually programmed it
      into the hardware.
      So if the bootloader did not set the MAC,
      network operation would only work if userspace
      explicitly asked to transfer the MAC to hardware.
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      44934fac
    • Y
      qmi_wwan/cdc_ether: move Novatel E371 (1410:9011) to qmi_wwan · 7b5939ba
      Yegor Yefremov 提交于
      This device provides QMI and ethernet functionality via a standard CDC
      ethernet descriptor.  But when driven by cdc_ether, the QMI
      functionality is unavailable because only cdc_ether can claim the USB
      interface. Thus blacklist the device in cdc_ether and add its IDs to
      qmi_wwan, which enables both QMI and ethernet simultaneously.
      Signed-off-by: NYegor Yefremov <yegorslists@googlemail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b5939ba
    • A
      rtl8187: fix use after free on failure path in rtl8187_probe() · a31267c3
      Alexey Khoroshilov 提交于
      If allocation of io_dmabuf fails, rtl8187_probe() calls usb_put_dev(udev)
      while usb_get_dev(udev) is not called yet. As a result refcnt is decremented
      incorrectly and usb_dev can be used after memory deallocation.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Acked-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a31267c3
    • A
      rtl8180: don't use weird trick to access "far" registers · 6cea5f21
      Andrea Merello 提交于
      In rtl8180/rtl8185/rtl8187se the register space is represented
      using packed structure type. Register are thus accessed using a
      pointer of this type.
      All registers are packed toghether, and only small gaps are present.
      
      However Rtl8187se has also some "sparse" registers, very far from
      the "main register block".
      
      It could be possible to access them by simply declare huge reserved
      blocks inside the register struct (and this causes NO memory waste).
      However, for various reasons, access to those "far" registers is
      done with special dedicated macros, without declaring them in the
      register struct.
      
      This is done in an intricate manner, that makes code less readable
      and caused static analisys tool to produce warnings.
      
      This patch keeps the "macro" mechanism, but it changes its
      implementation in a simplier and more straightforward way.
      Signed-off-by: NAndrea Merello <andrea.merello@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6cea5f21
    • D
      rsi: rsi_91x: misleading debug printk · 3f3aa2fb
      Dan Carpenter 提交于
      There is a missing set of curly braces here so the debug output says
      "Probe confirm received" unintentionally.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3f3aa2fb
    • A
      mwifiex: fix spinlock bad magic bug · a7488c79
      Amitkumar Karwar 提交于
      [ 6630.450908] BUG: spinlock bad magic on CPU#1,
                     ksdioirqd/mmc1/355
      [ 6630.450914] Unable to handle kernel NULL pointer dereference
                     at virtual address 0000004f
      [ 6630.450919] pgd = ecbd8000
      [ 6630.450926] [0000004f] *pgd=00000000
      [ 6630.450936]  lock: 0xeea4ab08, .magic: 00000000,
                     .owner: <none>/-1, .owner_cpu: 0
      [ 6630.450939] Backtrace:
      [ 6630.450956] [<c010d354>] (unwind_backtrace+0x0/0x118) from
                     [<c060c238>] (dump_stack+0x28/0x30)
      [ 6630.450960] Internal error: Oops: 5 [#1] SMP ARM
      [ 6630.450964] Modules linked in: uvcvideo videobuf2_vmalloc
      [ 6630.450980] [<c060c238>] (dump_stack+0x28/0x30) from
                     [<c0315ab4>] (spin_dump+0x80/0x94)
      [ 6630.450988] [<c0315ab4>] (spin_dump+0x80/0x94) from
                     [<c0315af4>] (spin_bug+0x2c/0x30)
      [ 6630.450996] [<c0315af4>] (spin_bug+0x2c/0x30) from
                     [<c0315b80>] (do_raw_spin_lock+0x28/0x15c)
      [ 6630.451004] [<c0315b80>] (do_raw_spin_lock+0x28/0x15c) from
                     [<c0610c24>] (_raw_spin_lock_irqsave+0x20/0x28)
      [ 6630.451016] [<c0610c24>] (_raw_spin_lock_irqsave+0x20/0x28)
                     from [<bf07a7f4>] (mwifiex_exec_next_cmd
                                        +0x6c/0x45c [mwifiex])
      [ 6630.451030] [<bf07a7f4>] (mwifiex_exec_next_cmd+0x6c/0x45c
                     [mwifiex]) from [<bf07834c>]
                     (mwifiex_main_process+0x2c8/0x464 [mwifiex])
      [ 6630.451047] [<bf07834c>] (mwifiex_main_process+0x2c8/0x464
                     [mwifiex]) from [<bf0a093c>]
                     (mwifiex_sdio_interrupt+0xc8/0x1cc [mwifiex_sdio]
      [ 6630.451064] [<bf0a093c>] (mwifiex_sdio_interrupt+0xc8/0x1cc
                     [mwifiex_sdio]) from [<c04bbde0>]
                     (sdio_irq_thread+0x178/0x31c)
      [ 6630.451079] [<c04bbde0>] (sdio_irq_thread+0x178/0x31c) from
                     [<c0145514>] (kthread+0xc8/0xd8)
      [ 6630.451095] [<c0145514>] (kthread+0xc8/0xd8) from
                     [<c0106118>] (ret_from_fork+0x14/0x20)
      
      This bug has introduced/exposed due to recent patch in which we
      cancel pending commands before suspend (using hs_enabling flag).
      The NULL pointer is dereferenced when both
      mwifiex_cancel_all_pending_cmd() and mwifiex_exec_next_cmd()
      try to access cmd pending queue simultaneously.
      Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: NBing Zhao <bzhao@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a7488c79
    • A
      rtl8187: fix compile warning · aabcaa8b
      Andrea Merello 提交于
      ANAPARAM3 register, defined in the rtl818x common register
      struct, is accessed as 16bit by rtl8187se and as 8bit by rtl8187b.
      Since I have no documentation about this, I can only stick to
      the reference code and to what is known to work.
      
      This issue has been addressed by a patch from Larry Finger
      that introduces an "union", in the register struct.
      In my last patch-set I applied it on the register struct, but
      I forget to update rtl8187 driver too.
      This patch does it.
      
      Suggested-by: Larry Finger <Larry.Finger@lwfinger.net> [ Original patch ]
      Signed-off-by: NAndrea Merello <andrea.merello@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      aabcaa8b
    • A
      rtlwifi: rtl8188ee: enable MSI interrupts mode · 2a54eb5e
      Adam Lee 提交于
      Some HP notebooks using this rtl8188ee hardware module can't get
      AP scan results with pin-based interrupts mode, enabling MSI interrupts
      mode could fix it.
      
      As RealTek's testing results, RTL8188EE works well with both MSI mode
      and pin-based mode fallback.
      Signed-off-by: NAdam Lee <adam.lee@canonical.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2a54eb5e
    • A
      rtlwifi: add MSI interrupts mode support · 94010fa0
      Adam Lee 提交于
      Add MSI interrupts mode support, enable it when submodules' msi_support
      flag is true, also could fallback to pin-based interrupts mode if MSI
      interrupts mode fails.
      
      RealTek's policy(on modules which work well with MSI interrupts mode) is:
      
      > If the platform supports both MSI and pin-based, use MSI.
      > If the platform supports MSI only, use MSI.
      > If the platform supports pin-based only, use pin-based.
      
      Also as RealTek's testing results, RTL8188EE and RTL8723BE work well
      with both MSI mode and pin-based mode fallback.
      Signed-off-by: NAdam Lee <adam.lee@canonical.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      94010fa0
    • A
      mwifiex: use timeout variant for wait_event_interruptible · 52250cbe
      Amitkumar Karwar 提交于
      It has been observed that system hangs during suspend, if host
      sleep activation fails due to a missing interrupt from firmware.
      Use timeout variant, so that the thread will be woken up when
      timer expires.
      Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: NBing Zhao <bzhao@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      52250cbe
    • A
      mwifiex: cancel pending commands for signal · 3d026d09
      Amitkumar Karwar 提交于
      When a thread is interrupted by signal, all
      wait_event_interruptible calls after queueing commands return
      an error. Numbers of commands in pending queue are increased
      in this case. Sometimes all commands nodes in pool are filled.
      
      We will cancel pending commands when signal is received.
      Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: NBing Zhao <bzhao@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3d026d09
    • A
      mwifiex: scan command preparation failure handling · 1845bd3a
      Amitkumar Karwar 提交于
      When scan request is received, scan commands are prepared and
      queued into scan pending queue. There is a corner case when
      command nodes are full. So we stop queueing further scan
      commands and return an error. This patch makes sure that
      currently queued commands in scan pending queue are also freed
      in this case.
      Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: NBing Zhao <bzhao@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1845bd3a
  2. 31 3月, 2014 2 次提交
    • D
      net: ppp: use sk_unattached_filter api · 568f194e
      Daniel Borkmann 提交于
      For the ppp driver, there are currently two open-coded BPF filters in use,
      that is, pass_filter and active_filter. Migrate both to make proper use
      of sk_unattached_filter_{create,destroy} API so that the actual BPF code
      is decoupled from direct access, and filters can be jited as a side-effect
      by the internal filter compiler.
      
      Joint work with Alexei Starovoitov.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: linux-ppp@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      568f194e
    • D
      net: ptp: do not reimplement PTP/BPF classifier · 164d8c66
      Daniel Borkmann 提交于
      There are currently pch_gbe, cpts, and ixp4xx_eth drivers that open-code
      and reimplement a BPF classifier for the PTP protocol. Since all of them
      effectively do the very same thing and load the very same PTP/BPF filter,
      we can just consolidate that code by introducing ptp_classify_raw() in
      the time-stamping core framework which can be used in drivers.
      
      As drivers get initialized after bootstrapping the core networking
      subsystem, they can make use of ptp_insns wrapped through
      ptp_classify_raw(), which allows to simplify and remove PTP classifier
      setup code in drivers.
      
      Joint work with Alexei Starovoitov.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Cc: Richard Cochran <richard.cochran@omicron.at>
      Cc: Jiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      164d8c66
  3. 30 3月, 2014 14 次提交
  4. 29 3月, 2014 8 次提交