1. 08 Aug, 2018 20 commits
    • Sergio Paracuellos's avatar
      staging: mt7621-pci: use generic kernel pci subsystem read and write · 8571c62d
      Sergio Paracuellos authored
      map_bus callback is called before every .read/.write operation.
      Implement it and change custom read write operations for the
      pci subsystem generics. Make the probe function to don't use
      legacy stuff and request bus resources directly. Get pci register
      base and ranges from device tree.
      The driver is not using PCI_LEGACY code anymore and shall use the
      PCI_DRIVERS_GENERIC option to correct compile it. Add also new
      Kconfig file for this controller setting there its correct dependencies.
      Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
      Tested-by: default avatarNeilBrown <neil@brown.name>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8571c62d
    • Michael Straube's avatar
      Revert "staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames" · c5fe50aa
      Michael Straube authored
      On a Raven Ridge system with a r8188eu usb wifi device
      commit 515ce733 ("staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames")
      is causing two bugs and a warning in dmesg:
      
      [   22.618465] BUG: scheduling while atomic: NetworkManager/489/0x00000202
      [   22.618466] Modules linked in: amdkfd amd_iommu_v2 amdgpu nls_iso8859_1 nls_cp437 vfat fat r8188eu(C) edac_mce_amd
      chash kvm_amd gpu_sched i2c_algo_bit ccp ttm rng_core lib80211 kvm snd_hda_codec_realtek snd_hda_codec_generic cfg80211
      snd_hda_codec_hdmi snd_hda_intel input_leds drm_kms_helper irqbypass snd_hda_codec crct10dif_pclmul crc32_pclmul
      ghash_clmulni_intel pcbc rfkill led_class mousedev joydev wmi_bmof snd_hda_core drm aesni_intel snd_hwdep aes_x86_64
      crypto_simd cryptd glue_helper snd_pcm pcspkr sp5100_tco snd_timer r8169 k10temp agpgart i2c_piix4 snd mii syscopyarea
      sysfillrect sysimgblt fb_sys_fops soundcore rtc_cmos evdev gpio_amdpt pinctrl_amd mac_hid wmi pcc_cpufreq acpi_cpufreq
      crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto hid_generic usbhid hid sd_mod
      [   22.618549]  ahci xhci_pci libahci xhci_hcd crc32c_intel libata usbcore scsi_mod usb_common
      [   22.618554] Preemption disabled at:
      [   22.618558] [<ffffffff94600954>] __dev_queue_xmit+0x74/0x910
      [   22.618561] CPU: 3 PID: 489 Comm: NetworkManager Tainted: G         C        4.18.0-rc7-staging+ #14
      [   22.618562] Hardware name: Gigabyte Technology Co., Ltd. A320M-S2H/A320M-S2H-CF, BIOS F23d 04/17/2018
      [   22.618563] Call Trace:
      [   22.618569]  dump_stack+0x5c/0x80
      [   22.618571]  ? __dev_queue_xmit+0x74/0x910
      [   22.618574]  __schedule_bug.cold.14+0x82/0x9b
      [   22.618576]  __schedule+0x6fd/0x8b0
      [   22.618578]  ? enqueue_task_fair+0xc3/0x730
      [   22.618580]  schedule+0x32/0x90
      [   22.618581]  schedule_timeout+0x311/0x4a0
      [   22.618583]  ? _raw_spin_unlock_irqrestore+0x20/0x40
      [   22.618585]  ? try_to_wake_up+0x231/0x480
      [   22.618586]  wait_for_common+0x15f/0x190
      [   22.618588]  ? wake_up_q+0x70/0x70
      [   22.618597]  ? rtw_aes_encrypt+0x26f/0x290 [r8188eu]
      [   22.618598]  wait_for_completion_killable+0x19/0x30
      [   22.618601]  call_usermodehelper_exec+0x115/0x160
      [   22.618603]  __request_module+0x1ac/0x3e2
      [   22.618606]  ? netlink_broadcast_filtered+0x142/0x400
      [   22.618607]  ? netlink_broadcast+0xf/0x20
      [   22.618615]  rtw_aes_encrypt+0x26f/0x290 [r8188eu]
      [   22.618622]  ? rtw_get_stainfo+0xe6/0x130 [r8188eu]
      [   22.618629]  rtw_xmitframe_coalesce+0x950/0xb00 [r8188eu]
      [   22.618631]  ? _raw_spin_lock_irqsave+0x25/0x50
      [   22.618638]  rtw_hal_xmit+0x83/0x130 [r8188eu]
      [   22.618645]  rtw_xmit+0x258/0x5d0 [r8188eu]
      [   22.618652]  rtw_xmit_entry+0xe8/0x2e7 [r8188eu]
      [   22.618654]  dev_hard_start_xmit+0xa5/0x240
      [   22.618657]  sch_direct_xmit+0x150/0x340
      [   22.618658]  __dev_queue_xmit+0x2f6/0x910
      [   22.618661]  packet_sendmsg+0x948/0x15a7
      [   22.618663]  ? attach_to_pi_owner+0x38/0x180
      [   22.618666]  sock_sendmsg+0x33/0x40
      [   22.618668]  __sys_sendto+0xee/0x160
      [   22.618670]  ? memzero_explicit+0xa/0x10
      [   22.618672]  ? urandom_read+0x120/0x270
      [   22.618675]  __x64_sys_sendto+0x24/0x30
      [   22.618677]  do_syscall_64+0x5b/0x170
      [   22.618678]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [   22.618680] RIP: 0033:0x7f0942790c12
      [   22.618680] Code: 48 83 ec 18 44 89 4c 24 08 e8 9a f5 ff ff 44 8b 4c 24 08 4d 89 f8 45 89 f2 89 c5 4c 89 ea 4c 89 e6
      89 df b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3a 89 ef 48 89 44 24 08 e8 ca f5 ff ff 48 8b
      [   22.618700] RSP: 002b:00007ffe2051be30 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
      [   22.618701] RAX: ffffffffffffffda RBX: 0000000000000011 RCX: 00007f0942790c12
      [   22.618702] RDX: 0000000000000148 RSI: 0000559278761700 RDI: 0000000000000011
      [   22.618703] RBP: 0000000000000000 R08: 00005592787aa860 R09: 0000000000000014
      [   22.618703] R10: 0000000000000000 R11: 0000000000000293 R12: 0000559278761700
      [   22.618704] R13: 0000000000000148 R14: 0000000000000000 R15: 00005592787aa860
      [   22.620488] lib80211_crypt: registered algorithm 'CCMP'
      [   22.620735] ------------[ cut here ]------------
      [   22.620738] DEBUG_LOCKS_WARN_ON(val > preempt_count())
      [   22.620744] WARNING: CPU: 3 PID: 489 at kernel/sched/core.c:3246 preempt_count_sub+0x5a/0x90
      [   22.620749] Modules linked in: lib80211_crypt_ccmp amdkfd amd_iommu_v2 amdgpu nls_iso8859_1 nls_cp437 vfat fat
      r8188eu(C) edac_mce_amd chash kvm_amd gpu_sched i2c_algo_bit ccp ttm rng_core lib80211 kvm snd_hda_codec_realtek
      snd_hda_codec_generic cfg80211 snd_hda_codec_hdmi snd_hda_intel input_leds drm_kms_helper irqbypass snd_hda_codec
      crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc rfkill led_class mousedev joydev wmi_bmof snd_hda_core drm
      aesni_intel snd_hwdep aes_x86_64 crypto_simd cryptd glue_helper snd_pcm pcspkr sp5100_tco snd_timer r8169 k10temp
      agpgart i2c_piix4 snd mii syscopyarea sysfillrect sysimgblt fb_sys_fops soundcore rtc_cmos evdev gpio_amdpt pinctrl_amd
      mac_hid wmi pcc_cpufreq acpi_cpufreq crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto
      hid_generic
      [   22.620792]  usbhid hid sd_mod ahci xhci_pci libahci xhci_hcd crc32c_intel libata usbcore scsi_mod usb_common
      [   22.620803] CPU: 3 PID: 489 Comm: NetworkManager Tainted: G        WC        4.18.0-rc7-staging+ #14
      [   22.620804] Hardware name: Gigabyte Technology Co., Ltd. A320M-S2H/A320M-S2H-CF, BIOS F23d 04/17/2018
      [   22.620808] RIP: 0010:preempt_count_sub+0x5a/0x90
      [   22.620809] Code: 14 f7 6b c3 e8 57 89 2d 00 85 c0 74 f6 8b 15 55 6a 5a 01 85 d2 75 ec 48 c7 c6 2e 01 e7 94 48 c7 c7
      db b2 e5 94 e8 90 77 fd ff <0f> 0b c3 84 d2 75 c9 e8 2a 89 2d 00 85 c0 74 c9 8b 05 28 6a 5a 01
      [   22.620842] RSP: 0018:ffffa1904133bc48 EFLAGS: 00010286
      [   22.620844] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
      [   22.620846] RDX: 0000000080000001 RSI: ffffffff94e82606 RDI: 00000000ffffffff
      [   22.620847] RBP: ffff8eb4449eac00 R08: 0000001af4246984 R09: 00000000000003f1
      [   22.620849] R10: ffffffff955f7700 R11: 0000000000000000 R12: ffff8eb4449eacac
      [   22.620850] R13: ffff8eb4565da800 R14: ffff8eb453ca2000 R15: 0000000000000003
      [   22.620852] FS:  00007f0944d69000(0000) GS:ffff8eb45ecc0000(0000) knlGS:0000000000000000
      [   22.620853] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   22.620854] CR2: 00007ffe20518fa8 CR3: 0000000207844000 CR4: 00000000003406e0
      [   22.620855] Call Trace:
      [   22.620859]  _raw_spin_unlock+0x16/0x30
      [   22.620862]  sch_direct_xmit+0x178/0x340
      [   22.620866]  __dev_queue_xmit+0x2f6/0x910
      [   22.620870]  packet_sendmsg+0x948/0x15a7
      [   22.620873]  ? attach_to_pi_owner+0x38/0x180
      [   22.620877]  sock_sendmsg+0x33/0x40
      [   22.620880]  __sys_sendto+0xee/0x160
      [   22.620885]  ? memzero_explicit+0xa/0x10
      [   22.620887]  ? urandom_read+0x120/0x270
      [   22.620891]  __x64_sys_sendto+0x24/0x30
      [   22.620893]  do_syscall_64+0x5b/0x170
      [   22.620896]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [   22.620898] RIP: 0033:0x7f0942790c12
      [   22.620899] Code: 48 83 ec 18 44 89 4c 24 08 e8 9a f5 ff ff 44 8b 4c 24 08 4d 89 f8 45 89 f2 89 c5 4c 89 ea 4c 89 e6
      89 df b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3a 89 ef 48 89 44 24 08 e8 ca f5 ff ff 48 8b
      [   22.620925] RSP: 002b:00007ffe2051be30 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
      [   22.620928] RAX: ffffffffffffffda RBX: 0000000000000011 RCX: 00007f0942790c12
      [   22.620929] RDX: 0000000000000148 RSI: 0000559278761700 RDI: 0000000000000011
      [   22.620930] RBP: 0000000000000000 R08: 00005592787aa860 R09: 0000000000000014
      [   22.620931] R10: 0000000000000000 R11: 0000000000000293 R12: 0000559278761700
      [   22.620933] R13: 0000000000000148 R14: 0000000000000000 R15: 00005592787aa860
      [   22.620936] ---[ end trace ecf9299fa6cc3176 ]---
      [   22.620940] BUG: using __this_cpu_read() in preemptible [00000000] code: NetworkManager/489
      [   22.620942] caller is __local_bh_enable_ip+0x50/0x80
      [   22.620945] CPU: 3 PID: 489 Comm: NetworkManager Tainted: G        WC        4.18.0-rc7-staging+ #14
      [   22.620946] Hardware name: Gigabyte Technology Co., Ltd. A320M-S2H/A320M-S2H-CF, BIOS F23d 04/17/2018
      [   22.620947] Call Trace:
      [   22.620950]  dump_stack+0x5c/0x80
      [   22.620955]  check_preemption_disabled.cold.0+0x46/0x51
      [   22.620958]  __local_bh_enable_ip+0x50/0x80
      [   22.620961]  __dev_queue_xmit+0x450/0x910
      [   22.620964]  packet_sendmsg+0x948/0x15a7
      [   22.620967]  ? attach_to_pi_owner+0x38/0x180
      [   22.620971]  sock_sendmsg+0x33/0x40
      [   22.620973]  __sys_sendto+0xee/0x160
      [   22.620976]  ? memzero_explicit+0xa/0x10
      [   22.620978]  ? urandom_read+0x120/0x270
      [   22.620982]  __x64_sys_sendto+0x24/0x30
      [   22.620984]  do_syscall_64+0x5b/0x170
      [   22.620986]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [   22.620990] RIP: 0033:0x7f0942790c12
      [   22.620991] Code: 48 83 ec 18 44 89 4c 24 08 e8 9a f5 ff ff 44 8b 4c 24 08 4d 89 f8 45 89 f2 89 c5 4c 89 ea 4c 89 e6
      89 df b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3a 89 ef 48 89 44 24 08 e8 ca f5 ff ff 48 8b
      [   22.621017] RSP: 002b:00007ffe2051be30 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
      [   22.621020] RAX: ffffffffffffffda RBX: 0000000000000011 RCX: 00007f0942790c12
      [   22.621021] RDX: 0000000000000148 RSI: 0000559278761700 RDI: 0000000000000011
      [   22.621024] RBP: 0000000000000000 R08: 00005592787aa860 R09: 0000000000000014
      [   22.621025] R10: 0000000000000000 R11: 0000000000000293 R12: 0000559278761700
      [   22.621026] R13: 0000000000000148 R14: 0000000000000000 R15: 00005592787aa860
      
      Revert the commit fixes the issues and dmesg looks good again.
      
      Fixes: 515ce733 ("staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames")
      Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c5fe50aa
    • Gao Xiang's avatar
      staging: erofs: remove an extra semicolon in z_erofs_vle_unzip_all · 3978c8e3
      Gao Xiang authored
      There is an extra semicolon in z_erofs_vle_unzip_all, remove it.
      Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarGao Xiang <gaoxiang25@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3978c8e3
    • zhong jiang's avatar
      staging: gasket: remove some extra semicolon · ec6e6925
      zhong jiang authored
      That semicolons are unneeded, Just remove them.
      Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ec6e6925
    • Sumit Pundir's avatar
      staging: gasket: fix code indent for conditional statement · 8d84a9c1
      Sumit Pundir authored
      Fixed a coding style issue related to indentation. Reported by
      checkpatch.pl
      Signed-off-by: default avatarSumit Pundir <pundirsumit11@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8d84a9c1
    • Todd Poynor's avatar
      staging: gasket: core: remove incorrect extraneous comment · d37d2dd4
      Todd Poynor authored
      A copy-and-pasted comment from another code sequence is removed from
      gasket core init sequence.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d37d2dd4
    • Todd Poynor's avatar
      staging: gasket: apex: place in low power reset until opened · 4801fc6f
      Todd Poynor authored
      The apex device is left out of reset mode at the end of device
      probe/initialize processing.  Add a call to enter reset at the end of
      the sequence, triggering power gating and other low power features.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4801fc6f
    • Todd Poynor's avatar
      staging: gasket: core: protect against races during unregister · 95a2c279
      Todd Poynor authored
      Keep mutex held across the unregistration operation, until the
      driver_desc field of the global table is removed, to prevent a
      concurrent accessor from looking up the driver_desc while
      gasket_unregister_device() is in the processing of removing it.
      Reported-by: default avatarGuenter Roeck <groeck@chromium.org>
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      95a2c279
    • Todd Poynor's avatar
      staging: gasket: apex: move sysfs setup code to probe function · 71934948
      Todd Poynor authored
      The gasket framework no longer provides callbacks to the device driver
      for sysfs setup and teardown.  Move the sysfs setup code to the device
      probe function.  Apex does not implement sysfs cleanup code.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      71934948
    • Todd Poynor's avatar
      staging: gasket: core: remove sysfs setup and cleanup callbacks · 565eeeda
      Todd Poynor authored
      Gasket device drivers now call into the gasket framework to initialize
      and de-initialize, rather than the other way around.  The calling code
      can perform sysfs setup and cleanup actions without callbacks from the
      framework.  Remove the sysfs setup and cleanup callbacks.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      565eeeda
    • Todd Poynor's avatar
      staging: gasket: apex: fold device add/remove logic inline · c169d876
      Todd Poynor authored
      Gasket device drivers are now in charge of the device add and remove
      sequences; the framework callbacks for these are deleted.  Move the
      apex device add callback code to the probe function.  Apex did not
      implement the removal callback.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c169d876
    • Todd Poynor's avatar
      staging: gasket: core: delete device add and remove callbacks · 4420ea93
      Todd Poynor authored
      Gasket device drivers are now in charge of orchestrating the device add
      and removal sequences, so the callbacks from the framework to the device
      drivers for these events are no longer needed.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4420ea93
    • Todd Poynor's avatar
      staging: gasket: apex: enable/disable gasket device from apex · 38da89d5
      Todd Poynor authored
      Gasket framework now places device drivers in charge of calling APIs to
      enable and disable gasket device operations.  Make the appropriate calls
      from the apex driver.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      38da89d5
    • Todd Poynor's avatar
      staging: gasket: core: let device driver enable/disable gasket device · 39091410
      Todd Poynor authored
      Move gasket device enable/disable functions from internal calls to
      external calls from the gasket device drivers.  The device driver will
      call these functions at appropriate times in its processing, placing
      the device driver in control of this sequence and reducing the need for
      callbacks from framework back to the device drivers during the
      enable/disable sequences.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      39091410
    • Todd Poynor's avatar
      staging: gasket: apex: remove device enable and disable callbacks · 2f649036
      Todd Poynor authored
      These are not implemented for apex, and are now being removed from the
      gasket framework.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2f649036
    • Todd Poynor's avatar
      staging: gasket: core: remove device enable and disable callbacks · 1b25e6e8
      Todd Poynor authored
      Device enable/disable operations are moving from being initiated through
      the gasket framework to being initiated by the gasket device driver.
      The driver can perform any processing needed for these operations before
      or after the calls into the framework.  Neither of these callbacks are
      implemented for the only gasket driver upstream today, apex.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1b25e6e8
    • Todd Poynor's avatar
      staging: gasket: core: convert remaining info logs to debug · c75e2bb3
      Todd Poynor authored
      Remaining info-level logs in gasket core converted to debug-level; the
      information is not needed during normal system operation.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c75e2bb3
    • Todd Poynor's avatar
      staging: gasket: apex: move PCI core calls to apex driver · 1453e90c
      Todd Poynor authored
      Apex driver moves PCI core calls like probe, enable, and remove from
      gasket to apex.  Call new functions in gasket to register apex as a PCI
      device to the gasket framework.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1453e90c
    • Todd Poynor's avatar
      staging: gasket: core: move core PCI calls to device drivers · b7072b24
      Todd Poynor authored
      Remove gasket wrapping of PCI probe, enable, disable, and remove
      functions.  Replace with calls to add and remove PCI gasket devices,
      to be called by the gasket device drivers.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b7072b24
    • Todd Poynor's avatar
      staging: gasket: sysfs: clean up state if ENOMEM removing mapping · a81d6789
      Todd Poynor authored
      If kcalloc() returns NULL in put_mapping(), continue to clean up state,
      including dropping the reference on the struct device and free attribute
      memory.
      Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a81d6789
  2. 05 Aug, 2018 20 commits