1. 26 Jan, 2021 6 commits
    • Bernd Harries's avatar
      staging: comedi: adv_pci_dio: Add interrupt handling for PCI-1730 · 2e0e629d
      Bernd Harries authored
      On the Advantech PCI-1730, four digital inputs (DI0, DI1, IDI0 and IDI1)
      can be used as external interrupt sources.  Each input can be programmed
      to latch an interrupt bit on either a rising edge or a falling edge (but
      not both).
      
      Add a new Comedi subdevice for each interrupt source, supporting the
      asynchronous command interface.  Subdevices 5, 6, 7 and 8 are for
      interrupt sources DI0, DI1, IDI0 and IDI1.  They each write the state of
      16 digital inputs to the subdevice's data buffer each time the
      corresponding interrupt occurs.  (For DI0 and DI1, use the 16
      non-isolated digital inputs.  For IDI0 and IDI1, use the 16 isolated
      digital inputs.)
      
      Currently, only rising edge triggers are supported.  Support could be
      added for the PCI-1733 and PCI-1736.
      Signed-off-by: default avatarBernd Harries <bha@gmx.de>
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Link: https://lore.kernel.org/r/20210118144359.378730-2-abbotti@mev.co.ukSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e0e629d
    • Bernd Harries's avatar
      staging: comedi: adl_pci7x3x: Add interrupt handling for PCI-7230 · 115dbad4
      Bernd Harries authored
      On the ADLink PCI-7230, digital input channels 0 and 1 can be used as
      external interrupt sources.  A rising edge on each input latches a
      corresponding local interrupt input of the PCI interface chip.  Writing
      a "clear IRQ" register clears both latches.
      
      Add a new Comedi subdevice for each interrupt source, supporting the
      asynchronous command interface.  This writes the state of the 16 digital
      inputs to the subdevice's data buffer each time the corresponding
      interrupt occurs.
      
      This could be adapted to support the PCI-7233, PCI-7432 and PCI-7433
      boards too.  They all have two interrupt sources, although for PCI-7233
      each interrupt source is triggered by a change of state of 16 digital
      inputs (0-15 and 16-31).  The "clear IRQ" register is at a different
      offset for some boards.
      Signed-off-by: default avatarBernd Harries <bha@gmx.de>
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Link: https://lore.kernel.org/r/20210118141829.376505-1-abbotti@mev.co.ukSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      115dbad4
    • DENG Qingfang's avatar
      staging: mt7621-dts: remove obsolete switch node · c88c76c7
      DENG Qingfang authored
      This was for OpenWrt's swconfig driver, which never made it upstream,
      and was also superseded by MT7530 DSA driver.
      Reviewed-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
      Signed-off-by: default avatarDENG Qingfang <dqfext@gmail.com>
      Link: https://lore.kernel.org/r/20210108025155.31556-1-dqfext@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c88c76c7
    • Chen-Yu Tsai's avatar
      staging: rtl8723bs: wifi_regd.c: Fix incorrect number of regulatory rules · 61834c96
      Chen-Yu Tsai authored
      The custom regulatory ruleset in the rtl8723bs driver lists an incorrect
      number of rules: one too many. This results in an out-of-bounds access,
      as detected by KASAN. This was possible thanks to the newly added support
      for KASAN on ARMv7.
      
      Fix this by filling in the correct number of rules given.
      
      KASAN report:
      
      ==================================================================
      BUG: KASAN: global-out-of-bounds in cfg80211_does_bw_fit_range+0x14/0x4c [cfg80211]
      Read of size 4 at addr bf20c254 by task ip/971
      
      CPU: 2 PID: 971 Comm: ip Tainted: G         C        5.11.0-rc2-00020-gf7fe528a7ebe #1
      Hardware name: Allwinner sun8i Family
      [<c0113338>] (unwind_backtrace) from [<c010e8a4>] (show_stack+0x10/0x14)
      [<c010e8a4>] (show_stack) from [<c0e0f868>] (dump_stack+0x9c/0xb4)
      [<c0e0f868>] (dump_stack) from [<c0388284>] (print_address_description.constprop.2+0x1dc/0x2dc)
      [<c0388284>] (print_address_description.constprop.2) from [<c03885cc>] (kasan_report+0x1a8/0x1c4)
      [<c03885cc>] (kasan_report) from [<bf00a354>] (cfg80211_does_bw_fit_range+0x14/0x4c [cfg80211])
      [<bf00a354>] (cfg80211_does_bw_fit_range [cfg80211]) from [<bf00b41c>] (freq_reg_info_regd.part.6+0x108/0x124 [>
      [<bf00b41c>] (freq_reg_info_regd.part.6 [cfg80211]) from [<bf00df00>] (handle_channel_custom.constprop.12+0x48/>
      [<bf00df00>] (handle_channel_custom.constprop.12 [cfg80211]) from [<bf00e150>] (wiphy_apply_custom_regulatory+0>
      [<bf00e150>] (wiphy_apply_custom_regulatory [cfg80211]) from [<bf1fb9e8>] (rtw_regd_init+0x60/0x70 [r8723bs])
      [<bf1fb9e8>] (rtw_regd_init [r8723bs]) from [<bf1ee5a8>] (rtw_cfg80211_init_wiphy+0x164/0x1e8 [r8723bs])
      [<bf1ee5a8>] (rtw_cfg80211_init_wiphy [r8723bs]) from [<bf1f8d50>] (_netdev_open+0xe4/0x28c [r8723bs])
      [<bf1f8d50>] (_netdev_open [r8723bs]) from [<bf1f8f58>] (netdev_open+0x60/0x88 [r8723bs])
      [<bf1f8f58>] (netdev_open [r8723bs]) from [<c0bb3730>] (__dev_open+0x178/0x220)
      [<c0bb3730>] (__dev_open) from [<c0bb3cdc>] (__dev_change_flags+0x258/0x2c4)
      [<c0bb3cdc>] (__dev_change_flags) from [<c0bb3d88>] (dev_change_flags+0x40/0x80)
      [<c0bb3d88>] (dev_change_flags) from [<c0bc86fc>] (do_setlink+0x538/0x1160)
      [<c0bc86fc>] (do_setlink) from [<c0bcf9e8>] (__rtnl_newlink+0x65c/0xad8)
      [<c0bcf9e8>] (__rtnl_newlink) from [<c0bcfeb0>] (rtnl_newlink+0x4c/0x6c)
      [<c0bcfeb0>] (rtnl_newlink) from [<c0bc67c8>] (rtnetlink_rcv_msg+0x1f8/0x454)
      [<c0bc67c8>] (rtnetlink_rcv_msg) from [<c0c330e4>] (netlink_rcv_skb+0xc4/0x1e0)
      [<c0c330e4>] (netlink_rcv_skb) from [<c0c32478>] (netlink_unicast+0x2c8/0x3c4)
      [<c0c32478>] (netlink_unicast) from [<c0c32894>] (netlink_sendmsg+0x320/0x5f0)
      [<c0c32894>] (netlink_sendmsg) from [<c0b75eb0>] (____sys_sendmsg+0x320/0x3e0)
      [<c0b75eb0>] (____sys_sendmsg) from [<c0b78394>] (___sys_sendmsg+0xe8/0x12c)
      [<c0b78394>] (___sys_sendmsg) from [<c0b78a50>] (__sys_sendmsg+0xc0/0x120)
      [<c0b78a50>] (__sys_sendmsg) from [<c0100060>] (ret_fast_syscall+0x0/0x58)
      Exception stack(0xc5693fa8 to 0xc5693ff0)
      3fa0:                   00000074 c7a39800 00000003 b6cee648 00000000 00000000
      3fc0: 00000074 c7a39800 00000001 00000128 78d18349 00000000 b6ceeda0 004f7cb0
      3fe0: 00000128 b6cee5e8 aeca151f aec1d746
      
      The buggy address belongs to the variable:
       rtw_drv_halt+0xf908/0x6b4 [r8723bs]
      
      Memory state around the buggy address:
       bf20c100: 00 00 00 00 00 00 00 00 00 00 04 f9 f9 f9 f9 f9
       bf20c180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      >bf20c200: 00 00 00 00 00 00 00 00 00 00 04 f9 f9 f9 f9 f9
                                               ^
       bf20c280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       bf20c300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      ==================================================================
      
      Fixes: 554c0a3a ("staging: Add rtl8723bs sdio wifi driver")
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Link: https://lore.kernel.org/r/20210108141401.31741-1-wens@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      61834c96
    • Puranjay Mohan's avatar
      Staging: rtl8192u: use %s and __func__ · c6c4a17b
      Puranjay Mohan authored
      Change function's name to %s and __func__ to fix checkpatch.pl errors.
      Signed-off-by: default avatarPuranjay Mohan <puranjay12@gmail.com>
      Link: https://lore.kernel.org/r/20210124144328.121688-1-puranjay12@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c6c4a17b
    • Martin Kaiser's avatar
      staging: rtl8188eu: fix rtw_xmit_entry's return value · 89be5992
      Martin Kaiser authored
      A netdev xmit function should return NETDEV_TX_OK or NETDEV_TX_BUSY.
      Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
      Link: https://lore.kernel.org/r/20210122165749.29467-1-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      89be5992
  2. 25 Jan, 2021 3 commits
  3. 24 Jan, 2021 31 commits