1. 08 7月, 2014 13 次提交
  2. 23 6月, 2014 1 次提交
  3. 27 4月, 2014 13 次提交
  4. 15 4月, 2014 2 次提交
  5. 08 4月, 2014 1 次提交
  6. 01 4月, 2014 1 次提交
    • 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
  7. 18 3月, 2014 5 次提交
    • A
      at86rf230: add support for devicetree · fa2d3e94
      Alexander Aring 提交于
      This patch adds devicetree support for the at86rf230 driver.
      
      Possible gpios to configure are "reset-gpio" and "sleep-gpio".
      Also add support to configure the "irq-type" for the irq polarity
      register.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa2d3e94
    • A
      at86rf230: make reset pin optionally · 3fa27571
      Alexander Aring 提交于
      This patch make the reset pin optionally. Some devices like the atben
      from qi-hardware don't have a reset pin externally. The usually way is
      to turn power off/on for the atben device to initiate a device reset.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3fa27571
    • A
      at86rf230: change reset timings · 56f023fb
      Alexander Aring 提交于
      While checkpatch another patch I got a:
      
      "WARNING: msleep < 20ms can sleep for up to 20ms"
      
      The datasheet of at86rf231 and at86rf212 says a minimum delay for reset
      pulse width and spi access latency after reset is 625 nanoseconds.
      
      This patch removes the 1 milliseconds sleep and replace it with a 1
      microseconds udelay which should be also okay for the reset pulse width.
      
      To change the state from RESET -> TRX_OFF the at86rf230 device needs 120
      microseconds, this is a worst case of all at86rf* chips.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56f023fb
    • A
      at86rf230: move locking state in xmit · 7e814618
      Alexander Aring 提交于
      There is no need to lock the clearing of IRQ_TRX_END in status.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e814618
    • A
      at86rf230: fix unexpected state change · 7332fcb8
      Alexander Aring 提交于
      This patch fix a unexpected state change for the at86rf231 chip.
      We can't change into STATE_FORCE_TX_ON while the chip is in one of
      SLEEP, P_ON, RESET, TRX_OFF, and all *_NOCLK states.
      
      In this case we are in the TRX_OFF state. See datasheet [1] page 71 for
      more information.
      
      Without this patch you will get the following message on a at86rf231 device:
      
      [   20.065218] unexpected state change: 8, asked for 4
      [   20.070527] ------------[ cut here ]------------
      [   20.075414] WARNING: CPU: 0 PID: 160 at net/mac802154/ieee802154_dev.c:43 mac802154_slave_open+0x70/0xb8()
      [   20.085594] Modules linked in: autofs4
      [   20.089667] CPU: 0 PID: 160 Comm: ifconfig Not tainted 3.14.0-20140108-1-00993-g905c192 #162
      [   20.098612] [<c00127b8>] (unwind_backtrace) from [<c0010b1c>] (show_stack+0x10/0x14)
      [   20.106819] [<c0010b1c>] (show_stack) from [<c0033838>] (warn_slowpath_common+0x60/0x80)
      [   20.115311] [<c0033838>] (warn_slowpath_common) from [<c00338e8>] (warn_slowpath_null+0x18/0x20)
      [   20.124590] [<c00338e8>] (warn_slowpath_null) from [<c057b7e8>] (mac802154_slave_open+0x70/0xb8)
      [   20.133880] [<c057b7e8>] (mac802154_slave_open) from [<c0488a58>] (__dev_open+0xa8/0x108)
      [   20.142553] [<c0488a58>] (__dev_open) from [<c0488cb0>] (__dev_change_flags+0x8c/0x148)
      [   20.151051] [<c0488cb0>] (__dev_change_flags) from [<c0488d84>] (dev_change_flags+0x18/0x48)
      [   20.159968] [<c0488d84>] (dev_change_flags) from [<c04e2e9c>] (devinet_ioctl+0x2b0/0x63c)
      [   20.168623] [<c04e2e9c>] (devinet_ioctl) from [<c04712e4>] (sock_ioctl+0x23c/0x29c)
      [   20.176727] [<c04712e4>] (sock_ioctl) from [<c00e3cb8>] (do_vfs_ioctl+0x4a8/0x578)
      [   20.184671] [<c00e3cb8>] (do_vfs_ioctl) from [<c00e3dd4>] (SyS_ioctl+0x4c/0x78)
      [   20.192402] [<c00e3dd4>] (SyS_ioctl) from [<c000da00>] (ret_fast_syscall+0x0/0x48)
      [   20.200392] ---[ end trace 9a34542f4ea08e47 ]---
      
      This patch was tested on at86rf231 and at86rf212.
      
      [1] http://www.atmel.com/images/doc8111.pdfSigned-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7332fcb8
  8. 15 3月, 2014 1 次提交
  9. 14 3月, 2014 1 次提交
    • A
      at86rf230: fix lockdep splats · 6e07a1e0
      Alexander Aring 提交于
      This patch fix a lockdep in the at86rf230 driver, otherwise we get:
      
      [   30.206517] =================================
      [   30.211078] [ INFO: inconsistent lock state ]
      [   30.215647] 3.14.0-20140108-1-00994-g32e9426 #163 Not tainted
      [   30.221660] ---------------------------------
      [   30.226222] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
      [   30.232514] systemd-udevd/157 [HC1[1]:SC0[0]:HE0:SE1] takes:
      [   30.238439]  (&(&lp->lock)->rlock){?.+...}, at: [<c03600f8>] at86rf230_isr+0x18/0x44
      [   30.246621] {HARDIRQ-ON-W} state was registered at:
      [   30.251728]   [<c0061ce4>] __lock_acquire+0x7a4/0x18d8
      [   30.257135]   [<c0063500>] lock_acquire+0x68/0x7c
      [   30.262071]   [<c0588820>] _raw_spin_lock+0x28/0x38
      [   30.267203]   [<c0361240>] at86rf230_xmit+0x1c/0x144
      [   30.272412]   [<c057ba6c>] mac802154_xmit_worker+0x88/0x148
      [   30.278271]   [<c0047844>] process_one_work+0x274/0x404
      [   30.283761]   [<c00484c0>] worker_thread+0x228/0x374
      [   30.288971]   [<c004cfb8>] kthread+0xd0/0xe4
      [   30.293455]   [<c000dac8>] ret_from_fork+0x14/0x2c
      [   30.298493] irq event stamp: 8948
      [   30.301963] hardirqs last  enabled at (8947): [<c00cb290>] __kmalloc+0xb4/0x110
      [   30.309636] hardirqs last disabled at (8948): [<c00115d4>] __irq_svc+0x34/0x5c
      [   30.317215] softirqs last  enabled at (8452): [<c0037324>] __do_softirq+0x1dc/0x264
      [   30.325243] softirqs last disabled at (8439): [<c0037638>] irq_exit+0x80/0xf4
      
      We use the lp->lock inside the isr of at86rf230, that's why we need the
      irqsave spinlock calls.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e07a1e0
  10. 12 3月, 2014 1 次提交
  11. 04 3月, 2014 1 次提交
    • J
      ieee802154: fix at86rf212_set_txpower() exit path · 677676cd
      Jean Sacren 提交于
      The commit 9b2777d6 ("ieee802154: add TX power control to
      wpan_phy") introduced the new function at86rf212_set_txpower() with
      the questionable check of the return of __at86rf230_write() in the
      exit path:
      
      1) Both at86rf212_set_txpower() and __at86rf230_write() have the
         same return type.
      
      2) Whatever __at86rf230_write() returns becomes the return value of
         at86rf212_set_txpower().
      
      Thus, fix the exit path by getting rid of that check entirely.
      Signed-off-by: NJean Sacren <sakiwit@gmail.com>
      Cc: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      677676cd