* [PATCH 12/13] ARM64: dts: rockchip: replace to "max-frequency" instead of "clock-freq-min-max"
From: Heiko Stuebner @ 2016-11-09 14:37 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161103062135.10697-13-jh80.chung@samsung.com>
Am Donnerstag, 3. November 2016, 15:21:34 CET schrieb Jaehoon Chung:
> In drivers/mmc/core/host.c, there is "max-freqeuncy" property.
> It should be same behavior, So Use the "max-frequency" instead of
> "clock-freq-min-max".
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
applied to my dts64 branch for 4.10
Thanks
Heiko
^ permalink raw reply
* Re: [PATCH 12/13] ARM64: dts: rockchip: replace to "max-frequency" instead of "clock-freq-min-max"
From: Heiko Stuebner @ 2016-11-09 14:37 UTC (permalink / raw)
To: Jaehoon Chung
Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt, krzk,
shawn.lin
In-Reply-To: <20161103062135.10697-13-jh80.chung@samsung.com>
Am Donnerstag, 3. November 2016, 15:21:34 CET schrieb Jaehoon Chung:
> In drivers/mmc/core/host.c, there is "max-freqeuncy" property.
> It should be same behavior, So Use the "max-frequency" instead of
> "clock-freq-min-max".
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
applied to my dts64 branch for 4.10
Thanks
Heiko
^ permalink raw reply
* [distros-debian-squeeze test] 68018: tolerable FAIL
From: Platform Team regression test user @ 2016-11-09 14:37 UTC (permalink / raw)
To: xen-devel, osstest-admin
flight 68018 distros-debian-squeeze real [real]
http://osstest.xs.citrite.net/~osstest/testlogs/logs/68018/
Failures :-/ but no regressions.
Regressions which are regarded as allowable (not blocking):
test-amd64-amd64-amd64-squeeze-netboot-pygrub 9 debian-di-install fail like 67978
test-amd64-amd64-i386-squeeze-netboot-pygrub 9 debian-di-install fail like 67978
test-amd64-i386-amd64-squeeze-netboot-pygrub 9 debian-di-install fail like 67978
test-amd64-i386-i386-squeeze-netboot-pygrub 9 debian-di-install fail like 67978
baseline version:
flight 67978
jobs:
build-amd64 pass
build-armhf pass
build-i386 pass
build-amd64-pvops pass
build-armhf-pvops pass
build-i386-pvops pass
test-amd64-amd64-amd64-squeeze-netboot-pygrub fail
test-amd64-i386-amd64-squeeze-netboot-pygrub fail
test-amd64-amd64-i386-squeeze-netboot-pygrub fail
test-amd64-i386-i386-squeeze-netboot-pygrub fail
------------------------------------------------------------
sg-report-flight on osstest.xs.citrite.net
logs: /home/osstest/logs
images: /home/osstest/images
Logs, config files, etc. are available at
http://osstest.xs.citrite.net/~osstest/testlogs/logs
Test harness code can be found at
http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary
Push not applicable.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply
* Re: [PATCH] t6026-merge-attr: don't fail if sleep exits early
From: Andreas Schwab @ 2016-11-09 14:36 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Jeff King, Johannes Sixt, git
In-Reply-To: <alpine.DEB.2.20.1611091437280.72596@virtualbox>
On Nov 09 2016, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> The reason why we do not ignore kill errors is that we want to make sure
> that the script *actually ran*. Otherwise, the thing we need to test here
> does not necessarily get tested.
That can be tested by looking for the pid file.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply
* Re: [PATCH v9 0/8] thunderbolt: Introducing Thunderbolt(TM) Networking
From: Simon Guinot @ 2016-11-09 14:36 UTC (permalink / raw)
To: Amir Levy
Cc: gregkh, andreas.noever, bhelgaas, corbet, linux-kernel, linux-pci,
netdev, linux-doc, mario_limonciello, thunderbolt-linux,
mika.westerberg, tomas.winkler, xiong.y.zhang, Michael Jamet
In-Reply-To: <1478701208-4585-1-git-send-email-amir.jer.levy@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2919 bytes --]
On Wed, Nov 09, 2016 at 04:20:00PM +0200, Amir Levy wrote:
> This driver enables Thunderbolt Networking on non-Apple platforms
> running Linux.
>
> Thunderbolt Networking provides peer-to-peer connections to transfer
> files between computers, perform PC migrations, and/or set up small
> workgroups with shared storage.
>
> This is a virtual connection that emulates an Ethernet adapter that
> enables Ethernet networking with the benefit of Thunderbolt superfast
> medium capability.
>
> Thunderbolt Networking enables two hosts and several devices that
> have a Thunderbolt controller to be connected together in a linear
> (Daisy chain) series from a single port.
>
> Thunderbolt Networking for Linux is compatible with Thunderbolt
> Networking on systems running macOS or Windows and also supports
> Thunderbolt generation 2 and 3 controllers.
>
> Note that all pre-existing Thunderbolt generation 3 features, such as
> USB, Display and other Thunderbolt device connectivity will continue
> to function exactly as they did prior to enabling Thunderbolt Networking.
>
> Code and Software Specifications:
> This kernel code creates a virtual ethernet device for computer to
> computer communication over a Thunderbolt cable.
> The new driver is a separate driver to the existing Thunderbolt driver.
> It is designed to work on systems running Linux that
> interface with Intel Connection Manager (ICM) firmware based
> Thunderbolt controllers that support Thunderbolt Networking.
> The kernel code operates in coordination with the Thunderbolt user-
> space daemon to implement full Thunderbolt networking functionality.
>
> Hardware Specifications:
> Thunderbolt Hardware specs have not yet been published but are used
> where necessary for register definitions.
Hi Amir,
I have an ASUS "All Series/Z87-DELUXE/QUAD" motherboard with a
Thunderbolt 2 "Falcon Ridge" chipset (device ID 156d).
Is the thunderbolt-icm driver supposed to work with this chipset ?
I have installed both a 4.8.6 Linux kernel (patched with your v9
series) and the thunderbolt-software-daemon (27 october release)
inside a Debian system (Jessie).
If I connect the ASUS motherboard with a MacBook Pro (Thunderbolt 2,
device ID 156c), I can see that the thunderbolt-icm driver is loaded and
that the thunderbolt-software-daemon is well started. But the Ethernet
interface is not created.
I have attached to this email the syslog file. There is the logs from
both the kernel and the daemon inside. Note that the daemon logs are
everything but clear about what could be the issue. Maybe I missed some
kind of configuration ? But I failed to find any valuable information
about configuring the driver and/or the daemon in the various
documentation files.
Please, can you provide some guidance ? I'd really like to test your
patch series.
Thanks in advance.
Simon
[-- Attachment #1.2: syslog --]
[-- Type: text/plain, Size: 154325 bytes --]
Nov 9 16:30:30 debian8 systemd-modules-load[218]: Inserted module 'lp'
Nov 9 16:30:30 debian8 systemd-modules-load[218]: Inserted module 'ppdev'
Nov 9 16:30:30 debian8 systemd-modules-load[218]: Inserted module 'parport_pc'
Nov 9 16:30:30 debian8 systemd-modules-load[218]: Inserted module 'fuse'
Nov 9 16:30:30 debian8 systemd[1]: Started Create Static Device Nodes in /dev.
Nov 9 16:30:30 debian8 systemd[1]: Starting udev Kernel Device Manager...
Nov 9 16:30:30 debian8 systemd[1]: Started Load Kernel Modules.
Nov 9 16:30:30 debian8 systemd[1]: Mounting FUSE Control File System...
Nov 9 16:30:30 debian8 systemd[1]: Starting Apply Kernel Variables...
Nov 9 16:30:30 debian8 systemd[1]: Mounted Configuration File System.
Nov 9 16:30:30 debian8 systemd[1]: Mounted FUSE Control File System.
Nov 9 16:30:30 debian8 systemd[1]: Started udev Kernel Device Manager.
Nov 9 16:30:30 debian8 systemd[1]: Starting Copy rules generated while the root was ro...
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: MD array assembly...
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: Set preliminary keymap...
Nov 9 16:30:30 debian8 systemd[1]: Started Apply Kernel Variables.
Nov 9 16:30:30 debian8 systemd[1]: Started Copy rules generated while the root was ro.
Nov 9 16:30:30 debian8 mdadm-raid[247]: Generating udev events for MD arrays...done.
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: MD array assembly.
Nov 9 16:30:30 debian8 keyboard-setup[248]: Setting preliminary keymap...done.
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: Set preliminary keymap.
Nov 9 16:30:30 debian8 systemd[1]: Starting Remount Root and Kernel File Systems...
Nov 9 16:30:30 debian8 systemd[1]: Started Remount Root and Kernel File Systems.
Nov 9 16:30:30 debian8 systemd[1]: Started Various fixups to make systemd work better on Debian.
Nov 9 16:30:30 debian8 systemd[1]: Starting Load/Save Random Seed...
Nov 9 16:30:30 debian8 systemd[1]: Starting Local File Systems (Pre).
Nov 9 16:30:30 debian8 systemd[1]: Reached target Local File Systems (Pre).
Nov 9 16:30:30 debian8 systemd[1]: Started Load/Save Random Seed.
Nov 9 16:30:30 debian8 mtp-probe: checking bus 3, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4"
Nov 9 16:30:30 debian8 mtp-probe: checking bus 3, device 4: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-5"
Nov 9 16:30:30 debian8 mtp-probe: checking bus 3, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-6"
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Linux version 4.8.6+ (sguinot@debian8) (gcc version 4.9.2 (Debian 4.9.2-10) ) #2 SMP Mon Nov 7 18:52:35 CET 2016
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.8.6+ root=UUID=6e1b0503-9be7-40ef-8da7-ef7e35297f58 ro console=ttyS1,115200n8
Nov 9 16:30:30 debian8 mtp-probe: bus: 3, device: 4 was not an MTP device
Nov 9 16:30:30 debian8 kernel: [ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Nov 9 16:30:30 debian8 kernel: [ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Nov 9 16:30:30 debian8 kernel: [ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Nov 9 16:30:30 debian8 kernel: [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
Nov 9 16:30:30 debian8 mtp-probe: bus: 3, device: 5 was not an MTP device
Nov 9 16:30:30 debian8 kernel: [ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] x86/fpu: Using 'eager' FPU context switches.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] e820: BIOS-provided physical RAM map:
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x0000000000057fff] usable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000000058000-0x0000000000058fff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000000059000-0x000000000009efff] usable
Nov 9 16:30:30 debian8 mtp-probe: bus: 3, device: 3 was not an MTP device
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003508dfff] usable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x000000003508e000-0x0000000035094fff] ACPI NVS
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000035095000-0x00000000354ecfff] usable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000354ed000-0x0000000035960fff] reserved
Nov 9 16:30:30 debian8 systemd[1]: Found device ST1000DM003-9YN162 1.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000035961000-0x00000000486c4fff] usable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000486c5000-0x00000000488cdfff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000488ce000-0x00000000488e6fff] ACPI data
Nov 9 16:30:30 debian8 systemd[1]: Starting File System Check on /dev/disk/by-uuid/057B-B280...
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000488e7000-0x0000000048e2cfff] ACPI NVS
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000048e2d000-0x0000000049f48fff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000049f49000-0x0000000049ffefff] type 20
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000049fff000-0x0000000049ffffff] usable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x000000004b000000-0x000000004f1fffff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
Nov 9 16:30:30 debian8 systemd[1]: Found device ST1000DM003-9YN162 4.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed03fff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
Nov 9 16:30:30 debian8 systemd[1]: Starting File System Check on /dev/disk/by-uuid/39f58bf3-20a1-4c5d-8c38-7804598f1b07...
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000001afdfffff] usable
Nov 9 16:30:30 debian8 systemd[1]: Found device ST1000DM003-9YN162 3.
Nov 9 16:30:30 debian8 systemd[1]: Found device ST1000DM003-9YN162 3.
Nov 9 16:30:30 debian8 systemd[1]: Activating swap Swap Partition...
Nov 9 16:30:30 debian8 systemd[1]: Activating swap /dev/disk/by-uuid/e37efc6f-badb-45c0-8854-f115567dc8fc...
Nov 9 16:30:30 debian8 systemd[1]: Activated swap Swap Partition.
Nov 9 16:30:30 debian8 systemd[1]: Activated swap /dev/disk/by-uuid/e37efc6f-badb-45c0-8854-f115567dc8fc.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] NX (Execute Disable) protection: active
Nov 9 16:30:30 debian8 systemd[1]: Starting Swap.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] efi: EFI v2.31 by American Megatrends
Nov 9 16:30:30 debian8 kernel: [ 0.000000] efi: ESRT=0x49f47818 ACPI=0x488d3000 ACPI 2.0=0x488d3000 SMBIOS=0xf04c0 MPS=0xfd4f0
Nov 9 16:30:30 debian8 kernel: [ 0.000000] esrt: Reserving ESRT space from 0x0000000049f47818 to 0x0000000049f47850.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] SMBIOS 2.7 present.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] DMI: ASUS All Series/Z87-DELUXE/QUAD, BIOS 2103 08/18/2014
Nov 9 16:30:30 debian8 kernel: [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] e820: last_pfn = 0x1afe00 max_arch_pfn = 0x400000000
Nov 9 16:30:30 debian8 kernel: [ 0.000000] MTRR default type: uncachable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] MTRR fixed ranges enabled:
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 00000-9FFFF write-back
Nov 9 16:30:30 debian8 kernel: [ 0.000000] A0000-BFFFF uncachable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] C0000-CFFFF write-protect
Nov 9 16:30:30 debian8 systemd[1]: Reached target Swap.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] D0000-DFFFF uncachable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] E0000-FFFFF write-protect
Nov 9 16:30:30 debian8 kernel: [ 0.000000] MTRR variable ranges enabled:
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 0 base 0000000000 mask 7F00000000 write-back
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 1 base 0100000000 mask 7F80000000 write-back
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 2 base 0180000000 mask 7FC0000000 write-back
Nov 9 16:30:30 debian8 systemd-fsck[388]: /dev/sda4: clean, 119435/60145664 files, 7633198/240576768 blocks
Nov 9 16:30:30 debian8 systemd[1]: Started File System Check on /dev/disk/by-uuid/39f58bf3-20a1-4c5d-8c38-7804598f1b07.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 3 base 0080000000 mask 7F80000000 uncachable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 4 base 0060000000 mask 7FE0000000 uncachable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 5 base 0050000000 mask 7FF0000000 uncachable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 6 base 004C000000 mask 7FFC000000 uncachable
Nov 9 16:30:30 debian8 systemd[1]: Mounting /home...
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 7 base 004B000000 mask 7FFF000000 uncachable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 8 base 01B0000000 mask 7FF0000000 uncachable
Nov 9 16:30:30 debian8 kernel: [ 0.000000] 9 base 01AFE00000 mask 7FFFE00000 uncachable
Nov 9 16:30:30 debian8 systemd[1]: Mounted /home.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT
Nov 9 16:30:30 debian8 kernel: [ 0.000000] e820: update [mem 0x4b000000-0xffffffff] usable ==> reserved
Nov 9 16:30:30 debian8 kernel: [ 0.000000] e820: last_pfn = 0x4a000 max_arch_pfn = 0x400000000
Nov 9 16:30:30 debian8 kernel: [ 0.000000] found SMP MP-table at [mem 0x000fd800-0x000fd80f] mapped at [ffff9882400fd800]
Nov 9 16:30:30 debian8 systemd[1]: Starting system-systemd\x2drfkill.slice.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Base memory trampoline at [ffff988240097000] 97000 size 24576
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Using GB pages for direct mapping
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181960000, 0x181960fff] PGTABLE
Nov 9 16:30:30 debian8 systemd[1]: Created slice system-systemd\x2drfkill.slice.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181961000, 0x181961fff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181962000, 0x181962fff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181963000, 0x181963fff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181964000, 0x181964fff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181965000, 0x181965fff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181966000, 0x181966fff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181967000, 0x181967fff] PGTABLE
Nov 9 16:30:30 debian8 systemd[1]: Starting Load/Save RF Kill Switch Status of rfkill0...
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181968000, 0x181968fff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x181969000, 0x181969fff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] BRK [0x18196a000, 0x18196afff] PGTABLE
Nov 9 16:30:30 debian8 kernel: [ 0.000000] RAMDISK: [mem 0x17560000-0x22fcffff]
Nov 9 16:30:30 debian8 systemd[1]: Mounted Configuration File System.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: Early table checksum verification disabled
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: RSDP 0x00000000488D3000 000024 (v02 ALASKA)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: XSDT 0x00000000488D3080 00007C (v01 ALASKA A M I 01072009 AMI 00010013)
Nov 9 16:30:30 debian8 systemd[1]: Started Set Up Additional Binary Formats.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: FACP 0x00000000488E1878 00010C (v05 ALASKA A M I 01072009 AMI 00010013)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: DSDT 0x00000000488D3198 00E6DC (v02 ALASKA A M I 00000031 INTL 20091112)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: FACS 0x0000000048E2B080 000040
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: APIC 0x00000000488E1988 000092 (v03 ALASKA A M I 01072009 AMI 00010013)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: FPDT 0x00000000488E1A20 000044 (v01 ALASKA A M I 01072009 AMI 00010013)
Nov 9 16:30:30 debian8 systemd[1]: Started Various fixups to make systemd work better on Debian.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: LPIT 0x00000000488E1A68 00005C (v01 ALASKA A M I 00000000 AMI. 00000005)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: SSDT 0x00000000488E1AC8 000539 (v01 PmRef Cpu0Ist 00003000 INTL 20091112)
Nov 9 16:30:30 debian8 systemd[1]: Started File System Check on Root Device.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: SSDT 0x00000000488E2008 000AD8 (v01 PmRef CpuPm 00003000 INTL 20091112)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: MCFG 0x00000000488E2AE0 00003C (v01 ALASKA A M I 01072009 MSFT 00000097)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: HPET 0x00000000488E2B20 000038 (v01 ALASKA A M I 01072009 AMI. 00000005)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: SSDT 0x00000000488E2B58 00036D (v01 SataRe SataTabl 00001000 INTL 20091112)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: SSDT 0x00000000488E2EC8 0034E1 (v01 SaSsdt SaSsdt 00003000 INTL 20091112)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: BGRT 0x00000000488E6408 000038 (v00 ALASKA A M I 01072009 AMI 00010013)
Nov 9 16:30:30 debian8 systemd-fsck[374]: fsck.fat 3.0.27 (2014-11-12)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: Local APIC address 0xfee00000
Nov 9 16:30:30 debian8 kernel: [ 0.000000] No NUMA configuration found
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Faking a node at [mem 0x0000000000000000-0x00000001afdfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] NODE_DATA(0) allocated [mem 0x1afdfb000-0x1afdfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Zone ranges:
Nov 9 16:30:30 debian8 kernel: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
Nov 9 16:30:30 debian8 systemd-fsck[374]: /dev/sda1: 9 files, 69/130812 clusters
Nov 9 16:30:30 debian8 kernel: [ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Normal [mem 0x0000000100000000-0x00000001afdfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Device empty
Nov 9 16:30:30 debian8 systemd[1]: Started File System Check on /dev/disk/by-uuid/057B-B280.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Movable zone start for each node
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Early memory node ranges
Nov 9 16:30:30 debian8 kernel: [ 0.000000] node 0: [mem 0x0000000000001000-0x0000000000057fff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] node 0: [mem 0x0000000000059000-0x000000000009efff]
Nov 9 16:30:30 debian8 systemd[1]: Mounting /boot/efi...
Nov 9 16:30:30 debian8 kernel: [ 0.000000] node 0: [mem 0x0000000000100000-0x000000003508dfff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] node 0: [mem 0x0000000035095000-0x00000000354ecfff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] node 0: [mem 0x0000000035961000-0x00000000486c4fff]
Nov 9 16:30:30 debian8 systemd[1]: Started Load/Save RF Kill Switch Status of rfkill0.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] node 0: [mem 0x0000000049fff000-0x0000000049ffffff]
Nov 9 16:30:30 debian8 systemd[1]: Starting Sound Card.
Nov 9 16:30:30 debian8 systemd[1]: Reached target Sound Card.
Nov 9 16:30:30 debian8 systemd[1]: Mounted /boot/efi.
Nov 9 16:30:30 debian8 systemd[1]: Starting Local File Systems.
Nov 9 16:30:30 debian8 systemd[1]: Reached target Local File Systems.
Nov 9 16:30:30 debian8 systemd[1]: Starting Create Volatile Files and Directories...
Nov 9 16:30:30 debian8 systemd[1]: Starting Remote File Systems.
Nov 9 16:30:30 debian8 systemd[1]: Reached target Remote File Systems.
Nov 9 16:30:30 debian8 systemd[1]: Starting Trigger Flushing of Journal to Persistent Storage...
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: Prepare console...
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: Raise network interfaces....
Nov 9 16:30:30 debian8 systemd[1]: Started Trigger Flushing of Journal to Persistent Storage.
Nov 9 16:30:30 debian8 systemd[1]: Started Create Volatile Files and Directories.
Nov 9 16:30:30 debian8 systemd[1]: Starting Update UTMP about System Boot/Shutdown...
Nov 9 16:30:30 debian8 kbd[428]: Setting console screen modes.
Nov 9 16:30:30 debian8 networking[429]: Configuring network interfaces.../etc/network/interfaces:11: too few parameters for iface line
Nov 9 16:30:30 debian8 networking[429]: ifquery: couldn't read interfaces file "/etc/network/interfaces"
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: Raise network interfaces..
Nov 9 16:30:30 debian8 networking[429]: /etc/network/interfaces:11: too few parameters for iface line
Nov 9 16:30:30 debian8 kernel: [ 0.000000] node 0: [mem 0x0000000100000000-0x00000001afdfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x00000001afdfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] On node 0 totalpages: 1015784
Nov 9 16:30:30 debian8 networking[429]: ifquery: couldn't read interfaces file "/etc/network/interfaces"
Nov 9 16:30:30 debian8 kernel: [ 0.000000] DMA zone: 64 pages used for memmap
Nov 9 16:30:30 debian8 kernel: [ 0.000000] DMA zone: 26 pages reserved
Nov 9 16:30:30 debian8 networking[429]: /etc/network/interfaces:11: too few parameters for iface line
Nov 9 16:30:30 debian8 kernel: [ 0.000000] DMA zone: 3997 pages, LIFO batch:0
Nov 9 16:30:30 debian8 kernel: [ 0.000000] DMA32 zone: 4554 pages used for memmap
Nov 9 16:30:30 debian8 kernel: [ 0.000000] DMA32 zone: 291403 pages, LIFO batch:31
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Normal zone: 11256 pages used for memmap
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Normal zone: 720384 pages, LIFO batch:31
Nov 9 16:30:30 debian8 networking[429]: ifup: couldn't read interfaces file "/etc/network/interfaces"
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Reserving Intel graphics memory at 0x000000004b200000-0x000000004f1fffff
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: PM-Timer IO Port: 0x1808
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: Local APIC address 0xfee00000
Nov 9 16:30:30 debian8 networking[429]: failed.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
Nov 9 16:30:30 debian8 kernel: [ 0.000000] IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: IRQ0 used by override.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: IRQ9 used by override.
Nov 9 16:30:30 debian8 systemd[1]: Starting Network.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Using ACPI (MADT) for SMP configuration information
Nov 9 16:30:30 debian8 kernel: [ 0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
Nov 9 16:30:30 debian8 kernel: [ 0.000000] smpboot: Allowing 8 CPUs, 0 hotplug CPUs
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
Nov 9 16:30:30 debian8 systemd[1]: Reached target Network.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x00058000-0x00058fff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000fffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x3508e000-0x35094fff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x354ed000-0x35960fff]
Nov 9 16:30:30 debian8 systemd[1]: Starting Network is Online.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x486c5000-0x488cdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x488ce000-0x488e6fff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x488e7000-0x48e2cfff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x48e2d000-0x49f48fff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x49f49000-0x49ffefff]
Nov 9 16:30:30 debian8 systemd[1]: Reached target Network is Online.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x4a000000-0x4affffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x4b000000-0x4f1fffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0x4f200000-0xdfffffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xe0000000-0xefffffff]
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: RPC portmapper replacement...
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xf0000000-0xfebfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xfec00000-0xfec00fff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xfec01000-0xfecfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xfed00000-0xfed03fff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xfed04000-0xfed1bfff]
Nov 9 16:30:30 debian8 systemd[1]: Started Update UTMP about System Boot/Shutdown.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xfed1c000-0xfed1ffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xfed20000-0xfedfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xfeffffff]
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PM: Registered nosave memory: [mem 0xff000000-0xffffffff]
Nov 9 16:30:30 debian8 kbd[428]: setterm: $TERM is not defined.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] e820: [mem 0x4f200000-0xdfffffff] available for PCI devices
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Booting paravirtualized kernel on bare hardware
Nov 9 16:30:30 debian8 kernel: [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: Prepare console.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:8 nr_node_ids:1
Nov 9 16:30:30 debian8 kernel: [ 0.000000] percpu: Embedded 35 pages/cpu @ffff9883efa00000 s104792 r8192 d30376 u262144
Nov 9 16:30:30 debian8 kernel: [ 0.000000] pcpu-alloc: s104792 r8192 d30376 u262144 alloc=1*2097152
Nov 9 16:30:30 debian8 kernel: [ 0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 999884
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Policy zone: Normal
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: Set console font and keymap...
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.8.6+ root=UUID=6e1b0503-9be7-40ef-8da7-ef7e35297f58 ro console=ttyS1,115200n8
Nov 9 16:30:30 debian8 kernel: [ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Calgary: detecting Calgary via BIOS EBDA area
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
Nov 9 16:30:30 debian8 rpcbind[467]: Starting rpcbind daemon....
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Memory: 3499716K/4063136K available (6083K kernel code, 1232K rwdata, 2776K rodata, 1376K init, 808K bss, 563420K reserved, 0K cma-reserved)
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Hierarchical RCU implementation.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Build-time adjustment of leaf fanout to 64.
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: RPC portmapper replacement.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=8.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=8
Nov 9 16:30:30 debian8 kernel: [ 0.000000] NR_IRQS:33024 nr_irqs:488 16
Nov 9 16:30:30 debian8 kernel: [ 0.000000] Console: colour dummy device 80x25
Nov 9 16:30:30 debian8 systemd[1]: Starting RPC Port Mapper.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] console [ttyS1] enabled
Nov 9 16:30:30 debian8 kernel: [ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484882848 ns
Nov 9 16:30:30 debian8 kernel: [ 0.000000] hpet clockevent registered
Nov 9 16:30:30 debian8 systemd[1]: Reached target RPC Port Mapper.
Nov 9 16:30:30 debian8 kernel: [ 0.000000] tsc: Fast TSC calibration using PIT
Nov 9 16:30:30 debian8 kernel: [ 0.000000] tsc: Detected 3398.200 MHz processor
Nov 9 16:30:30 debian8 kernel: [ 0.000017] Calibrating delay loop (skipped), value calculated using timer frequency.. 6796.40 BogoMIPS (lpj=13592800)
Nov 9 16:30:30 debian8 kernel: [ 0.000404] pid_max: default: 32768 minimum: 301
Nov 9 16:30:30 debian8 kernel: [ 0.000582] ACPI: Core revision 20160422
Nov 9 16:30:30 debian8 kernel: [ 0.008302] ACPI: 5 ACPI AML tables successfully acquired and loaded
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: NFS support files common to client and server...
Nov 9 16:30:30 debian8 kernel: [ 0.008537]
Nov 9 16:30:30 debian8 kernel: [ 0.009185] Security Framework initialized
Nov 9 16:30:30 debian8 kernel: [ 0.009335] Yama: becoming mindful.
Nov 9 16:30:30 debian8 kernel: [ 0.009467] AppArmor: AppArmor disabled by boot time parameter
Nov 9 16:30:30 debian8 console-setup[472]: Setting up console font and keymap...done.
Nov 9 16:30:30 debian8 kernel: [ 0.009813] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Nov 9 16:30:30 debian8 kernel: [ 0.010979] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Nov 9 16:30:30 debian8 kernel: [ 0.011653] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: Set console font and keymap.
Nov 9 16:30:30 debian8 kernel: [ 0.011894] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
Nov 9 16:30:30 debian8 kernel: [ 0.012346] CPU: Physical Processor ID: 0
Nov 9 16:30:30 debian8 kernel: [ 0.012492] CPU: Processor Core ID: 0
Nov 9 16:30:30 debian8 kernel: [ 0.012629] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
Nov 9 16:30:30 debian8 kernel: [ 0.012844] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
Nov 9 16:30:30 debian8 rpc.statd[541]: Version 1.2.8 starting
Nov 9 16:30:30 debian8 kernel: [ 0.013098] mce: CPU supports 9 MCE banks
Nov 9 16:30:30 debian8 kernel: [ 0.013250] CPU0: Thermal monitoring enabled (TM1)
Nov 9 16:30:30 debian8 kernel: [ 0.013434] process: using mwait in idle threads
Nov 9 16:30:30 debian8 sm-notify[542]: Version 1.2.8 starting
Nov 9 16:30:30 debian8 kernel: [ 0.013603] Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024
Nov 9 16:30:30 debian8 kernel: [ 0.013822] Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4
Nov 9 16:30:30 debian8 kernel: [ 0.014300] Freeing SMP alternatives memory: 24K (ffffffffba28e000 - ffffffffba294000)
Nov 9 16:30:30 debian8 kernel: [ 0.022238] ftrace: allocating 24996 entries in 98 pages
Nov 9 16:30:30 debian8 kernel: [ 0.028985] smpboot: APIC(0) Converting physical 0 to logical package 0
Nov 9 16:30:30 debian8 nfs-common[535]: Starting NFS common utilities: statd idmapd.
Nov 9 16:30:30 debian8 kernel: [ 0.029223] smpboot: Max logical packages: 2
Nov 9 16:30:30 debian8 kernel: [ 0.029443] x2apic: IRQ remapping doesn't support X2APIC mode
Nov 9 16:30:30 debian8 kernel: [ 0.030047] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: NFS support files common to client and server.
Nov 9 16:30:30 debian8 kernel: [ 0.069946] TSC deadline timer enabled
Nov 9 16:30:30 debian8 kernel: [ 0.069948] smpboot: CPU0: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (family: 0x6, model: 0x3c, stepping: 0x3)
Nov 9 16:30:30 debian8 kernel: [ 0.070317] Performance Events: PEBS fmt2+, Haswell events, 16-deep LBR, full-width counters, Intel PMU driver.
Nov 9 16:30:30 debian8 kernel: [ 0.070721] ... version: 3
Nov 9 16:30:30 debian8 kernel: [ 0.070867] ... bit width: 48
Nov 9 16:30:30 debian8 kernel: [ 0.071016] ... generic registers: 4
Nov 9 16:30:30 debian8 kernel: [ 0.071161] ... value mask: 0000ffffffffffff
Nov 9 16:30:30 debian8 kernel: [ 0.071352] ... max period: 0000ffffffffffff
Nov 9 16:30:30 debian8 kernel: [ 0.071543] ... fixed-purpose events: 3
Nov 9 16:30:30 debian8 kernel: [ 0.071689] ... event mask: 000000070000000f
Nov 9 16:30:30 debian8 kernel: [ 0.072295] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
Nov 9 16:30:30 debian8 kernel: [ 0.072649] x86: Booting SMP configuration:
Nov 9 16:30:30 debian8 kernel: [ 0.072801] .... node #0, CPUs: #1 #2 #3 #4 #5 #6 #7
Nov 9 16:30:30 debian8 systemd[1]: Starting System Initialization.
Nov 9 16:30:30 debian8 kernel: [ 0.632101] x86: Booted up 1 node, 8 CPUs
Nov 9 16:30:30 debian8 kernel: [ 0.632262] smpboot: Total of 8 processors activated (54378.36 BogoMIPS)
Nov 9 16:30:30 debian8 kernel: [ 0.654844] devtmpfs: initialized
Nov 9 16:30:30 debian8 kernel: [ 0.655011] x86/mm: Memory block size: 128MB
Nov 9 16:30:30 debian8 systemd[1]: Reached target System Initialization.
Nov 9 16:30:30 debian8 systemd[1]: Starting Avahi mDNS/DNS-SD Stack Activation Socket.
Nov 9 16:30:30 debian8 systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Nov 9 16:30:30 debian8 systemd[1]: Starting D-Bus System Message Bus Socket.
Nov 9 16:30:30 debian8 systemd[1]: Listening on D-Bus System Message Bus Socket.
Nov 9 16:30:30 debian8 systemd[1]: Starting ACPID Listen Socket.
Nov 9 16:30:30 debian8 systemd[1]: Listening on ACPID Listen Socket.
Nov 9 16:30:30 debian8 systemd[1]: Starting ACPI Events Check.
Nov 9 16:30:30 debian8 systemd[1]: Started ACPI Events Check.
Nov 9 16:30:30 debian8 systemd[1]: Starting CUPS Printing Service Sockets.
Nov 9 16:30:30 debian8 systemd[1]: Listening on CUPS Printing Service Sockets.
Nov 9 16:30:30 debian8 systemd[1]: Starting Sockets.
Nov 9 16:30:30 debian8 systemd[1]: Reached target Sockets.
Nov 9 16:30:30 debian8 systemd[1]: Starting Daily Cleanup of Temporary Directories.
Nov 9 16:30:30 debian8 systemd[1]: Started Daily Cleanup of Temporary Directories.
Nov 9 16:30:30 debian8 systemd[1]: Starting Timers.
Nov 9 16:30:30 debian8 systemd[1]: Reached target Timers.
Nov 9 16:30:30 debian8 systemd[1]: Started Manage Sound Card State (restore and store).
Nov 9 16:30:30 debian8 systemd[1]: Starting Restore Sound Card State...
Nov 9 16:30:30 debian8 kernel: [ 0.670815] PM: Registering ACPI NVS region [mem 0x3508e000-0x35094fff] (28672 bytes)
Nov 9 16:30:30 debian8 systemd[1]: Starting CUPS Printer Service Spool.
Nov 9 16:30:30 debian8 kernel: [ 0.671095] PM: Registering ACPI NVS region [mem 0x488e7000-0x48e2cfff] (5529600 bytes)
Nov 9 16:30:30 debian8 kernel: [ 0.671493] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
Nov 9 16:30:30 debian8 kernel: [ 0.686807] pinctrl core: initialized pinctrl subsystem
Nov 9 16:30:30 debian8 kernel: [ 0.702866] NET: Registered protocol family 16
Nov 9 16:30:30 debian8 systemd[1]: Started CUPS Printer Service Spool.
Nov 9 16:30:30 debian8 kernel: [ 0.718816] cpuidle: using governor ladder
Nov 9 16:30:30 debian8 kernel: [ 0.734824] cpuidle: using governor menu
Nov 9 16:30:30 debian8 systemd[1]: Starting Paths.
Nov 9 16:30:30 debian8 kernel: [ 0.734981] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
Nov 9 16:30:30 debian8 kernel: [ 0.735251] ACPI: bus type PCI registered
Nov 9 16:30:30 debian8 kernel: [ 0.735397] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
Nov 9 16:30:30 debian8 kernel: [ 0.766874] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
Nov 9 16:30:30 debian8 systemd[1]: Reached target Paths.
Nov 9 16:30:30 debian8 kernel: [ 0.767205] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820
Nov 9 16:30:30 debian8 kernel: [ 0.767452] pmd_set_huge: Cannot satisfy [mem 0xe0000000-0xe0200000] with a huge-page mapping due to MTRR override.
Nov 9 16:30:30 debian8 systemd[1]: Starting Basic System.
Nov 9 16:30:30 debian8 kernel: [ 0.768004] PCI: Using configuration type 1 for base access
Nov 9 16:30:30 debian8 kernel: [ 0.768239] core: PMU erratum BJ122, BV98, HSD29 worked around, HT is on
Nov 9 16:30:30 debian8 kernel: [ 0.768645] mtrr: your CPUs had inconsistent fixed MTRR settings
Nov 9 16:30:30 debian8 kernel: [ 0.768861] mtrr: probably your BIOS does not setup all CPUs.
Nov 9 16:30:30 debian8 kernel: [ 0.769066] mtrr: corrected configuration.
Nov 9 16:30:30 debian8 kernel: [ 0.782910] HugeTLB registered 1 GB page size, pre-allocated 0 pages
Nov 9 16:30:30 debian8 systemd[1]: Reached target Basic System.
Nov 9 16:30:30 debian8 kernel: [ 0.783138] HugeTLB registered 2 MB page size, pre-allocated 0 pages
Nov 9 16:30:30 debian8 kernel: [ 0.830910] ACPI: Added _OSI(Module Device)
Nov 9 16:30:30 debian8 systemd[1]: Starting Bluetooth service...
Nov 9 16:30:30 debian8 kernel: [ 0.831063] ACPI: Added _OSI(Processor Device)
Nov 9 16:30:30 debian8 kernel: [ 0.831224] ACPI: Added _OSI(3.0 _SCP Extensions)
Nov 9 16:30:30 debian8 kernel: [ 0.831395] ACPI: Added _OSI(Processor Aggregator Device)
Nov 9 16:30:30 debian8 kernel: [ 0.831715] ACPI: Executed 1 blocks of module-level executable AML code
Nov 9 16:30:30 debian8 kernel: [ 0.834727] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
Nov 9 16:30:30 debian8 systemd[1]: Starting Accounts Service...
Nov 9 16:30:30 debian8 kernel: [ 0.835611] ACPI: Dynamic OEM Table Load:
Nov 9 16:30:30 debian8 kernel: [ 0.835773] ACPI: SSDT 0xFFFF9883EA24F800 0003D3 (v01 PmRef Cpu0Cst 00003001 INTL 20091112)
Nov 9 16:30:30 debian8 kernel: [ 0.836498] ACPI: Dynamic OEM Table Load:
Nov 9 16:30:30 debian8 kernel: [ 0.836659] ACPI: SSDT 0xFFFF9883EB0B2800 0005AA (v01 PmRef ApIst 00003000 INTL 20091112)
Nov 9 16:30:30 debian8 systemd[1]: Starting Deferred execution scheduler...
Nov 9 16:30:30 debian8 kernel: [ 0.837422] ACPI: Dynamic OEM Table Load:
Nov 9 16:30:30 debian8 kernel: [ 0.837582] ACPI: SSDT 0xFFFF9883EA69AA00 000119 (v01 PmRef ApCst 00003000 INTL 20091112)
Nov 9 16:30:30 debian8 kernel: [ 0.839158] ACPI: Interpreter enabled
Nov 9 16:30:30 debian8 systemd[1]: Started Deferred execution scheduler.
Nov 9 16:30:30 debian8 systemd[1]: Starting OpenBSD Secure Shell server...
Nov 9 16:30:30 debian8 kernel: [ 0.839308] ACPI: (supports S0 S3 S4 S5)
Nov 9 16:30:30 debian8 kernel: [ 0.839451] ACPI: Using IOAPIC for interrupt routing
Nov 9 16:30:30 debian8 kernel: [ 0.839647] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
Nov 9 16:30:30 debian8 kernel: [ 0.845546] ACPI: Power Resource [FN00] (off)
Nov 9 16:30:30 debian8 kernel: [ 0.845756] ACPI: Power Resource [FN01] (off)
Nov 9 16:30:30 debian8 systemd[1]: Started OpenBSD Secure Shell server.
Nov 9 16:30:30 debian8 kernel: [ 0.845963] ACPI: Power Resource [FN02] (off)
Nov 9 16:30:30 debian8 kernel: [ 0.846169] ACPI: Power Resource [FN03] (off)
Nov 9 16:30:30 debian8 systemd[1]: Starting Modem Manager...
Nov 9 16:30:30 debian8 kernel: [ 0.846375] ACPI: Power Resource [FN04] (off)
Nov 9 16:30:30 debian8 kernel: [ 0.847093] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe])
Nov 9 16:30:30 debian8 kernel: [ 0.847318] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
Nov 9 16:30:30 debian8 kernel: [ 0.847762] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug PME]
Nov 9 16:30:30 debian8 kernel: [ 0.848108] acpi PNP0A08:00: _OSC: OS now controls [AER PCIeCapability]
Nov 9 16:30:30 debian8 kernel: [ 0.848345] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration
Nov 9 16:30:30 debian8 systemd[1]: Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down....
Nov 9 16:30:30 debian8 kernel: [ 0.848900] PCI host bridge to bus 0000:00
Nov 9 16:30:30 debian8 kernel: [ 0.849051] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
Nov 9 16:30:30 debian8 kernel: [ 0.849294] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
Nov 9 16:30:30 debian8 systemd[1]: Starting Run anacron jobs...
Nov 9 16:30:30 debian8 kernel: [ 0.849537] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
Nov 9 16:30:30 debian8 kernel: [ 0.849804] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff window]
Nov 9 16:30:30 debian8 kernel: [ 0.850071] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff window]
Nov 9 16:30:30 debian8 kernel: [ 0.850339] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff window]
Nov 9 16:30:30 debian8 systemd[1]: Started Run anacron jobs.
Nov 9 16:30:30 debian8 kernel: [ 0.850606] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff window]
Nov 9 16:30:30 debian8 kernel: [ 0.850873] pci_bus 0000:00: root bus resource [mem 0x4f200000-0xfeafffff window]
Nov 9 16:30:30 debian8 kernel: [ 0.851143] pci_bus 0000:00: root bus resource [bus 00-fe]
Nov 9 16:30:30 debian8 kernel: [ 0.851344] pci 0000:00:00.0: [8086:0c00] type 00 class 0x060000
Nov 9 16:30:30 debian8 kernel: [ 0.851405] pci 0000:00:01.0: [8086:0c01] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.851428] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 systemd[1]: Starting Regular background program processing daemon...
Nov 9 16:30:30 debian8 kernel: [ 0.851487] pci 0000:00:01.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 kernel: [ 0.851718] pci 0000:00:02.0: [8086:0412] type 00 class 0x030000
Nov 9 16:30:30 debian8 kernel: [ 0.851724] pci 0000:00:02.0: reg 0x10: [mem 0xde400000-0xde7fffff 64bit]
Nov 9 16:30:30 debian8 anacron[565]: Anacron 2.3 started on 2016-11-09
Nov 9 16:30:30 debian8 kernel: [ 0.851728] pci 0000:00:02.0: reg 0x18: [mem 0x50000000-0x5fffffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.851731] pci 0000:00:02.0: reg 0x20: [io 0xf000-0xf03f]
Nov 9 16:30:30 debian8 kernel: [ 0.851784] pci 0000:00:03.0: [8086:0c0c] type 00 class 0x040300
Nov 9 16:30:30 debian8 kernel: [ 0.851789] pci 0000:00:03.0: reg 0x10: [mem 0xdf134000-0xdf137fff 64bit]
Nov 9 16:30:30 debian8 anacron[565]: Normal exit (0 jobs run)
Nov 9 16:30:30 debian8 kernel: [ 0.851861] pci 0000:00:14.0: [8086:8c31] type 00 class 0x0c0330
Nov 9 16:30:30 debian8 kernel: [ 0.851874] pci 0000:00:14.0: reg 0x10: [mem 0xdf120000-0xdf12ffff 64bit]
Nov 9 16:30:30 debian8 kernel: [ 0.851922] pci 0000:00:14.0: PME# supported from D3hot D3cold
Nov 9 16:30:30 debian8 systemd[1]: Started Regular background program processing daemon.
Nov 9 16:30:30 debian8 kernel: [ 0.851949] pci 0000:00:14.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 kernel: [ 0.852176] pci 0000:00:16.0: [8086:8c3a] type 00 class 0x078000
Nov 9 16:30:30 debian8 kernel: [ 0.852189] pci 0000:00:16.0: reg 0x10: [mem 0xdf13e000-0xdf13e00f 64bit]
Nov 9 16:30:30 debian8 kernel: [ 0.852241] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.852293] pci 0000:00:19.0: [8086:153b] type 00 class 0x020000
Nov 9 16:30:30 debian8 kernel: [ 0.852304] pci 0000:00:19.0: reg 0x10: [mem 0xdf100000-0xdf11ffff]
Nov 9 16:30:30 debian8 kernel: [ 0.852310] pci 0000:00:19.0: reg 0x14: [mem 0xdf13c000-0xdf13cfff]
Nov 9 16:30:30 debian8 systemd[1]: Starting Network Manager...
Nov 9 16:30:30 debian8 kernel: [ 0.852316] pci 0000:00:19.0: reg 0x18: [io 0xf060-0xf07f]
Nov 9 16:30:30 debian8 kernel: [ 0.852363] pci 0000:00:19.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.852389] pci 0000:00:19.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 kernel: [ 0.852617] pci 0000:00:1a.0: [8086:8c2d] type 00 class 0x0c0320
Nov 9 16:30:30 debian8 systemd[1]: Starting /etc/rc.local Compatibility...
Nov 9 16:30:30 debian8 kernel: [ 0.852631] pci 0000:00:1a.0: reg 0x10: [mem 0xdf13b000-0xdf13b3ff]
Nov 9 16:30:30 debian8 kernel: [ 0.852701] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.852737] pci 0000:00:1a.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 systemd[1]: Started getty on tty2-tty6 if dbus and logind are not available.
Nov 9 16:30:30 debian8 kernel: [ 0.852965] pci 0000:00:1b.0: [8086:8c20] type 00 class 0x040300
Nov 9 16:30:30 debian8 kernel: [ 0.852977] pci 0000:00:1b.0: reg 0x10: [mem 0xdf130000-0xdf133fff 64bit]
Nov 9 16:30:30 debian8 kernel: [ 0.853032] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.853061] pci 0000:00:1b.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 systemd[1]: Starting Login Service...
Nov 9 16:30:30 debian8 kernel: [ 0.853287] pci 0000:00:1c.0: [8086:8c10] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.853337] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.853388] pci 0000:00:1c.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: start Samba NetBIOS nameserver (nmbd)...
Nov 9 16:30:30 debian8 kernel: [ 0.853615] pci 0000:00:1c.1: [8086:8c12] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.853666] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.853715] pci 0000:00:1c.1: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 kernel: [ 0.853942] pci 0000:00:1c.3: [8086:8c16] type 01 class 0x060400
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: exim Mail Transport Agent...
Nov 9 16:30:30 debian8 kernel: [ 0.853993] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.854041] pci 0000:00:1c.3: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 kernel: [ 0.854267] pci 0000:00:1c.4: [8086:8c18] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.854319] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.854367] pci 0000:00:1c.4: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: daemon to balance interrupts for SMP systems...
Nov 9 16:30:30 debian8 kernel: [ 0.854599] pci 0000:00:1d.0: [8086:8c26] type 00 class 0x0c0320
Nov 9 16:30:30 debian8 kernel: [ 0.854613] pci 0000:00:1d.0: reg 0x10: [mem 0xdf13a000-0xdf13a3ff]
Nov 9 16:30:30 debian8 kernel: [ 0.854682] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.854718] pci 0000:00:1d.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 kernel: [ 0.854947] pci 0000:00:1f.0: [8086:8c44] type 00 class 0x060100
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: git-daemon service...
Nov 9 16:30:30 debian8 kernel: [ 0.855076] pci 0000:00:1f.3: [8086:8c22] type 00 class 0x0c0500
Nov 9 16:30:30 debian8 kernel: [ 0.855087] pci 0000:00:1f.3: reg 0x10: [mem 0xdf139000-0xdf1390ff 64bit]
Nov 9 16:30:30 debian8 kernel: [ 0.855103] pci 0000:00:1f.3: reg 0x20: [io 0xf040-0xf05f]
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: keep memory of all UPnP devices that announced themselves...
Nov 9 16:30:30 debian8 kernel: [ 0.855191] pci 0000:01:00.0: [1b21:1242] type 00 class 0x0c0330
Nov 9 16:30:30 debian8 kernel: [ 0.855205] pci 0000:01:00.0: reg 0x10: [mem 0xdf000000-0xdf007fff 64bit]
Nov 9 16:30:30 debian8 kernel: [ 0.855275] pci 0000:01:00.0: PME# supported from D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.855296] pci 0000:01:00.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: start Samba daemons for the AD DC...
Nov 9 16:30:30 debian8 kernel: [ 0.867182] pci 0000:00:01.0: PCI bridge to [bus 01]
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: Speech Dispatcher...
Nov 9 16:30:30 debian8 systemd[1]: Starting LSB: Start the GNUstep distributed object mapper...
Nov 9 16:30:30 debian8 systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Nov 9 16:30:30 debian8 systemd[1]: Starting D-Bus System Message Bus...
Nov 9 16:30:30 debian8 systemd[1]: Started D-Bus System Message Bus.
Nov 9 16:30:30 debian8 bluetoothd[559]: Bluetooth daemon 5.23
Nov 9 16:30:30 debian8 ModemManager[563]: <info> ModemManager (version 1.4.0) starting in system bus...
Nov 9 16:30:30 debian8 cron[569]: (CRON) INFO (pidfile fd = 3)
Nov 9 16:30:30 debian8 cron[569]: (CRON) INFO (Running @reboot jobs)
Nov 9 16:30:30 debian8 speech-dispatcher[580]: speech-dispatcher disabled; edit /etc/default/speech-dispatcher.
Nov 9 16:30:30 debian8 irqbalance[575]: Starting SMP IRQ Balancer: irqbalance.
Nov 9 16:30:30 debian8 gdomap[581]: GNUstep distributed object mapper disabled, see /etc/default/gdomap.
Nov 9 16:30:30 debian8 minissdpd[630]: setsockopt(udp, IP_ADD_MEMBERSHIP)(0.0.0.0): No such device
Nov 9 16:30:30 debian8 minissdpd[630]: Failed to add IPv4 multicast membership for interface 0.0.0.0.
Nov 9 16:30:30 debian8 kernel: [ 0.867362] pci 0000:00:01.0: bridge window [mem 0xdf000000-0xdf0fffff]
Nov 9 16:30:30 debian8 minissdpd[578]: Starting UPnP devices daemon: MiniSSDPd.
Nov 9 16:30:30 debian8 kernel: [ 0.867408] acpiphp: Slot [1] registered
Nov 9 16:30:30 debian8 git-daemon[651]: Ready to rumble
Nov 9 16:30:30 debian8 kernel: [ 0.867554] pci 0000:00:1c.0: PCI bridge to [bus 02]
Nov 9 16:30:30 debian8 kernel: [ 0.867787] pci 0000:03:00.0: [1b21:0612] type 00 class 0x010601
Nov 9 16:30:30 debian8 kernel: [ 0.867803] pci 0000:03:00.0: reg 0x10: [io 0xe050-0xe057]
Nov 9 16:30:30 debian8 kernel: [ 0.867812] pci 0000:03:00.0: reg 0x14: [io 0xe040-0xe043]
Nov 9 16:30:30 debian8 kernel: [ 0.867822] pci 0000:03:00.0: reg 0x18: [io 0xe030-0xe037]
Nov 9 16:30:30 debian8 avahi-daemon[582]: Found user 'avahi' (UID 106) and group 'avahi' (GID 114).
Nov 9 16:30:30 debian8 kernel: [ 0.867831] pci 0000:03:00.0: reg 0x1c: [io 0xe020-0xe023]
Nov 9 16:30:30 debian8 kernel: [ 0.867841] pci 0000:03:00.0: reg 0x20: [io 0xe000-0xe01f]
Nov 9 16:30:30 debian8 avahi-daemon[582]: Successfully dropped root privileges.
Nov 9 16:30:30 debian8 kernel: [ 0.867850] pci 0000:03:00.0: reg 0x24: [mem 0xdef00000-0xdef001ff]
Nov 9 16:30:30 debian8 kernel: [ 0.867927] pci 0000:03:00.0: System wakeup disabled by ACPI
Nov 9 16:30:30 debian8 kernel: [ 0.879191] pci 0000:00:1c.1: PCI bridge to [bus 03]
Nov 9 16:30:30 debian8 kernel: [ 0.879372] pci 0000:00:1c.1: bridge window [io 0xe000-0xefff]
Nov 9 16:30:30 debian8 kernel: [ 0.879374] pci 0000:00:1c.1: bridge window [mem 0xdef00000-0xdeffffff]
Nov 9 16:30:30 debian8 avahi-daemon[582]: avahi-daemon 0.6.31 starting up.
Nov 9 16:30:30 debian8 kernel: [ 0.879422] pci 0000:04:00.0: [10b5:8608] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.879437] pci 0000:04:00.0: reg 0x10: [mem 0xdee00000-0xdee1ffff]
Nov 9 16:30:30 debian8 kernel: [ 0.879531] pci 0000:04:00.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.891197] pci 0000:00:1c.3: PCI bridge to [bus 04-0c]
Nov 9 16:30:30 debian8 avahi-daemon[582]: Successfully called chroot().
Nov 9 16:30:30 debian8 kernel: [ 0.891387] pci 0000:00:1c.3: bridge window [io 0xc000-0xdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.891389] pci 0000:00:1c.3: bridge window [mem 0xde800000-0xdeefffff]
Nov 9 16:30:30 debian8 kernel: [ 0.891392] pci 0000:00:1c.3: bridge window [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.891475] pci 0000:05:01.0: [10b5:8608] type 01 class 0x060400
Nov 9 16:30:30 debian8 avahi-daemon[582]: Successfully dropped remaining capabilities.
Nov 9 16:30:30 debian8 kernel: [ 0.891581] pci 0000:05:01.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.891646] pci 0000:05:04.0: [10b5:8608] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.891751] pci 0000:05:04.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.891813] pci 0000:05:05.0: [10b5:8608] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.891918] pci 0000:05:05.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.891981] pci 0000:05:06.0: [10b5:8608] type 01 class 0x060400
Nov 9 16:30:30 debian8 avahi-daemon[582]: No service file found in /etc/avahi/services.
Nov 9 16:30:30 debian8 kernel: [ 0.892086] pci 0000:05:06.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.892150] pci 0000:05:07.0: [10b5:8608] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.892255] pci 0000:05:07.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Nov 9 16:30:30 debian8 kernel: [ 0.892317] pci 0000:05:08.0: [10b5:8608] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.892422] pci 0000:05:08.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.892484] pci 0000:05:09.0: [10b5:8608] type 01 class 0x060400
Nov 9 16:30:30 debian8 kernel: [ 0.892588] pci 0000:05:09.0: PME# supported from D0 D3hot D3cold
Nov 9 16:30:30 debian8 systemd[1]: Started Bluetooth service.
Nov 9 16:30:30 debian8 kernel: [ 0.892664] pci 0000:04:00.0: PCI bridge to [bus 05-0c]
Nov 9 16:30:30 debian8 kernel: [ 0.892858] pci 0000:04:00.0: bridge window [io 0xc000-0xdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.892861] pci 0000:04:00.0: bridge window [mem 0xde800000-0xdedfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.892866] pci 0000:04:00.0: bridge window [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.892904] pci 0000:05:01.0: PCI bridge to [bus 06]
Nov 9 16:30:30 debian8 systemd[1]: Starting Bluetooth.
Nov 9 16:30:30 debian8 kernel: [ 0.893133] pci 0000:05:04.0: PCI bridge to [bus 07]
Nov 9 16:30:30 debian8 kernel: [ 0.893379] pci 0000:08:00.0: [10ec:8168] type 00 class 0x020000
Nov 9 16:30:30 debian8 systemd[1]: Reached target Bluetooth.
Nov 9 16:30:30 debian8 kernel: [ 0.893401] pci 0000:08:00.0: reg 0x10: [io 0xd000-0xd0ff]
Nov 9 16:30:30 debian8 kernel: [ 0.893433] pci 0000:08:00.0: reg 0x18: [mem 0xded00000-0xded00fff 64bit]
Nov 9 16:30:30 debian8 kernel: [ 0.893453] pci 0000:08:00.0: reg 0x20: [mem 0xaa100000-0xaa103fff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.893563] pci 0000:08:00.0: supports D1 D2
Nov 9 16:30:30 debian8 kernel: [ 0.893564] pci 0000:08:00.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:30:30 debian8 systemd[1]: Starting System Logging Service...
Nov 9 16:30:30 debian8 kernel: [ 0.903211] pci 0000:05:05.0: PCI bridge to [bus 08]
Nov 9 16:30:30 debian8 kernel: [ 0.903395] pci 0000:05:05.0: bridge window [io 0xd000-0xdfff]
Nov 9 16:30:30 debian8 systemd[1]: Starting Permit User Sessions...
Nov 9 16:30:30 debian8 kernel: [ 0.903398] pci 0000:05:05.0: bridge window [mem 0xded00000-0xdedfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.903403] pci 0000:05:05.0: bridge window [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.903443] pci 0000:05:06.0: PCI bridge to [bus 09]
Nov 9 16:30:30 debian8 kernel: [ 0.903691] pci 0000:0a:00.0: [14e4:43b1] type 00 class 0x028000
Nov 9 16:30:30 debian8 kernel: [ 0.903719] pci 0000:0a:00.0: reg 0x10: [mem 0xdea00000-0xdea07fff 64bit]
Nov 9 16:30:30 debian8 kernel: [ 0.903739] pci 0000:0a:00.0: reg 0x18: [mem 0xde800000-0xde9fffff 64bit]
Nov 9 16:30:30 debian8 systemd[1]: Starting ACPI event daemon...
Nov 9 16:30:30 debian8 kernel: [ 0.903879] pci 0000:0a:00.0: supports D1 D2
Nov 9 16:30:30 debian8 kernel: [ 0.903880] pci 0000:0a:00.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:30:30 debian8 kernel: [ 0.915217] pci 0000:05:07.0: PCI bridge to [bus 0a]
Nov 9 16:30:30 debian8 kernel: [ 0.915404] pci 0000:05:07.0: bridge window [mem 0xde800000-0xdeafffff]
Nov 9 16:30:30 debian8 avahi-daemon[582]: Network interface enumeration completed.
Nov 9 16:30:30 debian8 kernel: [ 0.915447] pci 0000:05:08.0: PCI bridge to [bus 0b]
Nov 9 16:30:30 debian8 kernel: [ 0.915692] pci 0000:0c:00.0: [1b21:0612] type 00 class 0x010601
Nov 9 16:30:30 debian8 kernel: [ 0.915712] pci 0000:0c:00.0: reg 0x10: [io 0xc050-0xc057]
Nov 9 16:30:30 debian8 avahi-daemon[582]: Registering HINFO record with values 'X86_64'/'LINUX'.
Nov 9 16:30:30 debian8 kernel: [ 0.915725] pci 0000:0c:00.0: reg 0x14: [io 0xc040-0xc043]
Nov 9 16:30:30 debian8 kernel: [ 0.915737] pci 0000:0c:00.0: reg 0x18: [io 0xc030-0xc037]
Nov 9 16:30:30 debian8 kernel: [ 0.915750] pci 0000:0c:00.0: reg 0x1c: [io 0xc020-0xc023]
Nov 9 16:30:30 debian8 kernel: [ 0.915762] pci 0000:0c:00.0: reg 0x20: [io 0xc000-0xc01f]
Nov 9 16:30:30 debian8 kernel: [ 0.915774] pci 0000:0c:00.0: reg 0x24: [mem 0xdec00000-0xdec001ff]
Nov 9 16:30:30 debian8 avahi-daemon[582]: Server startup complete. Host name is debian8.local. Local service cookie is 2384464375.
Nov 9 16:30:30 debian8 kernel: [ 0.927222] pci 0000:05:09.0: PCI bridge to [bus 0c]
Nov 9 16:30:30 debian8 kernel: [ 0.927406] pci 0000:05:09.0: bridge window [io 0xc000-0xcfff]
Nov 9 16:30:30 debian8 bluetoothd[559]: Starting SDP server
Nov 9 16:30:30 debian8 kernel: [ 0.927409] pci 0000:05:09.0: bridge window [mem 0xdec00000-0xdecfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.927499] acpiphp: Slot [1-1] registered
Nov 9 16:30:30 debian8 kernel: [ 0.927651] pci 0000:00:1c.4: PCI bridge to [bus 0d-77]
Nov 9 16:30:30 debian8 kernel: [ 0.927842] pci 0000:00:1c.4: bridge window [mem 0xb0000000-0xde0fffff]
Nov 9 16:30:30 debian8 kernel: [ 0.927845] pci 0000:00:1c.4: bridge window [mem 0x60000000-0xa9ffffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.928305] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
Nov 9 16:30:30 debian8 systemd[1]: Started ACPI event daemon.
Nov 9 16:30:30 debian8 kernel: [ 0.928663] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 *4 5 6 7 10 11 12 14 15)
Nov 9 16:30:30 debian8 kernel: [ 0.929019] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 11 12 *14 15)
Nov 9 16:30:30 debian8 kernel: [ 0.929374] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 11 12 14 *15)
Nov 9 16:30:30 debian8 kernel: [ 0.929729] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 *5 6 7 10 11 12 14 15)
Nov 9 16:30:30 debian8 systemd[1]: Starting CUPS Printing Service...
Nov 9 16:30:30 debian8 kernel: [ 0.930085] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 *10 11 12 14 15)
Nov 9 16:30:30 debian8 kernel: [ 0.930439] ACPI: PCI Interrupt Link [LNKG] (IRQs *3 4 5 6 7 10 11 12 14 15)
Nov 9 16:30:30 debian8 kernel: [ 0.930794] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 *6 7 10 11 12 14 15)
Nov 9 16:30:30 debian8 systemd[1]: Started CUPS Printing Service.
Nov 9 16:30:30 debian8 kernel: [ 0.931338] ACPI: Enabled 6 GPEs in block 00 to 3F
Nov 9 16:30:30 debian8 kernel: [ 0.931577] vgaarb: setting as boot device: PCI:0000:00:02.0
Nov 9 16:30:30 debian8 kernel: [ 0.931781] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
Nov 9 16:30:30 debian8 kernel: [ 0.932071] vgaarb: loaded
Nov 9 16:30:30 debian8 kernel: [ 0.932172] vgaarb: bridge control possible 0000:00:02.0
Nov 9 16:30:30 debian8 systemd[1]: Starting Make remote CUPS printers available locally...
Nov 9 16:30:30 debian8 kernel: [ 0.935148] PCI: Using ACPI for IRQ routing
Nov 9 16:30:30 debian8 kernel: [ 0.940190] PCI: pci_cache_line_size set to 64 bytes
Nov 9 16:30:30 debian8 systemd[1]: Started Make remote CUPS printers available locally.
Nov 9 16:30:30 debian8 kernel: [ 0.940251] e820: reserve RAM buffer [mem 0x00058000-0x0005ffff]
Nov 9 16:30:30 debian8 kernel: [ 0.940252] e820: reserve RAM buffer [mem 0x0009f000-0x0009ffff]
Nov 9 16:30:30 debian8 kernel: [ 0.940253] e820: reserve RAM buffer [mem 0x3508e000-0x37ffffff]
Nov 9 16:30:30 debian8 kernel: [ 0.940253] e820: reserve RAM buffer [mem 0x354ed000-0x37ffffff]
Nov 9 16:30:30 debian8 kernel: [ 0.940254] e820: reserve RAM buffer [mem 0x486c5000-0x4bffffff]
Nov 9 16:30:30 debian8 systemd[1]: Started Restore Sound Card State.
Nov 9 16:30:30 debian8 kernel: [ 0.940254] e820: reserve RAM buffer [mem 0x4a000000-0x4bffffff]
Nov 9 16:30:30 debian8 kernel: [ 0.940255] e820: reserve RAM buffer [mem 0x1afe00000-0x1afffffff]
Nov 9 16:30:30 debian8 systemd[1]: Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down..
Nov 9 16:30:30 debian8 kernel: [ 0.940344] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
Nov 9 16:30:30 debian8 kernel: [ 0.940623] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
Nov 9 16:30:30 debian8 kernel: [ 0.942846] clocksource: Switched to clocksource hpet
Nov 9 16:30:30 debian8 kernel: [ 0.947004] VFS: Disk quotas dquot_6.6.0
Nov 9 16:30:30 debian8 kernel: [ 0.962865] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Nov 9 16:30:30 debian8 kernel: [ 0.978911] pnp: PnP ACPI init
Nov 9 16:30:30 debian8 kernel: [ 0.979074] system 00:00: [mem 0xfed40000-0xfed44fff] has been reserved
Nov 9 16:30:30 debian8 systemd[1]: Started /etc/rc.local Compatibility.
Nov 9 16:30:30 debian8 kernel: [ 0.979312] system 00:00: Plug and Play ACPI device, IDs PNP0c01 (active)
Nov 9 16:30:30 debian8 kernel: [ 0.979425] system 00:01: [io 0x0680-0x069f] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.979638] system 00:01: [io 0xffff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.979830] system 00:01: [io 0xffff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.980022] system 00:01: [io 0xffff] has been reserved
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: daemon to balance interrupts for SMP systems.
Nov 9 16:30:30 debian8 kernel: [ 0.980214] system 00:01: [io 0x1c00-0x1cfe] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.980427] system 00:01: [io 0x1d00-0x1dfe] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.980640] system 00:01: [io 0x1e00-0x1efe] has been reserved
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: git-daemon service.
Nov 9 16:30:30 debian8 kernel: [ 0.980853] system 00:01: [io 0x1f00-0x1ffe] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.981066] system 00:01: [io 0x1800-0x18fe] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.981279] system 00:01: [io 0x164e-0x164f] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.981492] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: keep memory of all UPnP devices that announced themselves.
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: Speech Dispatcher.
Nov 9 16:30:30 debian8 systemd[1]: Started LSB: Start the GNUstep distributed object mapper.
Nov 9 16:30:30 debian8 dbus[586]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkitd.service'
Nov 9 16:30:30 debian8 dbus[586]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Nov 9 16:30:30 debian8 bluetoothd[559]: Bluetooth management interface 1.13 initialized
Nov 9 16:30:30 debian8 systemd[1]: Started Permit User Sessions.
Nov 9 16:30:30 debian8 systemd[1]: Started Login Service.
Nov 9 16:30:30 debian8 systemd[1]: Starting Hostname Service...
Nov 9 16:30:30 debian8 systemd[1]: Starting Light Display Manager...
Nov 9 16:30:30 debian8 systemd[1]: Starting Authenticate and Authorize Users to Run Privileged Tasks...
Nov 9 16:30:30 debian8 systemd[1]: Starting Getty on tty1...
Nov 9 16:30:30 debian8 systemd[1]: Started Getty on tty1.
Nov 9 16:30:30 debian8 kernel: [ 0.981508] pnp 00:02: Plug and Play ACPI device, IDs PNP0b00 (active)
Nov 9 16:30:30 debian8 systemd[1]: Starting Login Prompts.
Nov 9 16:30:30 debian8 kernel: [ 0.981539] system 00:03: [io 0x1854-0x1857] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.981752] system 00:03: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
Nov 9 16:30:30 debian8 kernel: [ 0.981807] system 00:04: [io 0x0290-0x029f] has been reserved
Nov 9 16:30:30 debian8 systemd[1]: Reached target Login Prompts.
Nov 9 16:30:30 debian8 kernel: [ 0.982020] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
Nov 9 16:30:30 debian8 kernel: [ 0.982054] system 00:05: [io 0x04d0-0x04d1] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.982267] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active)
Nov 9 16:30:30 debian8 kernel: [ 0.982545] system 00:06: [mem 0xfed1c000-0xfed1ffff] has been reserved
Nov 9 16:30:30 debian8 bluetoothd[559]: Sap driver initialization failed.
Nov 9 16:30:30 debian8 bluetoothd[559]: sap-server: Operation not permitted (1)
Nov 9 16:30:30 debian8 kernel: [ 0.982782] system 00:06: [mem 0xfed10000-0xfed17fff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.983025] system 00:06: [mem 0xfed18000-0xfed18fff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.983264] system 00:06: [mem 0xfed19000-0xfed19fff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.983501] system 00:06: [mem 0xe0000000-0xefffffff] has been reserved
Nov 9 16:30:30 debian8 acpid: starting up with netlink and the input layer
Nov 9 16:30:30 debian8 kernel: [ 0.983739] system 00:06: [mem 0xfed20000-0xfed3ffff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.983976] system 00:06: [mem 0xfed90000-0xfed93fff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.984213] system 00:06: [mem 0xfed45000-0xfed8ffff] has been reserved
Nov 9 16:30:30 debian8 dbus[586]: [system] Successfully activated service 'org.freedesktop.hostname1'
Nov 9 16:30:30 debian8 kernel: [ 0.984450] system 00:06: [mem 0xff000000-0xffffffff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.984687] system 00:06: [mem 0xfee00000-0xfeefffff] could not be reserved
Nov 9 16:30:30 debian8 kernel: [ 0.984937] system 00:06: [mem 0xdffdf000-0xdffdffff] has been reserved
Nov 9 16:30:30 debian8 kernel: [ 0.985174] system 00:06: [mem 0xdffe0000-0xdffeffff] has been reserved
Nov 9 16:30:30 debian8 systemd[1]: Started Hostname Service.
Nov 9 16:30:30 debian8 kernel: [ 0.985412] system 00:06: Plug and Play ACPI device, IDs PNP0c02 (active)
Nov 9 16:30:30 debian8 kernel: [ 0.985554] pnp: PnP ACPI: found 7 devices
Nov 9 16:30:30 debian8 kernel: [ 0.991383] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
Nov 9 16:30:30 debian8 kernel: [ 0.991780] pci 0000:00:1c.4: bridge window [io 0x1000-0x0fff] to [bus 0d-77] add_size 1000
Nov 9 16:30:30 debian8 kernel: [ 0.991782] pci 0000:00:1c.4: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:30:30 debian8 kernel: [ 0.991783] pci 0000:00:1c.4: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:30:30 debian8 kernel: [ 0.991785] pci 0000:00:1c.4: BAR 13: assigned [io 0x2000-0x2fff]
Nov 9 16:30:30 debian8 acpid: 1 rule loaded
Nov 9 16:30:30 debian8 kernel: [ 0.992008] pci 0000:00:01.0: PCI bridge to [bus 01]
Nov 9 16:30:30 debian8 kernel: [ 0.992189] pci 0000:00:01.0: bridge window [mem 0xdf000000-0xdf0fffff]
Nov 9 16:30:30 debian8 kernel: [ 0.992434] pci 0000:00:1c.0: PCI bridge to [bus 02]
Nov 9 16:30:30 debian8 kernel: [ 0.992620] pci 0000:00:1c.1: PCI bridge to [bus 03]
Nov 9 16:30:30 debian8 kernel: [ 0.992800] pci 0000:00:1c.1: bridge window [io 0xe000-0xefff]
Nov 9 16:30:30 debian8 kernel: [ 0.993021] pci 0000:00:1c.1: bridge window [mem 0xdef00000-0xdeffffff]
Nov 9 16:30:30 debian8 acpid: waiting for events: event logging is off
Nov 9 16:30:30 debian8 kernel: [ 0.993269] pci 0000:05:01.0: PCI bridge to [bus 06]
Nov 9 16:30:30 debian8 kernel: [ 0.993459] pci 0000:05:04.0: PCI bridge to [bus 07]
Nov 9 16:30:30 debian8 systemd[1]: Started System Logging Service.
Nov 9 16:30:30 debian8 kernel: [ 0.993650] pci 0000:05:05.0: PCI bridge to [bus 08]
Nov 9 16:30:30 debian8 kernel: [ 0.993831] pci 0000:05:05.0: bridge window [io 0xd000-0xdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.994054] pci 0000:05:05.0: bridge window [mem 0xded00000-0xdedfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.994299] pci 0000:05:05.0: bridge window [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.994580] pci 0000:05:06.0: PCI bridge to [bus 09]
Nov 9 16:30:30 debian8 kernel: [ 0.994771] pci 0000:05:07.0: PCI bridge to [bus 0a]
Nov 9 16:30:30 debian8 kernel: [ 0.994957] pci 0000:05:07.0: bridge window [mem 0xde800000-0xdeafffff]
Nov 9 16:30:30 debian8 kernel: [ 0.995208] pci 0000:05:08.0: PCI bridge to [bus 0b]
Nov 9 16:30:30 debian8 kernel: [ 0.995398] pci 0000:05:09.0: PCI bridge to [bus 0c]
Nov 9 16:30:30 debian8 kernel: [ 0.995579] pci 0000:05:09.0: bridge window [io 0xc000-0xcfff]
Nov 9 16:30:30 debian8 kernel: [ 0.995801] pci 0000:05:09.0: bridge window [mem 0xdec00000-0xdecfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.996051] pci 0000:04:00.0: PCI bridge to [bus 05-0c]
Nov 9 16:30:30 debian8 kernel: [ 0.996241] pci 0000:04:00.0: bridge window [io 0xc000-0xdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.996463] pci 0000:04:00.0: bridge window [mem 0xde800000-0xdedfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.996708] pci 0000:04:00.0: bridge window [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.996990] pci 0000:00:1c.3: PCI bridge to [bus 04-0c]
Nov 9 16:30:30 debian8 kernel: [ 0.997179] pci 0000:00:1c.3: bridge window [io 0xc000-0xdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.997400] pci 0000:00:1c.3: bridge window [mem 0xde800000-0xdeefffff]
Nov 9 16:30:30 debian8 kernel: [ 0.997644] pci 0000:00:1c.3: bridge window [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.997923] pci 0000:00:1c.4: PCI bridge to [bus 0d-77]
Nov 9 16:30:30 debian8 kernel: [ 0.998113] pci 0000:00:1c.4: bridge window [io 0x2000-0x2fff]
Nov 9 16:30:30 debian8 kernel: [ 0.998333] pci 0000:00:1c.4: bridge window [mem 0xb0000000-0xde0fffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998578] pci 0000:00:1c.4: bridge window [mem 0x60000000-0xa9ffffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.998860] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
Nov 9 16:30:30 debian8 kernel: [ 0.998861] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
Nov 9 16:30:30 debian8 kernel: [ 0.998862] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
Nov 9 16:30:30 debian8 kernel: [ 0.998862] pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000d3fff window]
Nov 9 16:30:30 debian8 kernel: [ 0.998863] pci_bus 0000:00: resource 8 [mem 0x000d4000-0x000d7fff window]
Nov 9 16:30:30 debian8 kernel: [ 0.998863] pci_bus 0000:00: resource 9 [mem 0x000d8000-0x000dbfff window]
Nov 9 16:30:30 debian8 kernel: [ 0.998864] pci_bus 0000:00: resource 10 [mem 0x000dc000-0x000dffff window]
Nov 9 16:30:30 debian8 kernel: [ 0.998865] pci_bus 0000:00: resource 11 [mem 0x4f200000-0xfeafffff window]
Nov 9 16:30:30 debian8 kernel: [ 0.998865] pci_bus 0000:01: resource 1 [mem 0xdf000000-0xdf0fffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998866] pci_bus 0000:03: resource 0 [io 0xe000-0xefff]
Nov 9 16:30:30 debian8 kernel: [ 0.998867] pci_bus 0000:03: resource 1 [mem 0xdef00000-0xdeffffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998867] pci_bus 0000:04: resource 0 [io 0xc000-0xdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.998868] pci_bus 0000:04: resource 1 [mem 0xde800000-0xdeefffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998869] pci_bus 0000:04: resource 2 [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.998869] pci_bus 0000:05: resource 0 [io 0xc000-0xdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.998870] pci_bus 0000:05: resource 1 [mem 0xde800000-0xdedfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998871] pci_bus 0000:05: resource 2 [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.998871] pci_bus 0000:08: resource 0 [io 0xd000-0xdfff]
Nov 9 16:30:30 debian8 kernel: [ 0.998872] pci_bus 0000:08: resource 1 [mem 0xded00000-0xdedfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998873] pci_bus 0000:08: resource 2 [mem 0xaa100000-0xaa1fffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 0.998874] pci_bus 0000:0a: resource 1 [mem 0xde800000-0xdeafffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998874] pci_bus 0000:0c: resource 0 [io 0xc000-0xcfff]
Nov 9 16:30:30 debian8 kernel: [ 0.998875] pci_bus 0000:0c: resource 1 [mem 0xdec00000-0xdecfffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998876] pci_bus 0000:0d: resource 0 [io 0x2000-0x2fff]
Nov 9 16:30:30 debian8 kernel: [ 0.998876] pci_bus 0000:0d: resource 1 [mem 0xb0000000-0xde0fffff]
Nov 9 16:30:30 debian8 kernel: [ 0.998877] pci_bus 0000:0d: resource 2 [mem 0x60000000-0xa9ffffff 64bit pref]
Nov 9 16:30:30 debian8 kernel: [ 1.078856] NET: Registered protocol family 2
Nov 9 16:30:30 debian8 kernel: [ 1.094888] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
Nov 9 16:30:30 debian8 kernel: [ 1.095209] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
Nov 9 16:30:30 debian8 kernel: [ 1.095545] TCP: Hash tables configured (established 32768 bind 32768)
Nov 9 16:30:30 debian8 kernel: [ 1.095795] UDP hash table entries: 2048 (order: 4, 65536 bytes)
Nov 9 16:30:30 debian8 kernel: [ 1.096026] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
Nov 9 16:30:30 debian8 kernel: [ 1.096300] NET: Registered protocol family 1
Nov 9 16:30:30 debian8 kernel: [ 1.096467] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
Nov 9 16:30:30 debian8 kernel: [ 1.118905] PCI: CLS mismatch (64 != 128), using 64 bytes
Nov 9 16:30:30 debian8 kernel: [ 1.139004] Unpacking initramfs...
Nov 9 16:30:30 debian8 kernel: [ 3.234304] Freeing initrd memory: 190912K (ffff988257560000 - ffff988262fd0000)
Nov 9 16:30:30 debian8 kernel: [ 3.234572] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
Nov 9 16:30:30 debian8 kernel: [ 3.234813] software IO TLB [mem 0x3636d000-0x3a36d000] (64MB) mapped at [ffff98827636d000-ffff98827a36cfff]
Nov 9 16:30:30 debian8 kernel: [ 3.235255] RAPL PMU: API unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer
Nov 9 16:30:30 debian8 kernel: [ 3.235538] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules
Nov 9 16:30:30 debian8 kernel: [ 3.235744] RAPL PMU: hw unit of domain package 2^-14 Joules
Nov 9 16:30:30 debian8 kernel: [ 3.235948] RAPL PMU: hw unit of domain dram 2^-14 Joules
Nov 9 16:30:30 debian8 kernel: [ 3.236142] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
Nov 9 16:30:30 debian8 kernel: [ 3.236600] simple-framebuffer simple-framebuffer.0: framebuffer at 0x50000000, 0x300000 bytes, mapped to 0xffffb6fe80800000
Nov 9 16:30:30 debian8 kernel: [ 3.236999] simple-framebuffer simple-framebuffer.0: format=a8r8g8b8, mode=1024x768x32, linelength=4096
Nov 9 16:30:30 debian8 kernel: [ 3.238424] Console: switching to colour frame buffer device 128x48
Nov 9 16:30:30 debian8 kernel: [ 3.239672] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered!
Nov 9 16:30:30 debian8 kernel: [ 3.258871] futex hash table entries: 2048 (order: 5, 131072 bytes)
Nov 9 16:30:30 debian8 kernel: [ 3.274750] audit: initializing netlink subsys (disabled)
Nov 9 16:30:30 debian8 kernel: [ 3.274959] audit: type=2000 audit(1478705418.264:1): initialized
Nov 9 16:30:30 debian8 kernel: [ 3.275579] workingset: timestamp_bits=40 max_order=20 bucket_order=0
Nov 9 16:30:30 debian8 kernel: [ 3.275818] zbud: loaded
Nov 9 16:30:30 debian8 kernel: [ 3.513227] Key type asymmetric registered
Nov 9 16:30:30 debian8 kernel: [ 3.513377] Asymmetric key parser 'x509' registered
Nov 9 16:30:30 debian8 kernel: [ 3.534741] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
Nov 9 16:30:30 debian8 kernel: [ 3.535034] io scheduler noop registered
Nov 9 16:30:30 debian8 kernel: [ 3.535177] io scheduler deadline registered
Nov 9 16:30:30 debian8 kernel: [ 3.535335] io scheduler cfq registered (default)
Nov 9 16:30:30 debian8 kernel: [ 3.536951] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
Nov 9 16:30:30 debian8 kernel: [ 3.537154] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
Nov 9 16:30:30 debian8 kernel: [ 3.537399] intel_idle: MWAIT substates: 0x42120
Nov 9 16:30:30 debian8 kernel: [ 3.537399] intel_idle: v0.4.1 model 0x3C
Nov 9 16:30:30 debian8 kernel: [ 3.537589] intel_idle: lapic_timer_reliable_states 0xffffffff
Nov 9 16:30:30 debian8 kernel: [ 3.537720] GHES: HEST is not enabled!
Nov 9 16:30:30 debian8 kernel: [ 3.537887] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
Nov 9 16:30:30 debian8 kernel: [ 3.538380] Linux agpgart interface v0.103
Nov 9 16:30:30 debian8 kernel: [ 3.538559] AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
Nov 9 16:30:30 debian8 kernel: [ 3.538785] AMD IOMMUv2 functionality not available on this system
Nov 9 16:30:30 debian8 kernel: [ 3.539366] i8042: PNP: No PS/2 controller found. Probing ports directly.
Nov 9 16:30:30 debian8 kernel: [ 3.541968] serio: i8042 KBD port at 0x60,0x64 irq 1
Nov 9 16:30:30 debian8 kernel: [ 3.542150] serio: i8042 AUX port at 0x60,0x64 irq 12
Nov 9 16:30:30 debian8 kernel: [ 3.542430] mousedev: PS/2 mouse device common for all mice
Nov 9 16:30:30 debian8 kernel: [ 3.542657] rtc_cmos 00:02: RTC can wake from S4
Nov 9 16:30:30 debian8 kernel: [ 3.542934] rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
Nov 9 16:30:30 debian8 kernel: [ 3.543172] rtc_cmos 00:02: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
Nov 9 16:30:30 debian8 kernel: [ 3.543450] intel_pstate: Intel P-state driver initializing
Nov 9 16:30:30 debian8 kernel: [ 3.543953] ledtrig-cpu: registered to indicate activity on CPUs
Nov 9 16:30:30 debian8 kernel: [ 3.606773] NET: Registered protocol family 10
Nov 9 16:30:30 debian8 kernel: [ 3.626798] mip6: Mobile IPv6
Nov 9 16:30:30 debian8 kernel: [ 3.626924] NET: Registered protocol family 17
Nov 9 16:30:30 debian8 kernel: [ 3.627105] mpls_gso: MPLS GSO support
Nov 9 16:30:30 debian8 kernel: [ 3.627858] microcode: sig=0x306c3, pf=0x2, revision=0x19
Nov 9 16:30:30 debian8 kernel: [ 3.628350] microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
Nov 9 16:30:30 debian8 kernel: [ 3.629196] registered taskstats version 1
Nov 9 16:30:30 debian8 kernel: [ 3.629393] zswap: loaded using pool lzo/zbud
Nov 9 16:30:30 debian8 kernel: [ 3.630938] rtc_cmos 00:02: setting system clock to 2016-11-09 15:30:18 UTC (1478705418)
Nov 9 16:30:30 debian8 kernel: [ 3.631359] PM: Hibernation image not present or could not be loaded.
Nov 9 16:30:30 debian8 kernel: [ 3.632576] Freeing unused kernel memory: 1376K (ffffffffba136000 - ffffffffba28e000)
Nov 9 16:30:30 debian8 kernel: [ 3.632874] Write protecting the kernel read-only data: 10240k
Nov 9 16:30:30 debian8 kernel: [ 3.633337] Freeing unused kernel memory: 44K (ffff9883c11f5000 - ffff9883c1200000)
Nov 9 16:30:30 debian8 kernel: [ 3.637353] Freeing unused kernel memory: 1320K (ffff9883c14b6000 - ffff9883c1600000)
Nov 9 16:30:30 debian8 kernel: [ 3.645454] x86/mm: Checked W+X mappings: passed, no W+X pages found.
Nov 9 16:30:30 debian8 kernel: [ 3.653777] random: systemd-udevd: uninitialized urandom read (16 bytes read)
Nov 9 16:30:30 debian8 kernel: [ 3.659586] FUJITSU Extended Socket Network Device Driver - version 1.1 - Copyright (c) 2015 FUJITSU LIMITED
Nov 9 16:30:30 debian8 kernel: [ 3.665227] thermal LNXTHERM:00: registered as thermal_zone0
Nov 9 16:30:30 debian8 kernel: [ 3.665454] ACPI: Thermal Zone [TZ00] (28 C)
Nov 9 16:30:30 debian8 kernel: [ 3.665871] pps_core: LinuxPPS API ver. 1 registered
Nov 9 16:30:30 debian8 kernel: [ 3.665988] thermal LNXTHERM:01: registered as thermal_zone1
Nov 9 16:30:30 debian8 kernel: [ 3.665988] ACPI: Thermal Zone [TZ01] (30 C)
Nov 9 16:30:30 debian8 kernel: [ 3.666456] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
Nov 9 16:30:30 debian8 kernel: [ 3.668256] PTP clock support registered
Nov 9 16:30:30 debian8 kernel: [ 3.671405] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
Nov 9 16:30:30 debian8 kernel: [ 3.672237] r8169 0000:08:00.0: can't disable ASPM; OS doesn't have ASPM control
Nov 9 16:30:30 debian8 kernel: [ 3.674776] SCSI subsystem initialized
Nov 9 16:30:30 debian8 kernel: [ 3.675759] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
Nov 9 16:30:30 debian8 kernel: [ 3.675818] ACPI: bus type USB registered
Nov 9 16:30:30 debian8 kernel: [ 3.675863] usbcore: registered new interface driver usbfs
Nov 9 16:30:30 debian8 kernel: [ 3.675878] usbcore: registered new interface driver hub
Nov 9 16:30:30 debian8 kernel: [ 3.675934] usbcore: registered new device driver usb
Nov 9 16:30:30 debian8 kernel: [ 3.676797] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
Nov 9 16:30:30 debian8 kernel: [ 3.677493] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
Nov 9 16:30:30 debian8 kernel: [ 3.678883] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Nov 9 16:30:30 debian8 kernel: [ 3.680305] libata version 3.00 loaded.
Nov 9 16:30:30 debian8 kernel: [ 3.680782] ehci-pci: EHCI PCI platform driver
Nov 9 16:30:30 debian8 kernel: [ 3.681403] ahci 0000:03:00.0: version 3.0
Nov 9 16:30:30 debian8 kernel: [ 3.681531] ahci 0000:03:00.0: SSS flag set, parallel bus scan disabled
Nov 9 16:30:30 debian8 kernel: [ 3.681830] ahci 0000:03:00.0: AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
Nov 9 16:30:30 debian8 kernel: [ 3.682156] ahci 0000:03:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc
Nov 9 16:30:30 debian8 kernel: [ 3.683055] scsi host0: ahci
Nov 9 16:30:30 debian8 kernel: [ 3.683267] scsi host1: ahci
Nov 9 16:30:30 debian8 kernel: [ 3.683437] ata1: SATA max UDMA/133 abar m512@0xdef00000 port 0xdef00100 irq 34
Nov 9 16:30:30 debian8 kernel: [ 3.683732] ata2: SATA max UDMA/133 abar m512@0xdef00000 port 0xdef00180 irq 34
Nov 9 16:30:30 debian8 kernel: [ 3.684142] ahci 0000:0c:00.0: SSS flag set, parallel bus scan disabled
Nov 9 16:30:30 debian8 kernel: [ 3.684457] ahci 0000:0c:00.0: AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
Nov 9 16:30:30 debian8 kernel: [ 3.684789] ahci 0000:0c:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc
Nov 9 16:30:30 debian8 kernel: [ 3.685412] scsi host2: ahci
Nov 9 16:30:30 debian8 kernel: [ 3.685610] scsi host3: ahci
Nov 9 16:30:30 debian8 kernel: [ 3.685763] ata3: SATA max UDMA/133 abar m512@0xdec00000 port 0xdec00100 irq 35
Nov 9 16:30:30 debian8 kernel: [ 3.686026] ata4: SATA max UDMA/133 abar m512@0xdec00000 port 0xdec00180 irq 35
Nov 9 16:30:30 debian8 kernel: [ 3.691605] r8169 0000:08:00.0 eth0: RTL8168g/8111g at 0xffffb6fe8074e000, 00:e0:4c:68:00:3d, XID 0c000800 IRQ 36
Nov 9 16:30:30 debian8 kernel: [ 3.691980] r8169 0000:08:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Nov 9 16:30:30 debian8 kernel: [ 3.770626] e1000e 0000:00:19.0 0000:00:19.0 (uninitialized): registered PHC clock
Nov 9 16:30:30 debian8 kernel: [ 3.859033] e1000e 0000:00:19.0 eth1: (PCI Express:2.5GT/s:Width x1) 88:88:88:88:87:88
Nov 9 16:30:30 debian8 kernel: [ 3.859327] e1000e 0000:00:19.0 eth1: Intel(R) PRO/1000 Network Connection
Nov 9 16:30:30 debian8 kernel: [ 3.859617] e1000e 0000:00:19.0 eth1: MAC: 11, PHY: 12, PBA No: FFFFFF-0FF
Nov 9 16:30:30 debian8 kernel: [ 3.860020] ehci-pci 0000:00:1a.0: EHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.860235] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 1
Nov 9 16:30:30 debian8 kernel: [ 3.860516] ehci-pci 0000:00:1a.0: debug port 2
Nov 9 16:30:30 debian8 kernel: [ 3.864561] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
Nov 9 16:30:30 debian8 kernel: [ 3.864573] ehci-pci 0000:00:1a.0: irq 16, io mem 0xdf13b000
Nov 9 16:30:30 debian8 kernel: [ 3.878733] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
Nov 9 16:30:30 debian8 kernel: [ 3.878969] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
Nov 9 16:30:30 debian8 kernel: [ 3.879213] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Nov 9 16:30:30 debian8 kernel: [ 3.879472] usb usb1: Product: EHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.879649] usb usb1: Manufacturer: Linux 4.8.6+ ehci_hcd
Nov 9 16:30:30 debian8 kernel: [ 3.879844] usb usb1: SerialNumber: 0000:00:1a.0
Nov 9 16:30:30 debian8 kernel: [ 3.880120] hub 1-0:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 3.880264] hub 1-0:1.0: 2 ports detected
Nov 9 16:30:30 debian8 kernel: [ 3.880550] ehci-pci 0000:00:1d.0: EHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.880749] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 2
Nov 9 16:30:30 debian8 kernel: [ 3.881019] ehci-pci 0000:00:1d.0: debug port 2
Nov 9 16:30:30 debian8 kernel: [ 3.885068] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
Nov 9 16:30:30 debian8 kernel: [ 3.885073] ehci-pci 0000:00:1d.0: irq 23, io mem 0xdf13a000
Nov 9 16:30:30 debian8 kernel: [ 3.898738] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
Nov 9 16:30:30 debian8 kernel: [ 3.898989] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
Nov 9 16:30:30 debian8 kernel: [ 3.899241] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Nov 9 16:30:30 debian8 kernel: [ 3.899508] usb usb2: Product: EHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.899691] usb usb2: Manufacturer: Linux 4.8.6+ ehci_hcd
Nov 9 16:30:30 debian8 kernel: [ 3.899896] usb usb2: SerialNumber: 0000:00:1d.0
Nov 9 16:30:30 debian8 kernel: [ 3.900229] hub 2-0:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 3.900380] hub 2-0:1.0: 2 ports detected
Nov 9 16:30:30 debian8 kernel: [ 3.900807] xhci_hcd 0000:00:14.0: xHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.901018] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
Nov 9 16:30:30 debian8 kernel: [ 3.902370] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x00009810
Nov 9 16:30:30 debian8 kernel: [ 3.902685] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
Nov 9 16:30:30 debian8 kernel: [ 3.902787] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
Nov 9 16:30:30 debian8 kernel: [ 3.903029] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Nov 9 16:30:30 debian8 kernel: [ 3.903287] usb usb3: Product: xHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.903462] usb usb3: Manufacturer: Linux 4.8.6+ xhci-hcd
Nov 9 16:30:30 debian8 kernel: [ 3.903656] usb usb3: SerialNumber: 0000:00:14.0
Nov 9 16:30:30 debian8 kernel: [ 3.903899] hub 3-0:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 3.904053] hub 3-0:1.0: 14 ports detected
Nov 9 16:30:30 debian8 kernel: [ 3.906330] xhci_hcd 0000:00:14.0: xHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.906519] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 4
Nov 9 16:30:30 debian8 kernel: [ 3.906852] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
Nov 9 16:30:30 debian8 kernel: [ 3.907094] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Nov 9 16:30:30 debian8 kernel: [ 3.907350] usb usb4: Product: xHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.907526] usb usb4: Manufacturer: Linux 4.8.6+ xhci-hcd
Nov 9 16:30:30 debian8 kernel: [ 3.907719] usb usb4: SerialNumber: 0000:00:14.0
Nov 9 16:30:30 debian8 kernel: [ 3.907978] hub 4-0:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 3.908127] hub 4-0:1.0: 6 ports detected
Nov 9 16:30:30 debian8 kernel: [ 3.909002] xhci_hcd 0000:01:00.0: xHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.909191] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 5
Nov 9 16:30:30 debian8 kernel: [ 3.968189] xhci_hcd 0000:01:00.0: hcc params 0x0200eec1 hci version 0x110 quirks 0x00000010
Nov 9 16:30:30 debian8 kernel: [ 3.968570] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
Nov 9 16:30:30 debian8 kernel: [ 3.968812] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Nov 9 16:30:30 debian8 kernel: [ 3.969068] usb usb5: Product: xHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.969244] usb usb5: Manufacturer: Linux 4.8.6+ xhci-hcd
Nov 9 16:30:30 debian8 kernel: [ 3.969437] usb usb5: SerialNumber: 0000:01:00.0
Nov 9 16:30:30 debian8 kernel: [ 3.969671] hub 5-0:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 3.969814] hub 5-0:1.0: 2 ports detected
Nov 9 16:30:30 debian8 kernel: [ 3.970001] xhci_hcd 0000:01:00.0: xHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.970189] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 6
Nov 9 16:30:30 debian8 kernel: [ 3.970471] usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
Nov 9 16:30:30 debian8 kernel: [ 3.970821] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003
Nov 9 16:30:30 debian8 kernel: [ 3.971064] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Nov 9 16:30:30 debian8 kernel: [ 3.971322] usb usb6: Product: xHCI Host Controller
Nov 9 16:30:30 debian8 kernel: [ 3.971498] usb usb6: Manufacturer: Linux 4.8.6+ xhci-hcd
Nov 9 16:30:30 debian8 kernel: [ 3.971692] usb usb6: SerialNumber: 0000:01:00.0
Nov 9 16:30:30 debian8 kernel: [ 3.971935] hub 6-0:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 3.972078] hub 6-0:1.0: 2 ports detected
Nov 9 16:30:30 debian8 kernel: [ 3.997177] ata1: SATA link down (SStatus 0 SControl 300)
Nov 9 16:30:30 debian8 kernel: [ 4.001038] ata3: SATA link down (SStatus 0 SControl 300)
Nov 9 16:30:30 debian8 kernel: [ 4.206721] usb 1-1: new high-speed USB device number 2 using ehci-pci
Nov 9 16:30:30 debian8 kernel: [ 4.226721] usb 2-1: new high-speed USB device number 2 using ehci-pci
Nov 9 16:30:30 debian8 kernel: [ 4.230713] usb 3-3: new high-speed USB device number 2 using xhci_hcd
Nov 9 16:30:30 debian8 kernel: [ 4.258706] tsc: Refined TSC clocksource calibration: 3398.030 MHz
Nov 9 16:30:30 debian8 kernel: [ 4.258936] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x30fb0a05005, max_idle_ns: 440795375639 ns
Nov 9 16:30:30 debian8 kernel: [ 4.355123] usb 1-1: New USB device found, idVendor=8087, idProduct=8008
Nov 9 16:30:30 debian8 kernel: [ 4.355401] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Nov 9 16:30:30 debian8 kernel: [ 4.356187] hub 1-1:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 4.356437] hub 1-1:1.0: 6 ports detected
Nov 9 16:30:30 debian8 kernel: [ 4.375105] usb 2-1: New USB device found, idVendor=8087, idProduct=8000
Nov 9 16:30:30 debian8 kernel: [ 4.375370] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Nov 9 16:30:30 debian8 kernel: [ 4.375986] hub 2-1:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 4.376176] hub 2-1:1.0: 8 ports detected
Nov 9 16:30:30 debian8 kernel: [ 4.396467] usb 3-3: New USB device found, idVendor=174c, idProduct=2074
Nov 9 16:30:30 debian8 kernel: [ 4.396733] usb 3-3: New USB device strings: Mfr=2, Product=3, SerialNumber=0
Nov 9 16:30:30 debian8 kernel: [ 4.397012] usb 3-3: Product: ASM107x
Nov 9 16:30:30 debian8 kernel: [ 4.397158] usb 3-3: Manufacturer: ASUS Tek.
Nov 9 16:30:30 debian8 kernel: [ 4.397808] hub 3-3:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 4.398131] hub 3-3:1.0: 4 ports detected
Nov 9 16:30:30 debian8 kernel: [ 4.470758] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Nov 9 16:30:30 debian8 kernel: [ 4.471614] ata2.00: ATA-8: ST1000DM003-9YN162, CC4B, max UDMA/133
Nov 9 16:30:30 debian8 kernel: [ 4.471841] ata2.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
Nov 9 16:30:30 debian8 kernel: [ 4.472663] ata2.00: configured for UDMA/133
Nov 9 16:30:30 debian8 kernel: [ 4.473007] scsi 1:0:0:0: Direct-Access ATA ST1000DM003-9YN1 CC4B PQ: 0 ANSI: 5
Nov 9 16:30:30 debian8 kernel: [ 4.511825] sd 1:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
Nov 9 16:30:30 debian8 kernel: [ 4.512112] sd 1:0:0:0: [sda] 4096-byte physical blocks
Nov 9 16:30:30 debian8 kernel: [ 4.512349] sd 1:0:0:0: [sda] Write Protect is off
Nov 9 16:30:30 debian8 kernel: [ 4.512524] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
Nov 9 16:30:30 debian8 kernel: [ 4.512539] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Nov 9 16:30:30 debian8 kernel: [ 4.526503] usb 4-3: new SuperSpeed USB device number 2 using xhci_hcd
Nov 9 16:30:30 debian8 kernel: [ 4.551263] sda: sda1 sda2 sda3 sda4
Nov 9 16:30:30 debian8 kernel: [ 4.551900] sd 1:0:0:0: [sda] Attached SCSI disk
Nov 9 16:30:30 debian8 kernel: [ 4.654059] usb 4-3: New USB device found, idVendor=174c, idProduct=3074
Nov 9 16:30:30 debian8 kernel: [ 4.654302] usb 4-3: New USB device strings: Mfr=2, Product=3, SerialNumber=0
Nov 9 16:30:30 debian8 kernel: [ 4.654558] usb 4-3: Product: ASM107x
Nov 9 16:30:30 debian8 kernel: [ 4.654698] usb 4-3: Manufacturer: ASUS Tek.
Nov 9 16:30:30 debian8 kernel: [ 4.710725] usb 3-4: new full-speed USB device number 3 using xhci_hcd
Nov 9 16:30:30 debian8 kernel: [ 4.714554] hub 4-3:1.0: USB hub found
Nov 9 16:30:30 debian8 kernel: [ 4.726679] hub 4-3:1.0: 4 ports detected
Nov 9 16:30:30 debian8 kernel: [ 4.825816] ata4: SATA link down (SStatus 0 SControl 300)
Nov 9 16:30:30 debian8 kernel: [ 4.827420] sd 1:0:0:0: Attached scsi generic sg0 type 0
Nov 9 16:30:30 debian8 kernel: [ 4.857032] usb 3-4: New USB device found, idVendor=0b05, idProduct=17cf
Nov 9 16:30:30 debian8 kernel: [ 4.857283] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 9 16:30:30 debian8 kernel: [ 4.857549] usb 3-4: Product: BCM20702A0
Nov 9 16:30:30 debian8 kernel: [ 4.857698] usb 3-4: Manufacturer: Broadcom Corp
Nov 9 16:30:30 debian8 kernel: [ 4.857872] usb 3-4: SerialNumber: 6C71D9497B00
Nov 9 16:30:30 debian8 kernel: [ 4.978662] usb 3-5: new low-speed USB device number 4 using xhci_hcd
Nov 9 16:30:30 debian8 kernel: [ 4.992660] random: fast init done
Nov 9 16:30:30 debian8 kernel: [ 5.124224] usb 3-5: New USB device found, idVendor=04b3, idProduct=3025
Nov 9 16:30:30 debian8 kernel: [ 5.124467] usb 3-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 9 16:30:30 debian8 kernel: [ 5.124723] usb 3-5: Product: USB NetVista Full Width Keyboard
Nov 9 16:30:30 debian8 kernel: [ 5.124934] usb 3-5: Manufacturer: CHICONY
Nov 9 16:30:30 debian8 kernel: [ 5.126552] hidraw: raw HID events driver (C) Jiri Kosina
Nov 9 16:30:30 debian8 kernel: [ 5.129361] usbcore: registered new interface driver usbhid
Nov 9 16:30:30 debian8 kernel: [ 5.129569] usbhid: USB HID core driver
Nov 9 16:30:30 debian8 kernel: [ 5.130092] input: CHICONY USB NetVista Full Width Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5:1.0/0003:04B3:3025.0001/input/input3
Nov 9 16:30:30 debian8 kernel: [ 5.186794] hid-generic 0003:04B3:3025.0001: input,hidraw0: USB HID v1.10 Keyboard [CHICONY USB NetVista Full Width Keyboard] on usb-0000:00:14.0-5/input0
Nov 9 16:30:30 debian8 kernel: [ 5.195652] PM: Starting manual resume from disk
Nov 9 16:30:30 debian8 kernel: [ 5.195825] PM: Hibernation image partition 8:3 present
Nov 9 16:30:30 debian8 kernel: [ 5.195825] PM: Looking for hibernation image.
Nov 9 16:30:30 debian8 kernel: [ 5.196068] PM: Image not found (code -22)
Nov 9 16:30:30 debian8 kernel: [ 5.196069] PM: Hibernation image not present or could not be loaded.
Nov 9 16:30:30 debian8 kernel: [ 5.242671] usb 3-6: new low-speed USB device number 5 using xhci_hcd
Nov 9 16:30:30 debian8 kernel: [ 5.282874] clocksource: Switched to clocksource tsc
Nov 9 16:30:30 debian8 kernel: [ 5.386118] usb 3-6: New USB device found, idVendor=17ef, idProduct=6019
Nov 9 16:30:30 debian8 kernel: [ 5.386387] usb 3-6: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Nov 9 16:30:30 debian8 kernel: [ 5.386701] usb 3-6: Product: Lenovo Optical USB Mouse
Nov 9 16:30:30 debian8 kernel: [ 5.390458] input: Lenovo Optical USB Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.0/0003:17EF:6019.0002/input/input4
Nov 9 16:30:30 debian8 kernel: [ 5.391071] hid-generic 0003:17EF:6019.0002: input,hidraw1: USB HID v1.11 Mouse [Lenovo Optical USB Mouse] on usb-0000:00:14.0-6/input0
Nov 9 16:30:30 debian8 kernel: [ 5.538686] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
Nov 9 16:30:30 debian8 kernel: [ 7.085908] lp: driver loaded but no devices found
Nov 9 16:30:30 debian8 kernel: [ 7.175486] ppdev: user-space parallel port driver
Nov 9 16:30:30 debian8 kernel: [ 7.253918] fuse init (API version 7.25)
Nov 9 16:30:30 debian8 kernel: [ 7.799453] random: crng init done
Nov 9 16:30:30 debian8 kernel: [ 8.205477] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input5
Nov 9 16:30:30 debian8 kernel: [ 8.205785] ACPI: Power Button [PWRB]
Nov 9 16:30:30 debian8 kernel: [ 8.205966] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input6
Nov 9 16:30:30 debian8 kernel: [ 8.206235] ACPI: Power Button [PWRF]
Nov 9 16:30:30 debian8 kernel: [ 8.276995] wmi: Mapper loaded
Nov 9 16:30:30 debian8 kernel: [ 8.299164] EFI Variables Facility v0.08 2004-May-17
Nov 9 16:30:30 debian8 kernel: [ 8.303729] pstore: using zlib compression
Nov 9 16:30:30 debian8 kernel: [ 8.303882] pstore: Registered efi as persistent store backend
Nov 9 16:30:30 debian8 kernel: [ 8.539759] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro
Nov 9 16:30:30 debian8 kernel: [ 8.552815] e1000e 0000:00:19.0 eth4: renamed from eth1
Nov 9 16:30:30 debian8 kernel: [ 8.619147] i801_smbus 0000:00:1f.3: SMBus using PCI interrupt
Nov 9 16:30:30 debian8 kernel: [ 8.798750] input: PC Speaker as /devices/platform/pcspkr/input/input7
Nov 9 16:30:30 debian8 kernel: [ 8.994456] [drm] Initialized drm 1.1.0 20060810
Nov 9 16:30:30 debian8 kernel: [ 9.114052] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
Nov 9 16:30:30 debian8 kernel: [ 9.205423] asus_wmi: ASUS WMI generic driver loaded
Nov 9 16:30:30 debian8 kernel: [ 9.303106] iTCO_vendor_support: vendor-support=0
Nov 9 16:30:30 debian8 kernel: [ 9.426361] asus_wmi: Initialization: 0x0
Nov 9 16:30:30 debian8 kernel: [ 9.426532] asus_wmi: BIOS WMI version: 0.9
Nov 9 16:30:30 debian8 kernel: [ 9.426707] asus_wmi: SFUN value: 0x0
Nov 9 16:30:30 debian8 kernel: [ 9.427063] input: Eee PC WMI hotkeys as /devices/platform/eeepc-wmi/input/input8
Nov 9 16:30:30 debian8 kernel: [ 9.427396] asus_wmi: Number of fans: 1
Nov 9 16:30:30 debian8 kernel: [ 9.597077] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
Nov 9 16:30:30 debian8 kernel: [ 9.597311] iTCO_wdt: Found a Lynx Point TCO device (Version=2, TCOBASE=0x1860)
Nov 9 16:30:30 debian8 kernel: [ 9.597635] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
Nov 9 16:30:30 debian8 kernel: [ 9.648510] r8169 0000:08:00.0 eth5: renamed from eth0
Nov 9 16:30:30 debian8 kernel: [ 9.651479] AVX2 version of gcm_enc/dec engaged.
Nov 9 16:30:30 debian8 kernel: [ 9.651648] AES CTR mode by8 optimization enabled
Nov 9 16:30:30 debian8 kernel: [ 9.886501] [drm] Memory usable by graphics device = 2048M
Nov 9 16:30:30 debian8 kernel: [ 9.886705] checking generic (50000000 300000) vs hw (50000000 10000000)
Nov 9 16:30:30 debian8 kernel: [ 9.886706] fb: switching to inteldrmfb from simple
Nov 9 16:30:30 debian8 kernel: [ 9.886907] Console: switching to colour dummy device 80x25
Nov 9 16:30:30 debian8 kernel: [ 9.887168] [drm] Replacing VGA console driver
Nov 9 16:30:30 debian8 kernel: [ 9.893574] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
Nov 9 16:30:30 debian8 kernel: [ 9.893815] [drm] Driver supports precise vblank timestamp query.
Nov 9 16:30:30 debian8 kernel: [ 9.896222] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
Nov 9 16:30:30 debian8 kernel: [ 9.915390] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
Nov 9 16:30:30 debian8 kernel: [ 9.915719] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input9
Nov 9 16:30:30 debian8 kernel: [ 9.916158] [drm] Initialized i915 1.6.0 20160711 for 0000:00:02.0 on minor 0
Nov 9 16:30:30 debian8 kernel: [ 9.931670] fbcon: inteldrmfb (fb0) is primary device
Nov 9 16:30:30 debian8 kernel: [ 9.971882] Console: switching to colour frame buffer device 240x75
Nov 9 16:30:30 debian8 kernel: [ 9.985025] bcma: bus0: Found chip with id 0x4352, rev 0x03 and package 0x00
Nov 9 16:30:30 debian8 kernel: [ 9.985055] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2B, class 0x0)
Nov 9 16:30:30 debian8 kernel: [ 9.985071] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x2A, class 0x0)
Nov 9 16:30:30 debian8 kernel: [ 9.985102] bcma: bus0: Core 2 found: ARM CR4 (manuf 0x4BF, id 0x83E, rev 0x02, class 0x0)
Nov 9 16:30:30 debian8 kernel: [ 9.985135] bcma: bus0: Core 3 found: PCIe Gen2 (manuf 0x4BF, id 0x83C, rev 0x01, class 0x0)
Nov 9 16:30:30 debian8 kernel: [ 9.985151] bcma: bus0: Core 4 found: USB 2.0 Device (manuf 0x4BF, id 0x81A, rev 0x11, class 0x0)
Nov 9 16:30:30 debian8 kernel: [ 10.018208] bcma: Unsupported SPROM revision: 11
Nov 9 16:30:30 debian8 kernel: [ 10.018209] bcma: bus0: Invalid SPROM read from the PCIe card, trying to use fallback SPROM
Nov 9 16:30:30 debian8 kernel: [ 10.018209] bcma: bus0: Using fallback SPROM failed (err -2)
Nov 9 16:30:30 debian8 kernel: [ 10.018210] bcma: bus0: No SPROM available
Nov 9 16:30:30 debian8 kernel: [ 10.018728] Error: Driver 'pcspkr' is already registered, aborting...
Nov 9 16:30:30 debian8 kernel: [ 10.020262] bcma: bus0: Bus registered
Nov 9 16:30:30 debian8 kernel: [ 10.020773] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
Nov 9 16:30:30 debian8 kernel: [ 10.344412] Bluetooth: Core ver 2.21
Nov 9 16:30:30 debian8 kernel: [ 10.344555] NET: Registered protocol family 31
Nov 9 16:30:30 debian8 kernel: [ 10.344716] Bluetooth: HCI device and connection manager initialized
Nov 9 16:30:30 debian8 kernel: [ 10.344945] Bluetooth: HCI socket layer initialized
Nov 9 16:30:30 debian8 kernel: [ 10.345123] Bluetooth: L2CAP socket layer initialized
Nov 9 16:30:30 debian8 kernel: [ 10.345309] Bluetooth: SCO socket layer initialized
Nov 9 16:30:30 debian8 kernel: [ 10.463781] Adding 4163580k swap on /dev/sda3. Priority:-1 extents:1 across:4163580k FS
Nov 9 16:30:30 debian8 kernel: [ 10.622841] usbcore: registered new interface driver btusb
Nov 9 16:30:30 debian8 kernel: [ 10.627247] Bluetooth: hci0: BCM: chip id 63
Nov 9 16:30:30 debian8 kernel: [ 10.643256] Bluetooth: hci0: debian8
Nov 9 16:30:30 debian8 kernel: [ 10.644254] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000
Nov 9 16:30:30 debian8 kernel: [ 10.653809] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0b05-17cf.hcd failed with error -2
Nov 9 16:30:30 debian8 kernel: [ 10.654144] Bluetooth: hci0: BCM: Patch brcm/BCM20702A1-0b05-17cf.hcd not found
Nov 9 16:30:30 debian8 kernel: [ 11.086033] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Nov 9 16:30:30 debian8 kernel: [ 11.113762] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
Nov 9 16:30:30 debian8 kernel: [ 11.309420] input: HDA Intel HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input10
Nov 9 16:30:30 debian8 kernel: [ 11.309824] input: HDA Intel HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/sound/card0/input11
Nov 9 16:30:30 debian8 kernel: [ 11.310198] input: HDA Intel HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/sound/card0/input12
Nov 9 16:30:30 debian8 kernel: [ 11.418077] snd_hda_codec_realtek hdaudioC1D0: ALC1150: SKU not ready 0x00000000
Nov 9 16:30:30 debian8 kernel: [ 11.418907] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC1150: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
Nov 9 16:30:30 debian8 kernel: [ 11.419285] snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Nov 9 16:30:30 debian8 kernel: [ 11.419566] snd_hda_codec_realtek hdaudioC1D0: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
Nov 9 16:30:30 debian8 kernel: [ 11.419844] snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
Nov 9 16:30:30 debian8 kernel: [ 11.420071] snd_hda_codec_realtek hdaudioC1D0: dig-out=0x11/0x1e
Nov 9 16:30:30 debian8 kernel: [ 11.420295] snd_hda_codec_realtek hdaudioC1D0: inputs:
Nov 9 16:30:30 debian8 kernel: [ 11.420490] snd_hda_codec_realtek hdaudioC1D0: Front Mic=0x19
Nov 9 16:30:30 debian8 kernel: [ 11.420711] snd_hda_codec_realtek hdaudioC1D0: Rear Mic=0x18
Nov 9 16:30:30 debian8 kernel: [ 11.420938] snd_hda_codec_realtek hdaudioC1D0: Line=0x1a
Nov 9 16:30:30 debian8 kernel: [ 11.432840] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card1/input13
Nov 9 16:30:30 debian8 kernel: [ 11.433740] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input14
Nov 9 16:30:30 debian8 kernel: [ 11.434096] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input15
Nov 9 16:30:30 debian8 kernel: [ 11.434485] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card1/input16
Nov 9 16:30:30 debian8 kernel: [ 11.434870] input: HDA Intel PCH Line Out Front as /devices/pci0000:00/0000:00:1b.0/sound/card1/input17
Nov 9 16:30:30 debian8 kernel: [ 11.435283] input: HDA Intel PCH Line Out Surround as /devices/pci0000:00/0000:00:1b.0/sound/card1/input18
Nov 9 16:30:30 debian8 kernel: [ 11.435701] input: HDA Intel PCH Line Out CLFE as /devices/pci0000:00/0000:00:1b.0/sound/card1/input19
Nov 9 16:30:30 debian8 kernel: [ 11.436112] input: HDA Intel PCH Line Out Side as /devices/pci0000:00/0000:00:1b.0/sound/card1/input20
Nov 9 16:30:30 debian8 kernel: [ 11.436507] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input21
Nov 9 16:30:30 debian8 kernel: [ 12.270467] intel_rapl: Found RAPL domain package
Nov 9 16:30:30 debian8 kernel: [ 12.270649] intel_rapl: Found RAPL domain core
Nov 9 16:30:30 debian8 kernel: [ 12.270813] intel_rapl: Found RAPL domain uncore
Nov 9 16:30:30 debian8 kernel: [ 12.270982] intel_rapl: Found RAPL domain dram
Nov 9 16:30:30 debian8 kernel: [ 12.385687] b43-phy0: Broadcom 4352 WLAN found (core revision 42)
Nov 9 16:30:30 debian8 kernel: [ 12.386248] b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 12, Type 11 (AC), Revision 1)
Nov 9 16:30:30 debian8 kernel: [ 12.386542] b43: probe of bcma0:1 failed with error -95
Nov 9 16:30:30 debian8 kernel: [ 12.386742] Broadcom 43xx driver loaded [ Features: PNLS ]
Nov 9 16:30:30 debian8 kernel: [ 12.886267] RPC: Registered named UNIX socket transport module.
Nov 9 16:30:30 debian8 kernel: [ 12.886483] RPC: Registered udp transport module.
Nov 9 16:30:30 debian8 kernel: [ 12.886654] RPC: Registered tcp transport module.
Nov 9 16:30:30 debian8 kernel: [ 12.886825] RPC: Registered tcp NFSv4.1 backchannel transport module.
Nov 9 16:30:30 debian8 kernel: [ 12.930288] FS-Cache: Loaded
Nov 9 16:30:30 debian8 kernel: [ 13.037241] FS-Cache: Netfs 'nfs' registered for caching
Nov 9 16:30:30 debian8 kernel: [ 13.161992] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Nov 9 16:30:30 debian8 kernel: [ 15.001250] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Nov 9 16:30:30 debian8 kernel: [ 15.001446] Bluetooth: BNEP filters: protocol multicast
Nov 9 16:30:30 debian8 kernel: [ 15.001637] Bluetooth: BNEP socket layer initialized
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> NetworkManager (version 0.9.10.0) is starting...
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> Read config: /etc/NetworkManager/NetworkManager.conf
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> WEXT support is enabled
Nov 9 16:30:30 debian8 polkitd[868]: started daemon version 0.105 using authority implementation `local' version `0.105'
Nov 9 16:30:30 debian8 dbus[586]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Nov 9 16:30:30 debian8 systemd[1]: Started Authenticate and Authorize Users to Run Privileged Tasks.
Nov 9 16:30:30 debian8 accounts-daemon[560]: started daemon version 0.6.37
Nov 9 16:30:30 debian8 systemd[1]: Started Accounts Service.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> init!
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> update_system_hostname
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> interface-parser: parsing file /etc/network/interfaces
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> interface-parser: source line includes interfaces file(s) /etc/network/interfaces.d/*
Nov 9 16:30:30 debian8 NetworkManager[570]: <warn> interfaces file /etc/network/interfaces.d/* doesn't exist
Nov 9 16:30:30 debian8 NetworkManager[570]: <warn> Can't parse iface line 'iface eth0 dhcp'
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> interface-parser: finished parsing file /etc/network/interfaces
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> management mode: unmanaged
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> devices added (path: /sys/devices/pci0000:00/0000:00:19.0/net/eth4, iface: eth4)
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> device added (path: /sys/devices/pci0000:00/0000:00:19.0/net/eth4, iface: eth4): no ifupdown configuration found.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> devices added (path: /sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/0000:05:05.0/0000:08:00.0/net/eth5, iface: eth5)
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> device added (path: /sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/0000:05:05.0/0000:08:00.0/net/eth5, iface: eth5): no ifupdown configuration found.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> devices added (path: /sys/devices/virtual/net/lo, iface: lo)
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> device added (path: /sys/devices/virtual/net/lo, iface: lo): no ifupdown configuration found.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> end _init.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> Loaded plugin ifupdown: (C) 2008 Canonical Ltd. To report bugs please use the NetworkManager mailing list.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> Loaded plugin keyfile: (c) 2007 - 2013 Red Hat, Inc. To report bugs please use the NetworkManager mailing list.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (17085600) ... get_connections.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (17085600) ... get_connections (managed=false): return empty list.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> new connection /etc/NetworkManager/system-connections/Wired connection 1
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> get unmanaged devices count: 0
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> monitoring kernel firmware directory '/lib/firmware'.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> monitoring ifupdown state file '/run/network/ifstate'.
Nov 9 16:30:30 debian8 systemd[1]: Started Light Display Manager.
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> WiFi hardware radio set enabled
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> WWAN hardware radio set enabled
Nov 9 16:30:30 debian8 rsyslogd-2007: action 'action 17' suspended, next retry is Wed Nov 9 16:31:00 2016 [try http://www.rsyslog.com/e/2007 ]
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> Loaded device plugin: /usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-bluetooth.so
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> Loaded device plugin: /usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-wifi.so
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> Loaded device plugin: /usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-adsl.so
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> Loaded device plugin: /usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-wwan.so
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> WiFi enabled by radio killswitch; enabled by state file
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> WWAN enabled by radio killswitch; enabled by state file
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> WiMAX enabled by radio killswitch; enabled by state file
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> Networking is enabled by state file
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (lo): link connected
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (lo): carrier is ON
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (lo): new Generic device (driver: 'unknown' ifindex: 1)
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (lo): exported as /org/freedesktop/NetworkManager/Devices/0
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth5): carrier is OFF
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth5): new Ethernet device (driver: 'r8169' ifindex: 2)
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth5): exported as /org/freedesktop/NetworkManager/Devices/1
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth5): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Nov 9 16:30:30 debian8 systemd[1]: Started Network Manager.
Nov 9 16:30:30 debian8 kernel: [ 15.936554] r8169 0000:08:00.0: Direct firmware load for rtl_nic/rtl8168g-2.fw failed with error -2
Nov 9 16:30:30 debian8 kernel: [ 15.936878] r8169 0000:08:00.0 eth5: unable to load firmware patch rtl_nic/rtl8168g-2.fw (-2)
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth5): preparing device
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth4): carrier is OFF
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth4): new Ethernet device (driver: 'e1000e' ifindex: 3)
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth4): exported as /org/freedesktop/NetworkManager/Devices/2
Nov 9 16:30:30 debian8 NetworkManager[570]: <info> (eth4): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Nov 9 16:30:30 debian8 kernel: [ 15.952676] r8169 0000:08:00.0 eth5: link down
Nov 9 16:30:30 debian8 kernel: [ 15.952679] r8169 0000:08:00.0 eth5: link down
Nov 9 16:30:30 debian8 systemd[1]: Started Modem Manager.
Nov 9 16:30:31 debian8 NetworkManager[570]: <info> (eth4): preparing device
Nov 9 16:30:31 debian8 NetworkManager[570]: <info> use BlueZ version 5
Nov 9 16:30:31 debian8 NetworkManager[570]: <info> ModemManager available in the bus
Nov 9 16:30:31 debian8 exim4[574]: Starting MTA: exim4.
Nov 9 16:30:31 debian8 systemd[1]: Started LSB: exim Mail Transport Agent.
Nov 9 16:30:32 debian8 systemd[1]: Starting user-117.slice.
Nov 9 16:30:32 debian8 systemd[1]: Created slice user-117.slice.
Nov 9 16:30:32 debian8 ModemManager[563]: <warn> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:19.0': not supported by any plugin
Nov 9 16:30:32 debian8 ModemManager[563]: <warn> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/0000:05:05.0/0000:08:00.0': not supported by any plugin
Nov 9 16:30:32 debian8 systemd[1]: Starting User Manager for UID 117...
Nov 9 16:30:32 debian8 systemd[1]: Starting Session c1 of user lightdm.
Nov 9 16:30:32 debian8 systemd[1]: Started Session c1 of user lightdm.
Nov 9 16:30:33 debian8 systemd[1]: Started LSB: start Samba daemons for the AD DC.
Nov 9 16:30:33 debian8 nmbd[573]: Starting NetBIOS name server: nmbd.
Nov 9 16:30:33 debian8 systemd[1]: Started LSB: start Samba NetBIOS nameserver (nmbd).
Nov 9 16:30:33 debian8 systemd[916]: Starting Paths.
Nov 9 16:30:33 debian8 systemd[916]: Reached target Paths.
Nov 9 16:30:33 debian8 systemd[916]: Starting Timers.
Nov 9 16:30:33 debian8 systemd[916]: Reached target Timers.
Nov 9 16:30:33 debian8 systemd[916]: Starting Sockets.
Nov 9 16:30:33 debian8 systemd[916]: Reached target Sockets.
Nov 9 16:30:33 debian8 systemd[916]: Starting Basic System.
Nov 9 16:30:33 debian8 systemd[916]: Reached target Basic System.
Nov 9 16:30:33 debian8 systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Nov 9 16:30:33 debian8 systemd[916]: Starting Default.
Nov 9 16:30:33 debian8 systemd[916]: Reached target Default.
Nov 9 16:30:33 debian8 systemd[916]: Startup finished in 90ms.
Nov 9 16:30:33 debian8 systemd[1]: Started User Manager for UID 117.
Nov 9 16:30:33 debian8 lightdm[873]: ** (lightdm:873): WARNING **: Error using VT_ACTIVATE 7 on /dev/console: Input/output error
Nov 9 16:30:33 debian8 lightdm[873]: ** (lightdm:873): WARNING **: Error using VT_WAITACTIVE 7 on /dev/console: Input/output error
Nov 9 16:30:33 debian8 smbd[925]: Starting SMB/CIFS daemon: smbd.
Nov 9 16:30:33 debian8 systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).
Nov 9 16:30:33 debian8 systemd[1]: Starting Multi-User System.
Nov 9 16:30:33 debian8 systemd[1]: Reached target Multi-User System.
Nov 9 16:30:33 debian8 systemd[1]: Starting Graphical Interface.
Nov 9 16:30:33 debian8 systemd[1]: Reached target Graphical Interface.
Nov 9 16:30:33 debian8 systemd[1]: Starting Update UTMP about System Runlevel Changes...
Nov 9 16:30:33 debian8 systemd[1]: Started Update UTMP about System Runlevel Changes.
Nov 9 16:30:33 debian8 systemd[1]: Startup finished in 5.805s (kernel) + 12.824s (userspace) = 18.629s.
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> (eth5): link connected
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> (eth5): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Auto-activating connection 'Wired connection 1'.
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) starting connection 'Wired connection 1'
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 1 of 5 (Device Prepare) scheduled...
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 1 of 5 (Device Prepare) started...
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> (eth5): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> NetworkManager state is now CONNECTING
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 2 of 5 (Device Configure) scheduled...
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 1 of 5 (Device Prepare) complete.
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 2 of 5 (Device Configure) starting...
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> (eth5): device state change: prepare -> config (reason 'none') [40 50 0]
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 2 of 5 (Device Configure) successful.
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 3 of 5 (IP Configure Start) scheduled.
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 2 of 5 (Device Configure) complete.
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 3 of 5 (IP Configure Start) started...
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> (eth5): device state change: config -> ip-config (reason 'none') [50 70 0]
Nov 9 16:30:33 debian8 kernel: [ 18.931173] r8169 0000:08:00.0 eth5: link up
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Beginning DHCPv4 transaction (timeout in 45 seconds)
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> dhclient started with pid 944
Nov 9 16:30:33 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 3 of 5 (IP Configure Start) complete.
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> (eth5): DHCPv4 state changed nbi -> preinit
Nov 9 16:30:34 debian8 dhclient: DHCPREQUEST on eth5 to 255.255.255.255 port 67
Nov 9 16:30:34 debian8 dhclient: DHCPACK from 10.21.59.1
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> (eth5): DHCPv4 state changed preinit -> reboot
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> address 10.21.59.167
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> plen 24 (255.255.255.0)
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> gateway 10.21.59.1
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> server identifier 10.21.62.9
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> lease time 14400
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> hostname 'debian8'
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> nameserver '10.21.62.9'
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> nameserver '10.21.62.10'
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> domain name 'lacie.com'
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 5 of 5 (IPv4 Commit) started...
Nov 9 16:30:34 debian8 avahi-daemon[582]: Joining mDNS multicast group on interface eth5.IPv4 with address 10.21.59.167.
Nov 9 16:30:34 debian8 avahi-daemon[582]: New relevant interface eth5.IPv4 for mDNS.
Nov 9 16:30:34 debian8 avahi-daemon[582]: Registering new address record for 10.21.59.167 on eth5.IPv4.
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> (eth5): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> Activation (eth5) Stage 5 of 5 (IPv4 Commit) complete.
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> (eth5): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> (eth5): device state change: secondaries -> activated (reason 'none') [90 100 0]
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> NetworkManager state is now CONNECTED_LOCAL
Nov 9 16:30:34 debian8 dhclient: bound to 10.21.59.167 -- renewal in 7049 seconds.
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> NetworkManager state is now CONNECTED_GLOBAL
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> Policy set 'Wired connection 1' (eth5) as default for IPv4 routing and DNS.
Nov 9 16:30:34 debian8 NetworkManager[570]: <info> Activation (eth5) successful, device activated.
Nov 9 16:30:34 debian8 dbus[586]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Nov 9 16:30:34 debian8 systemd[1]: Starting Network Manager Script Dispatcher Service...
Nov 9 16:30:34 debian8 dbus[586]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Nov 9 16:30:34 debian8 systemd[1]: Started Network Manager Script Dispatcher Service.
Nov 9 16:30:34 debian8 nm-dispatcher: Dispatching action 'up' for eth5
Nov 9 16:30:34 debian8 org.a11y.Bus[953]: Activating service name='org.a11y.atspi.Registry'
Nov 9 16:30:34 debian8 org.a11y.Bus[953]: Successfully activated service 'org.a11y.atspi.Registry'
Nov 9 16:30:34 debian8 org.a11y.atspi.Registry[973]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Nov 9 16:30:34 debian8 systemd[1]: Reloading OpenBSD Secure Shell server.
Nov 9 16:30:35 debian8 systemd[1]: Reloaded OpenBSD Secure Shell server.
Nov 9 16:30:35 debian8 avahi-daemon[582]: Joining mDNS multicast group on interface eth5.IPv6 with address fe80::2e0:4cff:fe68:3d.
Nov 9 16:30:35 debian8 avahi-daemon[582]: New relevant interface eth5.IPv6 for mDNS.
Nov 9 16:30:35 debian8 avahi-daemon[582]: Registering new address record for fe80::2e0:4cff:fe68:3d on eth5.*.
Nov 9 16:30:38 debian8 NetworkManager[570]: <info> startup complete
Nov 9 16:31:43 debian8 systemd[1]: Starting user-1001.slice.
Nov 9 16:31:43 debian8 systemd[1]: Created slice user-1001.slice.
Nov 9 16:31:43 debian8 systemd[1]: Starting User Manager for UID 1001...
Nov 9 16:31:43 debian8 systemd[1]: Starting Session 1 of user sguinot.
Nov 9 16:31:43 debian8 systemd[1]: Started Session 1 of user sguinot.
Nov 9 16:31:43 debian8 systemd[1035]: Starting Paths.
Nov 9 16:31:43 debian8 systemd[1035]: Reached target Paths.
Nov 9 16:31:43 debian8 systemd[1035]: Starting Timers.
Nov 9 16:31:43 debian8 systemd[1035]: Reached target Timers.
Nov 9 16:31:43 debian8 systemd[1035]: Starting Sockets.
Nov 9 16:31:43 debian8 systemd[1035]: Reached target Sockets.
Nov 9 16:31:43 debian8 systemd[1035]: Starting Basic System.
Nov 9 16:31:43 debian8 systemd[1035]: Reached target Basic System.
Nov 9 16:31:43 debian8 systemd[1035]: Starting Default.
Nov 9 16:31:43 debian8 systemd[1035]: Reached target Default.
Nov 9 16:31:43 debian8 systemd[1035]: Startup finished in 17ms.
Nov 9 16:31:43 debian8 systemd[1]: Started User Manager for UID 1001.
Nov 9 16:32:37 debian8 kernel: [ 142.351927] pci 0000:0d:00.0: [8086:156d] type 01 class 0x060400
Nov 9 16:32:37 debian8 kernel: [ 142.352079] pci 0000:0d:00.0: supports D1 D2
Nov 9 16:32:37 debian8 kernel: [ 142.352082] pci 0000:0d:00.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:32:37 debian8 kernel: [ 142.352154] pci 0000:0d:00.0: System wakeup disabled by ACPI
Nov 9 16:32:37 debian8 kernel: [ 142.363957] pci 0000:0e:00.0: [8086:156d] type 01 class 0x060400
Nov 9 16:32:37 debian8 kernel: [ 142.364106] pci 0000:0e:00.0: supports D1 D2
Nov 9 16:32:37 debian8 kernel: [ 142.364109] pci 0000:0e:00.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:32:37 debian8 kernel: [ 142.364231] pci 0000:0e:03.0: [8086:156d] type 01 class 0x060400
Nov 9 16:32:37 debian8 kernel: [ 142.364372] pci 0000:0e:03.0: supports D1 D2
Nov 9 16:32:37 debian8 kernel: [ 142.364374] pci 0000:0e:03.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:32:37 debian8 kernel: [ 142.364482] pci 0000:0e:04.0: [8086:156d] type 01 class 0x060400
Nov 9 16:32:37 debian8 kernel: [ 142.364621] pci 0000:0e:04.0: supports D1 D2
Nov 9 16:32:37 debian8 kernel: [ 142.364623] pci 0000:0e:04.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:32:37 debian8 kernel: [ 142.364725] pci 0000:0e:05.0: [8086:156d] type 01 class 0x060400
Nov 9 16:32:37 debian8 kernel: [ 142.364865] pci 0000:0e:05.0: supports D1 D2
Nov 9 16:32:37 debian8 kernel: [ 142.364866] pci 0000:0e:05.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:32:37 debian8 kernel: [ 142.364968] pci 0000:0e:06.0: [8086:156d] type 01 class 0x060400
Nov 9 16:32:37 debian8 kernel: [ 142.365107] pci 0000:0e:06.0: supports D1 D2
Nov 9 16:32:37 debian8 kernel: [ 142.365109] pci 0000:0e:06.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:32:37 debian8 kernel: [ 142.365233] pci 0000:0d:00.0: PCI bridge to [bus 0e-77]
Nov 9 16:32:37 debian8 kernel: [ 142.365450] pci 0000:0d:00.0: bridge window [mem 0xb0000000-0xde0fffff]
Nov 9 16:32:37 debian8 kernel: [ 142.365458] pci 0000:0d:00.0: bridge window [mem 0x60000000-0xa9ffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.365545] pci 0000:0f:00.0: [8086:156c] type 00 class 0x088000
Nov 9 16:32:37 debian8 kernel: [ 142.365571] pci 0000:0f:00.0: reg 0x10: [mem 0xde000000-0xde03ffff]
Nov 9 16:32:37 debian8 kernel: [ 142.365586] pci 0000:0f:00.0: reg 0x14: [mem 0xde040000-0xde040fff]
Nov 9 16:32:37 debian8 kernel: [ 142.365767] pci 0000:0f:00.0: supports D1 D2
Nov 9 16:32:37 debian8 kernel: [ 142.365769] pci 0000:0f:00.0: PME# supported from D0 D1 D2 D3hot D3cold
Nov 9 16:32:37 debian8 kernel: [ 142.365894] pci 0000:0e:00.0: PCI bridge to [bus 0f]
Nov 9 16:32:37 debian8 kernel: [ 142.366106] pci 0000:0e:00.0: bridge window [mem 0xde000000-0xde0fffff]
Nov 9 16:32:37 debian8 kernel: [ 142.366167] pci 0000:0e:03.0: PCI bridge to [bus 10-3a]
Nov 9 16:32:37 debian8 kernel: [ 142.366371] pci 0000:0e:03.0: bridge window [mem 0xb0000000-0xbfffffff]
Nov 9 16:32:37 debian8 kernel: [ 142.366377] pci 0000:0e:03.0: bridge window [mem 0x60000000-0x7fffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.366430] pci 0000:0e:04.0: PCI bridge to [bus 3b-43]
Nov 9 16:32:37 debian8 kernel: [ 142.366634] pci 0000:0e:04.0: bridge window [mem 0xc0000000-0xc7ffffff]
Nov 9 16:32:37 debian8 kernel: [ 142.366641] pci 0000:0e:04.0: bridge window [mem 0x80000000-0x87ffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.366694] pci 0000:0e:05.0: PCI bridge to [bus 44-6e]
Nov 9 16:32:37 debian8 kernel: [ 142.366898] pci 0000:0e:05.0: bridge window [mem 0xc8000000-0xd5ffffff]
Nov 9 16:32:37 debian8 kernel: [ 142.366905] pci 0000:0e:05.0: bridge window [mem 0x90000000-0xa9ffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.366957] pci 0000:0e:06.0: PCI bridge to [bus 6f-77]
Nov 9 16:32:37 debian8 kernel: [ 142.367161] pci 0000:0e:06.0: bridge window [mem 0xd6000000-0xddffffff]
Nov 9 16:32:37 debian8 kernel: [ 142.367168] pci 0000:0e:06.0: bridge window [mem 0x88000000-0x8fffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.367206] pci_bus 0000:0e: Allocating resources
Nov 9 16:32:37 debian8 kernel: [ 142.367238] pci 0000:0e:00.0: bridge window [io 0x1000-0x0fff] to [bus 0f] add_size 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367240] pci 0000:0e:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 0f] add_size 200000 add_align 100000
Nov 9 16:32:37 debian8 kernel: [ 142.367251] pci 0000:0e:03.0: bridge window [io 0x1000-0x0fff] to [bus 10-3a] add_size 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367261] pci 0000:0e:04.0: bridge window [io 0x1000-0x0fff] to [bus 3b-43] add_size 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367271] pci 0000:0e:05.0: bridge window [io 0x1000-0x0fff] to [bus 44-6e] add_size 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367281] pci 0000:0e:06.0: bridge window [io 0x1000-0x0fff] to [bus 6f-77] add_size 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367291] pci 0000:0e:00.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367292] pci 0000:0e:03.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367294] pci 0000:0e:04.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367295] pci 0000:0e:05.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367296] pci 0000:0e:06.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367298] pci 0000:0d:00.0: bridge window [io 0x1000-0x0fff] to [bus 0e-77] add_size 5000
Nov 9 16:32:37 debian8 kernel: [ 142.367300] pci 0000:0d:00.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 5000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367301] pci 0000:0d:00.0: res[13]=[io 0x1000-0x5fff] res_to_dev_res add_size 5000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.367304] pci 0000:0d:00.0: BAR 13: no space for [io size 0x5000]
Nov 9 16:32:37 debian8 kernel: [ 142.367540] pci 0000:0d:00.0: BAR 13: failed to assign [io size 0x5000]
Nov 9 16:32:37 debian8 kernel: [ 142.367821] pci 0000:0d:00.0: BAR 13: no space for [io size 0x5000]
Nov 9 16:32:37 debian8 kernel: [ 142.368054] pci 0000:0d:00.0: BAR 13: failed to assign [io size 0x5000]
Nov 9 16:32:37 debian8 kernel: [ 142.368307] pci 0000:0e:00.0: res[15]=[mem 0x00100000-0x000fffff 64bit pref] res_to_dev_res add_size 200000 min_align 100000
Nov 9 16:32:37 debian8 kernel: [ 142.368308] pci 0000:0e:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] res_to_dev_res add_size 200000 min_align 100000
Nov 9 16:32:37 debian8 kernel: [ 142.368309] pci 0000:0e:00.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368310] pci 0000:0e:00.0: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368311] pci 0000:0e:03.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368311] pci 0000:0e:03.0: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368312] pci 0000:0e:04.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368313] pci 0000:0e:04.0: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368314] pci 0000:0e:05.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368315] pci 0000:0e:05.0: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368317] pci 0000:0e:06.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368318] pci 0000:0e:06.0: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
Nov 9 16:32:37 debian8 kernel: [ 142.368321] pci 0000:0e:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.368606] pci 0000:0e:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.368897] pci 0000:0e:00.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.369128] pci 0000:0e:00.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.369373] pci 0000:0e:03.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.369604] pci 0000:0e:03.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.369848] pci 0000:0e:04.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.370080] pci 0000:0e:04.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.370324] pci 0000:0e:05.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.370555] pci 0000:0e:05.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.370800] pci 0000:0e:06.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.371031] pci 0000:0e:06.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.371275] pci 0000:0e:06.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.371507] pci 0000:0e:06.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.371751] pci 0000:0e:05.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.371987] pci 0000:0e:05.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.372231] pci 0000:0e:04.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.372462] pci 0000:0e:04.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.372706] pci 0000:0e:03.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.372938] pci 0000:0e:03.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.373182] pci 0000:0e:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.373460] pci 0000:0e:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.373750] pci 0000:0e:00.0: BAR 13: no space for [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.373981] pci 0000:0e:00.0: BAR 13: failed to assign [io size 0x1000]
Nov 9 16:32:37 debian8 kernel: [ 142.374225] pci 0000:0e:00.0: PCI bridge to [bus 0f]
Nov 9 16:32:37 debian8 kernel: [ 142.374412] pci 0000:0e:00.0: bridge window [mem 0xde000000-0xde0fffff]
Nov 9 16:32:37 debian8 kernel: [ 142.374667] pci 0000:0e:03.0: PCI bridge to [bus 10-3a]
Nov 9 16:32:37 debian8 kernel: [ 142.374863] pci 0000:0e:03.0: bridge window [mem 0xb0000000-0xbfffffff]
Nov 9 16:32:37 debian8 kernel: [ 142.375112] pci 0000:0e:03.0: bridge window [mem 0x60000000-0x7fffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.375398] pci 0000:0e:04.0: PCI bridge to [bus 3b-43]
Nov 9 16:32:37 debian8 kernel: [ 142.375593] pci 0000:0e:04.0: bridge window [mem 0xc0000000-0xc7ffffff]
Nov 9 16:32:37 debian8 kernel: [ 142.375858] pci 0000:0e:04.0: bridge window [mem 0x80000000-0x87ffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.376140] pci 0000:0e:05.0: PCI bridge to [bus 44-6e]
Nov 9 16:32:37 debian8 kernel: [ 142.376333] pci 0000:0e:05.0: bridge window [mem 0xc8000000-0xd5ffffff]
Nov 9 16:32:37 debian8 kernel: [ 142.376578] pci 0000:0e:05.0: bridge window [mem 0x90000000-0xa9ffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.376860] pci 0000:0e:06.0: PCI bridge to [bus 6f-77]
Nov 9 16:32:37 debian8 kernel: [ 142.377052] pci 0000:0e:06.0: bridge window [mem 0xd6000000-0xddffffff]
Nov 9 16:32:37 debian8 kernel: [ 142.377298] pci 0000:0e:06.0: bridge window [mem 0x88000000-0x8fffffff 64bit pref]
Nov 9 16:32:37 debian8 kernel: [ 142.377580] pci 0000:0d:00.0: PCI bridge to [bus 0e-77]
Nov 9 16:32:37 debian8 kernel: [ 142.377772] pci 0000:0d:00.0: bridge window [mem 0xb0000000-0xde0fffff]
Nov 9 16:32:37 debian8 kernel: [ 142.378018] pci 0000:0d:00.0: bridge window [mem 0x60000000-0xa9ffffff 64bit pref]
Nov 9 16:32:37 debian8 systemd[1]: Expecting device sys-module-thunderbolt.device...
Nov 9 16:32:37 debian8 systemd[1]: Starting Thunderbolt Manager...
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Thunderbolt daemon version: 16.1.54.1-source Thread: 140713088374592, func main line 72 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/thunderbolt.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Thunderbolt module version: 16.1.55.1 Thread: 140713088374592, func main line 73 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/thunderbolt.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Starting initialization Thread: 140713088374592, func main line 74 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/thunderbolt.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: subscribing driver Thread: 140713088374592, func driver_subscribe line 145 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::send_message_sync entry, sending netlink message: command only Thread: 140713088374592, func send_message_sync line 456 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: netlink message was allocated Thread: 140713088374592, func alloc_message line 134 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::send_message_sync(struct nl_msg* msg) entry Thread: 140713088374592, func send_message_sync line 475 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Send Message:
Nov 9 16:32:37 debian8 thunderboltd[1081]: -------------------------- BEGIN NETLINK MESSAGE ---------------------------
Nov 9 16:32:37 debian8 thunderboltd[1081]: [NETLINK HEADER] 16 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: .nlmsg_len = 24
Nov 9 16:32:37 debian8 thunderboltd[1081]: .type = 24 <0x18>
Nov 9 16:32:37 debian8 thunderboltd[1081]: .flags = 0 <>
Nov 9 16:32:37 debian8 thunderboltd[1081]: .seq = 0
Nov 9 16:32:37 debian8 thunderboltd[1081]: .port = 0
Nov 9 16:32:37 debian8 thunderboltd[1081]: [PAYLOAD] 8 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: 01 01 00 00 00 00 00 00 ........
Nov 9 16:32:37 debian8 thunderboltd[1081]: --------------------------- END NETLINK MESSAGE ---------------------------
Nov 9 16:32:37 debian8 systemd[1]: Started Thunderbolt Manager.
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Netlink ACK received Thread: 140713062659840, func cb_ack line 260 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::send_message_sync(struct nl_msg* msg) exit Thread: 140713088374592, func send_message_sync line 495 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: netlink message was free Thread: 140713088374592, func operator() line 117 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::send_message_sync exit, sending netlink message: command only Thread: 140713088374592, func send_message_sync line 465 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::register_events_callback entry Thread: 140713088374592, func register_events_callback line 237 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::register_events_callback exit Thread: 140713088374592, func register_events_callback line 239 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::cb_valid entry, message arrived Thread: 140713062659840, func cb_valid line 270 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: -------------------------- BEGIN NETLINK MESSAGE ---------------------------
Nov 9 16:32:37 debian8 thunderboltd[1081]: [NETLINK HEADER] 16 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: .nlmsg_len = 48
Nov 9 16:32:37 debian8 thunderboltd[1081]: .type = 24 <0x18>
Nov 9 16:32:37 debian8 thunderboltd[1081]: .flags = 0 <>
Nov 9 16:32:37 debian8 thunderboltd[1081]: .seq = 0
Nov 9 16:32:37 debian8 thunderboltd[1081]: .port = 1081
Nov 9 16:32:37 debian8 thunderboltd[1081]: [GENERIC NETLINK HEADER] 4 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: .cmd = 5
Nov 9 16:32:37 debian8 thunderboltd[1081]: .version = 1
Nov 9 16:32:37 debian8 thunderboltd[1081]: .unused = 0
Nov 9 16:32:37 debian8 thunderboltd[1081]: [PAYLOAD] 28 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: 6c 15 00 0f 08 00 07 00 0c 00 00 00 10 00 09 00 l...............
Nov 9 16:32:37 debian8 thunderboltd[1081]: 01 00 0a 03 00 00 0a 50 3e fa ad aa .......P>...
Nov 9 16:32:37 debian8 thunderboltd[1081]: --------------------------- END NETLINK MESSAGE ---------------------------
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: validate netlink message: PASS Thread: 140713062659840, func cb_valid line 291 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: LinuxControllerCommandSender::OnEvent entry, PDF: 12 Thread: 140713062659840, func OnEvent line 63 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/LinuxControllerCommandSender.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: Message from FW: PDF_FW_TO_SW_RESPONSE, Controller: f00156c Thread: 140713062659840, func OnEvent line 79 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/LinuxControllerCommandSender.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: FW response: DRIVER_READY_RESPONSE, Controller: 0f00156c Thread: 140713062659840, func HandleFwToSwResponse line 42 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/MessageFromFwEvent.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: New controller detected: 0f00156c Thread: 140713062659840, func OnDriverReadyResponse line 103 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Shared/src/ConnectionManagerBase.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: Create new controller class Thread: 140713062659840, func OnDriverReadyResponse line 107 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Shared/src/ConnectionManagerBase.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GetGenerationFromControllerID devID=156c Thread: 140713062659840, func GetGenerationFromControllerID line 136 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Shared/src/Utils.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GetNomOfPortsFromControllerID devID=156c Thread: 140713062659840, func GetNomOfPortsFromControllerID line 113 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Shared/src/Utils.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Controller device ID: 156C, TBT generation: 2, port count: 2, security level: 0 Thread: 140713062659840, func OnDriverReadyResponse line 121 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Shared/src/ConnectionManagerBase.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Controller settings: Certified only: False, Override first depth: True, Allow dock at any depth: False Thread: 140713062659840, func OnDriverReadyResponse line 124 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Shared/src/ConnectionManagerBase.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Netlink message received Thread: 140713062659840, func OnEvent line 116 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/LinuxControllerCommandSender.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: LinuxControllerCommandSender::OnEvent exit, PDF: 12 Thread: 140713062659840, func OnEvent line 121 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/LinuxControllerCommandSender.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::cb_valid exit, message arrived Thread: 140713062659840, func cb_valid line 362 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::send_message_sync entry, sending netlink message: command only Thread: 140713054267136, func send_message_sync line 456 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: netlink message was allocated Thread: 140713054267136, func alloc_message line 134 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::send_message_sync(struct nl_msg* msg) entry Thread: 140713054267136, func send_message_sync line 475 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Send Message:
Nov 9 16:32:37 debian8 thunderboltd[1081]: -------------------------- BEGIN NETLINK MESSAGE ---------------------------
Nov 9 16:32:37 debian8 thunderboltd[1081]: [NETLINK HEADER] 16 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: .nlmsg_len = 24
Nov 9 16:32:37 debian8 thunderboltd[1081]: .type = 24 <0x18>
Nov 9 16:32:37 debian8 thunderboltd[1081]: .flags = 0 <>
Nov 9 16:32:37 debian8 thunderboltd[1081]: .seq = 0
Nov 9 16:32:37 debian8 thunderboltd[1081]: .port = 0
Nov 9 16:32:37 debian8 thunderboltd[1081]: [PAYLOAD] 8 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: 03 01 00 00 6c 15 00 0f ....l...
Nov 9 16:32:37 debian8 thunderboltd[1081]: --------------------------- END NETLINK MESSAGE ---------------------------
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::cb_valid entry, message arrived Thread: 140713062659840, func cb_valid line 270 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: -------------------------- BEGIN NETLINK MESSAGE ---------------------------
Nov 9 16:32:37 debian8 thunderboltd[1081]: [NETLINK HEADER] 16 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: .nlmsg_len = 64
Nov 9 16:32:37 debian8 thunderboltd[1081]: .type = 24 <0x18>
Nov 9 16:32:37 debian8 thunderboltd[1081]: .flags = 0 <>
Nov 9 16:32:37 debian8 thunderboltd[1081]: .seq = 1478705559
Nov 9 16:32:37 debian8 thunderboltd[1081]: .port = 1081
Nov 9 16:32:37 debian8 thunderboltd[1081]: [GENERIC NETLINK HEADER] 4 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: .cmd = 3
Nov 9 16:32:37 debian8 thunderboltd[1081]: .version = 1
Nov 9 16:32:37 debian8 thunderboltd[1081]: .unused = 0
Nov 9 16:32:37 debian8 thunderboltd[1081]: [PAYLOAD] 44 octets
Nov 9 16:32:37 debian8 thunderboltd[1081]: 6c 15 00 0f 0e 00 01 00 31 36 2e 31 2e 35 35 2e l.......16.1.55.
Nov 9 16:32:37 debian8 thunderboltd[1081]: 31 00 00 00 06 00 02 00 0a 00 00 00 05 00 03 00 1...............
Nov 9 16:32:37 debian8 thunderboltd[1081]: 02 00 00 00 05 00 04 00 05 00 00 00 ............
Nov 9 16:32:37 debian8 thunderboltd[1081]: --------------------------- END NETLINK MESSAGE ---------------------------
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: validate netlink message: PASS Thread: 140713062659840, func cb_valid line 291 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: LinuxControllerCommandSender::OnEvent entry, PDF: -1 Thread: 140713062659840, func OnEvent line 63 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/LinuxControllerCommandSender.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Netlink message received from Driver Thread: 140713062659840, func OnEvent line 99 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/LinuxControllerCommandSender.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GetGenerationFromControllerID devID=156c Thread: 140713062659840, func GetGenerationFromControllerID line 136 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Shared/src/Utils.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GetNomOfPortsFromControllerID devID=156c Thread: 140713062659840, func GetNomOfPortsFromControllerID line 113 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Shared/src/Utils.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Netlink message received Thread: 140713062659840, func OnEvent line 116 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/LinuxControllerCommandSender.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: LinuxControllerCommandSender::OnEvent exit, PDF: -1 Thread: 140713062659840, func OnEvent line 121 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/LinuxControllerCommandSender.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::cb_valid exit, message arrived Thread: 140713062659840, func cb_valid line 362 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Netlink ACK received Thread: 140713062659840, func cb_ack line 260 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::send_message_sync(struct nl_msg* msg) exit Thread: 140713054267136, func send_message_sync line 495 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Debug: netlink message was free Thread: 140713054267136, func operator() line 117 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: GenlWrapper::send_message_sync exit, sending netlink message: command only Thread: 140713054267136, func send_message_sync line 465 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/src/GenlWrapper.cpp)
Nov 9 16:32:37 debian8 thunderboltd[1081]: Info: Daemon is running... Thread: 140713088374592, func main line 89 (/home/sguinot/thunderbolt-software-daemon.git/daemon/ThunderboltService/Linux/thunderbolt.cpp)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply
* Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support
From: Dave Anderson @ 2016-11-09 14:36 UTC (permalink / raw)
To: Dave Young; +Cc: Wen Congyang, lersek, qemu-devel, bhe
In-Reply-To: <20161109050248.GA4431@dhcp-128-65.nay.redhat.com>
----- Original Message -----
> On 11/09/16 at 11:58am, Wen Congyang wrote:
> > On 11/09/2016 11:17 AM, Dave Young wrote:
> > > Drop qiaonuohan, seems the mail address is wrong..
> > >
> > > On 11/09/16 at 11:01am, Dave Young wrote:
> > >> Hi,
> > >>
> > >> Latest linux kernel enabled kaslr to randomiz phys/virt memory
> > >> addresses, we had some effort to support kexec/kdump so that crash
> > >> utility can still works in case crashed kernel has kaslr enabled.
> > >>
> > >> But according to Dave Anderson virsh dump does not work, quoted messages
> > >> from Dave below:
> > >>
> > >> """
> > >> with virsh dump, there's no way of even knowing that KASLR
> > >> has randomized the kernel __START_KERNEL_map region, because there is no
> > >> virtual address information -- e.g., like "SYMBOL(_stext)" in the kdump
> > >> vmcoreinfo data to compare against the vmlinux file symbol value.
> > >> Unless virsh dump can export some basic virtual memory data, which
> > >> they say it can't, I don't see how KASLR can ever be supported.
> > >> """
> > >>
> > >> I assume virsh dump is using qemu guest memory dump facility so it
> > >> should be first addressed in qemu. Thus post this query to qemu devel
> > >> list. If this is not correct please let me know.
> >
> > IIRC, 'virsh dump --memory-only' uses dump-guest-memory, and 'virsh dump'
> > uses migration to dump.
>
> Do they need different fixes? Dave, I guess you mean --memory-only, but
> could you clarify and confirm it?
As I understand it, the "--memory-only" option uses a new "dump-guest-memory"
QEMU monitor command that creates an ELF kdump vmcore clone.
Dave
>
> >
> > I think I should study kaslr first...
>
> Thanks for taking care of it.
>
> >
> > Thanks
> > Wen Congyang
> >
> > >>
> > >> Could you qemu dump people make it work? Or we can not support virt dump
> > >> as long as KASLR being enabled. Latest Fedora kernel has enabled it in
> > >> x86_64.
> > >>
> > >> Thanks
> > >> Dave
> > >
> > >
> > >
> >
> >
> >
>
^ permalink raw reply
* [LTP] [PATCH 1/1] network: load test_net.sh after getopts
From: Petr Vorel @ 2016-11-09 14:35 UTC (permalink / raw)
To: ltp
We shouldn't ask rsh/ssh password or require having set ssh pub keys
just for displaying help.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Alexey, thanks a lot for your point, I overlooked the comment in the
code.
v2: reset TST_TOTAL and TCID variables after loading test_net.sh
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
testscripts/network.sh | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/testscripts/network.sh b/testscripts/network.sh
index 66bacef..6b81823 100755
--- a/testscripts/network.sh
+++ b/testscripts/network.sh
@@ -1,8 +1,5 @@
#!/bin/sh
-TST_TOTAL=1
-TCID="network_settings"
-
cd $(dirname $0)
export LTPROOT=${LTPROOT:-"$PWD"}
echo $LTPROOT | grep -q testscripts
@@ -11,8 +8,6 @@ if [ $? -eq 0 ]; then
export LTPROOT=${PWD}
fi
-. test_net.sh
-
export TMPDIR=/tmp/netpan-$$
mkdir -p $TMPDIR
CMDFILE=${TMPDIR}/network.tests
@@ -20,11 +15,6 @@ VERBOSE="no"
export PATH="${PATH}:${LTPROOT}/testcases/bin"
-# Reset variables.
-# Don't break the tests which are using 'testcases/lib/cmdlib.sh'
-export TCID=
-export TST_LIB_LOADED=
-
usage()
{
echo "Usage: $0 OPTIONS"
@@ -81,6 +71,16 @@ if [ "$OPTIND" -eq 1 ]; then
exit 1
fi
+TST_TOTAL=1
+TCID="network_settings"
+
+. test_net.sh
+
+# Reset variables.
+# Don't break the tests which are using 'testcases/lib/cmdlib.sh'
+export TCID=
+export TST_LIB_LOADED=
+
rm -f $CMDFILE
for t in $TEST_CASES; do
--
2.10.2
^ permalink raw reply related
* Re: [PATCH v9 0/4] Enabling Ring 3 MONITOR/MWAIT feature for Knights Landing
From: Thomas Gleixner @ 2016-11-09 14:31 UTC (permalink / raw)
To: Grzegorz Andrejczuk
Cc: mingo, hpa, x86, bp, dave.hansen, lukasz.daniluk, james.h.cownie,
jacob.jun.pan, Piotr.Luc, linux-kernel
In-Reply-To: <1478699194-30946-1-git-send-email-grzegorz.andrejczuk@intel.com>
On Wed, 9 Nov 2016, Grzegorz Andrejczuk wrote:
> These patches enable Intel Xeon Phi x200 feature to use MONITOR/MWAIT
> instruction in ring 3 (userspace) Patches set MSR 0x140 for all logical CPUs.
> Then expose it as CPU feature and introduces elf HWCAP capability for x86.
> Reference:
> https://software.intel.com/en-us/blogs/2016/10/06/intel-xeon-phi-product-family-x200-knl-user-mode-ring-3-monitor-and-mwait
>
> v9:
> Removed PHI from defines
Do I really have to spell out everything? I asked you several times to get
rid of all PHI associations except for the feature detection logic.
But no, you still insist on it being a PHI special feature and once it
becomes available on other models, which can be expected, we can deal with
the cleanup and a PHI specific kernel parameter which we have to support
forever.
I'm slowly starting to get really grumpy. Your attitude of just addressing
review comments in the most minimal way w/o thinking about the big picture
is annoying.
This is hillarious. 9 versions of that simple thing, just because you
insist on slapping PHI to everything despite being told otherwise.
I do not care about the time you waste with this, but I very much care
about the time you steal from me.
If you can't be bothered to send something which addresses _ALL_ my review
comments, then so be it. The next version is the last one I'm going to look
at.
Thanks,
tglx
^ permalink raw reply
* Re: [ANNOUNCE] util-linux v2.29
From: Karel Zak @ 2016-11-09 14:35 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: Util-Linux
In-Reply-To: <1478701931.2123577.782374801.19BC445F@webmail.messagingengine.com>
On Wed, Nov 09, 2016 at 03:32:11PM +0100, Benno Schulenberg wrote:
>
> On Tue, Nov 8, 2016, at 12:32, Karel Zak wrote:
> > Changes between v2.28 and v2.29
> > -------------------------------
> >
> > [...]
> > write:
> > - add control structure to clarify what is going on [Sami Kerola]
> > - don't use strftime() [Karel Zak]
> > - fix setuid related regression [Wayne Pollock]
> > [...]
> >
> > - add control structure to clarify what is going on [Sami Kerola]
> > - don't use strftime() [Karel Zak]
> > - fix setuid related regression [Wayne Pollock]
> > [...]
>
> For some reason the last block of text is duplicated, less an
> indentation. Is that a mistake in your script, Karel, or a
> manual cut-and-paste error?
Manual mistake... sorry.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [PATCH v4 00/14] ARM: dts: r8a779x: use demuxer for I2C
From: Simon Horman @ 2016-11-09 14:35 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Wolfram Sang, linux-renesas-soc, linux-i2c
In-Reply-To: <20161109085954.GA1807@katana>
On Wed, Nov 09, 2016 at 09:59:54AM +0100, Wolfram Sang wrote:
> Hi Simon,
>
> > I have tested these patches on alt, gose, lager and koelsch.
>
> Wow, that was quick. Thank you!
>
> > The switching part seems to work fine, in so far as my test script
> > succeeds. However, it seems that some IP blocks are not able to handle
> > this switching. In particular I needed to disable VIDEO_RCAR_VIN and
> > REGULATOR_DA9210 to avoid errors shown in the logs below.
>
> Yes. Probably we should activate the shiny new DEBUG_TEST_DRIVER_REMOVE
> and if that passes, we should be safe.
>
> > My suggestion is to drop the following patches until those problems
> > can be sorted out, most likely via driver updates.
> >
> > ARM: dts: alt: use demuxer for I2C1
> > ARM: dts: gose: use demuxer for I2C2
> > ARM: dts: lager: use demuxer for IIC2/I2C2
> > ARM: dts: lager: use demuxer for IIC3/I2C3
> > ARM: dts: koelsch: use demuxer for I2C2
>
> OK. I'll try to have a look at those drivers nonetheless, because
> rebasing these patches is a bit of a hazzle once new i2c slaves were
> added to the busses. But I'll juest resend the patches along with my
> fixes if I really can find the time.
>
> > I am not in a position to test silk or porter at this time.
> > But by the same reasoning above I wonder if the following should
> > be dropped for now.
> >
> > ARM: dts: gose: use demuxer for I2C2
>
> I assume you mean 'porter' here.
Yes, I meant porter.
> > ARM: dts: silk: use demuxer for I2C1
>
> Will you get access to these boards in the foreseeable future?
As mentioned by Geert, there is a porter in Magnus's board farm.
Unforunately I have never had much luck in getting it to boot.
With regards to silk, I'm not aware of any plans at this time.
^ permalink raw reply
* [LTP] [PATCH] lsmod01: keep the output in variables
From: Stanislav Kholmanskikh @ 2016-11-09 14:34 UTC (permalink / raw)
To: ltp
In-Reply-To: <20161011161557.GD17083@rei.suse.cz>
Operations with a file on NFS may increase the reference
counter of the corresponding module.
This test case creates temporary files in $TMPDIR, so if
$TMPDIR is on NFS, it may fail with output similar to:
21c21
< sunrpc 207591 28
---
> sunrpc 207591 29
To overcome this problem it was proposed in [1] to keep the output
in variables.
[1] http://lists.linux.it/pipermail/ltp/2016-October/002803.html
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
testcases/commands/lsmod/lsmod01.sh | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/testcases/commands/lsmod/lsmod01.sh b/testcases/commands/lsmod/lsmod01.sh
index 5cf2fee..cd19ca4 100755
--- a/testcases/commands/lsmod/lsmod01.sh
+++ b/testcases/commands/lsmod/lsmod01.sh
@@ -36,21 +36,25 @@ cleanup()
lsmod_test()
{
- lsmod >temp 2>&1
- if [ $? -ne 0 ]; then
- tst_resm TFAIL "'lsmod' failed."
- cat temp
+ lsmod_output=$(lsmod | awk '!/Module/{print $1, $2, $3}' | sort)
+ if [ -z "$lsmod_output" ]; then
+ tst_resm TFAIL "Failed to parse the output from lsmod"
return
fi
- awk '!/Module/{print $1, $2, $3}' temp |sort >temp1
-
- awk '{print $1, $2, $3}' /proc/modules |sort >temp2
+ modules_output=$(awk '{print $1, $2, $3}' /proc/modules | sort)
+ if [ -z "$modules_output" ]; then
+ tst_resm TFAIL "Failed to parse /proc/modules"
+ return
+ fi
- diff temp1 temp2 >temp3
- if [ $? -ne 0 ]; then
+ if [ "$lsmod_output" != "$modules_output" ]; then
tst_resm TFAIL "lsmod output different from /proc/modules."
- cat temp3
+
+ echo "$lsmod_output" > temp1
+ echo "$modules_output" > temp2
+ diff temp1 temp2
+
return
fi
--
1.7.1
^ permalink raw reply related
* re: reach millions with FB Groups Posting service
From: ANTHONY @ 2016-11-09 14:34 UTC (permalink / raw)
To: linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw
[-- Attachment #1: Type: text/plain, Size: 2831 bytes --]
Spam detection software, running on the system "blaine.gmane.org",
has identified this incoming email as possible spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Hello, Do you want to advertise on facebook? We're here to
help. We wil manually post your product/logo/link on Facebook Groups and
will give you a full report with links of each live post where your advertisement
was posted. [...]
Content analysis details: (10.6 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.
See
http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
for more information.
[URIs: 01.org]
1.7 URIBL_DBL_SPAM Contains an URL listed in the DBL blocklist
[URIs: buysocial.cn]
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no
trust
[198.145.21.10 listed in list.dnswl.org]
1.3 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
[Blocked - see <http://www.spamcop.net/bl.shtml?112.121.177.210>]
0.1 URIBL_SBL_A Contains URL's A record listed in the SBL blocklist
[URIs: www.buysocial.cn]
1.6 URIBL_SBL Contains an URL's NS IP listed in the SBL blocklist
[URIs: www.buysocial.cn]
2.8 FSL_HELO_FAKE No description available.
-0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain
0.0 T_HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
domains are different
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(fadecice330[at]gmail.com)
0.2 FREEMAIL_REPLYTO_END_DIGIT Reply-To freemail username ends in digit
(fadecice330[at]gmail.com)
-0.0 BAYES_40 BODY: Bayes spam probability is 20 to 40%
[score: 0.3004]
0.5 RAZOR2_CF_RANGE_51_100 Razor2 gives confidence level above 50%
[cf: 100]
1.9 RAZOR2_CF_RANGE_E8_51_100 Razor2 gives engine 8 confidence level
above 50%
[cf: 100]
0.9 RAZOR2_CHECK Listed in Razor2 (http://razor.sf.net/)
0.0 T_FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are different
[-- Attachment #2: original message before SpamAssassin --]
[-- Type: message/rfc822, Size: 2861 bytes --]
From: "ANTHONY" <fadecice330-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: <linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>
Subject: re: reach millions with FB Groups Posting service
Date: Wed, 09 Nov 2016 06:34:44 -0800
Message-ID: <413D8DCF.69C97F06-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hello,
Do you want to advertise on facebook? We're here to help.
We wil manually post your product/logo/link on Facebook Groups and will
give you a full report with links of each live post where your advertisement
was posted.
http://www.buysocial.cn/detail.php?id=12
Regards
ANTHONY
Unsubscribe option is available on the footer of our website
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply
* Re: [PATCH 1/6] dt-bindings: mdio-mux: Add documentation for mdio mux for NSP SoC
From: Andrew Lunn @ 2016-11-09 14:34 UTC (permalink / raw)
To: Yendapally Reddy Dhananjaya Reddy
Cc: Rob Herring, Mark Rutland, Russell King, Ray Jui, Scott Branden,
Jon Mason, Florian Fainelli, Kishon Vijay Abraham I,
bcm-kernel-feedback-list, netdev, devicetree, linux-kernel,
linux-arm-kernel
In-Reply-To: <1478683994-12008-2-git-send-email-yendapally.reddy@broadcom.com>
On Wed, Nov 09, 2016 at 04:33:09AM -0500, Yendapally Reddy Dhananjaya Reddy wrote:
> Add documentation for mdio mux available in Broadcom NSP SoC
>
> Signed-off-by: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
> ---
> .../devicetree/bindings/net/brcm,mdio-mux-nsp.txt | 57 ++++++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/brcm,mdio-mux-nsp.txt
>
> diff --git a/Documentation/devicetree/bindings/net/brcm,mdio-mux-nsp.txt b/Documentation/devicetree/bindings/net/brcm,mdio-mux-nsp.txt
> new file mode 100644
> index 0000000..b749a2b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/brcm,mdio-mux-nsp.txt
> @@ -0,0 +1,57 @@
> +Properties for an MDIO bus multiplexer available in Broadcom NSP SoC.
> +
> +This MDIO bus multiplexer defines buses that could access the internal
> +phys as well as external to SoCs. When child bus is selected, one needs
Hi Yendapally
Since we are in the networking subsystem, when we see phy, we think
Ethernet PHY. But broadcom mdio mux is generic and can have any sort
of PHY or device connected to it. To avoid confusion and
missunderstanding, please could you try to prefix each 'PHY' in the
with an indication of what type it is, 'Ethernet PHY', 'USB phy',
'SERDES PHY', or 'generic PHY/mdio device'.
And i mean this in general, not just this patch.
Thanks
Andrew
^ permalink raw reply
* [PATCH 1/6] dt-bindings: mdio-mux: Add documentation for mdio mux for NSP SoC
From: Andrew Lunn @ 2016-11-09 14:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1478683994-12008-2-git-send-email-yendapally.reddy@broadcom.com>
On Wed, Nov 09, 2016 at 04:33:09AM -0500, Yendapally Reddy Dhananjaya Reddy wrote:
> Add documentation for mdio mux available in Broadcom NSP SoC
>
> Signed-off-by: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
> ---
> .../devicetree/bindings/net/brcm,mdio-mux-nsp.txt | 57 ++++++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/brcm,mdio-mux-nsp.txt
>
> diff --git a/Documentation/devicetree/bindings/net/brcm,mdio-mux-nsp.txt b/Documentation/devicetree/bindings/net/brcm,mdio-mux-nsp.txt
> new file mode 100644
> index 0000000..b749a2b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/brcm,mdio-mux-nsp.txt
> @@ -0,0 +1,57 @@
> +Properties for an MDIO bus multiplexer available in Broadcom NSP SoC.
> +
> +This MDIO bus multiplexer defines buses that could access the internal
> +phys as well as external to SoCs. When child bus is selected, one needs
Hi Yendapally
Since we are in the networking subsystem, when we see phy, we think
Ethernet PHY. But broadcom mdio mux is generic and can have any sort
of PHY or device connected to it. To avoid confusion and
missunderstanding, please could you try to prefix each 'PHY' in the
with an indication of what type it is, 'Ethernet PHY', 'USB phy',
'SERDES PHY', or 'generic PHY/mdio device'.
And i mean this in general, not just this patch.
Thanks
Andrew
^ permalink raw reply
* Re: [PATCH i-g-t v2] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
From: Robert Foss @ 2016-11-09 14:33 UTC (permalink / raw)
To: Emil Velikov, intel-gfx
In-Reply-To: <20161026161847.22352-1-emil.l.velikov@gmail.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support
From: Dave Anderson @ 2016-11-09 14:32 UTC (permalink / raw)
To: Dave Young; +Cc: wency, qiaonuohan, lersek, qemu-devel, bhe
In-Reply-To: <20161109030146.GA3802@dhcp-128-65.nay.redhat.com>
----- Original Message -----
> Hi,
>
> Latest linux kernel enabled kaslr to randomiz phys/virt memory
> addresses, we had some effort to support kexec/kdump so that crash
> utility can still works in case crashed kernel has kaslr enabled.
>
> But according to Dave Anderson virsh dump does not work, quoted messages
> from Dave below:
>
> """
> with virsh dump, there's no way of even knowing that KASLR
> has randomized the kernel __START_KERNEL_map region, because there is no
> virtual address information -- e.g., like "SYMBOL(_stext)" in the kdump
> vmcoreinfo data to compare against the vmlinux file symbol value.
> Unless virsh dump can export some basic virtual memory data, which
> they say it can't, I don't see how KASLR can ever be supported.
> """
We also need the x86_64 phys_base value.
As it is right now, virsh dump vmcores work by luck. It is presumed that
the __START_KERNEL_map region is unmodified (i.e., what's in the vmlinux file),
and the phys_base value is guessed by checking phys_base values from
-16MB to +16MB in 1MB chunks. If the phys_base value is not one of those
32 possible values, the crash session will fail.
Dave
>
> I assume virsh dump is using qemu guest memory dump facility so it
> should be first addressed in qemu. Thus post this query to qemu devel
> list. If this is not correct please let me know.
>
> Could you qemu dump people make it work? Or we can not support virt dump
> as long as KASLR being enabled. Latest Fedora kernel has enabled it in
> x86_64.
>
> Thanks
> Dave
>
^ permalink raw reply
* [U-Boot] [PATCH 3/7] sunxi: Enable UBI and NAND support
From: Maxime Ripard @ 2016-11-09 14:32 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20161108172748.5a920362@bbrezillon>
Hi Boris,
On Tue, Nov 08, 2016 at 05:27:48PM +0100, Boris Brezillon wrote:
> On Tue, 8 Nov 2016 17:21:13 +0100
> Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
>
> > From: Hans de Goede <hdegoede@redhat.com>
> >
> > Enable the NAND and UBI support in the configuration header so that we can
> > (finally) use it.
> >
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> > include/configs/sunxi-common.h | 26 ++++++++++++++++++++++----
> > 1 file changed, 22 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> > index 8363414828fa..1733767ba53b 100644
> > --- a/include/configs/sunxi-common.h
> > +++ b/include/configs/sunxi-common.h
> > @@ -129,9 +129,23 @@
> > #define CONFIG_SERIAL_TAG
> >
> > #ifdef CONFIG_NAND_SUNXI
> > +#define CONFIG_SYS_NAND_U_BOOT_OFFS (8 << 20) /* 8 MiB */
>
> Can we make this configurable through Kconfig?
Is there a need for that? AFAIK, everyone in U-Boot defines it there
(and converting everyone to Kconfig for all the CONFIG_SYS_NAND
options is going to be painful).
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161109/145628d7/attachment.sig>
^ permalink raw reply
* Re: [ANNOUNCE] util-linux v2.29
From: Benno Schulenberg @ 2016-11-09 14:32 UTC (permalink / raw)
To: Karel Zak; +Cc: Util-Linux
In-Reply-To: <20161108113209.7qa5wgfqtxmoqjb4@ws.net.home>
On Tue, Nov 8, 2016, at 12:32, Karel Zak wrote:
> Changes between v2.28 and v2.29
> -------------------------------
>
> [...]
> write:
> - add control structure to clarify what is going on [Sami Kerola]
> - don't use strftime() [Karel Zak]
> - fix setuid related regression [Wayne Pollock]
> [...]
>
> - add control structure to clarify what is going on [Sami Kerola]
> - don't use strftime() [Karel Zak]
> - fix setuid related regression [Wayne Pollock]
> [...]
For some reason the last block of text is duplicated, less an
indentation. Is that a mistake in your script, Karel, or a
manual cut-and-paste error?
Benno
--
http://www.fastmail.com - The professional email service
^ permalink raw reply
* [ovmf baseline-only test] 68019: all pass
From: Platform Team regression test user @ 2016-11-09 14:31 UTC (permalink / raw)
To: xen-devel, osstest-admin
This run is configured for baseline tests only.
flight 68019 ovmf real [real]
http://osstest.xs.citrite.net/~osstest/testlogs/logs/68019/
Perfect :-)
All tests in this flight passed as required
version targeted for testing:
ovmf 008e2ccf02e7be65b3a1b48a925f005115027d1c
baseline version:
ovmf fef15ecd20dd8db5bf0c33b00908fc59491dba8a
Last test of basis 68016 2016-11-09 00:49:32 Z 0 days
Testing same since 68019 2016-11-09 10:17:59 Z 0 days 1 attempts
------------------------------------------------------------
People who touched revisions under test:
Jiewen Yao <jiewen.yao@intel.com>
Michael Kinney <michael.d.kinney@intel.com>
jobs:
build-amd64-xsm pass
build-i386-xsm pass
build-amd64 pass
build-i386 pass
build-amd64-libvirt pass
build-i386-libvirt pass
build-amd64-pvops pass
build-i386-pvops pass
test-amd64-amd64-xl-qemuu-ovmf-amd64 pass
test-amd64-i386-xl-qemuu-ovmf-amd64 pass
------------------------------------------------------------
sg-report-flight on osstest.xs.citrite.net
logs: /home/osstest/logs
images: /home/osstest/images
Logs, config files, etc. are available at
http://osstest.xs.citrite.net/~osstest/testlogs/logs
Test harness code can be found at
http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary
Push not applicable.
(No revision log; it would be 1044 lines long.)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v2 0/5] target-m68k-patches
From: Laurent Vivier @ 2016-11-09 14:31 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
In-Reply-To: <1478699171-10637-1-git-send-email-rth@twiddle.net>
Le 09/11/2016 à 14:46, Richard Henderson a écrit :
> Changes since v1:
> * Tweaked local variable decls for movem.
> * Fixed the bitfield patches such that they work with linux-user-test-0.3.
> (Along with the whole passle of extra patches required to make that work.)
>
> The register bitfield patch still depends on the patches posted
> here in another thread implementing extract and sextract.
>
>
> r~
>
>
> Laurent Vivier (1):
> target-m68k: Implement 680x0 movem
>
> Richard Henderson (4):
> target-m68k: Do not cpu_abort on undefined insns
> target-m68k: Inline shifts
> target-m68k: Implement bitfield ops for registers
> target-m68k: Implement bitfield ops for memory
>
> target-m68k/cpu.h | 1 +
> target-m68k/helper.c | 52 ----
> target-m68k/helper.h | 10 +-
> target-m68k/op_helper.c | 185 +++++++++++++
> target-m68k/translate.c | 702 ++++++++++++++++++++++++++++++++++++++++++++----
> 5 files changed, 843 insertions(+), 107 deletions(-)
>
It seems I have always a segfault when I start a container. I'm going to
try to understand what happens.
Thanks,
Laurent
^ permalink raw reply
* [OSSTEST PATCH 3/3] rump build tests: Disable a lot of unwanted Xen things at configure time
From: Ian Jackson @ 2016-11-09 14:30 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <1478701847-30651-1-git-send-email-ian.jackson@eu.citrix.com>
Amongst other things, we disable rombios which requires lzma.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
ts-xen-build-rump | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ts-xen-build-rump b/ts-xen-build-rump
index 7ce3e73..9ea595b 100755
--- a/ts-xen-build-rump
+++ b/ts-xen-build-rump
@@ -2,5 +2,8 @@
set -ex
exec ./ts-xen-build "$@" \
+ --disable-ovmf --disable-seabios --disable-blktap2 \
+ --disable-rombios --disable-qemu-traditional \
+ --disable-stubdom --disable-xen --disable-docs \
--- \
tools
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related
* [OSSTEST PATCH 2/3] rump build tests: Introduce ts-xen-build-rump
From: Ian Jackson @ 2016-11-09 14:30 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <1478701847-30651-1-git-send-email-ian.jackson@eu.citrix.com>
We are going to want to pass a whole slew of options to configure, and
hence to ts-xen-build. I think putting that in sg-run-job is
undesirable.
So, split out the ts-xen-build invocation into its own script.
Explicitly set the testid so that it does not change.
No significant functional change.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
sg-run-job | 2 +-
ts-xen-build-rump | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
create mode 100755 ts-xen-build-rump
diff --git a/sg-run-job b/sg-run-job
index 57080e7..104c880 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -501,7 +501,7 @@ proc run-job/build-libvirt {} {
proc run-job/build-rumprun {} {
run-ts . = ts-rumprun-build
run-ts . = ts-rumprun-demo-build + host + nettest rump-test-net
- run-ts . = ts-xen-build + host --no-kconfig tools
+ run-ts . xen-build ts-xen-build-rump + host --no-kconfig --
run-ts . = ts-rumprun-bake + host \
nettest :nettest:/rump-test-net \
xenstorels ::/usr/local/bin/xenstore-ls
diff --git a/ts-xen-build-rump b/ts-xen-build-rump
new file mode 100755
index 0000000..7ce3e73
--- /dev/null
+++ b/ts-xen-build-rump
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -ex
+
+exec ./ts-xen-build "$@" \
+ --- \
+ tools
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related
* [PATCH V3] qtnfmac: announcement of new FullMAC driver for Quantenna chipsets
From: igor.mitsyanko.os @ 2016-11-09 14:00 UTC (permalink / raw)
To: johannes, linux-wireless
Cc: btherthala, hwang, smaksimenko, dlebed, Sergey Matyukevich,
Kamlesh Rath, Avinash Patil, Igor Mitsyanko
In-Reply-To: <1478700000-11624-1-git-send-email-igor.mitsyanko.os@quantenna.com>
From: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
This patch adds support for new FullMAC WiFi driver for Quantenna
QSR10G chipsets.
QSR10G is Quantenna's 8x8, 160M, 11ac offering. QSR10G supports
2 simultaneous WMACs - one 5G and one 2G. 5G WMAC supports 160M,
8x8 configuration. FW supports 8 concurrent virtual
interfaces on each WMAC.
Patch introduces 2 new drivers:
- qtnfmac.ko for interfacing with kernel wireless core
- qtnfmac_pcie.ko for interfacing with hardware over PCIe interface
Signed-off-by: Dmitrii Lebed <dlebed@quantenna.com>
Signed-off-by: Sergei Maksimenko <smaksimenko@quantenna.com>
Signed-off-by: Sergey Matyukevich <smatyukevich@quantenna.com>
Signed-off-by: Bindu Therthala <btherthala@quantenna.com>
Signed-off-by: Huizhao Wang <hwang@quantenna.com>
Signed-off-by: Kamlesh Rath <krath@quantenna.com>
Signed-off-by: Avinash Patil <avinashp@quantenna.com>
Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
---
Changelist V2->V3:
0. Send an RFC patch for linux-firmware adding QSR10G firmware.
1. Get rid of quantenna/include subdirectory and move all headers
into quantenna/fmac.
2. Pass the whole qlink_channel structure instead of passing channel
number for commands operating on channels.
3. Fix printk format for dma_addr_t.
4. Drop unneeded SKB alignment and unused alignement helpers. This
fixes kbuild errors as a side effect.
5. Fix comments style.
6. Update usage of WARN_ON conditionals.
7. Drop custom unaligned readers in favor of kernel builtin functions.
8. Replace sysfs by debugfs custom entries.
9. Remove '#undef DEBUG'.
10. Change EP firmware paths and names according to linux-firmware
conventions.
11. Fix prefixes in pr_* functions.
12. Modify channels initialization logic to retreive a correct
channels list from EP fro both 2.4 and 5 GHz radios.
13. Remove various unused functions/data structures.
14. Use pr_fmt to setup driver specific prefixes for qtnfmac logging.
15. Drop excessive logging.
16. Drop qtnfmac duplicates of linux ieee80211 structures definitions.
17. Ensure proper alignment for bus_priv.
18. Fix sparse warning when setting __le16 structure field.
Changelist V1->V2:
1. Get rid of confidentiality footer.
2. Rewrite qlink.h header to make it easier to use, add
documentation to most of qlink.h definitions.
MAINTAINERS | 8 +
drivers/net/wireless/Kconfig | 1 +
drivers/net/wireless/Makefile | 1 +
drivers/net/wireless/quantenna/Kconfig | 16 +
drivers/net/wireless/quantenna/Makefile | 6 +
drivers/net/wireless/quantenna/qtnfmac/Kconfig | 23 +
drivers/net/wireless/quantenna/qtnfmac/Makefile | 32 +
drivers/net/wireless/quantenna/qtnfmac/bus.h | 139 ++
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 1049 +++++++++++
drivers/net/wireless/quantenna/qtnfmac/cfg80211.h | 36 +
drivers/net/wireless/quantenna/qtnfmac/commands.c | 1953 ++++++++++++++++++++
drivers/net/wireless/quantenna/qtnfmac/commands.h | 74 +
drivers/net/wireless/quantenna/qtnfmac/core.c | 235 +++
drivers/net/wireless/quantenna/qtnfmac/core.h | 175 ++
drivers/net/wireless/quantenna/qtnfmac/debug.c | 46 +
drivers/net/wireless/quantenna/qtnfmac/debug.h | 50 +
drivers/net/wireless/quantenna/qtnfmac/event.c | 438 +++++
drivers/net/wireless/quantenna/qtnfmac/event.h | 27 +
drivers/net/wireless/quantenna/qtnfmac/init.c | 386 ++++
.../net/wireless/quantenna/qtnfmac/pearl/pcie.c | 1368 ++++++++++++++
.../quantenna/qtnfmac/pearl/pcie_bus_priv.h | 89 +
.../wireless/quantenna/qtnfmac/pearl/pcie_ipc.h | 157 ++
.../quantenna/qtnfmac/pearl/pcie_regs_pearl.h | 353 ++++
drivers/net/wireless/quantenna/qtnfmac/qlink.h | 907 +++++++++
.../net/wireless/quantenna/qtnfmac/qlink_util.c | 71 +
.../net/wireless/quantenna/qtnfmac/qlink_util.h | 80 +
.../net/wireless/quantenna/qtnfmac/qtn_hw_ids.h | 32 +
drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c | 172 ++
drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h | 80 +
.../net/wireless/quantenna/qtnfmac/shm_ipc_defs.h | 46 +
drivers/net/wireless/quantenna/qtnfmac/trans.c | 224 +++
drivers/net/wireless/quantenna/qtnfmac/trans.h | 57 +
drivers/net/wireless/quantenna/qtnfmac/util.c | 114 ++
drivers/net/wireless/quantenna/qtnfmac/util.h | 45 +
34 files changed, 8490 insertions(+)
create mode 100644 drivers/net/wireless/quantenna/Kconfig
create mode 100644 drivers/net/wireless/quantenna/Makefile
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/Kconfig
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/Makefile
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/bus.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/cfg80211.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/commands.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/commands.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/core.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/core.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/debug.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/debug.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/event.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/event.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/init.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_bus_priv.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_ipc.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_regs_pearl.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/qlink.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/qlink_util.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/trans.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/trans.h
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/util.c
create mode 100644 drivers/net/wireless/quantenna/qtnfmac/util.h
diff --git a/MAINTAINERS b/MAINTAINERS
index f18b546..d4fa138 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9969,6 +9969,14 @@ L: qemu-devel@nongnu.org
S: Maintained
F: drivers/firmware/qemu_fw_cfg.c
+QUANTENNA QTNFMAC WIRELESS DRIVER
+M: Igor Mitsyanko <imitsyanko@quantenna.com>
+M: Avinash Patil <avinashp@quantenna.com>
+M: Sergey Matyukevich <smatyukevich@quantenna.com>
+L: linux-wireless@vger.kernel.org
+S: Maintained
+F: drivers/net/wireless/quantenna
+
RADOS BLOCK DEVICE (RBD)
M: Ilya Dryomov <idryomov@gmail.com>
M: Sage Weil <sage@redhat.com>
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 8c8edaf..3a2d1b2 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -32,6 +32,7 @@ source "drivers/net/wireless/rsi/Kconfig"
source "drivers/net/wireless/st/Kconfig"
source "drivers/net/wireless/ti/Kconfig"
source "drivers/net/wireless/zydas/Kconfig"
+source "drivers/net/wireless/quantenna/Kconfig"
config PCMCIA_RAYCS
tristate "Aviator/Raytheon 2.4GHz wireless support"
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index f00d429..54b41ac 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_WLAN_VENDOR_RSI) += rsi/
obj-$(CONFIG_WLAN_VENDOR_ST) += st/
obj-$(CONFIG_WLAN_VENDOR_TI) += ti/
obj-$(CONFIG_WLAN_VENDOR_ZYDAS) += zydas/
+obj-$(CONFIG_WLAN_VENDOR_QUANTENNA) += quantenna/
# 16-bit wireless PCMCIA client drivers
obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
diff --git a/drivers/net/wireless/quantenna/Kconfig b/drivers/net/wireless/quantenna/Kconfig
new file mode 100644
index 0000000..c177dd5
--- /dev/null
+++ b/drivers/net/wireless/quantenna/Kconfig
@@ -0,0 +1,16 @@
+config WLAN_VENDOR_QUANTENNA
+ bool "Quantenna WLAN devices"
+ default y
+ ---help---
+ If you have a wireless card belonging to this class, say Y.
+
+ Note that the answer to this question doesn't directly affect the
+ kernel: saying N will just cause the configurator to skip all
+ the questions about cards. If you say Y, you will be asked for
+ your specific card in the following questions.
+
+if WLAN_VENDOR_QUANTENNA
+
+source "drivers/net/wireless/quantenna/qtnfmac/Kconfig"
+
+endif # WLAN_VENDOR_QUANTENNA
diff --git a/drivers/net/wireless/quantenna/Makefile b/drivers/net/wireless/quantenna/Makefile
new file mode 100644
index 0000000..baebfbd
--- /dev/null
+++ b/drivers/net/wireless/quantenna/Makefile
@@ -0,0 +1,6 @@
+#
+# Copyright (c) 2015-2016 Quantenna Communications, Inc.
+# All rights reserved.
+#
+
+obj-$(CONFIG_QTNFMAC) += qtnfmac/
diff --git a/drivers/net/wireless/quantenna/qtnfmac/Kconfig b/drivers/net/wireless/quantenna/qtnfmac/Kconfig
new file mode 100644
index 0000000..d51a36d
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/Kconfig
@@ -0,0 +1,23 @@
+config QTNFMAC
+ tristate "Quantenna WiFi FullMAC WLAN driver"
+ default n
+ depends on CFG80211
+ ---help---
+ This option adds core support for wireless adapters based on
+ Quantenna 802.11n/ac chipsets. You still need separate
+ bus drivers for PCIe to be able to use real devices.
+
+ If you choose to build it as a module, it will be
+ called qtnfmac.ko.
+
+config QTNFMAC_PEARL_PCIE
+ tristate "PCIE bus interface support for Quantenna QSR10g FullMAC driver"
+ default n
+ depends on HAS_DMA && PCI
+ depends on QTNFMAC
+ select FW_LOADER
+ select CRC32
+ ---help---
+ This option adds support for wireless adapters based on Quantenna
+ QSR10g FullMAC chipset running over PCIe. If you choose to build
+ it as a module, it will be called qtnfmac_pearl_pcie.ko.
diff --git a/drivers/net/wireless/quantenna/qtnfmac/Makefile b/drivers/net/wireless/quantenna/qtnfmac/Makefile
new file mode 100644
index 0000000..f51497a
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/Makefile
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2015-2016 Quantenna Communications, Inc.
+# All rights reserved.
+#
+
+ccflags-y += \
+ -Idrivers/net/wireless/quantenna/qtnfmac
+
+obj-$(CONFIG_QTNFMAC) += qtnfmac.o
+qtnfmac-objs += \
+ core.o \
+ init.o \
+ commands.o \
+ trans.o \
+ cfg80211.o \
+ event.o \
+ util.o \
+ qlink_util.o
+
+#
+
+obj-$(CONFIG_QTNFMAC_PEARL_PCIE) += qtnfmac_pearl_pcie.o
+
+qtnfmac_pearl_pcie-objs += \
+ shm_ipc.o \
+ pearl/pcie.o
+
+qtnfmac_pearl_pcie-$(CONFIG_DEBUG_FS) += debug.o
+
+#
+
+ccflags-y += -D__CHECK_ENDIAN
diff --git a/drivers/net/wireless/quantenna/qtnfmac/bus.h b/drivers/net/wireless/quantenna/qtnfmac/bus.h
new file mode 100644
index 0000000..da2c799
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/bus.h
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2015 Quantenna Communications
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef QTNFMAC_BUS_H
+#define QTNFMAC_BUS_H
+
+#include <linux/netdevice.h>
+#include <linux/workqueue.h>
+
+#define QTNF_MAX_MAC 3
+
+enum qtnf_fw_state {
+ QTNF_FW_STATE_RESET,
+ QTNF_FW_STATE_FW_DNLD_DONE,
+ QTNF_FW_STATE_BOOT_DONE,
+ QTNF_FW_STATE_ACTIVE,
+ QTNF_FW_STATE_DEAD,
+};
+
+struct qtnf_bus;
+
+struct qtnf_bus_ops {
+ /* mgmt methods */
+ int (*preinit)(struct qtnf_bus *);
+ void (*stop)(struct qtnf_bus *);
+
+ /* control path methods */
+ int (*control_tx)(struct qtnf_bus *, struct sk_buff *);
+
+ /* data xfer methods */
+ int (*data_tx)(struct qtnf_bus *, struct sk_buff *);
+ void (*data_tx_timeout)(struct qtnf_bus *, struct net_device *);
+ void (*data_rx_start)(struct qtnf_bus *);
+ void (*data_rx_stop)(struct qtnf_bus *);
+};
+
+struct qtnf_bus {
+ struct device *dev;
+ enum qtnf_fw_state fw_state;
+ u32 chip;
+ u32 chiprev;
+ struct qtnf_bus_ops *bus_ops;
+ struct qtnf_wmac *mac[QTNF_MAX_MAC];
+ struct qtnf_qlink_transport trans;
+ struct qtnf_hw_info hw_info;
+ char fwname[32];
+ struct napi_struct mux_napi;
+ struct net_device mux_dev;
+ struct completion request_firmware_complete;
+ struct workqueue_struct *workqueue;
+ struct work_struct event_work;
+ struct mutex bus_lock; /* lock during command/event processing */
+ struct dentry *dbg_dir;
+ /* bus private data */
+ char bus_priv[0] __aligned(sizeof(void *));
+};
+
+static inline void *get_bus_priv(struct qtnf_bus *bus)
+{
+ if (WARN(!bus, "qtnfmac: invalid bus pointer"))
+ return NULL;
+
+ return &bus->bus_priv;
+}
+
+/* callback wrappers */
+
+static inline int qtnf_bus_preinit(struct qtnf_bus *bus)
+{
+ if (!bus->bus_ops->preinit)
+ return 0;
+ return bus->bus_ops->preinit(bus);
+}
+
+static inline void qtnf_bus_stop(struct qtnf_bus *bus)
+{
+ if (!bus->bus_ops->stop)
+ return;
+ bus->bus_ops->stop(bus);
+}
+
+static inline int qtnf_bus_data_tx(struct qtnf_bus *bus, struct sk_buff *skb)
+{
+ return bus->bus_ops->data_tx(bus, skb);
+}
+
+static inline void
+qtnf_bus_data_tx_timeout(struct qtnf_bus *bus, struct net_device *ndev)
+{
+ return bus->bus_ops->data_tx_timeout(bus, ndev);
+}
+
+static inline int qtnf_bus_control_tx(struct qtnf_bus *bus, struct sk_buff *skb)
+{
+ return bus->bus_ops->control_tx(bus, skb);
+}
+
+static inline void qtnf_bus_data_rx_start(struct qtnf_bus *bus)
+{
+ return bus->bus_ops->data_rx_start(bus);
+}
+
+static inline void qtnf_bus_data_rx_stop(struct qtnf_bus *bus)
+{
+ return bus->bus_ops->data_rx_stop(bus);
+}
+
+static __always_inline void qtnf_bus_lock(struct qtnf_bus *bus)
+{
+ mutex_lock(&bus->bus_lock);
+}
+
+static __always_inline void qtnf_bus_unlock(struct qtnf_bus *bus)
+{
+ mutex_unlock(&bus->bus_lock);
+}
+
+/* interface functions from common layer */
+
+void qtnf_rx_frame(struct device *dev, struct sk_buff *rxp);
+int qtnf_core_attach(struct qtnf_bus *bus);
+void qtnf_core_detach(struct qtnf_bus *bus);
+void qtnf_txflowblock(struct device *dev, bool state);
+void qtnf_txcomplete(struct device *dev, struct sk_buff *txp, bool success);
+
+#endif /* QTNFMAC_BUS_H */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
new file mode 100644
index 0000000..0ef35c7
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
@@ -0,0 +1,1049 @@
+/*
+ * Copyright (c) 2012-2012 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/etherdevice.h>
+#include <linux/vmalloc.h>
+#include <linux/ieee80211.h>
+#include <net/cfg80211.h>
+#include <net/netlink.h>
+
+#include "cfg80211.h"
+#include "commands.h"
+#include "core.h"
+#include "util.h"
+#include "bus.h"
+
+/* Supported rates to be advertised to the cfg80211 */
+static struct ieee80211_rate qtnf_rates_2g[] = {
+ {.bitrate = 10, .hw_value = 2, },
+ {.bitrate = 20, .hw_value = 4, },
+ {.bitrate = 55, .hw_value = 11, },
+ {.bitrate = 110, .hw_value = 22, },
+ {.bitrate = 60, .hw_value = 12, },
+ {.bitrate = 90, .hw_value = 18, },
+ {.bitrate = 120, .hw_value = 24, },
+ {.bitrate = 180, .hw_value = 36, },
+ {.bitrate = 240, .hw_value = 48, },
+ {.bitrate = 360, .hw_value = 72, },
+ {.bitrate = 480, .hw_value = 96, },
+ {.bitrate = 540, .hw_value = 108, },
+};
+
+/* Supported rates to be advertised to the cfg80211 */
+static struct ieee80211_rate qtnf_rates_5g[] = {
+ {.bitrate = 60, .hw_value = 12, },
+ {.bitrate = 90, .hw_value = 18, },
+ {.bitrate = 120, .hw_value = 24, },
+ {.bitrate = 180, .hw_value = 36, },
+ {.bitrate = 240, .hw_value = 48, },
+ {.bitrate = 360, .hw_value = 72, },
+ {.bitrate = 480, .hw_value = 96, },
+ {.bitrate = 540, .hw_value = 108, },
+};
+
+/* Supported crypto cipher suits to be advertised to cfg80211 */
+static const u32 qtnf_cipher_suites[] = {
+ WLAN_CIPHER_SUITE_TKIP,
+ WLAN_CIPHER_SUITE_CCMP,
+ WLAN_CIPHER_SUITE_AES_CMAC,
+};
+
+/* Supported mgmt frame types to be advertised to cfg80211 */
+static const struct ieee80211_txrx_stypes
+qtnf_mgmt_stypes[NUM_NL80211_IFTYPES] = {
+ [NL80211_IFTYPE_STATION] = {
+ .tx = BIT(IEEE80211_STYPE_ACTION >> 4),
+ .rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
+ BIT(IEEE80211_STYPE_PROBE_REQ >> 4),
+ },
+ [NL80211_IFTYPE_AP] = {
+ .tx = BIT(IEEE80211_STYPE_ACTION >> 4),
+ .rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
+ BIT(IEEE80211_STYPE_PROBE_REQ >> 4),
+ },
+};
+
+static int
+qtnf_change_virtual_intf(struct wiphy *wiphy,
+ struct net_device *dev,
+ enum nl80211_iftype type, u32 *flags,
+ struct vif_params *params)
+{
+ struct qtnf_vif *vif;
+ u8 *mac_addr;
+
+ vif = qtnf_netdev_get_priv(dev);
+
+ if (params)
+ mac_addr = params->macaddr;
+ else
+ mac_addr = NULL;
+
+ if (qtnf_cmd_send_change_intf_type(vif, type, mac_addr)) {
+ pr_err("failed to change interface type\n");
+ return -EFAULT;
+ }
+
+ vif->wdev.iftype = type;
+ return 0;
+}
+
+int qtnf_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
+{
+ struct net_device *netdev = wdev->netdev;
+ struct qtnf_vif *vif;
+
+ if (WARN(!netdev, "qtnfmac: could not get netdev for wdev"))
+ return -EFAULT;
+
+ vif = qtnf_netdev_get_priv(wdev->netdev);
+
+ if (qtnf_cmd_send_del_intf(vif))
+ pr_err("failed to send del_intf command\n");
+
+ /* Stop data */
+ netif_tx_stop_all_queues(netdev);
+ if (netif_carrier_ok(netdev))
+ netif_carrier_off(netdev);
+
+ if (netdev->reg_state == NETREG_REGISTERED)
+ unregister_netdevice(netdev);
+
+ /* Clear the vif in mac */
+ vif->netdev->ieee80211_ptr = NULL;
+ vif->netdev = NULL;
+ vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED;
+ eth_zero_addr(vif->mac_addr);
+
+ return 0;
+}
+
+struct wireless_dev *qtnf_add_virtual_intf(struct wiphy *wiphy,
+ const char *name,
+ unsigned char name_assign_type,
+ enum nl80211_iftype type,
+ u32 *flags,
+ struct vif_params *params)
+{
+ struct qtnf_wmac *mac;
+ struct qtnf_vif *vif;
+ u8 *mac_addr = NULL;
+
+ mac = wiphy_priv(wiphy);
+
+ if (!mac)
+ return ERR_PTR(-EFAULT);
+
+ switch (type) {
+ case NL80211_IFTYPE_STATION:
+ case NL80211_IFTYPE_AP:
+ vif = qtnf_get_free_vif(mac);
+ if (!vif) {
+ pr_err("could not get free private structure\n");
+ return ERR_PTR(-EFAULT);
+ }
+
+ eth_zero_addr(vif->mac_addr);
+ vif->bss_priority = QTNF_DEF_BSS_PRIORITY;
+ vif->wdev.wiphy = wiphy;
+ vif->wdev.iftype = type;
+ vif->sta_state = QTNF_STA_DISCONNECTED;
+ break;
+ default:
+ pr_err("unsupported virtual interface type (%d)\n", type);
+ return ERR_PTR(-ENOTSUPP);
+ }
+
+ if (params)
+ mac_addr = params->macaddr;
+
+ if (qtnf_cmd_send_add_intf(vif, type, mac_addr)) {
+ vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED;
+ pr_err("failed to send add_intf command\n");
+ return ERR_PTR(-EFAULT);
+ }
+
+ if (!is_valid_ether_addr(vif->mac_addr)) {
+ vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED;
+ pr_err("FW reported invalid MAC for new interface: %pM\n",
+ vif->mac_addr);
+ return ERR_PTR(-EFAULT);
+ }
+
+ if (qtnf_net_attach(mac, vif, name, name_assign_type, type)) {
+ pr_err("could not attach netdev\n");
+ vif->netdev = NULL;
+ vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED;
+ return ERR_PTR(-EFAULT);
+ }
+
+ vif->wdev.netdev = vif->netdev;
+ return &vif->wdev;
+}
+
+/* concatenate all the beacon IEs into one buffer
+ * Take IEs from head, tail and beacon_ies fields of cfg80211_beacon_data
+ * and append it to provided buffer.
+ * Checks total IE buf length to be <= than IEEE80211_MAX_DATA_LEN.
+ * Checks IE buffers to be valid, so that resulting buffer
+ * should be a valid IE buffer with length <= IEEE80211_MAX_DATA_LEN.
+ */
+static int qtnf_get_beacon_ie(const struct cfg80211_beacon_data *info,
+ uint8_t *buf)
+{
+ const struct ieee80211_mgmt *frame = (void *)info->head;
+ const size_t head_tlv_offset = offsetof(struct ieee80211_mgmt,
+ u.beacon.variable);
+ const size_t head_tlv_len = (info->head_len > head_tlv_offset) ?
+ info->head_len - head_tlv_offset : 0;
+ size_t pos = 0;
+
+ if (frame && head_tlv_len) {
+ if (pos + head_tlv_len > IEEE80211_MAX_DATA_LEN) {
+ pr_warn("too large beacon head IEs: %zu\n",
+ pos + head_tlv_len);
+ return -E2BIG;
+ }
+
+ memcpy(buf, frame->u.beacon.variable, head_tlv_len);
+ pos += head_tlv_len;
+ buf += head_tlv_len;
+ }
+
+ if (info->tail && info->tail_len) {
+ if (pos + info->tail_len > IEEE80211_MAX_DATA_LEN) {
+ pr_warn("too large beacon tail IEs: %zu\n",
+ pos + info->tail_len);
+ return -E2BIG;
+ }
+
+ memcpy(buf, info->tail, info->tail_len);
+ pos += info->tail_len;
+ buf += info->tail_len;
+ }
+
+ if (info->beacon_ies && info->beacon_ies_len) {
+ if (pos + info->beacon_ies_len > IEEE80211_MAX_DATA_LEN) {
+ pr_warn("too large beacon extra IEs: %zu\n",
+ pos + info->beacon_ies_len);
+ return -E2BIG;
+ }
+
+ memcpy(buf, info->beacon_ies, info->beacon_ies_len);
+ pos += info->beacon_ies_len;
+ buf += info->beacon_ies_len;
+ }
+
+ return pos;
+}
+
+static int qtnf_mgmt_set_appie(struct qtnf_vif *vif,
+ const struct cfg80211_beacon_data *info)
+{
+ u8 *beacon_ies;
+ int beacon_ies_len;
+ int ret = 0;
+
+ beacon_ies = kmalloc(IEEE80211_MAX_DATA_LEN, GFP_KERNEL);
+
+ if (unlikely(!beacon_ies))
+ return -ENOMEM;
+
+ beacon_ies_len = qtnf_get_beacon_ie(info, beacon_ies);
+
+ if (unlikely(beacon_ies_len < 0)) {
+ ret = beacon_ies_len;
+ goto out;
+ }
+
+ ret = qtnf_cmd_send_mgmt_set_appie(vif, QLINK_MGMT_FRAME_BEACON,
+ beacon_ies, beacon_ies_len);
+
+ if (ret)
+ goto out;
+
+ if (!info->proberesp_ies || !info->proberesp_ies_len) {
+ ret = qtnf_cmd_send_mgmt_set_appie(vif,
+ QLINK_MGMT_FRAME_PROBE_RESP,
+ NULL, 0);
+ } else {
+ ret = qtnf_cmd_send_mgmt_set_appie(vif,
+ QLINK_MGMT_FRAME_PROBE_RESP,
+ info->proberesp_ies,
+ info->proberesp_ies_len);
+ }
+
+ if (ret)
+ goto out;
+
+ if (!info->assocresp_ies || !info->assocresp_ies_len) {
+ ret = qtnf_cmd_send_mgmt_set_appie(vif,
+ QLINK_MGMT_FRAME_ASSOC_RESP,
+ NULL, 0);
+ } else {
+ ret = qtnf_cmd_send_mgmt_set_appie(vif,
+ QLINK_MGMT_FRAME_ASSOC_RESP,
+ info->assocresp_ies,
+ info->assocresp_ies_len);
+ }
+
+out:
+ kfree(beacon_ies);
+ return ret;
+}
+
+static int qtnf_change_beacon(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_beacon_data *info)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ if (!(vif->bss_status & QTNF_STATE_AP_START)) {
+ pr_err("bss not started\n");
+ return -EFAULT;
+ }
+
+ return qtnf_mgmt_set_appie(vif, info);
+}
+
+static int qtnf_start_ap(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ap_settings *settings)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+ struct qtnf_bss_config *bss_cfg;
+
+ bss_cfg = &vif->bss_cfg;
+
+ memset(bss_cfg, 0, sizeof(*bss_cfg));
+
+ bss_cfg->bcn_period = settings->beacon_interval;
+ bss_cfg->dtim = settings->dtim_period;
+ bss_cfg->auth_type = settings->auth_type;
+ bss_cfg->privacy = settings->privacy;
+
+ bss_cfg->ssid_len = settings->ssid_len;
+ memcpy(&bss_cfg->ssid, settings->ssid, bss_cfg->ssid_len);
+
+ memcpy(&bss_cfg->chandef, &settings->chandef,
+ sizeof(struct cfg80211_chan_def));
+ memcpy(&bss_cfg->crypto, &settings->crypto,
+ sizeof(struct cfg80211_crypto_settings));
+
+ if (qtnf_cmd_send_config_ap(vif)) {
+ pr_err("failed to upload AP configuration to FW\n");
+ return -EFAULT;
+ }
+
+ if (!(vif->bss_status & QTNF_STATE_AP_CONFIG)) {
+ pr_err("failed to configure AP settings in FW\n");
+ return -EFAULT;
+ }
+
+ /* update beacon extra IEs */
+ if (qtnf_mgmt_set_appie(vif, &settings->beacon)) {
+ pr_err("failed to setup mgmt frames IEs in FW\n");
+ return -EFAULT;
+ }
+
+ if (qtnf_cmd_send_start_ap(vif)) {
+ pr_err("failed to issue start AP command\n");
+ return -EFAULT;
+ }
+
+ if (!(vif->bss_status & QTNF_STATE_AP_START)) {
+ pr_err("failed to start AP operations in FW\n");
+ return -EFAULT;
+ }
+
+ return 0;
+}
+
+static int qtnf_stop_ap(struct wiphy *wiphy, struct net_device *dev)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ if (qtnf_cmd_send_stop_ap(vif)) {
+ pr_err("failed to stop AP operation in FW\n");
+ vif->bss_status &= ~QTNF_STATE_AP_START;
+ vif->bss_status &= ~QTNF_STATE_AP_CONFIG;
+
+ netif_carrier_off(vif->netdev);
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int qtnf_set_wiphy_params(struct wiphy *wiphy, u32 changed)
+{
+ struct qtnf_wmac *mac = wiphy_priv(wiphy);
+ struct qtnf_vif *vif;
+ int ret;
+
+ vif = qtnf_get_base_vif(mac);
+ if (!vif) {
+ pr_err("primary interface is not configured\n");
+ return -EFAULT;
+ }
+
+ if (changed & (WIPHY_PARAM_RETRY_LONG | WIPHY_PARAM_RETRY_SHORT)) {
+ pr_err("device doesn't support modifing retry parameters\n");
+ return -EOPNOTSUPP;
+ }
+
+ ret = qtnf_cmd_send_update_phy_params(mac, QLINK_CMD_ACTION_SET,
+ changed);
+ if (ret)
+ pr_err("failed to configure phy thresholds\n");
+
+ return ret;
+}
+
+static void
+qtnf_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,
+ u16 frame_type, bool reg)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
+ u16 mgmt_type;
+ u16 new_mask;
+ u16 qlink_frame_type = 0;
+
+ mgmt_type = (frame_type & IEEE80211_FCTL_STYPE) >> 4;
+
+ if (reg)
+ new_mask = vif->mgmt_frames_bitmask | BIT(mgmt_type);
+ else
+ new_mask = vif->mgmt_frames_bitmask & ~BIT(mgmt_type);
+
+ if (new_mask == vif->mgmt_frames_bitmask)
+ return;
+
+ switch (frame_type & IEEE80211_FCTL_STYPE) {
+ case IEEE80211_STYPE_PROBE_REQ:
+ qlink_frame_type = QLINK_MGMT_FRAME_PROBE_REQ;
+ break;
+ case IEEE80211_STYPE_ACTION:
+ qlink_frame_type = QLINK_MGMT_FRAME_ACTION;
+ break;
+ default:
+ pr_warn("unsupported frame type: %X\n",
+ (frame_type & IEEE80211_FCTL_STYPE) >> 4);
+ return;
+ }
+
+ if (qtnf_cmd_send_register_mgmt(vif, qlink_frame_type, reg)) {
+ pr_warn("failed to %sregistered mgmt frame type 0x%x\n",
+ reg ? "" : "un", frame_type);
+ return;
+ }
+
+ vif->mgmt_frames_bitmask = new_mask;
+ pr_debug("%sregistered mgmt frame type 0x%x\n",
+ reg ? "" : "un", frame_type);
+}
+
+static int
+qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
+ struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
+ const struct ieee80211_mgmt *mgmt_frame = (void *)params->buf;
+ u32 short_cookie = prandom_u32();
+ u16 flags = 0;
+
+ *cookie = short_cookie;
+
+ if (params->offchan)
+ flags |= QLINK_MGMT_FRAME_TX_FLAG_OFFCHAN;
+
+ if (params->no_cck)
+ flags |= QLINK_MGMT_FRAME_TX_FLAG_NO_CCK;
+
+ if (params->dont_wait_for_ack)
+ flags |= QLINK_MGMT_FRAME_TX_FLAG_ACK_NOWAIT;
+
+ pr_debug("%s freq:%u; FC:%.4X; DA:%pM; len:%zu; C:%.8X; FL:%.4X\n",
+ wdev->netdev->name, params->chan->center_freq,
+ le16_to_cpu(mgmt_frame->frame_control), mgmt_frame->da,
+ params->len, short_cookie, flags);
+
+ return qtnf_cmd_send_mgmt_frame(vif, short_cookie, flags,
+ params->chan->center_freq,
+ params->buf, params->len);
+}
+
+static int
+qtnf_get_station(struct wiphy *wiphy, struct net_device *dev,
+ const u8 *mac, struct station_info *sinfo)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ return qtnf_cmd_get_sta_info(vif, mac, sinfo);
+}
+
+static int
+qtnf_dump_station(struct wiphy *wiphy, struct net_device *dev,
+ int idx, u8 *mac, struct station_info *sinfo)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+ const struct qtnf_sta_node *sta_node;
+ int ret;
+
+ sta_node = qtnf_sta_list_lookup_index(&vif->sta_list, idx);
+
+ if (unlikely(!sta_node))
+ return -ENOENT;
+
+ ether_addr_copy(mac, sta_node->mac_addr);
+
+ ret = qtnf_cmd_get_sta_info(vif, sta_node->mac_addr, sinfo);
+
+ if (unlikely(ret == -ENOENT)) {
+ sinfo->filled = 0;
+ ret = 0;
+ }
+
+ return ret;
+}
+
+static int qtnf_add_key(struct wiphy *wiphy, struct net_device *dev,
+ u8 key_index, bool pairwise, const u8 *mac_addr,
+ struct key_params *params)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ pr_debug("cipher=%x idx=%u pairwise=%u\n", params->cipher,
+ key_index, pairwise);
+ if (qtnf_cmd_send_add_key(vif, key_index, pairwise, mac_addr,
+ params)) {
+ pr_err("failed to add key\n");
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int qtnf_del_key(struct wiphy *wiphy, struct net_device *dev,
+ u8 key_index, bool pairwise, const u8 *mac_addr)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ pr_debug("idx=%u pairwise=%u\n", key_index, pairwise);
+ if (qtnf_cmd_send_del_key(vif, key_index, pairwise, mac_addr)) {
+ pr_err("failed to delete key\n");
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int qtnf_set_default_key(struct wiphy *wiphy, struct net_device *dev,
+ u8 key_index, bool unicast, bool multicast)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ pr_debug("idx=%u unicast=%u multicast=%u\n", key_index,
+ unicast, multicast);
+ if (qtnf_cmd_send_set_default_key(vif, key_index, unicast,
+ multicast)) {
+ pr_err("failed to set default key\n");
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int
+qtnf_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *dev,
+ u8 key_index)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ pr_debug("idx=%u\n", key_index);
+ if (qtnf_cmd_send_set_default_mgmt_key(vif, key_index)) {
+ pr_err("failed to set default mgmt key\n");
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int
+qtnf_change_station(struct wiphy *wiphy, struct net_device *dev,
+ const u8 *mac, struct station_parameters *params)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ if (qtnf_cmd_send_change_sta(vif, mac, params)) {
+ pr_err("failed to change STA\n");
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int
+qtnf_del_station(struct wiphy *wiphy, struct net_device *dev,
+ struct station_del_parameters *params)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+
+ if (params->mac &&
+ (vif->wdev.iftype == NL80211_IFTYPE_AP) &&
+ !is_broadcast_ether_addr(params->mac) &&
+ !qtnf_sta_list_lookup(&vif->sta_list, params->mac))
+ return 0;
+ if (qtnf_cmd_send_del_sta(vif, params)) {
+ pr_err("failed to delete STA\n");
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int
+qtnf_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
+{
+ struct qtnf_wmac *mac = wiphy_priv(wiphy);
+
+ mac->scan_req = request;
+
+ if (qtnf_cmd_send_scan(mac)) {
+ pr_err("failed to start scan\n");
+ return -EFAULT;
+ }
+ return 0;
+}
+
+static int
+qtnf_connect(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_connect_params *sme)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+ struct qtnf_bss_config *bss_cfg;
+
+ if (vif->wdev.iftype != NL80211_IFTYPE_STATION) {
+ pr_err("can't connect when not in STA mode\n");
+ return -EOPNOTSUPP;
+ }
+
+ if (vif->sta_state != QTNF_STA_DISCONNECTED)
+ return -EBUSY;
+
+ bss_cfg = &vif->bss_cfg;
+ memset(bss_cfg, 0, sizeof(*bss_cfg));
+
+ bss_cfg->ssid_len = sme->ssid_len;
+ memcpy(&bss_cfg->ssid, sme->ssid, bss_cfg->ssid_len);
+ bss_cfg->chandef.chan = sme->channel;
+ bss_cfg->auth_type = sme->auth_type;
+ bss_cfg->privacy = sme->privacy;
+ bss_cfg->mfp = sme->mfp;
+ if ((sme->bg_scan_period > 0) &&
+ (sme->bg_scan_period <= QTNF_MAX_BG_SCAN_PERIOD))
+ bss_cfg->bg_scan_period = sme->bg_scan_period;
+ else if (sme->bg_scan_period == -1)
+ bss_cfg->bg_scan_period = QTNF_DEFAULT_BG_SCAN_PERIOD;
+ else
+ bss_cfg->bg_scan_period = 0; /* disabled */
+ bss_cfg->connect_flags = 0;
+ if (sme->flags & ASSOC_REQ_DISABLE_HT)
+ bss_cfg->connect_flags |= QLINK_STA_CONNECT_DISABLE_HT;
+ if (sme->flags & ASSOC_REQ_DISABLE_VHT)
+ bss_cfg->connect_flags |= QLINK_STA_CONNECT_DISABLE_VHT;
+ if (sme->flags & ASSOC_REQ_USE_RRM)
+ bss_cfg->connect_flags |= QLINK_STA_CONNECT_USE_RRM;
+ memcpy(&bss_cfg->crypto, &sme->crypto, sizeof(bss_cfg->crypto));
+ if (sme->bssid)
+ ether_addr_copy(bss_cfg->bssid, sme->bssid);
+ else
+ eth_zero_addr(bss_cfg->bssid);
+
+ if (qtnf_cmd_send_connect(vif, sme)) {
+ pr_err("failed to connect\n");
+ return -EFAULT;
+ }
+
+ vif->sta_state = QTNF_STA_CONNECTING;
+ return 0;
+}
+
+static int
+qtnf_disconnect(struct wiphy *wiphy, struct net_device *dev,
+ u16 reason_code)
+{
+ struct qtnf_wmac *mac = wiphy_priv(wiphy);
+ struct qtnf_vif *vif;
+
+ vif = qtnf_get_base_vif(mac);
+ if (!vif) {
+ pr_err("primary interface is not configured\n");
+ return -EFAULT;
+ }
+
+ if (vif->wdev.iftype != NL80211_IFTYPE_STATION) {
+ pr_err("can't disconnect when not in STA mode\n");
+ return -EOPNOTSUPP;
+ }
+
+ if (vif->sta_state == QTNF_STA_DISCONNECTED)
+ return 0;
+
+ if (qtnf_cmd_send_disconnect(vif, reason_code)) {
+ pr_err("failed to disconnect\n");
+ return -EFAULT;
+ }
+
+ vif->sta_state = QTNF_STA_DISCONNECTED;
+ return 0;
+}
+
+static struct cfg80211_ops qtn_cfg80211_ops = {
+ .add_virtual_intf = qtnf_add_virtual_intf,
+ .change_virtual_intf = qtnf_change_virtual_intf,
+ .del_virtual_intf = qtnf_del_virtual_intf,
+ .start_ap = qtnf_start_ap,
+ .change_beacon = qtnf_change_beacon,
+ .stop_ap = qtnf_stop_ap,
+ .set_wiphy_params = qtnf_set_wiphy_params,
+ .mgmt_frame_register = qtnf_mgmt_frame_register,
+ .mgmt_tx = qtnf_mgmt_tx,
+ .change_station = qtnf_change_station,
+ .del_station = qtnf_del_station,
+ .get_station = qtnf_get_station,
+ .dump_station = qtnf_dump_station,
+ .add_key = qtnf_add_key,
+ .del_key = qtnf_del_key,
+ .set_default_key = qtnf_set_default_key,
+ .set_default_mgmt_key = qtnf_set_default_mgmt_key,
+ .scan = qtnf_scan,
+ .connect = qtnf_connect,
+ .disconnect = qtnf_disconnect
+};
+
+static void qtnf_cfg80211_reg_notifier(struct wiphy *wiphy,
+ struct regulatory_request *req)
+{
+ struct qtnf_wmac *mac = wiphy_priv(wiphy);
+ struct qtnf_bus *bus;
+ struct qtnf_vif *vif;
+ struct qtnf_wmac *chan_mac;
+ int i;
+ enum nl80211_band band;
+
+ bus = mac->bus;
+
+ pr_debug("initiator=%d, alpha=%c%c, mac=%d\n", req->initiator,
+ req->alpha2[0], req->alpha2[1], mac->macid);
+
+ vif = qtnf_get_base_vif(mac);
+ if (!vif) {
+ pr_err("primary interface is not configured\n");
+ return;
+ }
+ /* ignore non-ISO3166 country codes */
+ for (i = 0; i < sizeof(req->alpha2); i++) {
+ if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {
+ pr_err("not a ISO3166 code\n");
+ return;
+ }
+ }
+ if (!strncasecmp(req->alpha2, bus->hw_info.alpha2_code,
+ sizeof(req->alpha2))) {
+ pr_warn("unchanged country code\n");
+ return;
+ }
+
+ if (qtnf_cmd_send_regulatory_config(mac, QLINK_CMD_ACTION_SET,
+ req->alpha2)) {
+ pr_err("failed to download regulatory configuration\n");
+ return;
+ }
+
+ for (i = 0; i < bus->hw_info.num_mac; i++) {
+ chan_mac = bus->mac[i];
+
+ if (!chan_mac || !chan_mac->mac_started)
+ continue;
+
+ if (!(bus->hw_info.mac_bitmap & BIT(i)))
+ continue;
+
+ for (band = 0; band < NUM_NL80211_BANDS; ++band) {
+ if (!wiphy->bands[band])
+ continue;
+
+ if (qtnf_cmd_get_mac_chan_info(chan_mac,
+ wiphy->bands[band])) {
+ pr_err("could not get channel information for mac%d\n",
+ chan_mac->macid);
+ qtnf_core_detach(bus);
+
+ return;
+ }
+ }
+ }
+}
+
+void qtnf_band_setup_htvht_caps(struct qtnf_mac_info *macinfo,
+ struct ieee80211_supported_band *band)
+{
+ struct ieee80211_sta_ht_cap *ht_cap;
+ struct ieee80211_sta_vht_cap *vht_cap;
+
+ ht_cap = &band->ht_cap;
+ ht_cap->ht_supported = true;
+ memcpy(&ht_cap->cap, &macinfo->ht_cap.cap_info,
+ sizeof(u16));
+ ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
+ ht_cap->ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE;
+ memcpy(&ht_cap->mcs, &macinfo->ht_cap.mcs,
+ sizeof(ht_cap->mcs));
+
+ if (macinfo->phymode_cap & QLINK_PHYMODE_AC) {
+ vht_cap = &band->vht_cap;
+ vht_cap->vht_supported = true;
+ memcpy(&vht_cap->cap,
+ &macinfo->vht_cap.vht_cap_info, sizeof(u32));
+ /* Update MCS support for VHT */
+ memcpy(&vht_cap->vht_mcs,
+ &macinfo->vht_cap.supp_mcs,
+ sizeof(struct ieee80211_vht_mcs_info));
+ }
+}
+
+struct wiphy *qtnf_allocate_wiphy(struct qtnf_bus *bus)
+{
+ struct wiphy *wiphy;
+
+ wiphy = wiphy_new(&qtn_cfg80211_ops, sizeof(struct qtnf_wmac));
+ if (!wiphy) {
+ pr_err("could not create new wiphy\n");
+ return NULL;
+ }
+
+ set_wiphy_dev(wiphy, bus->dev);
+
+ return wiphy;
+}
+
+static int qtnf_wiphy_setup_if_comb(struct wiphy *wiphy,
+ struct ieee80211_iface_combination *if_comb,
+ const struct qtnf_mac_info *mac_info)
+{
+ size_t max_interfaces = 0;
+ u16 interface_modes = 0;
+ size_t i;
+
+ if (unlikely(!mac_info->limits || !mac_info->n_limits)) {
+ pr_err("no interface types supported\n");
+ return -ENOENT;
+ }
+
+ if_comb->limits = mac_info->limits;
+ if_comb->n_limits = mac_info->n_limits;
+
+ for (i = 0; i < mac_info->n_limits; i++) {
+ max_interfaces += mac_info->limits[i].max;
+ interface_modes |= mac_info->limits[i].types;
+ }
+
+ if_comb->num_different_channels = 1;
+ if_comb->beacon_int_infra_match = true;
+ if_comb->max_interfaces = max_interfaces;
+ if_comb->radar_detect_widths = mac_info->radar_detect_widths;
+ wiphy->interface_modes = interface_modes;
+
+ pr_debug("MAX_IF: %zu; MODES: %.4X; RADAR WIDTHS: %.2X\n",
+ max_interfaces, interface_modes, if_comb->radar_detect_widths);
+
+ return 0;
+}
+
+int qtnf_register_wiphy(struct qtnf_bus *bus, struct qtnf_wmac *mac)
+{
+ struct wiphy *wiphy = priv_to_wiphy(mac);
+ struct ieee80211_iface_combination *iface_comb = NULL;
+ int ret;
+
+ if (!wiphy) {
+ pr_err("invalid wiphy pointer\n");
+ return -EFAULT;
+ }
+
+ iface_comb = kzalloc(sizeof(*iface_comb), GFP_KERNEL);
+ if (!iface_comb) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ ret = qtnf_wiphy_setup_if_comb(wiphy, iface_comb, &mac->macinfo);
+ if (ret)
+ goto out;
+
+ pr_info("macid=%d, phymode=%#x\n", mac->macid,
+ mac->macinfo.phymode_cap);
+
+ wiphy->frag_threshold = mac->macinfo.frag_thr;
+ wiphy->rts_threshold = mac->macinfo.rts_thr;
+ wiphy->retry_short = mac->macinfo.sretry_limit;
+ wiphy->retry_long = mac->macinfo.lretry_limit;
+ wiphy->coverage_class = mac->macinfo.coverage_class;
+
+ wiphy->max_scan_ssids = QTNF_MAX_SSID_LIST_LENGTH;
+ wiphy->max_scan_ie_len = QTNF_MAX_VSIE_LEN;
+ wiphy->mgmt_stypes = qtnf_mgmt_stypes;
+ wiphy->max_remain_on_channel_duration = 5000;
+
+ wiphy->iface_combinations = iface_comb;
+ wiphy->n_iface_combinations = 1;
+
+ /* Initialize cipher suits */
+ wiphy->cipher_suites = qtnf_cipher_suites;
+ wiphy->n_cipher_suites = ARRAY_SIZE(qtnf_cipher_suites);
+ wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
+ wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME |
+ WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD |
+ WIPHY_FLAG_AP_UAPSD;
+
+ wiphy->probe_resp_offload = NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS |
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2;
+
+ wiphy->available_antennas_tx = mac->macinfo.num_tx_chain;
+ wiphy->available_antennas_rx = mac->macinfo.num_rx_chain;
+
+ wiphy->max_ap_assoc_sta = mac->macinfo.max_ap_assoc_sta;
+
+ ether_addr_copy(wiphy->perm_addr, mac->macaddr);
+
+ if (bus->hw_info.hw_capab & QLINK_HW_SUPPORTS_REG_UPDATE) {
+ pr_debug("device supports REG_UPDATE\n");
+ wiphy->reg_notifier = qtnf_cfg80211_reg_notifier;
+ pr_debug("hint regulatory about EP region: %c%c\n",
+ bus->hw_info.alpha2_code[0],
+ bus->hw_info.alpha2_code[1]);
+ regulatory_hint(wiphy, bus->hw_info.alpha2_code);
+ } else {
+ pr_debug("device doesn't support REG_UPDATE\n");
+ wiphy->regulatory_flags |= REGULATORY_WIPHY_SELF_MANAGED;
+ }
+
+ pr_debug("registering regulatory for mac(%d)\n", mac->macid);
+ ret = wiphy_register(wiphy);
+
+out:
+ if (ret < 0) {
+ pr_err("could not register wiphy\n");
+ kfree(iface_comb);
+ return ret;
+ }
+
+ return 0;
+}
+
+void qtnf_netdev_updown(struct net_device *ndev, bool up)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev);
+
+ if (qtnf_cmd_send_updown_intf(vif, up))
+ pr_err("failed to send up/down command to FW\n");
+}
+
+void qtnf_virtual_intf_cleanup(struct net_device *ndev)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev);
+ struct qtnf_wmac *mac = mac = wiphy_priv(vif->wdev.wiphy);
+
+ if (vif->wdev.iftype == NL80211_IFTYPE_STATION) {
+ switch (vif->sta_state) {
+ case QTNF_STA_DISCONNECTED:
+ break;
+ case QTNF_STA_CONNECTING:
+ cfg80211_connect_result(vif->netdev,
+ vif->bss_cfg.bssid, NULL, 0,
+ NULL, 0,
+ WLAN_STATUS_UNSPECIFIED_FAILURE,
+ GFP_KERNEL);
+ qtnf_disconnect(vif->wdev.wiphy, ndev,
+ WLAN_REASON_DEAUTH_LEAVING);
+ break;
+ case QTNF_STA_CONNECTED:
+ cfg80211_disconnected(vif->netdev,
+ WLAN_REASON_DEAUTH_LEAVING,
+ NULL, 0, 1, GFP_KERNEL);
+ qtnf_disconnect(vif->wdev.wiphy, ndev,
+ WLAN_REASON_DEAUTH_LEAVING);
+ break;
+ }
+ vif->sta_state = QTNF_STA_DISCONNECTED;
+ if (mac->scan_req) {
+ struct cfg80211_scan_info info = {
+ .aborted = true,
+ };
+
+ cfg80211_scan_done(mac->scan_req, &info);
+ mac->scan_req = NULL;
+ }
+ }
+}
+
+void qtnf_virtual_intf_local_reset(struct net_device *ndev)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev);
+ struct qtnf_wmac *mac = mac = wiphy_priv(vif->wdev.wiphy);
+
+ if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)
+ return;
+
+ /* stop tx completely */
+ netif_tx_stop_all_queues(ndev);
+ if (netif_carrier_ok(ndev))
+ netif_carrier_off(ndev);
+
+ /* nofity cfg80211 */
+ if (vif->wdev.iftype == NL80211_IFTYPE_STATION) {
+ switch (vif->sta_state) {
+ case QTNF_STA_CONNECTING:
+ cfg80211_connect_result(vif->netdev,
+ vif->bss_cfg.bssid, NULL, 0,
+ NULL, 0,
+ WLAN_STATUS_UNSPECIFIED_FAILURE,
+ GFP_KERNEL);
+ break;
+ case QTNF_STA_CONNECTED:
+ cfg80211_disconnected(vif->netdev,
+ WLAN_REASON_DEAUTH_LEAVING,
+ NULL, 0, 1, GFP_KERNEL);
+ break;
+ case QTNF_STA_DISCONNECTED:
+ break;
+ }
+ }
+
+ cfg80211_shutdown_all_interfaces(vif->wdev.wiphy);
+ vif->sta_state = QTNF_STA_DISCONNECTED;
+}
+
+void qtnf_band_init_rates(struct ieee80211_supported_band *band)
+{
+ switch (band->band) {
+ case NL80211_BAND_2GHZ:
+ band->bitrates = qtnf_rates_2g;
+ band->n_bitrates = ARRAY_SIZE(qtnf_rates_2g);
+ break;
+ case NL80211_BAND_5GHZ:
+ band->bitrates = qtnf_rates_5g;
+ band->n_bitrates = ARRAY_SIZE(qtnf_rates_5g);
+ break;
+ default:
+ band->bitrates = NULL;
+ band->n_bitrates = 0;
+ break;
+ }
+}
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h
new file mode 100644
index 0000000..724a4d2
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_CFG80211_H_
+#define _QTN_FMAC_CFG80211_H_
+
+#include <net/cfg80211.h>
+
+#include "core.h"
+
+int qtnf_register_wiphy(struct qtnf_bus *bus, struct qtnf_wmac *mac);
+int qtnf_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev);
+void qtnf_virtual_intf_local_reset(struct net_device *ndev);
+struct wireless_dev *qtnf_add_virtual_intf(struct wiphy *wiphy,
+ const char *name,
+ unsigned char name_assign_type,
+ enum nl80211_iftype type, u32 *flags,
+ struct vif_params *params);
+void qtnf_band_init_rates(struct ieee80211_supported_band *band);
+void qtnf_band_setup_htvht_caps(struct qtnf_mac_info *macinfo,
+ struct ieee80211_supported_band *band);
+
+#endif /* _QTN_FMAC_CFG80211_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c
new file mode 100644
index 0000000..5f7d434
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c
@@ -0,0 +1,1953 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/types.h>
+#include <linux/skbuff.h>
+
+#include "cfg80211.h"
+#include "core.h"
+#include "qlink.h"
+#include "qlink_util.h"
+#include "bus.h"
+#include "commands.h"
+
+static int qtnf_cmd_check_reply_header(const struct qlink_resp *resp,
+ u16 cmd_id, u8 mac_id, u8 vif_id,
+ size_t resp_size)
+{
+ if (unlikely(le16_to_cpu(resp->cmd_id) != cmd_id)) {
+ pr_warn("invalid response cmd_id: 0x%.4X != 0x%.4X\n",
+ le16_to_cpu(resp->cmd_id), cmd_id);
+ return -EINVAL;
+ }
+
+ if (unlikely(resp->macid != mac_id)) {
+ pr_warn("invalid response macid: 0x%.2X != 0x%.2X\n",
+ resp->macid, mac_id);
+ return -EINVAL;
+ }
+
+ if (unlikely(resp->vifid != vif_id)) {
+ pr_warn("invalid response vif_id: 0x%.2X != 0x%.2X\n",
+ resp->vifid, vif_id);
+ return -EINVAL;
+ }
+
+ if (unlikely(le16_to_cpu(resp->mhdr.len) < resp_size)) {
+ pr_warn("invalid response size for cmd=0x%.4X mac=0x%.2X vif=0x%.2X: %u < %zu\n",
+ cmd_id, mac_id, vif_id,
+ le16_to_cpu(resp->mhdr.len), resp_size);
+ return -ENOSPC;
+ }
+
+ return 0;
+}
+
+static int qtnf_cmd_send_with_reply(struct qtnf_bus *bus,
+ struct sk_buff *cmd_skb,
+ struct sk_buff **response_skb,
+ u16 *result_code,
+ size_t const_resp_size,
+ size_t *var_resp_size)
+{
+ struct qlink_cmd *cmd;
+ const struct qlink_resp *resp;
+ struct sk_buff *resp_skb = NULL;
+ u16 cmd_id;
+ u8 mac_id, vif_id;
+ int ret;
+
+ if (unlikely(!cmd_skb)) {
+ pr_err("no command skb\n");
+ return -EFAULT;
+ }
+
+ if (unlikely(!cmd_skb->data) || unlikely(cmd_skb->len < sizeof(*cmd))) {
+ pr_err("invalid command skb data\n");
+ kfree_skb(cmd_skb);
+ return -EFAULT;
+ }
+
+ cmd = (struct qlink_cmd *)cmd_skb->data;
+ cmd_id = le16_to_cpu(cmd->cmd_id);
+ mac_id = cmd->macid;
+ vif_id = cmd->vifid;
+ cmd->mhdr.len = cpu_to_le16(cmd_skb->len);
+
+ if (unlikely(bus->fw_state != QTNF_FW_STATE_ACTIVE &&
+ le16_to_cpu(cmd->cmd_id) != QLINK_CMD_FW_INIT)) {
+ pr_warn("drop cmd 0x%.4X in fw state %d\n",
+ le16_to_cpu(cmd->cmd_id), bus->fw_state);
+ return -ENODEV;
+ }
+
+ pr_debug("cmd=0x%.4X macid=0x%.2X vif=0x%.2X\n",
+ le16_to_cpu(cmd->cmd_id), cmd->macid, cmd->vifid);
+
+ ret = qtnf_trans_send_cmd_with_resp(bus, cmd_skb, &resp_skb);
+
+ if (unlikely(ret))
+ goto out;
+
+ resp = (const struct qlink_resp *)resp_skb->data;
+ ret = qtnf_cmd_check_reply_header(resp, cmd_id, mac_id, vif_id,
+ const_resp_size);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (likely(result_code))
+ *result_code = le16_to_cpu(resp->result);
+
+ /* Return length of variable part of response */
+ if (response_skb && var_resp_size)
+ *var_resp_size = le16_to_cpu(resp->mhdr.len) - const_resp_size;
+
+out:
+ if (response_skb)
+ *response_skb = resp_skb;
+ else
+ consume_skb(resp_skb);
+
+ return ret;
+}
+
+static inline int qtnf_cmd_send(struct qtnf_bus *bus,
+ struct sk_buff *cmd_skb,
+ u16 *result_code)
+{
+ return qtnf_cmd_send_with_reply(bus, cmd_skb, NULL, result_code,
+ sizeof(struct qlink_resp), NULL);
+}
+
+static struct sk_buff *qtnf_cmd_alloc_new_cmdskb(u8 macid, u8 vifid, u16 cmd_no,
+ size_t cmd_size)
+{
+ struct qlink_cmd *cmd;
+ struct sk_buff *cmd_skb;
+
+ cmd_skb = __dev_alloc_skb(sizeof(*cmd) +
+ QTNF_MAX_CMD_BUF_SIZE, GFP_KERNEL);
+ if (unlikely(!cmd_skb)) {
+ pr_err("failed to allocate cmd_skb\n");
+ return NULL;
+ }
+
+ memset(skb_put(cmd_skb, cmd_size), 0, cmd_size);
+
+ cmd = (struct qlink_cmd *)cmd_skb->data;
+ cmd->mhdr.len = cpu_to_le16(cmd_skb->len);
+ cmd->mhdr.type = cpu_to_le16(QLINK_MSG_TYPE_CMD);
+ cmd->cmd_id = cpu_to_le16(cmd_no);
+ cmd->macid = macid;
+ cmd->vifid = vifid;
+
+ return cmd_skb;
+}
+
+int qtnf_cmd_send_start_ap(struct qtnf_vif *vif)
+{
+ struct sk_buff *cmd_skb;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_START_AP,
+ sizeof(struct qlink_cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ vif->bss_status |= QTNF_STATE_AP_START;
+ netif_carrier_on(vif->netdev);
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_regulatory_config(struct qtnf_wmac *mac, u16 action,
+ const char *alpha2)
+{
+ struct sk_buff *cmd_skb;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+
+ if ((action == QLINK_CMD_ACTION_SET) && !alpha2)
+ return -EINVAL;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD,
+ QLINK_CMD_REG_REGION,
+ sizeof(struct qlink_cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_cmd_skb_put_action(cmd_skb, action);
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, WLAN_EID_COUNTRY, alpha2,
+ QTNF_MAX_ALPHA_LEN);
+
+ ret = qtnf_cmd_send(mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ memcpy(mac->bus->hw_info.alpha2_code, alpha2,
+ sizeof(mac->bus->hw_info.alpha2_code));
+out:
+ return ret;
+}
+
+int qtnf_cmd_send_config_ap(struct qtnf_vif *vif)
+{
+ struct sk_buff *cmd_skb;
+ struct qtnf_bss_config *bss_cfg = &vif->bss_cfg;
+ struct cfg80211_chan_def *chandef = &bss_cfg->chandef;
+ struct qlink_tlv_channel *qchan;
+ struct qlink_auth_encr aen;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+ int i;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_CONFIG_AP,
+ sizeof(struct qlink_cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ qtnf_cmd_skb_put_action(cmd_skb, QLINK_CMD_ACTION_SET);
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, WLAN_EID_SSID, bss_cfg->ssid,
+ bss_cfg->ssid_len);
+ qtnf_cmd_skb_put_tlv_u16(cmd_skb, QTN_TLV_ID_BCN_PERIOD,
+ bss_cfg->bcn_period);
+ qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_DTIM, bss_cfg->dtim);
+
+ qchan = (struct qlink_tlv_channel *)skb_put(cmd_skb, sizeof(*qchan));
+
+ memset(qchan, 0, sizeof(*qchan));
+ qchan->hdr.type = cpu_to_le16(QTN_TLV_ID_CHANNEL);
+ qchan->hdr.len = cpu_to_le16(sizeof(*qchan) -
+ sizeof(struct qlink_tlv_hdr));
+ qchan->hw_value = cpu_to_le16(
+ ieee80211_frequency_to_channel(chandef->chan->center_freq));
+
+ memset(&aen, 0, sizeof(aen));
+ aen.auth_type = bss_cfg->auth_type;
+ aen.privacy = !!bss_cfg->privacy;
+ aen.mfp = bss_cfg->mfp;
+ aen.wpa_versions = cpu_to_le32(bss_cfg->crypto.wpa_versions);
+ aen.cipher_group = cpu_to_le32(bss_cfg->crypto.cipher_group);
+ aen.n_ciphers_pairwise = cpu_to_le32(
+ bss_cfg->crypto.n_ciphers_pairwise);
+ for (i = 0; i < QLINK_MAX_NR_CIPHER_SUITES; i++)
+ aen.ciphers_pairwise[i] = cpu_to_le32(
+ bss_cfg->crypto.ciphers_pairwise[i]);
+ aen.n_akm_suites = cpu_to_le32(
+ bss_cfg->crypto.n_akm_suites);
+ for (i = 0; i < QLINK_MAX_NR_AKM_SUITES; i++)
+ aen.akm_suites[i] = cpu_to_le32(
+ bss_cfg->crypto.akm_suites[i]);
+ aen.control_port = bss_cfg->crypto.control_port;
+ aen.control_port_no_encrypt =
+ bss_cfg->crypto.control_port_no_encrypt;
+ aen.control_port_ethertype = cpu_to_le16(be16_to_cpu(
+ bss_cfg->crypto.control_port_ethertype));
+
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_CRYPTO, (u8 *)&aen,
+ sizeof(aen));
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ vif->bss_status |= QTNF_STATE_AP_CONFIG;
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif)
+{
+ struct sk_buff *cmd_skb;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_STOP_AP,
+ sizeof(struct qlink_cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ vif->bss_status &= ~QTNF_STATE_AP_START;
+ vif->bss_status &= ~QTNF_STATE_AP_CONFIG;
+
+ netif_carrier_off(vif->netdev);
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_mgmt_frame_register *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_REGISTER_MGMT,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_mgmt_frame_register *)cmd_skb->data;
+ cmd->frame_type = cpu_to_le16(frame_type);
+ cmd->do_register = reg;
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_mgmt_frame(struct qtnf_vif *vif, u32 cookie, u16 flags,
+ u16 freq, const u8 *buf, size_t len)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_mgmt_frame_tx *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+
+ if (sizeof(*cmd) + len > QTNF_MAX_CMD_BUF_SIZE) {
+ pr_warn("frame is too big: %zu\n", len);
+ return -E2BIG;
+ }
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_SEND_MGMT_FRAME,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_mgmt_frame_tx *)cmd_skb->data;
+ cmd->cookie = cpu_to_le32(cookie);
+ cmd->freq = cpu_to_le16(freq);
+ cmd->flags = cpu_to_le16(flags);
+
+ if (len && buf)
+ qtnf_cmd_skb_put_buffer(cmd_skb, buf, len);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type,
+ const u8 *buf, size_t len)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_mgmt_append_ie *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+
+ if (sizeof(*cmd) + len > QTNF_MAX_CMD_BUF_SIZE) {
+ pr_warn("frame is too big: %zu\n", len);
+ return -E2BIG;
+ }
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_MGMT_SET_APPIE,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_mgmt_append_ie *)cmd_skb->data;
+ cmd->type = frame_type;
+ cmd->flags = 0;
+
+ /* If len == 0 then IE buf for specified frame type
+ * should be cleared on EP.
+ */
+ if (len && buf)
+ qtnf_cmd_skb_put_buffer(cmd_skb, buf, len);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+static void
+qtnf_sta_info_parse_basic_counters(struct station_info *sinfo,
+ const struct qlink_sta_stat_basic_counters *counters)
+{
+ sinfo->filled |= BIT(NL80211_STA_INFO_RX_BYTES) |
+ BIT(NL80211_STA_INFO_TX_BYTES);
+ sinfo->rx_bytes = get_unaligned_le64(&counters->rx_bytes);
+ sinfo->tx_bytes = get_unaligned_le64(&counters->tx_bytes);
+
+ sinfo->filled |= BIT(NL80211_STA_INFO_RX_PACKETS) |
+ BIT(NL80211_STA_INFO_TX_PACKETS) |
+ BIT(NL80211_STA_INFO_BEACON_RX);
+ sinfo->rx_packets = get_unaligned_le32(&counters->rx_packets);
+ sinfo->tx_packets = get_unaligned_le32(&counters->tx_packets);
+ sinfo->rx_beacon = get_unaligned_le64(&counters->rx_beacons);
+
+ sinfo->filled |= BIT(NL80211_STA_INFO_RX_DROP_MISC) |
+ BIT(NL80211_STA_INFO_TX_FAILED);
+ sinfo->rx_dropped_misc = get_unaligned_le32(&counters->rx_dropped);
+ sinfo->tx_failed = get_unaligned_le32(&counters->tx_failed);
+}
+
+static void
+qtnf_sta_info_parse_rate(struct rate_info *rate_dst,
+ const struct qlink_sta_info_rate *rate_src)
+{
+ rate_dst->legacy = get_unaligned_le16(&rate_src->rate) * 10;
+
+ rate_dst->mcs = rate_src->mcs;
+ rate_dst->nss = rate_src->nss;
+ rate_dst->flags = 0;
+
+ switch (rate_src->bw) {
+ case QLINK_STA_INFO_RATE_BW_5:
+ rate_dst->bw = RATE_INFO_BW_5;
+ break;
+ case QLINK_STA_INFO_RATE_BW_10:
+ rate_dst->bw = RATE_INFO_BW_10;
+ break;
+ case QLINK_STA_INFO_RATE_BW_20:
+ rate_dst->bw = RATE_INFO_BW_20;
+ break;
+ case QLINK_STA_INFO_RATE_BW_40:
+ rate_dst->bw = RATE_INFO_BW_40;
+ break;
+ case QLINK_STA_INFO_RATE_BW_80:
+ rate_dst->bw = RATE_INFO_BW_80;
+ break;
+ case QLINK_STA_INFO_RATE_BW_160:
+ rate_dst->bw = RATE_INFO_BW_160;
+ break;
+ default:
+ rate_dst->bw = 0;
+ break;
+ }
+
+ if (rate_src->flags & QLINK_STA_INFO_RATE_FLAG_HT_MCS)
+ rate_dst->flags |= RATE_INFO_FLAGS_MCS;
+ else if (rate_src->flags & QLINK_STA_INFO_RATE_FLAG_VHT_MCS)
+ rate_dst->flags |= RATE_INFO_FLAGS_VHT_MCS;
+}
+
+static void
+qtnf_sta_info_parse_flags(struct nl80211_sta_flag_update *dst,
+ const struct qlink_sta_info_state *src)
+{
+ u32 mask, value;
+
+ dst->mask = 0;
+ dst->set = 0;
+
+ mask = le32_to_cpu(src->mask);
+ value = le32_to_cpu(src->value);
+
+ if (mask & QLINK_STA_FLAG_AUTHORIZED) {
+ dst->mask |= BIT(NL80211_STA_FLAG_AUTHORIZED);
+ if (value & QLINK_STA_FLAG_AUTHORIZED)
+ dst->set |= BIT(NL80211_STA_FLAG_AUTHORIZED);
+ }
+
+ if (mask & QLINK_STA_FLAG_SHORT_PREAMBLE) {
+ dst->mask |= BIT(NL80211_STA_FLAG_SHORT_PREAMBLE);
+ if (value & QLINK_STA_FLAG_SHORT_PREAMBLE)
+ dst->set |= BIT(NL80211_STA_FLAG_SHORT_PREAMBLE);
+ }
+
+ if (mask & QLINK_STA_FLAG_WME) {
+ dst->mask |= BIT(NL80211_STA_FLAG_WME);
+ if (value & QLINK_STA_FLAG_WME)
+ dst->set |= BIT(NL80211_STA_FLAG_WME);
+ }
+
+ if (mask & QLINK_STA_FLAG_MFP) {
+ dst->mask |= BIT(NL80211_STA_FLAG_MFP);
+ if (value & QLINK_STA_FLAG_MFP)
+ dst->set |= BIT(NL80211_STA_FLAG_MFP);
+ }
+
+ if (mask & QLINK_STA_FLAG_AUTHENTICATED) {
+ dst->mask |= BIT(NL80211_STA_FLAG_AUTHENTICATED);
+ if (value & QLINK_STA_FLAG_AUTHENTICATED)
+ dst->set |= BIT(NL80211_STA_FLAG_AUTHENTICATED);
+ }
+
+ if (mask & QLINK_STA_FLAG_TDLS_PEER) {
+ dst->mask |= BIT(NL80211_STA_FLAG_TDLS_PEER);
+ if (value & QLINK_STA_FLAG_TDLS_PEER)
+ dst->set |= BIT(NL80211_STA_FLAG_TDLS_PEER);
+ }
+
+ if (mask & QLINK_STA_FLAG_ASSOCIATED) {
+ dst->mask |= BIT(NL80211_STA_FLAG_ASSOCIATED);
+ if (value & QLINK_STA_FLAG_ASSOCIATED)
+ dst->set |= BIT(NL80211_STA_FLAG_ASSOCIATED);
+ }
+}
+
+static void
+qtnf_sta_info_parse_generic_info(struct station_info *sinfo,
+ const struct qlink_sta_info_generic *info)
+{
+ sinfo->filled |= BIT(NL80211_STA_INFO_CONNECTED_TIME) |
+ BIT(NL80211_STA_INFO_INACTIVE_TIME);
+ sinfo->connected_time = get_unaligned_le32(&info->connected_time);
+ sinfo->inactive_time = get_unaligned_le32(&info->inactive_time);
+
+ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL) |
+ BIT(NL80211_STA_INFO_SIGNAL_AVG);
+ sinfo->signal = info->rssi - 120;
+ sinfo->signal_avg = info->rssi_avg - QLINK_RSSI_OFFSET;
+
+ if (info->rx_rate.rate) {
+ sinfo->filled |= BIT(NL80211_STA_INFO_RX_BITRATE);
+ qtnf_sta_info_parse_rate(&sinfo->rxrate, &info->rx_rate);
+ }
+
+ if (info->tx_rate.rate) {
+ sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
+ qtnf_sta_info_parse_rate(&sinfo->txrate, &info->tx_rate);
+ }
+
+ sinfo->filled |= BIT(NL80211_STA_INFO_STA_FLAGS);
+ qtnf_sta_info_parse_flags(&sinfo->sta_flags, &info->state);
+}
+
+static int qtnf_cmd_sta_info_parse(struct station_info *sinfo,
+ const u8 *payload, size_t payload_size)
+{
+ const struct qlink_sta_stat_basic_counters *counters;
+ const struct qlink_sta_info_generic *sta_info;
+ u16 tlv_type;
+ u16 tlv_value_len;
+ size_t tlv_full_len;
+ const struct qlink_tlv_hdr *tlv;
+
+ sinfo->filled = 0;
+
+ tlv = (const struct qlink_tlv_hdr *)payload;
+ while (payload_size >= sizeof(struct qlink_tlv_hdr)) {
+ tlv_type = le16_to_cpu(tlv->type);
+ tlv_value_len = le16_to_cpu(tlv->len);
+ tlv_full_len = tlv_value_len + sizeof(struct qlink_tlv_hdr);
+ if (tlv_full_len > payload_size) {
+ pr_warn("malformed TLV 0x%.2X; LEN: %u\n",
+ tlv_type, tlv_value_len);
+ return -EINVAL;
+ }
+ switch (tlv_type) {
+ case QTN_TLV_ID_STA_BASIC_COUNTERS:
+ if (unlikely(tlv_value_len < sizeof(*counters))) {
+ pr_err("invalid TLV size %.4X: %u\n",
+ tlv_type, tlv_value_len);
+ break;
+ }
+
+ counters = (void *)tlv->val;
+ qtnf_sta_info_parse_basic_counters(sinfo, counters);
+ break;
+ case QTN_TLV_ID_STA_GENERIC_INFO:
+ if (unlikely(tlv_value_len < sizeof(*sta_info)))
+ break;
+
+ sta_info = (void *)tlv->val;
+ qtnf_sta_info_parse_generic_info(sinfo, sta_info);
+ break;
+ default:
+ pr_warn("unexpected TLV type: %.4X\n", tlv_type);
+ break;
+ }
+ payload_size -= tlv_full_len;
+ tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len);
+ }
+
+ if (payload_size) {
+ pr_warn("malformed IEs buf; bytes left: %zu\n", payload_size);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac,
+ struct station_info *sinfo)
+{
+ struct sk_buff *cmd_skb, *resp_skb = NULL;
+ struct qlink_cmd_get_sta_info *cmd;
+ const struct qlink_resp_get_sta_info *resp;
+ size_t var_resp_len;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_GET_STA_INFO,
+ sizeof(*cmd));
+
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_get_sta_info *)cmd_skb->data;
+ ether_addr_copy(cmd->sta_addr, sta_mac);
+
+ ret = qtnf_cmd_send_with_reply(vif->mac->bus, cmd_skb, &resp_skb,
+ &res_code, sizeof(*resp),
+ &var_resp_len);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ switch (res_code) {
+ case QLINK_CMD_RESULT_ENOTFOUND:
+ pr_warn("STA %pM not found\n", sta_mac);
+ ret = -ENOENT;
+ break;
+ default:
+ pr_err("error returned: %u\n", res_code);
+ ret = -EFAULT;
+ break;
+ }
+ goto out;
+ }
+
+ resp = (const struct qlink_resp_get_sta_info *)resp_skb->data;
+
+ if (unlikely(!ether_addr_equal(sta_mac, resp->sta_addr))) {
+ pr_err("wrong mac in reply: %pM != %pM\n",
+ resp->sta_addr, sta_mac);
+ ret = -EINVAL;
+ goto out;
+ }
+
+ ret = qtnf_cmd_sta_info_parse(sinfo, resp->info, var_resp_len);
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ consume_skb(resp_skb);
+
+ return ret;
+}
+
+static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif,
+ enum nl80211_iftype iftype,
+ u8 *mac_addr,
+ enum qlink_cmd_type cmd_type)
+{
+ struct sk_buff *cmd_skb, *resp_skb = NULL;
+ struct qlink_cmd_manage_intf *cmd;
+ const struct qlink_resp_manage_intf *resp;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ cmd_type,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_manage_intf *)cmd_skb->data;
+ cmd->action = cpu_to_le16(QLINK_CMD_ACTION_SET);
+
+ switch (iftype) {
+ case NL80211_IFTYPE_AP:
+ cmd->intf_info.if_type = cpu_to_le16(QLINK_IFTYPE_AP);
+ break;
+ case NL80211_IFTYPE_STATION:
+ cmd->intf_info.if_type = cpu_to_le16(QLINK_IFTYPE_STATION);
+ break;
+ default:
+ pr_err("unsupported iftype %d\n", iftype);
+ ret = -EINVAL;
+ goto out;
+ }
+
+ if (mac_addr)
+ ether_addr_copy(cmd->intf_info.mac_addr, mac_addr);
+ else
+ eth_zero_addr(cmd->intf_info.mac_addr);
+
+ ret = qtnf_cmd_send_with_reply(vif->mac->bus, cmd_skb, &resp_skb,
+ &res_code, sizeof(*resp), NULL);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ resp = (const struct qlink_resp_manage_intf *)resp_skb->data;
+ ether_addr_copy(vif->mac_addr, resp->intf_info.mac_addr);
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ consume_skb(resp_skb);
+
+ return ret;
+}
+
+int qtnf_cmd_send_add_intf(struct qtnf_vif *vif,
+ enum nl80211_iftype iftype, u8 *mac_addr)
+{
+ return qtnf_cmd_send_add_change_intf(vif, iftype, mac_addr,
+ QLINK_CMD_ADD_INTF);
+}
+
+int qtnf_cmd_send_change_intf_type(struct qtnf_vif *vif,
+ enum nl80211_iftype iftype, u8 *mac_addr)
+{
+ return qtnf_cmd_send_add_change_intf(vif, iftype, mac_addr,
+ QLINK_CMD_CHANGE_INTF);
+}
+
+int qtnf_cmd_send_del_intf(struct qtnf_vif *vif)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_manage_intf *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_DEL_INTF,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_manage_intf *)cmd_skb->data;
+ cmd->action = cpu_to_le16(QLINK_CMD_ACTION_SET);
+
+ switch (vif->wdev.iftype) {
+ case NL80211_IFTYPE_AP:
+ cmd->intf_info.if_type = cpu_to_le16(QLINK_IFTYPE_AP);
+ break;
+ case NL80211_IFTYPE_STATION:
+ cmd->intf_info.if_type = cpu_to_le16(QLINK_IFTYPE_STATION);
+ break;
+ default:
+ pr_warn("unsupported iftype %d\n", vif->wdev.iftype);
+ ret = -EINVAL;
+ goto out;
+ }
+
+ eth_zero_addr(cmd->intf_info.mac_addr);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+static int
+qtnf_cmd_resp_proc_hw_info(struct qtnf_bus *bus,
+ const struct qlink_resp_get_hw_info *resp)
+{
+ struct qtnf_hw_info *hwinfo = &bus->hw_info;
+
+ hwinfo->num_mac = resp->num_mac;
+ hwinfo->mac_bitmap = resp->mac_bitmap;
+ hwinfo->fw_ver = le32_to_cpu(resp->fw_ver);
+ hwinfo->ql_proto_ver = le16_to_cpu(resp->ql_proto_ver);
+ memcpy(hwinfo->alpha2_code, resp->alpha2_code,
+ sizeof(hwinfo->alpha2_code));
+ hwinfo->total_tx_chain = resp->total_tx_chain;
+ hwinfo->total_rx_chain = resp->total_rx_chain;
+ hwinfo->hw_capab = le32_to_cpu(resp->hw_capab);
+
+ pr_info("fw_version=%d, MACs map %#x, alpha2=\"%c%c\", chains Tx=%u Rx=%u\n",
+ hwinfo->fw_ver, hwinfo->mac_bitmap,
+ hwinfo->alpha2_code[0], hwinfo->alpha2_code[1],
+ hwinfo->total_tx_chain, hwinfo->total_rx_chain);
+
+ return 0;
+}
+
+static int qtnf_parse_variable_mac_info(struct qtnf_wmac *mac,
+ const u8 *tlv_buf, size_t tlv_buf_size)
+{
+ struct ieee80211_iface_limit *limits = NULL;
+ const struct qlink_iface_limit *limit_record;
+ size_t record_count = 0, rec = 0;
+ u16 tlv_type, tlv_value_len, mask;
+ struct qlink_iface_comb_num *comb;
+ size_t tlv_full_len;
+ const struct qlink_tlv_hdr *tlv;
+
+ mac->macinfo.n_limits = 0;
+
+ tlv = (const struct qlink_tlv_hdr *)tlv_buf;
+ while (tlv_buf_size >= sizeof(struct qlink_tlv_hdr)) {
+ tlv_type = le16_to_cpu(tlv->type);
+ tlv_value_len = le16_to_cpu(tlv->len);
+ tlv_full_len = tlv_value_len + sizeof(struct qlink_tlv_hdr);
+ if (tlv_full_len > tlv_buf_size) {
+ pr_warn("malformed TLV 0x%.2X; LEN: %u\n",
+ tlv_type, tlv_value_len);
+ return -EINVAL;
+ }
+
+ switch (tlv_type) {
+ case QTN_TLV_ID_NUM_IFACE_COMB:
+ if (unlikely(tlv_value_len != sizeof(*comb)))
+ return -EINVAL;
+
+ comb = (void *)tlv->val;
+ record_count = le16_to_cpu(comb->iface_comb_num);
+
+ mac->macinfo.n_limits = record_count;
+ /* free earlier iface limits memory */
+ kfree(mac->macinfo.limits);
+ mac->macinfo.limits =
+ kzalloc(sizeof(*mac->macinfo.limits) *
+ record_count, GFP_KERNEL);
+
+ if (unlikely(!mac->macinfo.limits))
+ return -ENOMEM;
+
+ limits = mac->macinfo.limits;
+ pr_debug("iface limit record count=%zu\n",
+ record_count);
+ break;
+ case QTN_TLV_ID_IFACE_LIMIT:
+ if (unlikely(!limits)) {
+ pr_warn("limits yet not initialized\n");
+ return -EINVAL;
+ }
+ if (unlikely(tlv_value_len != sizeof(*limit_record))) {
+ pr_warn("record size mismatch\n");
+ return -EINVAL;
+ }
+
+ limit_record = (void *)tlv->val;
+ limits[rec].max = le16_to_cpu(limit_record->max_num);
+ mask = le16_to_cpu(limit_record->type_mask);
+ limits[rec].types = qlink_iface_type_mask_to_nl(mask);
+ /* only AP and STA modes are supported */
+ limits[rec].types &= BIT(NL80211_IFTYPE_AP) |
+ BIT(NL80211_IFTYPE_STATION);
+
+ pr_debug("MAX: %u; TYPES: %.4X\n",
+ limits[rec].max, limits[rec].types);
+
+ if (limits[rec].types)
+ rec++;
+ break;
+ default:
+ break;
+ }
+ tlv_buf_size -= tlv_full_len;
+ tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len);
+ }
+ if (tlv_buf_size) {
+ pr_warn("malformed IEs buf; bytes left: %zu\n", tlv_buf_size);
+ return -EINVAL;
+ }
+
+ if (mac->macinfo.n_limits != rec) {
+ pr_err("iface combination mismatch: reported=%zu, parsed=%zu\n",
+ mac->macinfo.n_limits, rec);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static void
+qtnf_cmd_resp_proc_mac_info(struct qtnf_wmac *mac,
+ const struct qlink_resp_get_mac_info *resp_info)
+{
+ struct qtnf_mac_info *mac_info;
+ struct qtnf_vif *vif;
+
+ mac_info = &mac->macinfo;
+
+ mac_info->bands_cap = resp_info->bands_cap;
+ mac_info->phymode_cap = resp_info->phymode_cap;
+ memcpy(&mac_info->dev_mac, &resp_info->dev_mac,
+ sizeof(mac_info->dev_mac));
+
+ ether_addr_copy(mac->macaddr, mac_info->dev_mac);
+
+ vif = qtnf_get_base_vif(mac);
+ if (vif)
+ ether_addr_copy(vif->mac_addr, mac->macaddr);
+ else
+ pr_err("could not get valid base vif\n");
+
+ mac_info->num_tx_chain = resp_info->num_tx_chain;
+ mac_info->num_rx_chain = resp_info->num_rx_chain;
+
+ mac_info->max_ap_assoc_sta = le16_to_cpu(resp_info->max_ap_assoc_sta);
+ mac_info->radar_detect_widths =
+ qlink_chan_width_mask_to_nl(le16_to_cpu(
+ resp_info->radar_detect_widths));
+
+ memcpy(&mac_info->ht_cap, &resp_info->ht_cap, sizeof(mac_info->ht_cap));
+ memcpy(&mac_info->vht_cap, &resp_info->vht_cap,
+ sizeof(mac_info->vht_cap));
+}
+
+static int
+qtnf_cmd_resp_fill_channels_info(struct ieee80211_supported_band *band,
+ struct qlink_resp_get_chan_info *resp,
+ size_t payload_len)
+{
+ u16 tlv_type;
+ size_t tlv_len;
+ const struct qlink_tlv_hdr *tlv;
+ const struct qlink_tlv_channel *qchan;
+ struct ieee80211_channel *chan;
+ unsigned int chidx = 0;
+ u32 qflags;
+
+ kfree(band->channels);
+ band->channels = NULL;
+
+ band->n_channels = resp->num_chans;
+ if (band->n_channels == 0)
+ return 0;
+
+ band->channels = kcalloc(band->n_channels, sizeof(*chan), GFP_KERNEL);
+ if (!band->channels) {
+ band->n_channels = 0;
+ return -ENOMEM;
+ }
+
+ tlv = (struct qlink_tlv_hdr *)resp->info;
+
+ while (payload_len >= sizeof(*tlv)) {
+ tlv_type = le16_to_cpu(tlv->type);
+ tlv_len = le16_to_cpu(tlv->len) + sizeof(*tlv);
+
+ if (tlv_len > payload_len) {
+ pr_warn("malformed TLV 0x%.2X; LEN: %zu\n",
+ tlv_type, tlv_len);
+ goto error_ret;
+ }
+
+ switch (tlv_type) {
+ case QTN_TLV_ID_CHANNEL:
+ if (unlikely(tlv_len != sizeof(*qchan))) {
+ pr_err("invalid channel TLV len %zu\n",
+ tlv_len);
+ goto error_ret;
+ }
+
+ if (chidx == band->n_channels) {
+ pr_err("too many channel TLVs\n");
+ goto error_ret;
+ }
+
+ qchan = (const struct qlink_tlv_channel *)tlv;
+ chan = &band->channels[chidx++];
+ qflags = le32_to_cpu(qchan->flags);
+
+ chan->hw_value = le16_to_cpu(qchan->hw_value);
+ chan->band = band->band;
+ chan->center_freq = le16_to_cpu(qchan->center_freq);
+ chan->max_antenna_gain = (int)qchan->max_antenna_gain;
+ chan->max_power = (int)qchan->max_power;
+ chan->max_reg_power = (int)qchan->max_reg_power;
+ chan->beacon_found = qchan->beacon_found;
+ chan->dfs_cac_ms = le32_to_cpu(qchan->dfs_cac_ms);
+ chan->flags = 0;
+
+ if (qflags & QLINK_CHAN_DISABLED)
+ chan->flags |= IEEE80211_CHAN_DISABLED;
+
+ if (qflags & QLINK_CHAN_NO_IR)
+ chan->flags |= IEEE80211_CHAN_NO_IR;
+
+ if (qflags & QLINK_CHAN_NO_HT40PLUS)
+ chan->flags |= IEEE80211_CHAN_NO_HT40PLUS;
+
+ if (qflags & QLINK_CHAN_NO_HT40MINUS)
+ chan->flags |= IEEE80211_CHAN_NO_HT40MINUS;
+
+ if (qflags & QLINK_CHAN_NO_OFDM)
+ chan->flags |= IEEE80211_CHAN_NO_OFDM;
+
+ if (qflags & QLINK_CHAN_NO_80MHZ)
+ chan->flags |= IEEE80211_CHAN_NO_80MHZ;
+
+ if (qflags & QLINK_CHAN_NO_160MHZ)
+ chan->flags |= IEEE80211_CHAN_NO_160MHZ;
+
+ if (qflags & QLINK_CHAN_INDOOR_ONLY)
+ chan->flags |= IEEE80211_CHAN_INDOOR_ONLY;
+
+ if (qflags & QLINK_CHAN_IR_CONCURRENT)
+ chan->flags |= IEEE80211_CHAN_IR_CONCURRENT;
+
+ if (qflags & QLINK_CHAN_NO_20MHZ)
+ chan->flags |= IEEE80211_CHAN_NO_20MHZ;
+
+ if (qflags & QLINK_CHAN_NO_10MHZ)
+ chan->flags |= IEEE80211_CHAN_NO_10MHZ;
+
+ if (qflags & QLINK_CHAN_RADAR) {
+ chan->flags |= IEEE80211_CHAN_RADAR;
+ chan->dfs_state_entered = jiffies;
+
+ if (qchan->dfs_state == QLINK_DFS_USABLE)
+ chan->dfs_state = NL80211_DFS_USABLE;
+ else if (qchan->dfs_state ==
+ QLINK_DFS_AVAILABLE)
+ chan->dfs_state = NL80211_DFS_AVAILABLE;
+ else
+ chan->dfs_state =
+ NL80211_DFS_UNAVAILABLE;
+ }
+
+ pr_debug("chan=%d flags=%#x max_pow=%d max_reg_pow=%d\n",
+ chan->hw_value, chan->flags, chan->max_power,
+ chan->max_reg_power);
+ break;
+ default:
+ pr_warn("unknown TLV type: %#x\n", tlv_type);
+ break;
+ }
+
+ payload_len -= tlv_len;
+ tlv = (struct qlink_tlv_hdr *)((u8 *)tlv + tlv_len);
+ }
+
+ if (payload_len) {
+ pr_err("malformed IEs buf; bytes left: %zu\n", payload_len);
+ goto error_ret;
+ }
+
+ if (band->n_channels != chidx) {
+ pr_err("channel count mismatch: reported=%d, parsed=%d\n",
+ band->n_channels, chidx);
+ goto error_ret;
+ }
+
+ return 0;
+
+error_ret:
+ kfree(band->channels);
+ band->channels = NULL;
+ band->n_channels = 0;
+
+ return -EINVAL;
+}
+
+static int qtnf_cmd_resp_proc_phy_params(struct qtnf_wmac *mac,
+ const u8 *payload, size_t payload_len)
+{
+ struct qtnf_mac_info *mac_info;
+ struct qlink_tlv_frag_rts_thr *phy_thr;
+ struct qlink_tlv_rlimit *limit;
+ struct qlink_tlv_cclass *class;
+ u16 tlv_type;
+ u16 tlv_value_len;
+ size_t tlv_full_len;
+ const struct qlink_tlv_hdr *tlv;
+
+ mac_info = &mac->macinfo;
+
+ tlv = (struct qlink_tlv_hdr *)payload;
+ while (payload_len >= sizeof(struct qlink_tlv_hdr)) {
+ tlv_type = le16_to_cpu(tlv->type);
+ tlv_value_len = le16_to_cpu(tlv->len);
+ tlv_full_len = tlv_value_len + sizeof(struct qlink_tlv_hdr);
+ if (tlv_full_len > payload_len) {
+ pr_warn("malformed TLV 0x%.2X; LEN: %u\n",
+ tlv_type, tlv_value_len);
+ return -EINVAL;
+ }
+ switch (tlv_type) {
+ case QTN_TLV_ID_FRAG_THRESH:
+ phy_thr = (void *)tlv;
+ mac_info->frag_thr = (u32)le16_to_cpu(phy_thr->thr);
+ break;
+ case QTN_TLV_ID_RTS_THRESH:
+ phy_thr = (void *)tlv;
+ mac_info->rts_thr = (u32)le16_to_cpu(phy_thr->thr);
+ break;
+ case QTN_TLV_ID_SRETRY_LIMIT:
+ limit = (void *)tlv;
+ mac_info->sretry_limit = limit->rlimit;
+ break;
+ case QTN_TLV_ID_LRETRY_LIMIT:
+ limit = (void *)tlv;
+ mac_info->lretry_limit = limit->rlimit;
+ break;
+ case QTN_TLV_ID_COVERAGE_CLASS:
+ class = (void *)tlv;
+ mac_info->coverage_class = class->cclass;
+ break;
+ default:
+ pr_err("Unknown TLV type: %#x\n",
+ le16_to_cpu(tlv->type));
+ break;
+ }
+ payload_len -= tlv_full_len;
+ tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len);
+ }
+
+ if (payload_len) {
+ pr_warn("malformed IEs buf; bytes left: %zu\n", payload_len);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+int qtnf_cmd_get_mac_info(struct qtnf_wmac *mac)
+{
+ struct sk_buff *cmd_skb, *resp_skb = NULL;
+ const struct qlink_resp_get_mac_info *resp;
+ size_t var_data_len;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD,
+ QLINK_CMD_MAC_INFO,
+ sizeof(struct qlink_cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(mac->bus);
+
+ ret = qtnf_cmd_send_with_reply(mac->bus, cmd_skb, &resp_skb, &res_code,
+ sizeof(*resp), &var_data_len);
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ resp = (const struct qlink_resp_get_mac_info *)resp_skb->data;
+ qtnf_cmd_resp_proc_mac_info(mac, resp);
+ ret = qtnf_parse_variable_mac_info(mac, resp->var_info, var_data_len);
+
+out:
+ qtnf_bus_unlock(mac->bus);
+ consume_skb(resp_skb);
+
+ return ret;
+}
+
+int qtnf_cmd_get_hw_info(struct qtnf_bus *bus)
+{
+ struct sk_buff *cmd_skb, *resp_skb = NULL;
+ const struct qlink_resp_get_hw_info *resp;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(QLINK_MACID_RSVD, QLINK_VIFID_RSVD,
+ QLINK_CMD_GET_HW_INFO,
+ sizeof(struct qlink_cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(bus);
+
+ ret = qtnf_cmd_send_with_reply(bus, cmd_skb, &resp_skb, &res_code,
+ sizeof(*resp), NULL);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ resp = (const struct qlink_resp_get_hw_info *)resp_skb->data;
+ ret = qtnf_cmd_resp_proc_hw_info(bus, resp);
+
+out:
+ qtnf_bus_unlock(bus);
+ consume_skb(resp_skb);
+
+ return ret;
+}
+
+int qtnf_cmd_get_mac_chan_info(struct qtnf_wmac *mac,
+ struct ieee80211_supported_band *band)
+{
+ struct sk_buff *cmd_skb, *resp_skb = NULL;
+ size_t info_len;
+ struct qlink_cmd_chans_info_get *cmd;
+ struct qlink_resp_get_chan_info *resp;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+ u8 qband;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, 0,
+ QLINK_CMD_CHANS_INFO_GET,
+ sizeof(*cmd));
+ if (!cmd_skb)
+ return -ENOMEM;
+
+ switch (band->band) {
+ case NL80211_BAND_2GHZ:
+ qband = QLINK_BAND_2GHZ;
+ break;
+ case NL80211_BAND_5GHZ:
+ qband = QLINK_BAND_5GHZ;
+ break;
+ case NL80211_BAND_60GHZ:
+ qband = QLINK_BAND_60GHZ;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ cmd = (struct qlink_cmd_chans_info_get *)cmd_skb->data;
+ cmd->band = qband;
+ ret = qtnf_cmd_send_with_reply(mac->bus, cmd_skb, &resp_skb, &res_code,
+ sizeof(*resp), &info_len);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ resp = (struct qlink_resp_get_chan_info *)resp_skb->data;
+ if (resp->band != qband) {
+ pr_err("reply band %u != cmd band %u\n", resp->band, qband);
+ ret = -EINVAL;
+ goto out;
+ }
+
+ ret = qtnf_cmd_resp_fill_channels_info(band, resp, info_len);
+
+out:
+ consume_skb(resp_skb);
+
+ return ret;
+}
+
+int qtnf_cmd_send_get_phy_params(struct qtnf_wmac *mac)
+{
+ struct sk_buff *cmd_skb, *resp_skb = NULL;
+ size_t response_size;
+ struct qlink_resp_phy_params *resp;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, 0,
+ QLINK_CMD_PHY_PARAMS,
+ sizeof(struct qlink_cmd));
+ if (!cmd_skb)
+ return -ENOMEM;
+
+ qtnf_bus_lock(mac->bus);
+
+ qtnf_cmd_skb_put_action(cmd_skb, QLINK_CMD_ACTION_GET);
+ ret = qtnf_cmd_send_with_reply(mac->bus, cmd_skb, &resp_skb, &res_code,
+ sizeof(*resp), &response_size);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+ resp = (struct qlink_resp_phy_params *)resp_skb->data;
+ ret = qtnf_cmd_resp_proc_phy_params(mac, resp->info, response_size);
+
+out:
+ qtnf_bus_unlock(mac->bus);
+ consume_skb(resp_skb);
+
+ return ret;
+}
+
+int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u16 cmd_action,
+ u32 changed)
+{
+ struct wiphy *wiphy = priv_to_wiphy(mac);
+ struct sk_buff *cmd_skb;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, 0,
+ QLINK_CMD_PHY_PARAMS,
+ sizeof(struct qlink_cmd));
+ if (!cmd_skb)
+ return -ENOMEM;
+
+ qtnf_bus_lock(mac->bus);
+
+ qtnf_cmd_skb_put_action(cmd_skb, cmd_action);
+
+ if (changed & WIPHY_PARAM_FRAG_THRESHOLD)
+ qtnf_cmd_skb_put_tlv_u16(cmd_skb, QTN_TLV_ID_FRAG_THRESH,
+ wiphy->frag_threshold);
+ if (changed & WIPHY_PARAM_RTS_THRESHOLD)
+ qtnf_cmd_skb_put_tlv_u16(cmd_skb, QTN_TLV_ID_RTS_THRESH,
+ wiphy->rts_threshold);
+ if (changed & WIPHY_PARAM_COVERAGE_CLASS)
+ qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_COVERAGE_CLASS,
+ wiphy->coverage_class);
+
+ ret = qtnf_cmd_send(mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_init_fw(struct qtnf_bus *bus)
+{
+ struct sk_buff *cmd_skb;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(QLINK_MACID_RSVD, QLINK_VIFID_RSVD,
+ QLINK_CMD_FW_INIT,
+ sizeof(struct qlink_cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(bus);
+
+ ret = qtnf_cmd_send(bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(bus);
+ return ret;
+}
+EXPORT_SYMBOL_GPL(qtnf_cmd_send_init_fw);
+
+int qtnf_cmd_send_add_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
+ const u8 *mac_addr, struct key_params *params)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_add_key *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_ADD_KEY,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_add_key *)cmd_skb->data;
+
+ if (mac_addr)
+ ether_addr_copy(cmd->addr, mac_addr);
+ else
+ eth_broadcast_addr(cmd->addr);
+
+ cmd->cipher = cpu_to_le32(params->cipher);
+ cmd->key_index = key_index;
+ cmd->pairwise = pairwise;
+
+ if (params->key && params->key_len > 0)
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_KEY,
+ params->key,
+ params->key_len);
+
+ if (params->seq && params->seq_len > 0)
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_SEQ,
+ params->seq,
+ params->seq_len);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_del_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
+ const u8 *mac_addr)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_del_key *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_DEL_KEY,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_del_key *)cmd_skb->data;
+
+ if (mac_addr)
+ ether_addr_copy(cmd->addr, mac_addr);
+ else
+ eth_broadcast_addr(cmd->addr);
+
+ cmd->key_index = key_index;
+ cmd->pairwise = pairwise;
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_set_default_key(struct qtnf_vif *vif, u8 key_index,
+ bool unicast, bool multicast)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_set_def_key *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_SET_DEFAULT_KEY,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_set_def_key *)cmd_skb->data;
+ cmd->key_index = key_index;
+ cmd->unicast = unicast;
+ cmd->multicast = multicast;
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_set_default_mgmt_key(struct qtnf_vif *vif, u8 key_index)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_set_def_mgmt_key *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_SET_DEFAULT_MGMT_KEY,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_set_def_mgmt_key *)cmd_skb->data;
+ cmd->key_index = key_index;
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+static u32 qtnf_encode_sta_flags(u32 flags)
+{
+ u32 code = 0;
+
+ if (flags & BIT(NL80211_STA_FLAG_AUTHORIZED))
+ code |= QLINK_STA_FLAG_AUTHORIZED;
+ if (flags & BIT(NL80211_STA_FLAG_SHORT_PREAMBLE))
+ code |= QLINK_STA_FLAG_SHORT_PREAMBLE;
+ if (flags & BIT(NL80211_STA_FLAG_WME))
+ code |= QLINK_STA_FLAG_WME;
+ if (flags & BIT(NL80211_STA_FLAG_MFP))
+ code |= QLINK_STA_FLAG_MFP;
+ if (flags & BIT(NL80211_STA_FLAG_AUTHENTICATED))
+ code |= QLINK_STA_FLAG_AUTHENTICATED;
+ if (flags & BIT(NL80211_STA_FLAG_TDLS_PEER))
+ code |= QLINK_STA_FLAG_TDLS_PEER;
+ if (flags & BIT(NL80211_STA_FLAG_ASSOCIATED))
+ code |= QLINK_STA_FLAG_ASSOCIATED;
+ return code;
+}
+
+int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac,
+ struct station_parameters *params)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_change_sta *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_CHANGE_STA,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_change_sta *)cmd_skb->data;
+ ether_addr_copy(cmd->sta_addr, mac);
+ cmd->sta_flags_mask = cpu_to_le32(qtnf_encode_sta_flags(
+ params->sta_flags_mask));
+ cmd->sta_flags_set = cpu_to_le32(qtnf_encode_sta_flags(
+ params->sta_flags_set));
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_del_sta(struct qtnf_vif *vif,
+ struct station_del_parameters *params)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_del_sta *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret = 0;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_DEL_STA,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_del_sta *)cmd_skb->data;
+
+ if (params->mac)
+ ether_addr_copy(cmd->sta_addr, params->mac);
+ else
+ eth_broadcast_addr(cmd->sta_addr); /* flush all stations */
+
+ cmd->subtype = params->subtype;
+ cmd->reason_code = cpu_to_le16(params->reason_code);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_scan(struct qtnf_wmac *mac)
+{
+ struct sk_buff *cmd_skb;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ struct ieee80211_channel *sc;
+ struct cfg80211_scan_request *scan_req = mac->scan_req;
+ struct qlink_tlv_channel *qchan;
+ int n_channels;
+ int count = 0;
+ int ret;
+ u32 flags;
+
+ if (scan_req->n_ssids > QTNF_MAX_SSID_LIST_LENGTH) {
+ pr_err("too many SSIDs in scan request\n");
+ return -EINVAL;
+ }
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD,
+ QLINK_CMD_SCAN,
+ sizeof(struct qlink_cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(mac->bus);
+
+ if (scan_req->n_ssids != 0) {
+ while (count < scan_req->n_ssids) {
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, WLAN_EID_SSID,
+ scan_req->ssids[count].ssid,
+ scan_req->ssids[count].ssid_len);
+ count++;
+ }
+ }
+
+ if (scan_req->ie_len != 0)
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_IE_SET,
+ scan_req->ie,
+ scan_req->ie_len);
+
+ if (scan_req->n_channels) {
+ n_channels = scan_req->n_channels;
+ count = 0;
+
+ while (n_channels != 0) {
+ sc = scan_req->channels[count];
+ if (sc->flags & IEEE80211_CHAN_DISABLED) {
+ n_channels--;
+ continue;
+ }
+
+ pr_debug("scan chan=%d, freq=%d, flags=%#x\n",
+ sc->hw_value, sc->center_freq, sc->flags);
+ qchan = (struct qlink_tlv_channel *)
+ skb_put(cmd_skb, sizeof(*qchan));
+ memset(qchan, 0, sizeof(*qchan));
+ flags = 0;
+
+ qchan->hdr.type = cpu_to_le16(QTN_TLV_ID_CHANNEL);
+ qchan->hdr.len = cpu_to_le16(sizeof(*qchan) -
+ sizeof(struct qlink_tlv_hdr));
+ qchan->center_freq = cpu_to_le16(sc->center_freq);
+ qchan->hw_value = cpu_to_le16(sc->hw_value);
+
+ if (sc->flags & IEEE80211_CHAN_NO_IR)
+ flags |= QLINK_CHAN_NO_IR;
+
+ if (sc->flags & IEEE80211_CHAN_RADAR)
+ flags |= QLINK_CHAN_RADAR;
+
+ qchan->flags = cpu_to_le32(flags);
+ n_channels--;
+ count++;
+ }
+ }
+
+ ret = qtnf_cmd_send(mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ pr_debug("scan started on mac(%u)\n", mac->macid);
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+out:
+ qtnf_bus_unlock(mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_connect(struct qtnf_vif *vif,
+ struct cfg80211_connect_params *sme)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_connect *cmd;
+ struct qtnf_bss_config *bss_cfg = &vif->bss_cfg;
+ struct qlink_auth_encr aen;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+ int i;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_CONNECT,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_connect *)cmd_skb->data;
+
+ ether_addr_copy(cmd->bssid, bss_cfg->bssid);
+
+ if (bss_cfg->chandef.chan)
+ cmd->freq = cpu_to_le16(bss_cfg->chandef.chan->center_freq);
+
+ cmd->bg_scan_period = cpu_to_le16(bss_cfg->bg_scan_period);
+
+ memset(&aen, 0, sizeof(aen));
+ aen.auth_type = bss_cfg->auth_type;
+ aen.privacy = !!bss_cfg->privacy;
+ aen.mfp = bss_cfg->mfp;
+ aen.wpa_versions = cpu_to_le32(bss_cfg->crypto.wpa_versions);
+ aen.cipher_group = cpu_to_le32(bss_cfg->crypto.cipher_group);
+ aen.n_ciphers_pairwise = cpu_to_le32(
+ bss_cfg->crypto.n_ciphers_pairwise);
+
+ for (i = 0; i < QLINK_MAX_NR_CIPHER_SUITES; i++)
+ aen.ciphers_pairwise[i] = cpu_to_le32(
+ bss_cfg->crypto.ciphers_pairwise[i]);
+
+ aen.n_akm_suites = cpu_to_le32(bss_cfg->crypto.n_akm_suites);
+
+ for (i = 0; i < QLINK_MAX_NR_AKM_SUITES; i++)
+ aen.akm_suites[i] = cpu_to_le32(
+ bss_cfg->crypto.akm_suites[i]);
+
+ aen.control_port = bss_cfg->crypto.control_port;
+ aen.control_port_no_encrypt =
+ bss_cfg->crypto.control_port_no_encrypt;
+ aen.control_port_ethertype = cpu_to_le16(be16_to_cpu(
+ bss_cfg->crypto.control_port_ethertype));
+
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, WLAN_EID_SSID, bss_cfg->ssid,
+ bss_cfg->ssid_len);
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_CRYPTO, (u8 *)&aen,
+ sizeof(aen));
+
+ if (sme->ie_len != 0)
+ qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_IE_SET,
+ sme->ie,
+ sme->ie_len);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_disconnect(struct qtnf_vif *vif, u16 reason_code)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_disconnect *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_DISCONNECT,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ qtnf_bus_lock(vif->mac->bus);
+
+ cmd = (struct qlink_cmd_disconnect *)cmd_skb->data;
+ cmd->reason = cpu_to_le16(reason_code);
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+out:
+ qtnf_bus_unlock(vif->mac->bus);
+ return ret;
+}
+
+int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif, bool up)
+{
+ struct sk_buff *cmd_skb;
+ struct qlink_cmd_updown *cmd;
+ u16 res_code = QLINK_CMD_RESULT_OK;
+ int ret;
+
+ cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
+ QLINK_CMD_UPDOWN_INTF,
+ sizeof(*cmd));
+ if (unlikely(!cmd_skb))
+ return -ENOMEM;
+
+ cmd = (struct qlink_cmd_updown *)cmd_skb->data;
+ cmd->if_up = !!up;
+
+ ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);
+
+ if (unlikely(ret))
+ goto out;
+
+ if (unlikely(res_code != QLINK_CMD_RESULT_OK)) {
+ pr_err("cmd exec failed: 0x%.4X\n", res_code);
+ ret = -EFAULT;
+ goto out;
+ }
+out:
+ return ret;
+}
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.h b/drivers/net/wireless/quantenna/qtnfmac/commands.h
new file mode 100644
index 0000000..1467779
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/commands.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2016 Quantenna Communications, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef QLINK_COMMANDS_H_
+#define QLINK_COMMANDS_H_
+
+#include <linux/nl80211.h>
+
+#include "core.h"
+#include "bus.h"
+
+int qtnf_cmd_send_init_fw(struct qtnf_bus *bus);
+int qtnf_cmd_get_hw_info(struct qtnf_bus *bus);
+int qtnf_cmd_get_mac_info(struct qtnf_wmac *mac);
+int qtnf_cmd_send_add_intf(struct qtnf_vif *vif, enum nl80211_iftype iftype,
+ u8 *mac_addr);
+int qtnf_cmd_send_change_intf_type(struct qtnf_vif *vif,
+ enum nl80211_iftype iftype, u8 *mac_addr);
+int qtnf_cmd_send_del_intf(struct qtnf_vif *vif);
+int qtnf_cmd_get_mac_chan_info(struct qtnf_wmac *mac,
+ struct ieee80211_supported_band *band);
+int qtnf_cmd_send_regulatory_config(struct qtnf_wmac *mac, u16 action,
+ const char *alpha2);
+int qtnf_cmd_send_config_ap(struct qtnf_vif *vif);
+int qtnf_cmd_send_start_ap(struct qtnf_vif *vif);
+int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif);
+int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg);
+int qtnf_cmd_send_mgmt_frame(struct qtnf_vif *vif, u32 cookie, u16 flags,
+ u16 freq, const u8 *buf, size_t len);
+int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type,
+ const u8 *buf, size_t len);
+int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac,
+ struct station_info *sinfo);
+int qtnf_cmd_send_phy_params(struct qtnf_wmac *mac, u16 cmd_action,
+ void *data_buf);
+int qtnf_cmd_send_add_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
+ const u8 *mac_addr, struct key_params *params);
+int qtnf_cmd_send_del_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
+ const u8 *mac_addr);
+int qtnf_cmd_send_set_default_key(struct qtnf_vif *vif, u8 key_index,
+ bool unicast, bool multicast);
+int qtnf_cmd_send_set_default_mgmt_key(struct qtnf_vif *vif, u8 key_index);
+int qtnf_cmd_send_add_sta(struct qtnf_vif *vif, const u8 *mac,
+ struct station_parameters *params);
+int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac,
+ struct station_parameters *params);
+int qtnf_cmd_send_del_sta(struct qtnf_vif *vif,
+ struct station_del_parameters *params);
+
+int qtnf_cmd_resp_parse(struct qtnf_bus *bus, struct sk_buff *resp_skb);
+int qtnf_cmd_resp_check(const struct qtnf_vif *vif,
+ const struct sk_buff *resp_skb, u16 cmd_id,
+ u16 *result, const u8 **payload, size_t *payload_size);
+int qtnf_cmd_send_scan(struct qtnf_wmac *mac);
+int qtnf_cmd_send_connect(struct qtnf_vif *vif,
+ struct cfg80211_connect_params *sme);
+int qtnf_cmd_send_disconnect(struct qtnf_vif *vif,
+ u16 reason_code);
+int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif,
+ bool up);
+
+#endif /* QLINK_COMMANDS_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c
new file mode 100644
index 0000000..7669a00
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/core.c
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/if_vlan.h>
+#include <linux/if_ether.h>
+
+#include "core.h"
+#include "bus.h"
+
+#define QTNF_DMP_MAX_LEN 48
+
+struct qtnf_frame_meta_info {
+ u8 magic_s;
+ u8 ifidx;
+ u8 macid;
+ u8 magic_e;
+} __packed;
+
+static inline int qtnf_is_frame_meta_magic_valid(struct qtnf_frame_meta_info *m)
+{
+ return m->magic_s == 0xAB && m->magic_e == 0xBA;
+}
+
+struct qtnf_wmac *qtnf_core_get_mac(const struct qtnf_bus *bus, u8 macid)
+{
+ struct qtnf_wmac *mac = NULL;
+
+ if (unlikely(macid >= QTNF_MAX_MAC)) {
+ pr_err("received invalid mac(%u)\n", macid);
+ return NULL;
+ }
+
+ mac = bus->mac[macid];
+
+ if (unlikely(!mac) || unlikely(!mac->mac_started)) {
+ pr_err("mac(%u) not initialized\n", macid);
+ return NULL;
+ }
+
+ return mac;
+}
+
+struct net_device *qtnf_classify_skb(struct qtnf_bus *bus, struct sk_buff *skb)
+{
+ struct qtnf_frame_meta_info *meta;
+ struct net_device *ndev = NULL;
+ struct qtnf_wmac *mac;
+ struct qtnf_vif *vif;
+
+ meta = (struct qtnf_frame_meta_info *)
+ (skb_tail_pointer(skb) - sizeof(*meta));
+
+ if (unlikely(!qtnf_is_frame_meta_magic_valid(meta))) {
+ pr_err_ratelimited("invalid magic 0x%x:0x%x\n",
+ meta->magic_s, meta->magic_e);
+ goto out;
+ }
+
+ if (unlikely(meta->macid >= QTNF_MAX_MAC)) {
+ pr_err_ratelimited("invalid mac(%u)\n", meta->macid);
+ goto out;
+ }
+
+ if (unlikely(meta->ifidx >= QTNF_MAX_INTF)) {
+ pr_err_ratelimited("invalid vif(%u)\n", meta->ifidx);
+ goto out;
+ }
+
+ mac = bus->mac[meta->macid];
+
+ if (unlikely(!mac)) {
+ pr_err_ratelimited("mac(%d) does not exist\n", meta->macid);
+ goto out;
+ }
+
+ vif = &mac->iflist[meta->ifidx];
+
+ if (unlikely(vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)) {
+ pr_err_ratelimited("vif(%u) does not exists\n", meta->ifidx);
+ goto out;
+ }
+
+ ndev = vif->netdev;
+
+ if (unlikely(!ndev)) {
+ pr_err_ratelimited("netdev for wlan%u.%u does not exists\n",
+ meta->macid, meta->ifidx);
+ goto out;
+ }
+
+ __skb_trim(skb, skb->len - sizeof(*meta));
+
+ pr_debug("packet received from mac/vif = %d/%d\n",
+ meta->macid, meta->ifidx);
+
+out:
+ return ndev;
+}
+EXPORT_SYMBOL_GPL(qtnf_classify_skb);
+
+/* Netdev handler for open.
+ */
+static int qtnf_netdev_open(struct net_device *ndev)
+{
+ netif_carrier_off(ndev);
+ qtnf_netdev_updown(ndev, 1);
+ return 0;
+}
+
+/* Netdev handler for close.
+ */
+static int qtnf_netdev_close(struct net_device *ndev)
+{
+ netif_carrier_off(ndev);
+ qtnf_virtual_intf_cleanup(ndev);
+ qtnf_netdev_updown(ndev, 0);
+ return 0;
+}
+
+/* Netdev handler for data transmission.
+ */
+static int
+qtnf_netdev_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+{
+ struct qtnf_vif *vif;
+ struct qtnf_wmac *mac;
+
+ vif = qtnf_netdev_get_priv(ndev);
+
+ if (unlikely(skb->dev != ndev)) {
+ pr_err_ratelimited("invalid skb->dev");
+ dev_kfree_skb_any(skb);
+ return 0;
+ }
+
+ if (unlikely(vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)) {
+ pr_err_ratelimited("unsupported vif type (%d)\n",
+ vif->wdev.iftype);
+ dev_kfree_skb_any(skb);
+ return 0;
+ }
+
+ mac = vif->mac;
+ if (unlikely(!mac)) {
+ pr_err_ratelimited("NULL mac pointer");
+ dev_kfree_skb_any(skb);
+ return 0;
+ }
+
+ if (!skb->len || (skb->len > ETH_FRAME_LEN)) {
+ pr_err_ratelimited("invalid skb len %d\n", skb->len);
+ dev_kfree_skb_any(skb);
+ ndev->stats.tx_dropped++;
+ return 0;
+ }
+
+ /* tx path is enabled: reset vif timeout */
+ vif->cons_tx_timeout_cnt = 0;
+
+ return qtnf_bus_data_tx(mac->bus, skb);
+}
+
+/* Netdev handler for getting stats.
+ */
+static struct net_device_stats *qtnf_netdev_get_stats(struct net_device *dev)
+{
+ return &dev->stats;
+}
+
+/* Netdev handler for transmission timeout.
+ */
+static void qtnf_netdev_tx_timeout(struct net_device *ndev)
+{
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev);
+ struct qtnf_wmac *mac;
+ struct qtnf_bus *bus;
+
+ if (unlikely(!vif || !vif->mac || !vif->mac->bus))
+ return;
+
+ mac = vif->mac;
+ bus = mac->bus;
+
+ pr_warn("Tx timeout- %lu, mac/vif = %d/%d\n",
+ jiffies, mac->macid, vif->vifid);
+
+ qtnf_bus_data_tx_timeout(bus, ndev);
+ ndev->stats.tx_errors++;
+
+ if (++vif->cons_tx_timeout_cnt > QTNF_TX_TIMEOUT_TRSHLD) {
+ pr_err("Tx timeout threshold exceeded !\n");
+ pr_err("schedule interface %s reset !\n", netdev_name(ndev));
+ queue_work(bus->workqueue, &vif->reset_work);
+ }
+}
+
+/* Network device ops handlers */
+const struct net_device_ops qtnf_netdev_ops = {
+ .ndo_open = qtnf_netdev_open,
+ .ndo_stop = qtnf_netdev_close,
+ .ndo_start_xmit = qtnf_netdev_hard_start_xmit,
+ .ndo_tx_timeout = qtnf_netdev_tx_timeout,
+ .ndo_get_stats = qtnf_netdev_get_stats,
+};
+
+static int __init qtnf_module_init(void)
+{
+ return 0;
+}
+
+static void __exit qtnf_module_exit(void)
+{
+}
+
+module_init(qtnf_module_init);
+module_exit(qtnf_module_exit);
+
+MODULE_AUTHOR("Quantenna Communications");
+MODULE_DESCRIPTION("Quantenna 802.11 wireless LAN FullMAC driver.");
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h
new file mode 100644
index 0000000..e95a947
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/core.h
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_CORE_H_
+#define _QTN_FMAC_CORE_H_
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/semaphore.h>
+#include <linux/ip.h>
+#include <linux/skbuff.h>
+#include <linux/if_arp.h>
+#include <linux/etherdevice.h>
+#include <net/sock.h>
+#include <net/lib80211.h>
+#include <net/cfg80211.h>
+#include <linux/vmalloc.h>
+#include <linux/firmware.h>
+#include <linux/ctype.h>
+#include <linux/workqueue.h>
+#include <linux/slab.h>
+
+#include "qlink.h"
+#include "trans.h"
+
+#undef pr_fmt
+#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__
+
+#define QTNF_MAX_SSID_LIST_LENGTH 2
+#define QTNF_MAX_VSIE_LEN 255
+#define QTNF_MAX_ALPHA_LEN 2
+#define QTNF_MAX_INTF 8
+#define QTNF_MAX_EVENT_QUEUE_LEN 255
+#define QTNF_DEFAULT_BG_SCAN_PERIOD 300
+#define QTNF_MAX_BG_SCAN_PERIOD 0xffff
+
+#define QTNF_DEF_BSS_PRIORITY 0
+#define QTNF_DEF_WDOG_TIMEOUT 5
+#define QTNF_TX_TIMEOUT_TRSHLD 100
+
+#define QTNF_STATE_AP_CONFIG BIT(2)
+#define QTNF_STATE_AP_START BIT(1)
+
+extern const struct net_device_ops qtnf_netdev_ops;
+struct qtnf_bus;
+struct qtnf_vif;
+
+struct qtnf_bss_config {
+ u8 ssid[IEEE80211_MAX_SSID_LEN];
+ u8 bssid[ETH_ALEN];
+ size_t ssid_len;
+ u8 dtim;
+ u16 bcn_period;
+ u16 auth_type;
+ bool privacy;
+ enum nl80211_mfp mfp;
+ struct cfg80211_chan_def chandef;
+ struct cfg80211_crypto_settings crypto;
+ u16 bg_scan_period;
+ u32 connect_flags;
+};
+
+struct qtnf_sta_node {
+ struct list_head list;
+ u8 mac_addr[ETH_ALEN];
+};
+
+struct qtnf_sta_list {
+ struct list_head head;
+ atomic_t size;
+};
+
+enum qtnf_sta_state {
+ QTNF_STA_DISCONNECTED,
+ QTNF_STA_CONNECTING,
+ QTNF_STA_CONNECTED
+};
+
+struct qtnf_vif {
+ struct wireless_dev wdev;
+ u8 vifid;
+ u8 bss_priority;
+ u8 bss_status;
+ enum qtnf_sta_state sta_state;
+ u16 mgmt_frames_bitmask;
+ struct net_device *netdev;
+ struct qtnf_wmac *mac;
+ u8 mac_addr[ETH_ALEN];
+ struct work_struct reset_work;
+ struct qtnf_bss_config bss_cfg;
+ struct qtnf_sta_list sta_list;
+ unsigned long cons_tx_timeout_cnt;
+};
+
+struct qtnf_mac_info {
+ u8 bands_cap;
+ u8 phymode_cap;
+ u8 dev_mac[ETH_ALEN];
+ u8 num_tx_chain;
+ u8 num_rx_chain;
+ u16 max_ap_assoc_sta;
+ u32 frag_thr;
+ u32 rts_thr;
+ u8 lretry_limit;
+ u8 sretry_limit;
+ u8 coverage_class;
+ u8 radar_detect_widths;
+ struct ieee80211_ht_cap ht_cap;
+ struct ieee80211_vht_cap vht_cap;
+ struct ieee80211_iface_limit *limits;
+ size_t n_limits;
+};
+
+struct qtnf_wmac {
+ u8 macid;
+ u8 mac_started;
+ u8 wiphy_registered;
+ struct qtnf_bus *bus;
+ u8 macaddr[ETH_ALEN];
+ struct qtnf_mac_info macinfo;
+ struct qtnf_vif iflist[QTNF_MAX_INTF];
+ struct cfg80211_scan_request *scan_req;
+};
+
+struct qtnf_hw_info {
+ u8 num_mac;
+ u8 mac_bitmap;
+ u8 alpha2_code[QTNF_MAX_ALPHA_LEN];
+ u32 fw_ver;
+ u16 ql_proto_ver;
+ u8 total_tx_chain;
+ u8 total_rx_chain;
+ u32 hw_capab;
+};
+
+struct qtnf_vif *qtnf_get_free_vif(struct qtnf_wmac *mac);
+struct qtnf_vif *qtnf_get_base_vif(struct qtnf_wmac *mac);
+struct wiphy *qtnf_allocate_wiphy(struct qtnf_bus *bus);
+int qtnf_net_attach(struct qtnf_wmac *mac, struct qtnf_vif *priv,
+ const char *name, unsigned char name_assign_type,
+ enum nl80211_iftype iftype);
+void qtnf_main_work_queue(struct work_struct *work);
+int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u16 cmd_action,
+ u32 changed);
+int qtnf_cmd_send_get_phy_params(struct qtnf_wmac *mac);
+
+struct qtnf_wmac *qtnf_core_get_mac(const struct qtnf_bus *bus, u8 macid);
+struct net_device *qtnf_classify_skb(struct qtnf_bus *bus, struct sk_buff *skb);
+struct net_device *qtnf_classify_skb_no_mbss(struct qtnf_bus *bus,
+ struct sk_buff *skb);
+
+void qtnf_virtual_intf_cleanup(struct net_device *ndev);
+
+void qtnf_netdev_updown(struct net_device *ndev, bool up);
+
+static inline struct qtnf_vif *qtnf_netdev_get_priv(struct net_device *dev)
+{
+ return (struct qtnf_vif *)(*(unsigned long *)netdev_priv(dev));
+}
+
+#endif /* _QTN_FMAC_CORE_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/debug.c b/drivers/net/wireless/quantenna/qtnfmac/debug.c
new file mode 100644
index 0000000..9f826b9
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/debug.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include "debug.h"
+
+#undef pr_fmt
+#define pr_fmt(fmt) "qtnfmac dbg: %s: " fmt, __func__
+
+void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name)
+{
+ bus->dbg_dir = debugfs_create_dir(name, NULL);
+
+ if (IS_ERR_OR_NULL(bus->dbg_dir)) {
+ pr_warn("failed to create debugfs root dir\n");
+ bus->dbg_dir = NULL;
+ }
+}
+
+void qtnf_debugfs_remove(struct qtnf_bus *bus)
+{
+ debugfs_remove_recursive(bus->dbg_dir);
+ bus->dbg_dir = NULL;
+}
+
+void qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name,
+ int (*fn)(struct seq_file *seq, void *data))
+{
+ struct dentry *entry;
+
+ entry = debugfs_create_devm_seqfile(bus->dev, name, bus->dbg_dir, fn);
+ if (IS_ERR_OR_NULL(entry))
+ pr_warn("failed to add entry (%s)\n", name);
+}
diff --git a/drivers/net/wireless/quantenna/qtnfmac/debug.h b/drivers/net/wireless/quantenna/qtnfmac/debug.h
new file mode 100644
index 0000000..d6dd12b5
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/debug.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_DEBUG_H_
+#define _QTN_FMAC_DEBUG_H_
+
+#include <linux/debugfs.h>
+
+#include "core.h"
+#include "bus.h"
+
+#ifdef CONFIG_DEBUG_FS
+
+void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name);
+void qtnf_debugfs_remove(struct qtnf_bus *bus);
+void qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name,
+ int (*fn)(struct seq_file *seq, void *data));
+
+#else
+
+static inline void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name)
+{
+}
+
+static inline void qtnf_debugfs_remove(struct qtnf_bus *bus)
+{
+}
+
+static inline void
+qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name,
+ int (*fn)(struct seq_file *seq, void *data))
+{
+}
+
+#endif /* CONFIG_DEBUG_FS */
+
+#endif /* _QTN_FMAC_DEBUG_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c
new file mode 100644
index 0000000..7bbb0b8
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/event.c
@@ -0,0 +1,438 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+
+#include "cfg80211.h"
+#include "core.h"
+#include "qlink.h"
+#include "bus.h"
+#include "trans.h"
+#include "util.h"
+#include "event.h"
+
+static int
+qtnf_event_handle_sta_assoc(struct qtnf_wmac *mac, struct qtnf_vif *vif,
+ const struct qlink_event_sta_assoc *sta_assoc,
+ u16 len)
+{
+ const u8 *sta_addr;
+ u16 frame_control;
+ struct station_info sinfo = { 0 };
+ size_t payload_len;
+ u16 tlv_type;
+ u16 tlv_value_len;
+ size_t tlv_full_len;
+ const struct qlink_tlv_hdr *tlv;
+
+ if (unlikely(len < sizeof(*sta_assoc))) {
+ pr_err("payload is too short (%u < %zu)\n",
+ len, sizeof(*sta_assoc));
+ return -EINVAL;
+ }
+
+ if (vif->wdev.iftype != NL80211_IFTYPE_AP) {
+ pr_err("STA_ASSOC event when not in AP mode\n");
+ return -EPROTO;
+ }
+
+ if (!(vif->bss_status & QTNF_STATE_AP_START)) {
+ pr_err("STA_ASSOC event when AP is not started\n");
+ return -EPROTO;
+ }
+
+ sta_addr = sta_assoc->sta_addr;
+ frame_control = le16_to_cpu(sta_assoc->frame_control);
+
+ pr_debug("MAC:%pM FC:%x\n", sta_addr, frame_control);
+
+ qtnf_sta_list_add(&vif->sta_list, sta_addr);
+
+ sinfo.assoc_req_ies = NULL;
+ sinfo.assoc_req_ies_len = 0;
+
+ payload_len = len - sizeof(*sta_assoc);
+ tlv = (struct qlink_tlv_hdr *)sta_assoc->ies;
+
+ while (payload_len >= sizeof(struct qlink_tlv_hdr)) {
+ tlv_type = le16_to_cpu(tlv->type);
+ tlv_value_len = le16_to_cpu(tlv->len);
+ tlv_full_len = tlv_value_len + sizeof(struct qlink_tlv_hdr);
+
+ if (tlv_full_len > payload_len) {
+ pr_warn("malformed TLV 0x%.2X; LEN: %u\n",
+ tlv_type, tlv_value_len);
+ return -EINVAL;
+ }
+
+ if (tlv_type == QTN_TLV_ID_IE_SET) {
+ sinfo.assoc_req_ies = tlv->val;
+ sinfo.assoc_req_ies_len = tlv_value_len;
+ }
+
+ payload_len -= tlv_full_len;
+ tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len);
+ }
+
+ if (payload_len) {
+ pr_warn("malformed IEs buf; bytes left: %zu\n", payload_len);
+ return -EINVAL;
+ }
+
+ cfg80211_new_sta(vif->netdev, sta_assoc->sta_addr, &sinfo,
+ GFP_KERNEL);
+
+ return 0;
+}
+
+static int
+qtnf_event_handle_sta_deauth(struct qtnf_wmac *mac, struct qtnf_vif *vif,
+ const struct qlink_event_sta_deauth *sta_deauth,
+ u16 len)
+{
+ const u8 *sta_addr;
+ u16 reason;
+
+ if (unlikely(len < sizeof(*sta_deauth))) {
+ pr_err("payload is too short (%u < %zu)\n", len,
+ sizeof(struct qlink_event_sta_deauth));
+ return -EINVAL;
+ }
+
+ if (vif->wdev.iftype != NL80211_IFTYPE_AP) {
+ pr_err("STA_DEAUTH event when not in AP mode\n");
+ return -EPROTO;
+ }
+
+ if (!(vif->bss_status & QTNF_STATE_AP_START)) {
+ pr_err("STA_DEAUTH event when AP is not started\n");
+ return -EPROTO;
+ }
+
+ sta_addr = sta_deauth->sta_addr;
+ reason = le16_to_cpu(sta_deauth->reason);
+
+ pr_debug("MAC:%pM; reason:%x\n", sta_addr, reason);
+
+ if (qtnf_sta_list_del(&vif->sta_list, sta_addr))
+ cfg80211_del_sta(vif->netdev, sta_deauth->sta_addr,
+ GFP_KERNEL);
+
+ return 0;
+}
+
+static int
+qtnf_event_handle_bss_join(struct qtnf_vif *vif,
+ const struct qlink_event_bss_join *join_info,
+ u16 len)
+{
+ if (unlikely(len < sizeof(*join_info))) {
+ pr_err("payload is too short (%u < %zu)\n", len,
+ sizeof(struct qlink_event_bss_join));
+ return -EINVAL;
+ }
+
+ if (vif->wdev.iftype != NL80211_IFTYPE_STATION) {
+ pr_err("BSS_JOIN event when not in STA mode\n");
+ return -EPROTO;
+ }
+
+ if (vif->sta_state != QTNF_STA_CONNECTING) {
+ pr_err("BSS_JOIN event when STA is not connecting\n");
+ return -EPROTO;
+ }
+
+ pr_debug("BSSID:%pM\n", join_info->bssid);
+
+ cfg80211_connect_result(vif->netdev, join_info->bssid, NULL, 0, NULL,
+ 0, le16_to_cpu(join_info->status), GFP_KERNEL);
+
+ if (le16_to_cpu(join_info->status) == WLAN_STATUS_SUCCESS) {
+ vif->sta_state = QTNF_STA_CONNECTED;
+ netif_carrier_on(vif->netdev);
+ } else {
+ vif->sta_state = QTNF_STA_DISCONNECTED;
+ }
+
+ return 0;
+}
+
+static int
+qtnf_event_handle_bss_leave(struct qtnf_vif *vif,
+ const struct qlink_event_bss_leave *leave_info,
+ u16 len)
+{
+ if (unlikely(len < sizeof(*leave_info))) {
+ pr_err("payload is too short (%u < %zu)\n", len,
+ sizeof(struct qlink_event_bss_leave));
+ return -EINVAL;
+ }
+
+ if (vif->wdev.iftype != NL80211_IFTYPE_STATION) {
+ pr_err("BSS_LEAVE event when not in STA mode\n");
+ return -EPROTO;
+ }
+
+ if (vif->sta_state != QTNF_STA_CONNECTED) {
+ pr_err("BSS_LEAVE event when STA is not connected\n");
+ return -EPROTO;
+ }
+
+ pr_debug("disconnected\n");
+
+ cfg80211_disconnected(vif->netdev, leave_info->reason, NULL, 0, 0,
+ GFP_KERNEL);
+
+ vif->sta_state = QTNF_STA_DISCONNECTED;
+ netif_carrier_off(vif->netdev);
+
+ return 0;
+}
+
+static int
+qtnf_event_handle_mgmt_received(struct qtnf_vif *vif,
+ const struct qlink_event_rxmgmt *rxmgmt,
+ u16 len)
+{
+ const size_t min_len = sizeof(*rxmgmt) +
+ sizeof(struct ieee80211_hdr_3addr);
+ const struct ieee80211_hdr_3addr *frame = (void *)rxmgmt->frame_data;
+ const u16 frame_len = len - sizeof(*rxmgmt);
+ enum nl80211_rxmgmt_flags flags = 0;
+
+ if (unlikely(len < min_len)) {
+ pr_err("payload is too short (%u < %zu)\n", len, min_len);
+ return -EINVAL;
+ }
+
+ if (le32_to_cpu(rxmgmt->flags) & QLINK_RXMGMT_FLAG_ANSWERED)
+ flags |= NL80211_RXMGMT_FLAG_ANSWERED;
+
+ pr_debug("%s LEN:%u FC:%.4X SA:%pM\n", vif->netdev->name, frame_len,
+ le16_to_cpu(frame->frame_control), frame->addr2);
+
+ cfg80211_rx_mgmt(&vif->wdev, le32_to_cpu(rxmgmt->freq),
+ le32_to_cpu(rxmgmt->sig_dbm), rxmgmt->frame_data,
+ frame_len, flags);
+
+ return 0;
+}
+
+static int
+qtnf_event_handle_scan_results(struct qtnf_vif *vif,
+ const struct qlink_event_scan_result *sr,
+ u16 len)
+{
+ struct cfg80211_bss *bss;
+ struct ieee80211_channel *channel;
+ struct wiphy *wiphy = priv_to_wiphy(vif->mac);
+ enum cfg80211_bss_frame_type frame_type;
+ size_t payload_len;
+ u16 tlv_type;
+ u16 tlv_value_len;
+ size_t tlv_full_len;
+ const struct qlink_tlv_hdr *tlv;
+
+ const u8 *ies = NULL;
+ size_t ies_len = 0;
+
+ if (len < sizeof(*sr)) {
+ pr_err("payload is too short\n");
+ return -EINVAL;
+ }
+
+ channel = ieee80211_get_channel(wiphy, le16_to_cpu(sr->freq));
+ if (!channel) {
+ pr_err("channel at %u MHz not found\n", le16_to_cpu(sr->freq));
+ return -EINVAL;
+ }
+
+ switch (sr->frame_type) {
+ case QLINK_BSS_FTYPE_BEACON:
+ frame_type = CFG80211_BSS_FTYPE_BEACON;
+ break;
+ case QLINK_BSS_FTYPE_PRESP:
+ frame_type = CFG80211_BSS_FTYPE_PRESP;
+ break;
+ default:
+ frame_type = CFG80211_BSS_FTYPE_UNKNOWN;
+ }
+
+ payload_len = len - sizeof(*sr);
+ tlv = (struct qlink_tlv_hdr *)sr->payload;
+
+ while (payload_len >= sizeof(struct qlink_tlv_hdr)) {
+ tlv_type = le16_to_cpu(tlv->type);
+ tlv_value_len = le16_to_cpu(tlv->len);
+ tlv_full_len = tlv_value_len + sizeof(struct qlink_tlv_hdr);
+
+ if (tlv_full_len > payload_len) {
+ pr_warn("malformed TLV 0x%.2X; LEN: %u\n",
+ tlv_type, tlv_value_len);
+ return -EINVAL;
+ }
+
+ if (tlv_type == QTN_TLV_ID_IE_SET) {
+ ies = tlv->val;
+ ies_len = tlv_value_len;
+ }
+
+ payload_len -= tlv_full_len;
+ tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len);
+ }
+
+ if (payload_len) {
+ pr_warn("malformed IEs buf; bytes left: %zu\n", payload_len);
+ return -EINVAL;
+ }
+
+ bss = cfg80211_inform_bss(wiphy, channel, frame_type,
+ sr->bssid, get_unaligned_le64(&sr->tsf),
+ le16_to_cpu(sr->capab),
+ le16_to_cpu(sr->bintval), ies, ies_len,
+ sr->signal, GFP_KERNEL);
+ if (!bss)
+ return -ENOMEM;
+
+ cfg80211_put_bss(wiphy, bss);
+
+ return 0;
+}
+
+static int
+qtnf_event_handle_scan_complete(struct qtnf_wmac *mac,
+ const struct qlink_event_scan_complete *status,
+ u16 len)
+{
+ struct cfg80211_scan_info info = {};
+
+ if (len < sizeof(*status)) {
+ pr_err("payload is too short\n");
+ return -EINVAL;
+ }
+
+ if (!mac->scan_req)
+ return 0;
+
+ info.aborted = le32_to_cpu(status->flags) & QLINK_SCAN_ABORTED;
+ cfg80211_scan_done(mac->scan_req, &info);
+ mac->scan_req = NULL;
+
+ return 0;
+}
+
+static int qtnf_event_parse(struct qtnf_wmac *mac,
+ const struct sk_buff *event_skb)
+{
+ const struct qlink_event *event;
+ struct qtnf_vif *vif = NULL;
+ int ret = -1;
+ u16 event_id;
+ u16 event_len;
+
+ event = (const struct qlink_event *)event_skb->data;
+ event_id = le16_to_cpu(event->event_id);
+ event_len = le16_to_cpu(event->mhdr.len);
+
+ if (likely(event->vifid < QTNF_MAX_INTF)) {
+ vif = &mac->iflist[event->vifid];
+ } else {
+ pr_err("invalid vif(%u)\n", event->vifid);
+ return -EINVAL;
+ }
+
+ switch (event_id) {
+ case QLINK_EVENT_STA_ASSOCIATED:
+ ret = qtnf_event_handle_sta_assoc(mac, vif, (const void *)event,
+ event_len);
+ break;
+ case QLINK_EVENT_STA_DEAUTH:
+ ret = qtnf_event_handle_sta_deauth(mac, vif,
+ (const void *)event,
+ event_len);
+ break;
+ case QLINK_EVENT_MGMT_RECEIVED:
+ ret = qtnf_event_handle_mgmt_received(vif, (const void *)event,
+ event_len);
+ break;
+ case QLINK_EVENT_SCAN_RESULTS:
+ ret = qtnf_event_handle_scan_results(vif, (const void *)event,
+ event_len);
+ break;
+ case QLINK_EVENT_SCAN_COMPLETE:
+ ret = qtnf_event_handle_scan_complete(mac, (const void *)event,
+ event_len);
+ break;
+ case QLINK_EVENT_BSS_JOIN:
+ ret = qtnf_event_handle_bss_join(vif, (const void *)event,
+ event_len);
+ break;
+ case QLINK_EVENT_BSS_LEAVE:
+ ret = qtnf_event_handle_bss_leave(vif, (const void *)event,
+ event_len);
+ break;
+ default:
+ pr_warn("unknown event type: %x\n", event_id);
+ break;
+ }
+
+ return ret;
+}
+
+static int qtnf_event_process_skb(struct qtnf_bus *bus,
+ const struct sk_buff *skb)
+{
+ const struct qlink_event *event;
+ struct qtnf_wmac *mac;
+ int res;
+
+ if (unlikely(!skb || skb->len < sizeof(*event))) {
+ pr_err("invalid event buffer\n");
+ return -EINVAL;
+ }
+
+ event = (struct qlink_event *)skb->data;
+
+ mac = qtnf_core_get_mac(bus, event->macid);
+
+ pr_debug("new event id:%x len:%u mac:%u vif:%u\n",
+ le16_to_cpu(event->event_id), le16_to_cpu(event->mhdr.len),
+ event->macid, event->vifid);
+
+ if (unlikely(!mac))
+ return -ENXIO;
+
+ qtnf_bus_lock(bus);
+ res = qtnf_event_parse(mac, skb);
+ qtnf_bus_unlock(bus);
+
+ return res;
+}
+
+void qtnf_event_work_handler(struct work_struct *work)
+{
+ struct qtnf_bus *bus = container_of(work, struct qtnf_bus, event_work);
+ struct sk_buff_head *event_queue = &bus->trans.event_queue;
+ struct sk_buff *current_event_skb = skb_dequeue(event_queue);
+
+ while (current_event_skb) {
+ qtnf_event_process_skb(bus, current_event_skb);
+ dev_kfree_skb_any(current_event_skb);
+ current_event_skb = skb_dequeue(event_queue);
+ }
+}
diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.h b/drivers/net/wireless/quantenna/qtnfmac/event.h
new file mode 100644
index 0000000..ae759b6
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/event.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_EVENT_H_
+#define _QTN_FMAC_EVENT_H_
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+
+#include "qlink.h"
+
+void qtnf_event_work_handler(struct work_struct *work);
+
+#endif /* _QTN_FMAC_EVENT_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/init.c b/drivers/net/wireless/quantenna/qtnfmac/init.c
new file mode 100644
index 0000000..9feb095
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/init.c
@@ -0,0 +1,386 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/types.h>
+#include <linux/export.h>
+#include <net/mac80211.h>
+
+#include "core.h"
+#include "bus.h"
+#include "commands.h"
+#include "event.h"
+#include "cfg80211.h"
+#include "util.h"
+
+struct qtnf_vif *qtnf_get_free_vif(struct qtnf_wmac *mac)
+{
+ struct qtnf_vif *vif;
+ int i;
+
+ for (i = 0; i < QTNF_MAX_INTF; i++) {
+ vif = &mac->iflist[i];
+ if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)
+ return vif;
+ }
+
+ return NULL;
+}
+
+struct qtnf_vif *qtnf_get_base_vif(struct qtnf_wmac *mac)
+{
+ struct qtnf_vif *vif;
+
+ vif = &mac->iflist[0];
+
+ if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)
+ return NULL;
+
+ return vif;
+}
+
+static void qtnf_vif_reset_handler(struct work_struct *work)
+{
+ struct qtnf_vif *vif = container_of(work, struct qtnf_vif, reset_work);
+
+ rtnl_lock();
+ qtnf_virtual_intf_local_reset(vif->netdev);
+ rtnl_unlock();
+}
+
+static int qtnf_add_default_intf(struct qtnf_wmac *mac)
+{
+ struct qtnf_vif *vif;
+
+ vif = qtnf_get_free_vif(mac);
+ if (!vif) {
+ pr_err("could not get free vif structure\n");
+ return -EFAULT;
+ }
+
+ vif->wdev.iftype = NL80211_IFTYPE_AP;
+ vif->bss_priority = QTNF_DEF_BSS_PRIORITY;
+ vif->wdev.wiphy = priv_to_wiphy(mac);
+ INIT_WORK(&vif->reset_work, qtnf_vif_reset_handler);
+ vif->cons_tx_timeout_cnt = 0;
+
+ return 0;
+}
+
+static struct qtnf_wmac *qtnf_mac_init(struct qtnf_bus *bus, int macid)
+{
+ struct wiphy *wiphy;
+ struct qtnf_wmac *mac;
+ unsigned int i;
+
+ wiphy = qtnf_allocate_wiphy(bus);
+ if (!wiphy)
+ return ERR_PTR(-ENOMEM);
+
+ mac = wiphy_priv(wiphy);
+
+ mac->macid = macid;
+ mac->bus = bus;
+
+ for (i = 0; i < QTNF_MAX_INTF; i++) {
+ memset(&mac->iflist[i], 0, sizeof(struct qtnf_vif));
+ mac->iflist[i].wdev.iftype = NL80211_IFTYPE_UNSPECIFIED;
+ mac->iflist[i].mac = mac;
+ mac->iflist[i].vifid = i;
+ qtnf_sta_list_init(&mac->iflist[i].sta_list);
+ }
+
+ if (qtnf_add_default_intf(mac)) {
+ pr_err("failed to create primary interface for mac(%d)\n",
+ macid);
+ wiphy_free(wiphy);
+ return NULL;
+ }
+
+ mac->mac_started = 1;
+ bus->mac[macid] = mac;
+ return mac;
+}
+
+static int qtnf_mac_init_single_band(struct wiphy *wiphy,
+ struct qtnf_wmac *mac,
+ enum nl80211_band band)
+{
+ int ret;
+
+ wiphy->bands[band] = kzalloc(sizeof(*wiphy->bands[band]), GFP_KERNEL);
+ if (!wiphy->bands[band])
+ return -ENOMEM;
+
+ wiphy->bands[band]->band = band;
+
+ ret = qtnf_cmd_get_mac_chan_info(mac, wiphy->bands[band]);
+ if (ret) {
+ pr_err("failed to get chans info for band %u\n",
+ band);
+ return ret;
+ }
+
+ qtnf_band_init_rates(wiphy->bands[band]);
+ qtnf_band_setup_htvht_caps(&mac->macinfo, wiphy->bands[band]);
+
+ return 0;
+}
+
+static int qtnf_mac_init_bands(struct qtnf_wmac *mac)
+{
+ struct wiphy *wiphy = priv_to_wiphy(mac);
+ int ret = 0;
+
+ if (mac->macinfo.bands_cap & QLINK_BAND_2GHZ) {
+ ret = qtnf_mac_init_single_band(wiphy, mac, NL80211_BAND_2GHZ);
+ if (ret)
+ goto out;
+ }
+
+ if (mac->macinfo.bands_cap & QLINK_BAND_5GHZ) {
+ ret = qtnf_mac_init_single_band(wiphy, mac, NL80211_BAND_5GHZ);
+ if (ret)
+ goto out;
+ }
+
+ if (mac->macinfo.bands_cap & QLINK_BAND_60GHZ)
+ ret = qtnf_mac_init_single_band(wiphy, mac, NL80211_BAND_60GHZ);
+
+out:
+ return ret;
+}
+
+int qtnf_net_attach(struct qtnf_wmac *mac, struct qtnf_vif *vif,
+ const char *name, unsigned char name_assign_type,
+ enum nl80211_iftype iftype)
+{
+ struct wiphy *wiphy = priv_to_wiphy(mac);
+ struct net_device *dev;
+ void *qdev_vif;
+
+ dev = alloc_netdev_mqs(sizeof(struct qtnf_vif *), name,
+ name_assign_type, ether_setup, 1, 1);
+ if (!dev) {
+ pr_err("failed to allocate net_device\n");
+ memset(&vif->wdev, 0, sizeof(vif->wdev));
+ vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED;
+ return -ENOMEM;
+ }
+
+ vif->netdev = dev;
+
+ dev->netdev_ops = &qtnf_netdev_ops;
+ dev->destructor = free_netdev;
+ dev_net_set(dev, wiphy_net(wiphy));
+ dev->ieee80211_ptr = &vif->wdev;
+ dev->ieee80211_ptr->iftype = iftype;
+ ether_addr_copy(dev->dev_addr, vif->mac_addr);
+ SET_NETDEV_DEV(dev, wiphy_dev(wiphy));
+ dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
+ dev->watchdog_timeo = QTNF_DEF_WDOG_TIMEOUT;
+ dev->tx_queue_len = 100;
+
+ qdev_vif = netdev_priv(dev);
+ *((unsigned long *)qdev_vif) = (unsigned long)vif;
+
+ SET_NETDEV_DEV(dev, mac->bus->dev);
+
+ if (register_netdevice(dev)) {
+ pr_err("failed to register virtual network device\n");
+ free_netdev(dev);
+ vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED;
+ return -EFAULT;
+ }
+
+ return 0;
+}
+
+static int qtnf_core_mac_init(struct qtnf_bus *bus, int macid)
+{
+ struct qtnf_wmac *mac;
+ struct qtnf_vif *vif;
+
+ pr_debug("starting mac(%d) init\n", macid);
+
+ if (!(bus->hw_info.mac_bitmap & BIT(macid))) {
+ pr_info("mac(%d) is not available for host operations\n",
+ macid);
+ return 0;
+ }
+
+ mac = qtnf_mac_init(bus, macid);
+ if (!mac) {
+ pr_err("failed to initialize mac(%d)\n", macid);
+ return -1;
+ }
+
+ if (qtnf_cmd_get_mac_info(mac)) {
+ pr_err("failed to get mac(%d) info\n", macid);
+ return -1;
+ }
+
+ vif = qtnf_get_base_vif(mac);
+ if (!vif) {
+ pr_err("could not get valid vif pointer\n");
+ return -1;
+ }
+
+ if (qtnf_cmd_send_add_intf(vif, NL80211_IFTYPE_AP, vif->mac_addr)) {
+ pr_err("could not add primary vif for mac(%d)\n", macid);
+ return -1;
+ }
+
+ if (qtnf_cmd_send_get_phy_params(mac)) {
+ pr_err("could not get phy thresholds for mac(%d)\n", macid);
+ return -1;
+ }
+
+ if (qtnf_mac_init_bands(mac)) {
+ pr_err("could not get channel info for mac(%d)\n", macid);
+ return -1;
+ }
+
+ if (qtnf_register_wiphy(bus, mac)) {
+ pr_err("wiphy registration failed for mac(%d)\n", macid);
+ return -1;
+ }
+
+ mac->wiphy_registered = 1;
+
+ /* add primary networking interface */
+ rtnl_lock();
+ if (qtnf_net_attach(mac, vif, "wlan%d", NET_NAME_ENUM,
+ NL80211_IFTYPE_AP)) {
+ pr_err("could not attach primary interface for mac(%d)\n",
+ macid);
+ vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED;
+ vif->netdev = NULL;
+ rtnl_unlock();
+ return -1;
+ }
+ rtnl_unlock();
+
+ return 0;
+}
+
+int qtnf_core_attach(struct qtnf_bus *bus)
+{
+ int i;
+
+ qtnf_trans_init(bus);
+
+ bus->fw_state = QTNF_FW_STATE_BOOT_DONE;
+ qtnf_bus_data_rx_start(bus);
+
+ bus->workqueue = alloc_ordered_workqueue("QTNF_BUS", 0);
+ if (!bus->workqueue) {
+ pr_err("failed to alloc main workqueue\n");
+ return -1;
+ }
+
+ INIT_WORK(&bus->event_work, qtnf_event_work_handler);
+
+ if (qtnf_cmd_send_init_fw(bus)) {
+ pr_err("failed to send FW init commands\n");
+ return -1;
+ }
+
+ bus->fw_state = QTNF_FW_STATE_ACTIVE;
+
+ if (qtnf_cmd_get_hw_info(bus)) {
+ pr_err("failed to get HW info\n");
+ return -1;
+ }
+
+ if (bus->hw_info.ql_proto_ver != QLINK_PROTO_VER) {
+ pr_err("qlink protocol version mismatch\n");
+ return -1;
+ }
+
+ if (bus->hw_info.num_mac > QTNF_MAX_MAC) {
+ pr_err("FW reported invalid mac count: %d\n",
+ bus->hw_info.num_mac);
+ return -1;
+ }
+
+ for (i = 0; i < bus->hw_info.num_mac; i++) {
+ if (qtnf_core_mac_init(bus, i)) {
+ pr_err("mac(%d) init failed\n", i);
+ return -1;
+ }
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(qtnf_core_attach);
+
+void qtnf_core_detach(struct qtnf_bus *bus)
+{
+ struct wiphy *wiphy;
+ struct qtnf_wmac *mac;
+ struct qtnf_vif *vif;
+ int i, cnt;
+ enum nl80211_band band;
+
+ for (cnt = 0; cnt < QTNF_MAX_MAC; cnt++) {
+ mac = bus->mac[cnt];
+
+ if (!mac || !mac->mac_started)
+ continue;
+
+ wiphy = priv_to_wiphy(mac);
+
+ for (i = 0; i < QTNF_MAX_INTF; i++) {
+ vif = &mac->iflist[i];
+ rtnl_lock();
+ if (vif->netdev &&
+ vif->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED) {
+ qtnf_virtual_intf_cleanup(vif->netdev);
+ qtnf_del_virtual_intf(wiphy, &vif->wdev);
+ }
+ rtnl_unlock();
+ qtnf_sta_list_free(&vif->sta_list);
+ }
+
+ if (mac->wiphy_registered)
+ wiphy_unregister(wiphy);
+
+ for (band = NL80211_BAND_2GHZ;
+ band < NUM_NL80211_BANDS; ++band) {
+ if (!wiphy->bands[band])
+ continue;
+
+ kfree(wiphy->bands[band]->channels);
+ wiphy->bands[band]->n_channels = 0;
+
+ kfree(wiphy->bands[band]);
+ wiphy->bands[band] = NULL;
+ }
+
+ kfree(mac->macinfo.limits);
+ kfree(wiphy->iface_combinations);
+ wiphy_free(wiphy);
+ bus->mac[cnt] = NULL;
+ }
+
+ if (bus->workqueue) {
+ flush_workqueue(bus->workqueue);
+ destroy_workqueue(bus->workqueue);
+ }
+
+ qtnf_trans_free(bus);
+}
+EXPORT_SYMBOL_GPL(qtnf_core_detach);
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
new file mode 100644
index 0000000..2b60e89
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
@@ -0,0 +1,1368 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/firmware.h>
+#include <linux/pci.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
+#include <linux/completion.h>
+#include <linux/crc32.h>
+#include <linux/spinlock.h>
+
+#include "qtn_hw_ids.h"
+#include "pcie_bus_priv.h"
+#include "core.h"
+#include "bus.h"
+#include "debug.h"
+
+static bool use_msi = true;
+module_param(use_msi, bool, 0644);
+MODULE_PARM_DESC(use_msi, "set 0 to use legacy interrupt");
+
+static unsigned int tx_bd_size_param = 256;
+module_param(tx_bd_size_param, uint, 0644);
+MODULE_PARM_DESC(tx_bd_size_param, "Tx descriptors queue size");
+
+static unsigned int rx_bd_size_param = 256;
+module_param(rx_bd_size_param, uint, 0644);
+MODULE_PARM_DESC(rx_bd_size_param, "Rx descriptors queue size");
+
+static unsigned int rx_bd_reserved_param = 16;
+module_param(rx_bd_reserved_param, uint, 0644);
+MODULE_PARM_DESC(rx_bd_reserved_param, "Reserved RX descriptors");
+
+#define DRV_NAME "qtnfmac_pearl_pcie"
+
+static inline void qtnf_non_posted_write(u32 val, void __iomem *basereg)
+{
+ writel(val, basereg);
+
+ /* flush posted write */
+ readl(basereg);
+}
+
+static inline void qtnf_init_hdp_irqs(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->irq_lock, flags);
+ priv->pcie_irq_mask = (PCIE_HDP_INT_RX_BITS | PCIE_HDP_INT_TX_BITS);
+ spin_unlock_irqrestore(&priv->irq_lock, flags);
+}
+
+static inline void qtnf_enable_hdp_irqs(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->irq_lock, flags);
+ writel(priv->pcie_irq_mask, PCIE_HDP_INT_EN(priv->pcie_reg_base));
+ spin_unlock_irqrestore(&priv->irq_lock, flags);
+}
+
+static inline void qtnf_disable_hdp_irqs(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->irq_lock, flags);
+ writel(0x0, PCIE_HDP_INT_EN(priv->pcie_reg_base));
+ spin_unlock_irqrestore(&priv->irq_lock, flags);
+}
+
+static inline void qtnf_en_rxdone_irq(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->irq_lock, flags);
+ priv->pcie_irq_mask |= PCIE_HDP_INT_RX_BITS;
+ writel(priv->pcie_irq_mask, PCIE_HDP_INT_EN(priv->pcie_reg_base));
+ spin_unlock_irqrestore(&priv->irq_lock, flags);
+}
+
+static inline void qtnf_dis_rxdone_irq(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->irq_lock, flags);
+ priv->pcie_irq_mask &= ~PCIE_HDP_INT_RX_BITS;
+ writel(priv->pcie_irq_mask, PCIE_HDP_INT_EN(priv->pcie_reg_base));
+ spin_unlock_irqrestore(&priv->irq_lock, flags);
+}
+
+static inline void qtnf_en_txdone_irq(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->irq_lock, flags);
+ priv->pcie_irq_mask |= PCIE_HDP_INT_TX_BITS;
+ writel(priv->pcie_irq_mask, PCIE_HDP_INT_EN(priv->pcie_reg_base));
+ spin_unlock_irqrestore(&priv->irq_lock, flags);
+}
+
+static inline void qtnf_dis_txdone_irq(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->irq_lock, flags);
+ priv->pcie_irq_mask &= ~PCIE_HDP_INT_TX_BITS;
+ writel(priv->pcie_irq_mask, PCIE_HDP_INT_EN(priv->pcie_reg_base));
+ spin_unlock_irqrestore(&priv->irq_lock, flags);
+}
+
+static int qtnf_pcie_init_irq(struct qtnf_pcie_bus_priv *priv)
+{
+ struct pci_dev *pdev = priv->pdev;
+
+ /* fall back to legacy INTx interrupts by default */
+ priv->msi_enabled = 0;
+
+ /* check if MSI capability is available */
+ if (use_msi) {
+ if (!pci_enable_msi(pdev)) {
+ pr_debug("MSI interrupt enabled\n");
+ priv->msi_enabled = 1;
+ } else {
+ pr_warn("failed to enable MSI interrupts");
+ }
+ }
+
+ if (!priv->msi_enabled) {
+ pr_warn("legacy PCIE interrupts enabled\n");
+ pci_intx(pdev, 1);
+ }
+
+ return 0;
+}
+
+static void qtnf_deassert_intx(struct qtnf_pcie_bus_priv *priv)
+{
+ void __iomem *reg = priv->sysctl_bar + PEARL_PCIE_CFG0_OFFSET;
+ u32 cfg;
+
+ cfg = readl(reg);
+ cfg &= ~PEARL_ASSERT_INTX;
+ qtnf_non_posted_write(cfg, reg);
+}
+
+static void qtnf_ipc_gen_ep_int(void *arg)
+{
+ const struct qtnf_pcie_bus_priv *priv = arg;
+ const u32 data = QTN_PEARL_IPC_IRQ_WORD(QTN_PEARL_LHOST_IPC_IRQ);
+ void __iomem *reg = priv->sysctl_bar +
+ QTN_PEARL_SYSCTL_LHOST_IRQ_OFFSET;
+
+ qtnf_non_posted_write(data, reg);
+}
+
+static void __iomem *qtnf_map_bar(struct qtnf_pcie_bus_priv *priv, u8 index)
+{
+ void __iomem *vaddr;
+ dma_addr_t busaddr;
+ size_t len;
+ int ret;
+
+ ret = pcim_iomap_regions(priv->pdev, 1 << index, DRV_NAME);
+ if (ret)
+ return IOMEM_ERR_PTR(ret);
+
+ busaddr = pci_resource_start(priv->pdev, index);
+ vaddr = pcim_iomap_table(priv->pdev)[index];
+ len = pci_resource_len(priv->pdev, index);
+
+ pr_debug("BAR%u vaddr=0x%p busaddr=%pad len=%u\n",
+ index, vaddr, &busaddr, (int)len);
+
+ return vaddr;
+}
+
+static void qtnf_pcie_control_rx_callback(void *arg, const u8 *buf, size_t len)
+{
+ struct qtnf_pcie_bus_priv *priv = arg;
+ struct qtnf_bus *bus = pci_get_drvdata(priv->pdev);
+ struct sk_buff *skb;
+
+ if (unlikely(len == 0)) {
+ pr_warn("zero length packet received\n");
+ return;
+ }
+
+ skb = __dev_alloc_skb(len, GFP_KERNEL);
+
+ if (unlikely(!skb)) {
+ pr_err("failed to allocate skb\n");
+ return;
+ }
+
+ memcpy(skb_put(skb, len), buf, len);
+
+ qtnf_trans_handle_rx_ctl_packet(bus, skb);
+}
+
+static int qtnf_pcie_init_shm_ipc(struct qtnf_pcie_bus_priv *priv)
+{
+ struct qtnf_shm_ipc_region __iomem *ipc_tx_reg;
+ struct qtnf_shm_ipc_region __iomem *ipc_rx_reg;
+ const struct qtnf_shm_ipc_int ipc_int = { qtnf_ipc_gen_ep_int, priv };
+ const struct qtnf_shm_ipc_rx_callback rx_callback = {
+ qtnf_pcie_control_rx_callback, priv };
+
+ ipc_tx_reg = &priv->bda->bda_shm_reg1;
+ ipc_rx_reg = &priv->bda->bda_shm_reg2;
+
+ qtnf_shm_ipc_init(&priv->shm_ipc_ep_in, QTNF_SHM_IPC_OUTBOUND,
+ ipc_tx_reg, priv->workqueue,
+ &ipc_int, &rx_callback);
+ qtnf_shm_ipc_init(&priv->shm_ipc_ep_out, QTNF_SHM_IPC_INBOUND,
+ ipc_rx_reg, priv->workqueue,
+ &ipc_int, &rx_callback);
+
+ return 0;
+}
+
+static void qtnf_pcie_free_shm_ipc(struct qtnf_pcie_bus_priv *priv)
+{
+ qtnf_shm_ipc_free(&priv->shm_ipc_ep_in);
+ qtnf_shm_ipc_free(&priv->shm_ipc_ep_out);
+}
+
+static int qtnf_pcie_init_memory(struct qtnf_pcie_bus_priv *priv)
+{
+ int ret;
+
+ priv->sysctl_bar = qtnf_map_bar(priv, QTN_SYSCTL_BAR);
+ if (IS_ERR_OR_NULL(priv->sysctl_bar)) {
+ pr_err("failed to map BAR%u\n", QTN_SYSCTL_BAR);
+ return ret;
+ }
+
+ priv->dmareg_bar = qtnf_map_bar(priv, QTN_DMA_BAR);
+ if (IS_ERR_OR_NULL(priv->dmareg_bar)) {
+ pr_err("failed to map BAR%u\n", QTN_DMA_BAR);
+ return ret;
+ }
+
+ priv->epmem_bar = qtnf_map_bar(priv, QTN_SHMEM_BAR);
+ if (IS_ERR_OR_NULL(priv->epmem_bar)) {
+ pr_err("failed to map BAR%u\n", QTN_SHMEM_BAR);
+ return ret;
+ }
+
+ priv->pcie_reg_base = priv->dmareg_bar;
+ priv->bda = priv->epmem_bar;
+ writel(priv->msi_enabled, &priv->bda->bda_rc_msi_enabled);
+
+ return 0;
+}
+
+static int
+qtnf_pcie_init_dma_mask(struct qtnf_pcie_bus_priv *priv, u64 dma_mask)
+{
+ int ret;
+
+ ret = dma_supported(&priv->pdev->dev, dma_mask);
+ if (!ret) {
+ pr_err("DMA mask %llu not supported\n", dma_mask);
+ return ret;
+ }
+
+ ret = pci_set_dma_mask(priv->pdev, dma_mask);
+ if (ret) {
+ pr_err("failed to set DMA mask %llu\n", dma_mask);
+ return ret;
+ }
+
+ ret = pci_set_consistent_dma_mask(priv->pdev, dma_mask);
+ if (ret) {
+ pr_err("failed to set consistent DMA mask %llu\n", dma_mask);
+ return ret;
+ }
+
+ return ret;
+}
+
+static void qtnf_tune_pcie_mps(struct qtnf_pcie_bus_priv *priv)
+{
+ struct pci_dev *pdev = priv->pdev;
+ struct pci_dev *parent;
+ int mps_p, mps_o, mps_m, mps;
+ int ret;
+
+ /* current mps */
+ mps_o = pcie_get_mps(pdev);
+
+ /* maximum supported mps */
+ mps_m = 128 << pdev->pcie_mpss;
+
+ /* suggested new mps value */
+ mps = mps_m;
+
+ if (pdev->bus && pdev->bus->self) {
+ /* parent (bus) mps */
+ parent = pdev->bus->self;
+
+ if (pci_is_pcie(parent)) {
+ mps_p = pcie_get_mps(parent);
+ mps = min(mps_m, mps_p);
+ }
+ }
+
+ ret = pcie_set_mps(pdev, mps);
+ if (ret) {
+ pr_err("failed to set mps to %d, keep using current %d\n",
+ mps, mps_o);
+ priv->mps = mps_o;
+ return;
+ }
+
+ pr_debug("set mps to %d (was %d, max %d)\n", mps, mps_o, mps_m);
+ priv->mps = mps;
+}
+
+static int qtnf_is_state(__le32 __iomem *reg, u32 state)
+{
+ u32 s = readl(reg);
+
+ return s & state;
+}
+
+static void qtnf_set_state(__le32 __iomem *reg, u32 state)
+{
+ u32 s = readl(reg);
+
+ qtnf_non_posted_write(state | s, reg);
+}
+
+static void qtnf_clear_state(__le32 __iomem *reg, u32 state)
+{
+ u32 s = readl(reg);
+
+ qtnf_non_posted_write(s & ~state, reg);
+}
+
+static int qtnf_poll_state(__le32 __iomem *reg, u32 state, u32 delay_in_ms)
+{
+ u32 timeout = 0;
+
+ while ((qtnf_is_state(reg, state) == 0)) {
+ usleep_range(1000, 1200);
+ if (++timeout > delay_in_ms)
+ return -1;
+ }
+
+ return 0;
+}
+
+static int alloc_skb_array(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long addr;
+ int len;
+
+ len = priv->tx_bd_num * sizeof(*priv->tx_skb) +
+ priv->rx_bd_num * sizeof(*priv->rx_skb);
+ addr = (unsigned long)devm_kzalloc(&priv->pdev->dev, len, GFP_KERNEL);
+
+ if (!addr)
+ return -ENOMEM;
+
+ priv->tx_skb = (struct sk_buff **)addr;
+
+ addr += priv->tx_bd_num * sizeof(*priv->tx_skb);
+ priv->rx_skb = (struct sk_buff **)addr;
+
+ return 0;
+}
+
+static int alloc_bd_table(struct qtnf_pcie_bus_priv *priv)
+{
+ unsigned long vaddr;
+ dma_addr_t paddr;
+ int len;
+
+ len = priv->tx_bd_num * sizeof(struct qtnf_tx_bd) +
+ priv->rx_bd_num * sizeof(struct qtnf_rx_bd);
+
+ vaddr = (unsigned long)dmam_alloc_coherent(&priv->pdev->dev,
+ len, &paddr, GFP_KERNEL);
+ if (!vaddr)
+ return -ENOMEM;
+
+ /* tx bd */
+
+ memset((void *)vaddr, 0, len);
+
+ priv->bd_table_vaddr = vaddr;
+ priv->bd_table_paddr = paddr;
+ priv->bd_table_len = len;
+
+ priv->tx_bd_vbase = (struct qtnf_tx_bd *)vaddr;
+ priv->tx_bd_pbase = paddr;
+
+ pr_debug("TX descriptor table: vaddr=0x%p paddr=%pad\n",
+ (void *)vaddr, &paddr);
+
+ priv->tx_bd_reclaim_start = 0;
+ priv->tx_bd_index = 0;
+ priv->tx_queue_len = 0;
+
+ /* rx bd */
+
+ vaddr += priv->tx_bd_num * sizeof(struct qtnf_tx_bd);
+ paddr += priv->tx_bd_num * sizeof(struct qtnf_tx_bd);
+
+ priv->rx_bd_vbase = (struct qtnf_rx_bd *)vaddr;
+ priv->rx_bd_pbase = paddr;
+
+ writel(QTN_HOST_LO32(paddr),
+ PCIE_HDP_TX_HOST_Q_BASE_L(priv->pcie_reg_base));
+ writel(QTN_HOST_HI32(paddr),
+ PCIE_HDP_TX_HOST_Q_BASE_H(priv->pcie_reg_base));
+ writel(priv->rx_bd_num | (sizeof(struct qtnf_rx_bd)) << 16,
+ PCIE_HDP_TX_HOST_Q_SZ_CTRL(priv->pcie_reg_base));
+
+ priv->hw_txproc_wr_ptr = priv->rx_bd_num - rx_bd_reserved_param;
+
+ writel(priv->hw_txproc_wr_ptr,
+ PCIE_HDP_TX_HOST_Q_WR_PTR(priv->pcie_reg_base));
+
+ pr_debug("RX descriptor table: vaddr=0x%p paddr=%pad\n",
+ (void *)vaddr, &paddr);
+
+ priv->rx_bd_index = 0;
+
+ return 0;
+}
+
+static int skb2rbd_attach(struct qtnf_pcie_bus_priv *priv, u16 rx_bd_index)
+{
+ struct qtnf_rx_bd *rxbd;
+ struct sk_buff *skb;
+ dma_addr_t paddr;
+
+ skb = __dev_alloc_skb(SKB_BUF_SIZE + NET_IP_ALIGN,
+ GFP_ATOMIC);
+ if (!skb) {
+ priv->rx_skb[rx_bd_index] = NULL;
+ return -ENOMEM;
+ }
+
+ priv->rx_skb[rx_bd_index] = skb;
+
+ skb_reserve(skb, NET_IP_ALIGN);
+
+ rxbd = &priv->rx_bd_vbase[rx_bd_index];
+
+ paddr = pci_map_single(priv->pdev, skb->data,
+ SKB_BUF_SIZE, PCI_DMA_FROMDEVICE);
+ if (pci_dma_mapping_error(priv->pdev, paddr)) {
+ pr_err("skb DMA mapping error: %pad\n", &paddr);
+ return -ENOMEM;
+ }
+
+ writel(QTN_HOST_LO32(paddr),
+ PCIE_HDP_HHBM_BUF_PTR(priv->pcie_reg_base));
+ writel(QTN_HOST_HI32(paddr),
+ PCIE_HDP_HHBM_BUF_PTR_H(priv->pcie_reg_base));
+
+ /* keep rx skb paddrs in rx buffer descriptors for cleanup purposes */
+ rxbd->addr = cpu_to_le32(QTN_HOST_LO32(paddr));
+ rxbd->addr_h = cpu_to_le32(QTN_HOST_HI32(paddr));
+
+ rxbd->info = 0x0;
+
+ return 0;
+}
+
+static int alloc_rx_buffers(struct qtnf_pcie_bus_priv *priv)
+{
+ u16 i;
+ int ret = 0;
+
+ memset((void *)priv->rx_bd_vbase, 0x0,
+ priv->rx_bd_num * sizeof(struct qtnf_rx_bd));
+
+ for (i = 0; i < priv->rx_bd_num; i++) {
+ ret = skb2rbd_attach(priv, i);
+ if (ret)
+ break;
+ }
+
+ return ret;
+}
+
+/* all rx/tx activity should have ceased before calling this function */
+static void free_xfer_buffers(void *data)
+{
+ struct qtnf_pcie_bus_priv *priv = (struct qtnf_pcie_bus_priv *)data;
+ struct qtnf_rx_bd *rxbd;
+ dma_addr_t paddr;
+ int i;
+
+ /* free rx buffers */
+ for (i = 0; i < priv->rx_bd_num; i++) {
+ if (priv->rx_skb[i]) {
+ rxbd = &priv->rx_bd_vbase[i];
+ paddr = QTN_HOST_ADDR(le32_to_cpu(rxbd->addr_h),
+ le32_to_cpu(rxbd->addr));
+ pci_unmap_single(priv->pdev, paddr, SKB_BUF_SIZE,
+ PCI_DMA_FROMDEVICE);
+
+ dev_kfree_skb_any(priv->rx_skb[i]);
+ }
+ }
+
+ /* free tx buffers */
+ for (i = 0; i < priv->tx_bd_num; i++) {
+ if (priv->tx_skb[i]) {
+ dev_kfree_skb_any(priv->tx_skb[i]);
+ priv->tx_skb[i] = NULL;
+ }
+ }
+}
+
+static int qtnf_pcie_init_xfer(struct qtnf_pcie_bus_priv *priv)
+{
+ int ret;
+
+ priv->tx_bd_num = tx_bd_size_param;
+ priv->rx_bd_num = rx_bd_size_param;
+
+ ret = alloc_skb_array(priv);
+ if (ret) {
+ pr_err("failed to allocate skb array\n");
+ return ret;
+ }
+
+ ret = alloc_bd_table(priv);
+ if (ret) {
+ pr_err("failed to allocate bd table\n");
+ return ret;
+ }
+
+ ret = alloc_rx_buffers(priv);
+ if (ret) {
+ pr_err("failed to allocate rx buffers\n");
+ return ret;
+ }
+
+ return ret;
+}
+
+static int qtnf_pcie_data_tx_reclaim(struct qtnf_pcie_bus_priv *priv)
+{
+ struct qtnf_tx_bd *txbd;
+ struct sk_buff *skb;
+ dma_addr_t paddr;
+ int last_sent;
+ int count;
+ int i;
+
+ last_sent = readl(PCIE_HDP_RX0DMA_CNT(priv->pcie_reg_base))
+ % priv->tx_bd_num;
+ i = priv->tx_bd_reclaim_start;
+ count = 0;
+
+ while (i != last_sent) {
+ skb = priv->tx_skb[i];
+ if (!skb)
+ break;
+
+ txbd = &priv->tx_bd_vbase[i];
+ paddr = QTN_HOST_ADDR(le32_to_cpu(txbd->addr_h),
+ le32_to_cpu(txbd->addr));
+ pci_unmap_single(priv->pdev, paddr, skb->len, PCI_DMA_TODEVICE);
+
+ if (skb->dev) {
+ skb->dev->stats.tx_packets++;
+ skb->dev->stats.tx_bytes += skb->len;
+
+ if (netif_queue_stopped(skb->dev))
+ netif_wake_queue(skb->dev);
+ }
+
+ dev_kfree_skb_any(skb);
+ priv->tx_skb[i] = NULL;
+ priv->tx_queue_len--;
+ count++;
+
+ if (++i >= priv->tx_bd_num)
+ i = 0;
+ }
+
+ priv->tx_bd_reclaim_start = i;
+ priv->tx_reclaim_done += count;
+ priv->tx_reclaim_req++;
+
+ return count;
+}
+
+static bool qtnf_tx_queue_ready(struct qtnf_pcie_bus_priv *priv)
+{
+ if (priv->tx_queue_len >= priv->tx_bd_num - 1) {
+ pr_err_ratelimited("reclaim full Tx queue\n");
+ qtnf_pcie_data_tx_reclaim(priv);
+
+ if (priv->tx_queue_len >= priv->tx_bd_num - 1) {
+ priv->tx_full_count++;
+ return false;
+ }
+ }
+
+ return true;
+}
+
+static int qtnf_pcie_data_tx(struct qtnf_bus *bus, struct sk_buff *skb)
+{
+ struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
+ dma_addr_t txbd_paddr, skb_paddr;
+ struct qtnf_tx_bd *txbd;
+ unsigned long flags;
+ int len, i;
+ u32 info;
+ int ret = 0;
+
+ spin_lock_irqsave(&priv->tx_lock, flags);
+
+ priv->tx_done_count++;
+
+ if (!qtnf_tx_queue_ready(priv)) {
+ if (skb->dev)
+ netif_stop_queue(skb->dev);
+
+ spin_unlock_irqrestore(&priv->tx_lock, flags);
+ return NETDEV_TX_BUSY;
+ }
+
+ i = priv->tx_bd_index;
+ priv->tx_skb[i] = skb;
+ len = skb->len;
+
+ skb_paddr = pci_map_single(priv->pdev, skb->data,
+ skb->len, PCI_DMA_TODEVICE);
+ if (pci_dma_mapping_error(priv->pdev, skb_paddr)) {
+ pr_err("skb DMA mapping error: %pad\n", &skb_paddr);
+ ret = -ENOMEM;
+ goto tx_done;
+ }
+
+ txbd = &priv->tx_bd_vbase[i];
+ txbd->addr = cpu_to_le32(QTN_HOST_LO32(skb_paddr));
+ txbd->addr_h = cpu_to_le32(QTN_HOST_HI32(skb_paddr));
+
+ info = (len & QTN_PCIE_TX_DESC_LEN_MASK) << QTN_PCIE_TX_DESC_LEN_SHIFT;
+ txbd->info = cpu_to_le32(info);
+
+ /* sync up all descriptor updates before passing them to EP */
+ wmb();
+
+ /* write new TX descriptor to PCIE_RX_FIFO on EP */
+ txbd_paddr = priv->tx_bd_pbase + i * sizeof(struct qtnf_tx_bd);
+ writel(QTN_HOST_LO32(txbd_paddr),
+ PCIE_HDP_HOST_WR_DESC0(priv->pcie_reg_base));
+ writel(QTN_HOST_HI32(txbd_paddr),
+ PCIE_HDP_HOST_WR_DESC0_H(priv->pcie_reg_base));
+
+ if (++i >= priv->tx_bd_num)
+ i = 0;
+
+ priv->tx_bd_index = i;
+ priv->tx_queue_len++;
+
+tx_done:
+ if (ret && skb) {
+ pr_err_ratelimited("drop skb\n");
+ if (skb->dev)
+ skb->dev->stats.tx_dropped++;
+ dev_kfree_skb_any(skb);
+ }
+
+ spin_unlock_irqrestore(&priv->tx_lock, flags);
+
+ return NETDEV_TX_OK;
+}
+
+static int qtnf_pcie_control_tx(struct qtnf_bus *bus, struct sk_buff *skb)
+{
+ struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
+
+ return qtnf_shm_ipc_send(&priv->shm_ipc_ep_in, skb->data, skb->len);
+}
+
+static irqreturn_t qtnf_interrupt(int irq, void *data)
+{
+ struct qtnf_bus *bus = (struct qtnf_bus *)data;
+ struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
+ u32 status;
+
+ priv->pcie_irq_count++;
+ status = readl(PCIE_HDP_INT_STATUS(priv->pcie_reg_base));
+
+ qtnf_shm_ipc_irq_handler(&priv->shm_ipc_ep_in);
+ qtnf_shm_ipc_irq_handler(&priv->shm_ipc_ep_out);
+
+ if (!(status & priv->pcie_irq_mask))
+ goto irq_done;
+
+ if (status & PCIE_HDP_INT_RX_BITS) {
+ priv->pcie_irq_rx_count++;
+ qtnf_dis_rxdone_irq(priv);
+ napi_schedule(&bus->mux_napi);
+ }
+
+ if (status & PCIE_HDP_INT_TX_BITS) {
+ priv->pcie_irq_tx_count++;
+ qtnf_dis_txdone_irq(priv);
+ tasklet_hi_schedule(&priv->reclaim_tq);
+ }
+
+irq_done:
+ /* H/W workaround: clean all bits, not only enabled */
+ qtnf_non_posted_write(~0U, PCIE_HDP_INT_STATUS(priv->pcie_reg_base));
+
+ if (!priv->msi_enabled)
+ qtnf_deassert_intx(priv);
+
+ return IRQ_HANDLED;
+}
+
+static inline void hw_txproc_wr_ptr_inc(struct qtnf_pcie_bus_priv *priv)
+{
+ u32 index;
+
+ index = priv->hw_txproc_wr_ptr;
+
+ if (++index >= priv->rx_bd_num)
+ index = 0;
+
+ priv->hw_txproc_wr_ptr = index;
+}
+
+static int qtnf_rx_poll(struct napi_struct *napi, int budget)
+{
+ struct qtnf_bus *bus = container_of(napi, struct qtnf_bus, mux_napi);
+ struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
+ struct net_device *ndev = NULL;
+ struct sk_buff *skb = NULL;
+ int processed = 0;
+ struct qtnf_rx_bd *rxbd;
+ dma_addr_t skb_paddr;
+ u32 descw;
+ u16 index;
+ int ret;
+
+ index = priv->rx_bd_index;
+ rxbd = &priv->rx_bd_vbase[index];
+
+ descw = le32_to_cpu(rxbd->info);
+
+ while ((descw & QTN_TXDONE_MASK) && (processed < budget)) {
+ skb = priv->rx_skb[index];
+
+ if (likely(skb)) {
+ skb_put(skb, QTN_GET_LEN(descw));
+
+ skb_paddr = QTN_HOST_ADDR(le32_to_cpu(rxbd->addr_h),
+ le32_to_cpu(rxbd->addr));
+ pci_unmap_single(priv->pdev, skb_paddr, SKB_BUF_SIZE,
+ PCI_DMA_FROMDEVICE);
+
+ ndev = qtnf_classify_skb(bus, skb);
+ if (likely(ndev)) {
+ ndev->stats.rx_packets++;
+ ndev->stats.rx_bytes += skb->len;
+ ndev->last_rx = jiffies;
+
+ skb->protocol = eth_type_trans(skb, ndev);
+ netif_receive_skb(skb);
+ } else {
+ pr_debug("drop untagged skb\n");
+ bus->mux_dev.stats.rx_dropped++;
+ dev_kfree_skb_any(skb);
+ }
+
+ processed++;
+ } else {
+ pr_err("missing rx_skb[%d]\n", index);
+ }
+
+ /* attached rx buffer is passed upstream: map a new one */
+ ret = skb2rbd_attach(priv, index);
+ if (likely(!ret)) {
+ if (++index >= priv->rx_bd_num)
+ index = 0;
+
+ priv->rx_bd_index = index;
+ hw_txproc_wr_ptr_inc(priv);
+
+ rxbd = &priv->rx_bd_vbase[index];
+ descw = le32_to_cpu(rxbd->info);
+ } else {
+ pr_err("failed to allocate new rx_skb[%d]\n", index);
+ break;
+ }
+
+ writel(priv->hw_txproc_wr_ptr,
+ PCIE_HDP_TX_HOST_Q_WR_PTR(priv->pcie_reg_base));
+ }
+
+ if (processed < budget) {
+ napi_complete(napi);
+ qtnf_en_rxdone_irq(priv);
+ }
+
+ return processed;
+}
+
+static void
+qtnf_pcie_data_tx_timeout(struct qtnf_bus *bus, struct net_device *ndev)
+{
+ struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
+
+ tasklet_hi_schedule(&priv->reclaim_tq);
+}
+
+static void qtnf_pcie_data_rx_start(struct qtnf_bus *bus)
+{
+ struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
+
+ qtnf_enable_hdp_irqs(priv);
+ napi_enable(&bus->mux_napi);
+}
+
+static void qtnf_pcie_data_rx_stop(struct qtnf_bus *bus)
+{
+ struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
+
+ napi_disable(&bus->mux_napi);
+ qtnf_disable_hdp_irqs(priv);
+}
+
+static struct qtnf_bus_ops qtnf_pcie_bus_ops = {
+ /* control path methods */
+ .control_tx = qtnf_pcie_control_tx,
+
+ /* data path methods */
+ .data_tx = qtnf_pcie_data_tx,
+ .data_tx_timeout = qtnf_pcie_data_tx_timeout,
+ .data_rx_start = qtnf_pcie_data_rx_start,
+ .data_rx_stop = qtnf_pcie_data_rx_stop,
+};
+
+static int qtnf_ep_fw_send(struct qtnf_pcie_bus_priv *priv, uint32_t size,
+ int blk, const u8 *pblk, const u8 *fw)
+{
+ struct pci_dev *pdev = priv->pdev;
+ struct qtnf_bus *bus = pci_get_drvdata(pdev);
+
+ struct qtnf_pcie_fw_hdr *hdr;
+ u8 *pdata;
+
+ int hds = sizeof(*hdr);
+ struct sk_buff *skb = NULL;
+ int len = 0;
+ int ret;
+
+ skb = __dev_alloc_skb(QTN_PCIE_FW_BUFSZ, GFP_KERNEL);
+ if (!skb)
+ return -ENOMEM;
+
+ skb->len = QTN_PCIE_FW_BUFSZ;
+ skb->dev = NULL;
+
+ hdr = (struct qtnf_pcie_fw_hdr *)skb->data;
+ memcpy(hdr->boardflg, QTN_PCIE_BOARDFLG, strlen(QTN_PCIE_BOARDFLG));
+ hdr->fwsize = cpu_to_le32(size);
+ hdr->seqnum = cpu_to_le32(blk);
+
+ if (blk)
+ hdr->type = cpu_to_le32(QTN_FW_DSUB);
+ else
+ hdr->type = cpu_to_le32(QTN_FW_DBEGIN);
+
+ pdata = skb->data + hds;
+
+ len = QTN_PCIE_FW_BUFSZ - hds;
+ if (pblk >= (fw + size - len)) {
+ len = fw + size - pblk;
+ hdr->type = cpu_to_le32(QTN_FW_DEND);
+ }
+
+ hdr->pktlen = cpu_to_le32(len);
+ memcpy(pdata, pblk, len);
+ hdr->crc = cpu_to_le32(~crc32(0, pdata, len));
+
+ ret = qtnf_pcie_data_tx(bus, skb);
+
+ return (ret == NETDEV_TX_OK) ? len : 0;
+}
+
+static int
+qtnf_ep_fw_load(struct qtnf_pcie_bus_priv *priv, const u8 *fw, u32 fw_size)
+{
+ int blk_size = QTN_PCIE_FW_BUFSZ - sizeof(struct qtnf_pcie_fw_hdr);
+ int blk_count = fw_size / blk_size + 1;
+ const u8 *pblk = fw;
+ int threshold = 0;
+ int blk = 0;
+ int len;
+
+ pr_debug("FW upload started: fw_addr=0x%p size=%d\n", fw, fw_size);
+
+ while (blk < blk_count) {
+ if (++threshold > 10000) {
+ pr_err("FW upload failed: too many retries\n");
+ return -ETIMEDOUT;
+ }
+
+ len = qtnf_ep_fw_send(priv, fw_size, blk, pblk, fw);
+ if (len <= 0)
+ continue;
+
+ if (!((blk + 1) & QTN_PCIE_FW_DLMASK) ||
+ (blk == (blk_count - 1))) {
+ qtnf_set_state(&priv->bda->bda_rc_state,
+ QTN_RC_FW_SYNC);
+ if (qtnf_poll_state(&priv->bda->bda_ep_state,
+ QTN_EP_FW_SYNC,
+ QTN_FW_DL_TIMEOUT_MS)) {
+ pr_err("FW upload failed: SYNC timed out\n");
+ return -ETIMEDOUT;
+ }
+
+ qtnf_clear_state(&priv->bda->bda_ep_state,
+ QTN_EP_FW_SYNC);
+
+ if (qtnf_is_state(&priv->bda->bda_ep_state,
+ QTN_EP_FW_RETRY)) {
+ if (blk == (blk_count - 1)) {
+ int last_round =
+ blk_count & QTN_PCIE_FW_DLMASK;
+ blk -= last_round;
+ pblk -= ((last_round - 1) *
+ blk_size + len);
+ } else {
+ blk -= QTN_PCIE_FW_DLMASK;
+ pblk -= QTN_PCIE_FW_DLMASK * blk_size;
+ }
+
+ qtnf_clear_state(&priv->bda->bda_ep_state,
+ QTN_EP_FW_RETRY);
+
+ pr_warn("FW upload retry: block #%d\n", blk);
+ continue;
+ }
+
+ qtnf_pcie_data_tx_reclaim(priv);
+ }
+
+ pblk += len;
+ blk++;
+ }
+
+ pr_debug("FW upload completed: totally sent %d blocks\n", blk);
+ return 0;
+}
+
+static void qtnf_firmware_load(const struct firmware *fw, void *context)
+{
+ struct qtnf_pcie_bus_priv *priv = (void *)context;
+ struct pci_dev *pdev = priv->pdev;
+ struct qtnf_bus *bus = pci_get_drvdata(pdev);
+ int ret;
+
+ if (!fw) {
+ pr_err("failed to get firmware %s\n", bus->fwname);
+ goto fw_load_err;
+ }
+
+ ret = qtnf_ep_fw_load(priv, fw->data, fw->size);
+ if (ret) {
+ pr_err("FW upload error\n");
+ goto fw_load_err;
+ }
+
+ if (qtnf_poll_state(&priv->bda->bda_ep_state, QTN_EP_FW_DONE,
+ QTN_FW_DL_TIMEOUT_MS)) {
+ pr_err("FW bringup timed out\n");
+ goto fw_load_err;
+ }
+
+ bus->fw_state = QTNF_FW_STATE_FW_DNLD_DONE;
+ pr_info("firmware is up and running\n");
+
+fw_load_err:
+
+ if (fw)
+ release_firmware(fw);
+
+ complete(&bus->request_firmware_complete);
+}
+
+static int qtnf_bringup_fw(struct qtnf_bus *bus)
+{
+ struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
+ struct pci_dev *pdev = priv->pdev;
+ int ret;
+
+ qtnf_set_state(&priv->bda->bda_rc_state,
+ QTN_RC_FW_LOADRDY | QTN_RC_FW_QLINK);
+ if (qtnf_poll_state(&priv->bda->bda_ep_state, QTN_EP_FW_LOADRDY,
+ QTN_FW_DL_TIMEOUT_MS)) {
+ pr_err("card is not ready\n");
+ return -ETIMEDOUT;
+ }
+
+ pr_info("starting firmware upload: %s\n", bus->fwname);
+
+ qtnf_clear_state(&priv->bda->bda_ep_state, QTN_EP_FW_LOADRDY);
+
+ ret = request_firmware_nowait(THIS_MODULE, 1, bus->fwname, &pdev->dev,
+ GFP_KERNEL, priv, qtnf_firmware_load);
+ if (ret)
+ pr_err("request_firmware_nowait error %d\n", ret);
+
+ return ret;
+}
+
+static void qtnf_reclaim_tasklet_fn(unsigned long data)
+{
+ struct qtnf_pcie_bus_priv *priv = (void *)data;
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->tx_lock, flags);
+ qtnf_pcie_data_tx_reclaim(priv);
+ spin_unlock_irqrestore(&priv->tx_lock, flags);
+ qtnf_en_txdone_irq(priv);
+}
+
+static int qtnf_dbg_mps_show(struct seq_file *s, void *data)
+{
+ struct qtnf_bus *bus = dev_get_drvdata(s->private);
+ struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus);
+
+ seq_printf(s, "%d\n", priv->mps);
+
+ return 0;
+}
+
+static int qtnf_dbg_msi_show(struct seq_file *s, void *data)
+{
+ struct qtnf_bus *bus = dev_get_drvdata(s->private);
+ struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus);
+
+ seq_printf(s, "%u\n", priv->msi_enabled);
+
+ return 0;
+}
+
+static int qtnf_dbg_irq_stats(struct seq_file *s, void *data)
+{
+ struct qtnf_bus *bus = dev_get_drvdata(s->private);
+ struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus);
+
+ seq_printf(s, "pcie_irq_count(%u)\n", priv->pcie_irq_count);
+ seq_printf(s, "pcie_irq_tx_count(%u)\n", priv->pcie_irq_tx_count);
+ seq_printf(s, "pcie_irq_rx_count(%u)\n", priv->pcie_irq_rx_count);
+
+ return 0;
+}
+
+static int qtnf_dbg_hdp_stats(struct seq_file *s, void *data)
+{
+ struct qtnf_bus *bus = dev_get_drvdata(s->private);
+ struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus);
+
+ seq_printf(s, "tx_full_count(%u)\n", priv->tx_full_count);
+ seq_printf(s, "tx_done_count(%u)\n", priv->tx_done_count);
+ seq_printf(s, "tx_reclaim_done(%u)\n", priv->tx_reclaim_done);
+ seq_printf(s, "tx_reclaim_req(%u)\n", priv->tx_reclaim_req);
+ seq_printf(s, "tx_bd_reclaim_start(%u)\n", priv->tx_bd_reclaim_start);
+ seq_printf(s, "tx_bd_index(%u)\n", priv->tx_bd_index);
+ seq_printf(s, "rx_bd_index(%u)\n", priv->rx_bd_index);
+ seq_printf(s, "tx_queue_len(%u)\n", priv->tx_queue_len);
+
+ return 0;
+}
+
+static int qtnf_dbg_shm_stats(struct seq_file *s, void *data)
+{
+ struct qtnf_bus *bus = dev_get_drvdata(s->private);
+ struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus);
+
+ seq_printf(s, "shm_ipc_ep_in.tx_packet_count(%zu)\n",
+ priv->shm_ipc_ep_in.tx_packet_count);
+ seq_printf(s, "shm_ipc_ep_in.rx_packet_count(%zu)\n",
+ priv->shm_ipc_ep_in.rx_packet_count);
+ seq_printf(s, "shm_ipc_ep_out.tx_packet_count(%zu)\n",
+ priv->shm_ipc_ep_out.tx_timeout_count);
+ seq_printf(s, "shm_ipc_ep_out.rx_packet_count(%zu)\n",
+ priv->shm_ipc_ep_out.rx_packet_count);
+
+ return 0;
+}
+
+static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+ struct qtnf_pcie_bus_priv *pcie_priv;
+ struct qtnf_bus *bus;
+ int ret;
+
+ bus = devm_kzalloc(&pdev->dev,
+ sizeof(*bus) + sizeof(*pcie_priv), GFP_KERNEL);
+ if (!bus) {
+ ret = -ENOMEM;
+ goto err_init;
+ }
+
+ pcie_priv = get_bus_priv(bus);
+
+ pci_set_drvdata(pdev, bus);
+ bus->bus_ops = &qtnf_pcie_bus_ops;
+ bus->dev = &pdev->dev;
+ bus->fw_state = QTNF_FW_STATE_RESET;
+ pcie_priv->pdev = pdev;
+
+ strcpy(bus->fwname, QTN_PCI_PEARL_FW_NAME);
+ init_completion(&bus->request_firmware_complete);
+ mutex_init(&bus->bus_lock);
+ spin_lock_init(&pcie_priv->irq_lock);
+ spin_lock_init(&pcie_priv->tx_lock);
+
+ /* init stats */
+ pcie_priv->tx_full_count = 0;
+ pcie_priv->tx_done_count = 0;
+ pcie_priv->pcie_irq_count = 0;
+ pcie_priv->pcie_irq_rx_count = 0;
+ pcie_priv->pcie_irq_tx_count = 0;
+ pcie_priv->tx_reclaim_done = 0;
+ pcie_priv->tx_reclaim_req = 0;
+
+ pcie_priv->workqueue = create_singlethread_workqueue("QTNF_PEARL_PCIE");
+ if (!pcie_priv->workqueue) {
+ pr_err("failed to alloc bus workqueue\n");
+ ret = -ENODEV;
+ goto err_priv;
+ }
+
+ if (!pci_is_pcie(pdev)) {
+ pr_err("device %s is not PCI Express\n", pci_name(pdev));
+ ret = -EIO;
+ goto err_base;
+ }
+
+ qtnf_tune_pcie_mps(pcie_priv);
+
+ ret = pcim_enable_device(pdev);
+ if (ret) {
+ pr_err("failed to init PCI device %x\n", pdev->device);
+ goto err_base;
+ } else {
+ pr_debug("successful init of PCI device %x\n", pdev->device);
+ }
+
+ pcim_pin_device(pdev);
+ pci_set_master(pdev);
+
+ ret = qtnf_pcie_init_irq(pcie_priv);
+ if (ret < 0) {
+ pr_err("irq init failed\n");
+ goto err_base;
+ }
+
+ ret = qtnf_pcie_init_memory(pcie_priv);
+ if (ret < 0) {
+ pr_err("PCIE memory init failed\n");
+ goto err_base;
+ }
+
+ ret = qtnf_pcie_init_shm_ipc(pcie_priv);
+ if (ret < 0) {
+ pr_err("PCIE SHM IPC init failed\n");
+ goto err_base;
+ }
+
+ ret = qtnf_pcie_init_dma_mask(pcie_priv, DMA_BIT_MASK(32));
+ if (ret) {
+ pr_err("PCIE DMA mask init failed\n");
+ goto err_base;
+ }
+
+ ret = devm_add_action(&pdev->dev, free_xfer_buffers, (void *)pcie_priv);
+ if (ret) {
+ pr_err("custom release callback init failed\n");
+ goto err_base;
+ }
+
+ ret = qtnf_pcie_init_xfer(pcie_priv);
+ if (ret) {
+ pr_err("PCIE xfer init failed\n");
+ goto err_base;
+ }
+
+ /* init default irq settings */
+ qtnf_init_hdp_irqs(pcie_priv);
+
+ /* start with disabled irqs */
+ qtnf_disable_hdp_irqs(pcie_priv);
+
+ ret = devm_request_irq(&pdev->dev, pdev->irq, &qtnf_interrupt, 0,
+ "qtnf_pcie_irq", (void *)bus);
+ if (ret) {
+ pr_err("failed to request pcie irq %d\n", pdev->irq);
+ goto err_base;
+ }
+
+ tasklet_init(&pcie_priv->reclaim_tq, qtnf_reclaim_tasklet_fn,
+ (unsigned long)pcie_priv);
+ init_dummy_netdev(&bus->mux_dev);
+ netif_napi_add(&bus->mux_dev, &bus->mux_napi,
+ qtnf_rx_poll, 10);
+
+ ret = qtnf_bringup_fw(bus);
+ if (ret) {
+ pr_err("failed to upload FW\n");
+ goto err_bringup_fw;
+ }
+
+ wait_for_completion(&bus->request_firmware_complete);
+ if (bus->fw_state != QTNF_FW_STATE_FW_DNLD_DONE) {
+ pr_err("failed to start FW\n");
+ goto err_bringup_fw;
+ }
+
+ if (qtnf_poll_state(&pcie_priv->bda->bda_ep_state, QTN_EP_FW_QLINK_DONE,
+ QTN_FW_QLINK_TIMEOUT_MS)) {
+ pr_err("FW runtime failure\n");
+ goto err_bringup_fw;
+ }
+
+ ret = qtnf_core_attach(bus);
+ if (ret) {
+ pr_err("failed to attach core\n");
+ goto err_core_attach;
+ }
+
+ qtnf_debugfs_init(bus, DRV_NAME);
+ qtnf_debugfs_add_entry(bus, "mps", qtnf_dbg_mps_show);
+ qtnf_debugfs_add_entry(bus, "msi_enabled", qtnf_dbg_msi_show);
+ qtnf_debugfs_add_entry(bus, "hdp_stats", qtnf_dbg_hdp_stats);
+ qtnf_debugfs_add_entry(bus, "irq_stats", qtnf_dbg_irq_stats);
+ qtnf_debugfs_add_entry(bus, "shm_stats", qtnf_dbg_shm_stats);
+
+ return 0;
+
+err_core_attach:
+ qtnf_core_detach(bus);
+ qtnf_pcie_data_rx_stop(bus);
+
+err_bringup_fw:
+ netif_napi_del(&bus->mux_napi);
+
+err_base:
+ flush_workqueue(pcie_priv->workqueue);
+ destroy_workqueue(pcie_priv->workqueue);
+
+err_priv:
+ pci_set_drvdata(pdev, NULL);
+
+err_init:
+ return ret;
+}
+
+static void qtnf_pcie_remove(struct pci_dev *pdev)
+{
+ struct qtnf_pcie_bus_priv *priv;
+ struct qtnf_bus *bus;
+
+ bus = pci_get_drvdata(pdev);
+ if (!bus)
+ return;
+
+ priv = get_bus_priv(bus);
+
+ qtnf_core_detach(bus);
+ qtnf_bus_data_rx_stop(bus);
+ netif_napi_del(&bus->mux_napi);
+
+ flush_workqueue(priv->workqueue);
+ destroy_workqueue(priv->workqueue);
+ tasklet_kill(&priv->reclaim_tq);
+
+ qtnf_debugfs_remove(bus);
+
+ qtnf_pcie_free_shm_ipc(priv);
+}
+
+#ifdef CONFIG_PM_SLEEP
+static int qtnf_pcie_suspend(struct device *dev)
+{
+ return -EOPNOTSUPP;
+}
+
+static int qtnf_pcie_resume(struct device *dev)
+{
+ return 0;
+}
+#endif /* CONFIG_PM_SLEEP */
+
+#ifdef CONFIG_PM_SLEEP
+/* Power Management Hooks */
+static SIMPLE_DEV_PM_OPS(qtnf_pcie_pm_ops, qtnf_pcie_suspend,
+ qtnf_pcie_resume);
+#endif
+
+static struct pci_device_id qtnf_pcie_devid_table[] = {
+ {
+ PCIE_VENDOR_ID_QUANTENNA, PCIE_DEVICE_ID_QTN_PEARL,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ },
+ { },
+};
+
+MODULE_DEVICE_TABLE(pci, qtnf_pcie_devid_table);
+
+static struct pci_driver qtnf_pcie_drv_data = {
+ .name = DRV_NAME,
+ .id_table = qtnf_pcie_devid_table,
+ .probe = qtnf_pcie_probe,
+ .remove = qtnf_pcie_remove,
+#ifdef CONFIG_PM_SLEEP
+ .driver = {
+ .pm = &qtnf_pcie_pm_ops,
+ },
+#endif
+};
+
+static int __init qtnf_pcie_register(void)
+{
+ pr_info("register Quantenna QSR10g FullMAC PCIE driver\n");
+ return pci_register_driver(&qtnf_pcie_drv_data);
+}
+
+static void __exit qtnf_pcie_exit(void)
+{
+ pr_info("unregister Quantenna QSR10g FullMAC PCIE driver\n");
+ pci_unregister_driver(&qtnf_pcie_drv_data);
+}
+
+module_init(qtnf_pcie_register);
+module_exit(qtnf_pcie_exit);
+
+MODULE_AUTHOR("Quantenna Communications");
+MODULE_DESCRIPTION("Quantenna QSR10g PCIe bus driver for 802.11 wireless LAN.");
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_bus_priv.h b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_bus_priv.h
new file mode 100644
index 0000000..ecd3d54
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_bus_priv.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_PCIE_H_
+#define _QTN_FMAC_PCIE_H_
+
+#include <linux/dma-mapping.h>
+#include <linux/io.h>
+
+#include "pcie_regs_pearl.h"
+#include "pcie_ipc.h"
+#include "shm_ipc.h"
+
+struct bus;
+
+struct qtnf_pcie_bus_priv {
+ struct pci_dev *pdev;
+
+ /* lock for irq configuration changes */
+ spinlock_t irq_lock;
+
+ /* lock for tx operations */
+ spinlock_t tx_lock;
+ u8 msi_enabled;
+ int mps;
+
+ struct workqueue_struct *workqueue;
+ struct tasklet_struct reclaim_tq;
+
+ void __iomem *sysctl_bar;
+ void __iomem *epmem_bar;
+ void __iomem *dmareg_bar;
+
+ struct qtnf_shm_ipc shm_ipc_ep_in;
+ struct qtnf_shm_ipc shm_ipc_ep_out;
+
+ struct qtnf_pcie_bda __iomem *bda;
+ void __iomem *pcie_reg_base;
+
+ u16 tx_bd_num;
+ u16 rx_bd_num;
+
+ struct sk_buff **tx_skb;
+ struct sk_buff **rx_skb;
+
+ struct qtnf_tx_bd *tx_bd_vbase;
+ dma_addr_t tx_bd_pbase;
+
+ struct qtnf_rx_bd *rx_bd_vbase;
+ dma_addr_t rx_bd_pbase;
+
+ unsigned long bd_table_vaddr;
+ dma_addr_t bd_table_paddr;
+ u32 bd_table_len;
+
+ u32 hw_txproc_wr_ptr;
+
+ u16 tx_bd_reclaim_start;
+ u16 tx_bd_index;
+ u32 tx_queue_len;
+
+ u16 rx_bd_index;
+
+ u32 pcie_irq_mask;
+
+ /* diagnostics stats */
+ u32 pcie_irq_count;
+ u32 pcie_irq_rx_count;
+ u32 pcie_irq_tx_count;
+ u32 tx_full_count;
+ u32 tx_done_count;
+ u32 tx_reclaim_done;
+ u32 tx_reclaim_req;
+};
+
+#endif /* _QTN_FMAC_PCIE_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_ipc.h b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_ipc.h
new file mode 100644
index 0000000..3d219b1
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_ipc.h
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_PCIE_IPC_H_
+#define _QTN_FMAC_PCIE_IPC_H_
+
+#include <linux/types.h>
+
+#include "shm_ipc_defs.h"
+
+/* bitmap for EP status and flags: updated by EP, read by RC */
+#define QTN_EP_HAS_UBOOT BIT(0)
+#define QTN_EP_HAS_FIRMWARE BIT(1)
+#define QTN_EP_REQ_UBOOT BIT(2)
+#define QTN_EP_REQ_FIRMWARE BIT(3)
+#define QTN_EP_ERROR_UBOOT BIT(4)
+#define QTN_EP_ERROR_FIRMWARE BIT(5)
+
+#define QTN_EP_FW_LOADRDY BIT(8)
+#define QTN_EP_FW_SYNC BIT(9)
+#define QTN_EP_FW_RETRY BIT(10)
+#define QTN_EP_FW_QLINK_DONE BIT(15)
+#define QTN_EP_FW_DONE BIT(16)
+
+/* bitmap for RC status and flags: updated by RC, read by EP */
+#define QTN_RC_PCIE_LINK BIT(0)
+#define QTN_RC_NET_LINK BIT(1)
+#define QTN_RC_FW_QLINK BIT(7)
+#define QTN_RC_FW_LOADRDY BIT(8)
+#define QTN_RC_FW_SYNC BIT(9)
+
+/* state transition timeouts */
+#define QTN_FW_DL_TIMEOUT_MS 3000
+#define QTN_FW_QLINK_TIMEOUT_MS 20000
+
+#define PCIE_HDP_INT_RX_BITS (0 \
+ | PCIE_HDP_INT_EP_TXDMA \
+ | PCIE_HDP_INT_EP_TXEMPTY \
+ )
+
+#define PCIE_HDP_INT_TX_BITS (0 \
+ | PCIE_HDP_INT_EP_RXDMA \
+ )
+
+#if BITS_PER_LONG == 64
+#define QTN_HOST_HI32(a) ((u32)(((u64)a) >> 32))
+#define QTN_HOST_LO32(a) ((u32)(((u64)a) & 0xffffffffUL))
+#define QTN_HOST_ADDR(h, l) ((((u64)h) << 32) | ((u64)l))
+#elif BITS_PER_LONG == 32
+#define QTN_HOST_HI32(a) 0
+#define QTN_HOST_LO32(a) ((u32)(((u32)a) & 0xffffffffUL))
+#define QTN_HOST_ADDR(h, l) ((u32)l)
+#else
+#error Unexpected BITS_PER_LONG value
+#endif
+
+#define QTN_SYSCTL_BAR 0
+#define QTN_SHMEM_BAR 2
+#define QTN_DMA_BAR 3
+
+#define QTN_PCIE_BDA_VERSION 0x1002
+
+#define PCIE_BDA_NAMELEN 32
+#define PCIE_HHBM_MAX_SIZE 512
+
+#define SKB_BUF_SIZE 2048
+
+#define QTN_PCIE_BOARDFLG "PCIEQTN"
+#define QTN_PCIE_FW_DLMASK 0xF
+#define QTN_PCIE_FW_BUFSZ 2048
+
+#define QTN_ENET_ADDR_LENGTH 6
+
+#define QTN_TXDONE_MASK ((u32)0x80000000)
+#define QTN_GET_LEN(x) ((x) & 0xFFFF)
+
+#define QTN_PCIE_TX_DESC_LEN_MASK 0xFFFF
+#define QTN_PCIE_TX_DESC_LEN_SHIFT 0
+#define QTN_PCIE_TX_DESC_PORT_MASK 0xF
+#define QTN_PCIE_TX_DESC_PORT_SHIFT 16
+#define QTN_PCIE_TX_DESC_TQE_BIT BIT(24)
+
+#define QTN_EP_LHOST_TQE_PORT 4
+
+enum qtnf_pcie_bda_ipc_flags {
+ QTN_PCIE_IPC_FLAG_HBM_MAGIC = BIT(0),
+ QTN_PCIE_IPC_FLAG_SHM_PIO = BIT(1),
+};
+
+struct qtnf_pcie_bda {
+ __le16 bda_len;
+ __le16 bda_version;
+ __le32 bda_pci_endian;
+ __le32 bda_ep_state;
+ __le32 bda_rc_state;
+ __le32 bda_dma_mask;
+ __le32 bda_msi_addr;
+ __le32 bda_flashsz;
+ u8 bda_boardname[PCIE_BDA_NAMELEN];
+ __le32 bda_rc_msi_enabled;
+ __le32 bda_hhbm_list[PCIE_HHBM_MAX_SIZE];
+ __le32 bda_dsbw_start_index;
+ __le32 bda_dsbw_end_index;
+ __le32 bda_dsbw_total_bytes;
+ __le32 bda_rc_tx_bd_base;
+ __le32 bda_rc_tx_bd_num;
+ u8 bda_pcie_mac[QTN_ENET_ADDR_LENGTH];
+ struct qtnf_shm_ipc_region bda_shm_reg1 __aligned(4096); /* host TX */
+ struct qtnf_shm_ipc_region bda_shm_reg2 __aligned(4096); /* host RX */
+} __packed;
+
+struct qtnf_tx_bd {
+ __le32 addr;
+ __le32 addr_h;
+ __le32 info;
+ __le32 info_h;
+} __packed;
+
+struct qtnf_rx_bd {
+ __le32 addr;
+ __le32 addr_h;
+ __le32 info;
+ __le32 info_h;
+ __le32 next_ptr;
+ __le32 next_ptr_h;
+} __packed;
+
+enum qtnf_fw_loadtype {
+ QTN_FW_DBEGIN,
+ QTN_FW_DSUB,
+ QTN_FW_DEND,
+ QTN_FW_CTRL
+};
+
+struct qtnf_pcie_fw_hdr {
+ u8 boardflg[8];
+ __le32 fwsize;
+ __le32 seqnum;
+ __le32 type;
+ __le32 pktlen;
+ __le32 crc;
+} __packed;
+
+#endif /* _QTN_FMAC_PCIE_IPC_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_regs_pearl.h b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_regs_pearl.h
new file mode 100644
index 0000000..78715b8
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_regs_pearl.h
@@ -0,0 +1,353 @@
+/*
+ * Copyright (c) 2015 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __PEARL_PCIE_H
+#define __PEARL_PCIE_H
+
+#define PCIE_GEN2_BASE (0xe9000000)
+#define PCIE_GEN3_BASE (0xe7000000)
+
+#define PEARL_CUR_PCIE_BASE (PCIE_GEN2_BASE)
+#define PCIE_HDP_OFFSET (0x2000)
+
+#define PCIE_HDP_CTRL(base) ((base) + 0x2c00)
+#define PCIE_HDP_AXI_CTRL(base) ((base) + 0x2c04)
+#define PCIE_HDP_HOST_WR_DESC0(base) ((base) + 0x2c10)
+#define PCIE_HDP_HOST_WR_DESC0_H(base) ((base) + 0x2c14)
+#define PCIE_HDP_HOST_WR_DESC1(base) ((base) + 0x2c18)
+#define PCIE_HDP_HOST_WR_DESC1_H(base) ((base) + 0x2c1c)
+#define PCIE_HDP_HOST_WR_DESC2(base) ((base) + 0x2c20)
+#define PCIE_HDP_HOST_WR_DESC2_H(base) ((base) + 0x2c24)
+#define PCIE_HDP_HOST_WR_DESC3(base) ((base) + 0x2c28)
+#define PCIE_HDP_HOST_WR_DESC4_H(base) ((base) + 0x2c2c)
+#define PCIE_HDP_RX_INT_CTRL(base) ((base) + 0x2c30)
+#define PCIE_HDP_TX_INT_CTRL(base) ((base) + 0x2c34)
+#define PCIE_HDP_INT_STATUS(base) ((base) + 0x2c38)
+#define PCIE_HDP_INT_EN(base) ((base) + 0x2c3c)
+#define PCIE_HDP_RX_DESC0_PTR(base) ((base) + 0x2c40)
+#define PCIE_HDP_RX_DESC0_NOE(base) ((base) + 0x2c44)
+#define PCIE_HDP_RX_DESC1_PTR(base) ((base) + 0x2c48)
+#define PCIE_HDP_RX_DESC1_NOE(base) ((base) + 0x2c4c)
+#define PCIE_HDP_RX_DESC2_PTR(base) ((base) + 0x2c50)
+#define PCIE_HDP_RX_DESC2_NOE(base) ((base) + 0x2c54)
+#define PCIE_HDP_RX_DESC3_PTR(base) ((base) + 0x2c58)
+#define PCIE_HDP_RX_DESC3_NOE(base) ((base) + 0x2c5c)
+
+#define PCIE_HDP_TX0_BASE_ADDR(base) ((base) + 0x2c60)
+#define PCIE_HDP_TX1_BASE_ADDR(base) ((base) + 0x2c64)
+#define PCIE_HDP_TX0_Q_CTRL(base) ((base) + 0x2c70)
+#define PCIE_HDP_TX1_Q_CTRL(base) ((base) + 0x2c74)
+#define PCIE_HDP_CFG0(base) ((base) + 0x2c80)
+#define PCIE_HDP_CFG1(base) ((base) + 0x2c84)
+#define PCIE_HDP_CFG2(base) ((base) + 0x2c88)
+#define PCIE_HDP_CFG3(base) ((base) + 0x2c8c)
+#define PCIE_HDP_CFG4(base) ((base) + 0x2c90)
+#define PCIE_HDP_CFG5(base) ((base) + 0x2c94)
+#define PCIE_HDP_CFG6(base) ((base) + 0x2c98)
+#define PCIE_HDP_CFG7(base) ((base) + 0x2c9c)
+#define PCIE_HDP_CFG8(base) ((base) + 0x2ca0)
+#define PCIE_HDP_CFG9(base) ((base) + 0x2ca4)
+#define PCIE_HDP_CFG10(base) ((base) + 0x2ca8)
+#define PCIE_HDP_CFG11(base) ((base) + 0x2cac)
+#define PCIE_INT(base) ((base) + 0x2cb0)
+#define PCIE_INT_MASK(base) ((base) + 0x2cb4)
+#define PCIE_MSI_MASK(base) ((base) + 0x2cb8)
+#define PCIE_MSI_PNDG(base) ((base) + 0x2cbc)
+#define PCIE_PRI_CFG(base) ((base) + 0x2cc0)
+#define PCIE_PHY_CR(base) ((base) + 0x2cc4)
+#define PCIE_HDP_CTAG_CTRL(base) ((base) + 0x2cf4)
+#define PCIE_HDP_HHBM_BUF_PTR(base) ((base) + 0x2d00)
+#define PCIE_HDP_HHBM_BUF_PTR_H(base) ((base) + 0x2d04)
+#define PCIE_HDP_HHBM_BUF_FIFO_NOE(base) ((base) + 0x2d04)
+#define PCIE_HDP_RX0DMA_CNT(base) ((base) + 0x2d10)
+#define PCIE_HDP_RX1DMA_CNT(base) ((base) + 0x2d14)
+#define PCIE_HDP_RX2DMA_CNT(base) ((base) + 0x2d18)
+#define PCIE_HDP_RX3DMA_CNT(base) ((base) + 0x2d1c)
+#define PCIE_HDP_TX0DMA_CNT(base) ((base) + 0x2d20)
+#define PCIE_HDP_TX1DMA_CNT(base) ((base) + 0x2d24)
+#define PCIE_HDP_RXDMA_CTRL(base) ((base) + 0x2d28)
+#define PCIE_HDP_TX_HOST_Q_SZ_CTRL(base) ((base) + 0x2d2c)
+#define PCIE_HDP_TX_HOST_Q_BASE_L(base) ((base) + 0x2d30)
+#define PCIE_HDP_TX_HOST_Q_BASE_H(base) ((base) + 0x2d34)
+#define PCIE_HDP_TX_HOST_Q_WR_PTR(base) ((base) + 0x2d38)
+#define PCIE_HDP_TX_HOST_Q_RD_PTR(base) ((base) + 0x2d3c)
+#define PCIE_HDP_TX_HOST_Q_STS(base) ((base) + 0x2d40)
+
+/* Host HBM pool registers */
+#define PCIE_HHBM_CSR_REG(base) ((base) + 0x2e00)
+#define PCIE_HHBM_Q_BASE_REG(base) ((base) + 0x2e04)
+#define PCIE_HHBM_Q_LIMIT_REG(base) ((base) + 0x2e08)
+#define PCIE_HHBM_Q_WR_REG(base) ((base) + 0x2e0c)
+#define PCIE_HHBM_Q_RD_REG(base) ((base) + 0x2e10)
+#define PCIE_HHBM_POOL_DATA_0_H(base) ((base) + 0x2e90)
+#define PCIE_HHBM_CONFIG(base) ((base) + 0x2f9c)
+#define PCIE_HHBM_POOL_REQ_0(base) ((base) + 0x2f10)
+#define PCIE_HHBM_POOL_DATA_0(base) ((base) + 0x2f40)
+#define PCIE_HHBM_WATERMARK_MASKED_INT(base) ((base) + 0x2f68)
+#define PCIE_HHBM_WATERMARK_INT(base) ((base) + 0x2f6c)
+#define PCIE_HHBM_POOL_WATERMARK(base) ((base) + 0x2f70)
+#define PCIE_HHBM_POOL_OVERFLOW_CNT(base) ((base) + 0x2f90)
+#define PCIE_HHBM_POOL_UNDERFLOW_CNT(base) ((base) + 0x2f94)
+#define HBM_INT_STATUS(base) ((base) + 0x2f9c)
+#define PCIE_HHBM_POOL_CNFIG(base) ((base) + 0x2f9c)
+
+/* host HBM bit field definition */
+#define HHBM_CONFIG_SOFT_RESET (BIT(8))
+#define HHBM_WR_REQ (BIT(0))
+#define HHBM_RD_REQ (BIT(1))
+#define HHBM_DONE (BIT(31))
+
+/* offsets for dual PCIE */
+#define PCIE_PORT_LINK_CTL(base) ((base) + 0x0710)
+#define PCIE_GEN2_CTL(base) ((base) + 0x080C)
+#define PCIE_GEN3_OFF(base) ((base) + 0x0890)
+#define PCIE_ATU_CTRL1(base) ((base) + 0x0904)
+#define PCIE_ATU_CTRL2(base) ((base) + 0x0908)
+#define PCIE_ATU_BASE_LOW(base) ((base) + 0x090C)
+#define PCIE_ATU_BASE_HIGH(base) ((base) + 0x0910)
+#define PCIE_ATU_BASE_LIMIT(base) ((base) + 0x0914)
+#define PCIE_ATU_TGT_LOW(base) ((base) + 0x0918)
+#define PCIE_ATU_TGT_HIGH(base) ((base) + 0x091C)
+#define PCIE_DMA_WR_ENABLE(base) ((base) + 0x097C)
+#define PCIE_DMA_WR_CHWTLOW(base) ((base) + 0x0988)
+#define PCIE_DMA_WR_CHWTHIG(base) ((base) + 0x098C)
+#define PCIE_DMA_WR_INTSTS(base) ((base) + 0x09BC)
+#define PCIE_DMA_WR_INTMASK(base) ((base) + 0x09C4)
+#define PCIE_DMA_WR_INTCLER(base) ((base) + 0x09C8)
+#define PCIE_DMA_WR_DONE_IMWR_ADDR_L(base) ((base) + 0x09D0)
+#define PCIE_DMA_WR_DONE_IMWR_ADDR_H(base) ((base) + 0x09D4)
+#define PCIE_DMA_WR_ABORT_IMWR_ADDR_L(base) ((base) + 0x09D8)
+#define PCIE_DMA_WR_ABORT_IMWR_ADDR_H(base) ((base) + 0x09DC)
+#define PCIE_DMA_WR_IMWR_DATA(base) ((base) + 0x09E0)
+#define PCIE_DMA_WR_LL_ERR_EN(base) ((base) + 0x0A00)
+#define PCIE_DMA_WR_DOORBELL(base) ((base) + 0x0980)
+#define PCIE_DMA_RD_ENABLE(base) ((base) + 0x099C)
+#define PCIE_DMA_RD_DOORBELL(base) ((base) + 0x09A0)
+#define PCIE_DMA_RD_CHWTLOW(base) ((base) + 0x09A8)
+#define PCIE_DMA_RD_CHWTHIG(base) ((base) + 0x09AC)
+#define PCIE_DMA_RD_INTSTS(base) ((base) + 0x0A10)
+#define PCIE_DMA_RD_INTMASK(base) ((base) + 0x0A18)
+#define PCIE_DMA_RD_INTCLER(base) ((base) + 0x0A1C)
+#define PCIE_DMA_RD_ERR_STS_L(base) ((base) + 0x0A24)
+#define PCIE_DMA_RD_ERR_STS_H(base) ((base) + 0x0A28)
+#define PCIE_DMA_RD_LL_ERR_EN(base) ((base) + 0x0A34)
+#define PCIE_DMA_RD_DONE_IMWR_ADDR_L(base) ((base) + 0x0A3C)
+#define PCIE_DMA_RD_DONE_IMWR_ADDR_H(base) ((base) + 0x0A40)
+#define PCIE_DMA_RD_ABORT_IMWR_ADDR_L(base) ((base) + 0x0A44)
+#define PCIE_DMA_RD_ABORT_IMWR_ADDR_H(base) ((base) + 0x0A48)
+#define PCIE_DMA_RD_IMWR_DATA(base) ((base) + 0x0A4C)
+#define PCIE_DMA_CHNL_CONTEXT(base) ((base) + 0x0A6C)
+#define PCIE_DMA_CHNL_CNTRL(base) ((base) + 0x0A70)
+#define PCIE_DMA_XFR_SIZE(base) ((base) + 0x0A78)
+#define PCIE_DMA_SAR_LOW(base) ((base) + 0x0A7C)
+#define PCIE_DMA_SAR_HIGH(base) ((base) + 0x0A80)
+#define PCIE_DMA_DAR_LOW(base) ((base) + 0x0A84)
+#define PCIE_DMA_DAR_HIGH(base) ((base) + 0x0A88)
+#define PCIE_DMA_LLPTR_LOW(base) ((base) + 0x0A8C)
+#define PCIE_DMA_LLPTR_HIGH(base) ((base) + 0x0A90)
+#define PCIE_DMA_WRLL_ERR_ENB(base) ((base) + 0x0A00)
+#define PCIE_DMA_RDLL_ERR_ENB(base) ((base) + 0x0A34)
+#define PCIE_DMABD_CHNL_CNTRL(base) ((base) + 0x8000)
+#define PCIE_DMABD_XFR_SIZE(base) ((base) + 0x8004)
+#define PCIE_DMABD_SAR_LOW(base) ((base) + 0x8008)
+#define PCIE_DMABD_SAR_HIGH(base) ((base) + 0x800c)
+#define PCIE_DMABD_DAR_LOW(base) ((base) + 0x8010)
+#define PCIE_DMABD_DAR_HIGH(base) ((base) + 0x8014)
+#define PCIE_DMABD_LLPTR_LOW(base) ((base) + 0x8018)
+#define PCIE_DMABD_LLPTR_HIGH(base) ((base) + 0x801c)
+#define PCIE_WRDMA0_CHNL_CNTRL(base) ((base) + 0x8000)
+#define PCIE_WRDMA0_XFR_SIZE(base) ((base) + 0x8004)
+#define PCIE_WRDMA0_SAR_LOW(base) ((base) + 0x8008)
+#define PCIE_WRDMA0_SAR_HIGH(base) ((base) + 0x800c)
+#define PCIE_WRDMA0_DAR_LOW(base) ((base) + 0x8010)
+#define PCIE_WRDMA0_DAR_HIGH(base) ((base) + 0x8014)
+#define PCIE_WRDMA0_LLPTR_LOW(base) ((base) + 0x8018)
+#define PCIE_WRDMA0_LLPTR_HIGH(base) ((base) + 0x801c)
+#define PCIE_WRDMA1_CHNL_CNTRL(base) ((base) + 0x8020)
+#define PCIE_WRDMA1_XFR_SIZE(base) ((base) + 0x8024)
+#define PCIE_WRDMA1_SAR_LOW(base) ((base) + 0x8028)
+#define PCIE_WRDMA1_SAR_HIGH(base) ((base) + 0x802c)
+#define PCIE_WRDMA1_DAR_LOW(base) ((base) + 0x8030)
+#define PCIE_WRDMA1_DAR_HIGH(base) ((base) + 0x8034)
+#define PCIE_WRDMA1_LLPTR_LOW(base) ((base) + 0x8038)
+#define PCIE_WRDMA1_LLPTR_HIGH(base) ((base) + 0x803c)
+#define PCIE_RDDMA0_CHNL_CNTRL(base) ((base) + 0x8040)
+#define PCIE_RDDMA0_XFR_SIZE(base) ((base) + 0x8044)
+#define PCIE_RDDMA0_SAR_LOW(base) ((base) + 0x8048)
+#define PCIE_RDDMA0_SAR_HIGH(base) ((base) + 0x804c)
+#define PCIE_RDDMA0_DAR_LOW(base) ((base) + 0x8050)
+#define PCIE_RDDMA0_DAR_HIGH(base) ((base) + 0x8054)
+#define PCIE_RDDMA0_LLPTR_LOW(base) ((base) + 0x8058)
+#define PCIE_RDDMA0_LLPTR_HIGH(base) ((base) + 0x805c)
+#define PCIE_RDDMA1_CHNL_CNTRL(base) ((base) + 0x8060)
+#define PCIE_RDDMA1_XFR_SIZE(base) ((base) + 0x8064)
+#define PCIE_RDDMA1_SAR_LOW(base) ((base) + 0x8068)
+#define PCIE_RDDMA1_SAR_HIGH(base) ((base) + 0x806c)
+#define PCIE_RDDMA1_DAR_LOW(base) ((base) + 0x8070)
+#define PCIE_RDDMA1_DAR_HIGH(base) ((base) + 0x8074)
+#define PCIE_RDDMA1_LLPTR_LOW(base) ((base) + 0x8078)
+#define PCIE_RDDMA1_LLPTR_HIGH(base) ((base) + 0x807c)
+
+#define PCIE_ID(base) ((base) + 0x0000)
+#define PCIE_CMD(base) ((base) + 0x0004)
+#define PCIE_BAR(base, n) ((base) + 0x0010 + ((n) << 2))
+#define PCIE_CAP_PTR(base) ((base) + 0x0034)
+#define PCIE_MSI_LBAR(base) ((base) + 0x0054)
+#define PCIE_MSI_CTRL(base) ((base) + 0x0050)
+#define PCIE_MSI_ADDR_L(base) ((base) + 0x0054)
+#define PCIE_MSI_ADDR_H(base) ((base) + 0x0058)
+#define PCIE_MSI_DATA(base) ((base) + 0x005C)
+#define PCIE_MSI_MASK_BIT(base) ((base) + 0x0060)
+#define PCIE_MSI_PEND_BIT(base) ((base) + 0x0064)
+#define PCIE_DEVCAP(base) ((base) + 0x0074)
+#define PCIE_DEVCTLSTS(base) ((base) + 0x0078)
+
+#define PCIE_CMDSTS(base) ((base) + 0x0004)
+#define PCIE_LINK_STAT(base) ((base) + 0x80)
+#define PCIE_LINK_CTL2(base) ((base) + 0xa0)
+#define PCIE_ASPM_L1_CTRL(base) ((base) + 0x70c)
+#define PCIE_ASPM_LINK_CTRL(base) (PCIE_LINK_STAT)
+#define PCIE_ASPM_L1_SUBSTATE_TIMING(base) ((base) + 0xB44)
+#define PCIE_L1SUB_CTRL1(base) ((base) + 0x150)
+#define PCIE_PMCSR(base) ((base) + 0x44)
+#define PCIE_CFG_SPACE_LIMIT(base) ((base) + 0x100)
+
+/* PCIe link defines */
+#define PEARL_PCIE_LINKUP (0x7)
+#define PEARL_PCIE_DATA_LINK (BIT(0))
+#define PEARL_PCIE_PHY_LINK (BIT(1))
+#define PEARL_PCIE_LINK_RST (BIT(3))
+#define PEARL_PCIE_FATAL_ERR (BIT(5))
+#define PEARL_PCIE_NONFATAL_ERR (BIT(6))
+
+/* PCIe Lane defines */
+#define PCIE_G2_LANE_X1 ((BIT(0)) << 16)
+#define PCIE_G2_LANE_X2 ((BIT(0) | BIT(1)) << 16)
+
+/* PCIe DLL link enable */
+#define PCIE_DLL_LINK_EN ((BIT(0)) << 5)
+
+#define PCIE_LINK_GEN1 (BIT(0))
+#define PCIE_LINK_GEN2 (BIT(1))
+#define PCIE_LINK_GEN3 (BIT(2))
+#define PCIE_LINK_MODE(x) (((x) >> 16) & 0x7)
+
+#define MSI_EN (BIT(0))
+#define MSI_64_EN (BIT(7))
+#define PCIE_MSI_ADDR_OFFSET(a) ((a) & 0xFFFF)
+#define PCIE_MSI_ADDR_ALIGN(a) ((a) & (~0xFFFF))
+
+#define PCIE_BAR_MASK(base, n) ((base) + 0x1010 + ((n) << 2))
+#define PCIE_MAX_BAR (6)
+
+#define PCIE_ATU_VIEW(base) ((base) + 0x0900)
+#define PCIE_ATU_CTL1(base) ((base) + 0x0904)
+#define PCIE_ATU_CTL2(base) ((base) + 0x0908)
+#define PCIE_ATU_LBAR(base) ((base) + 0x090c)
+#define PCIE_ATU_UBAR(base) ((base) + 0x0910)
+#define PCIE_ATU_LAR(base) ((base) + 0x0914)
+#define PCIE_ATU_LTAR(base) ((base) + 0x0918)
+#define PCIE_ATU_UTAR(base) ((base) + 0x091c)
+
+#define PCIE_MSI_ADDR_LOWER(base) ((base) + 0x0820)
+#define PCIE_MSI_ADDR_UPPER(base) ((base) + 0x0824)
+#define PCIE_MSI_ENABLE(base) ((base) + 0x0828)
+#define PCIE_MSI_MASK_RC(base) ((base) + 0x082c)
+#define PCIE_MSI_STATUS(base) ((base) + 0x0830)
+#define PEARL_PCIE_MSI_REGION (0xce000000)
+#define PEARL_PCIE_MSI_DATA (0)
+#define PCIE_MSI_GPIO(base) ((base) + 0x0888)
+
+#define PCIE_HDP_HOST_QUEUE_FULL (BIT(17))
+#define USE_BAR_MATCH_MODE
+#define PCIE_ATU_OB_REGION (BIT(0))
+#define PCIE_ATU_EN_REGION (BIT(31))
+#define PCIE_ATU_EN_MATCH (BIT(30))
+#define PCIE_BASE_REGION (0xb0000000)
+#define PCIE_MEM_MAP_SIZE (512 * 1024)
+
+#define PCIE_OB_REG_REGION (0xcf000000)
+#define PCIE_CONFIG_REGION (0xcf000000)
+#define PCIE_CONFIG_SIZE (4096)
+#define PCIE_CONFIG_CH (1)
+
+/* inbound mapping */
+#define PCIE_IB_BAR0 (0x00000000) /* ddr */
+#define PCIE_IB_BAR0_CH (0)
+#define PCIE_IB_BAR3 (0xe0000000) /* sys_reg */
+#define PCIE_IB_BAR3_CH (1)
+
+/* outbound mapping */
+#define PCIE_MEM_CH (0)
+#define PCIE_REG_CH (1)
+#define PCIE_MEM_REGION (0xc0000000)
+#define PCIE_MEM_SIZE (0x000fffff)
+#define PCIE_MEM_TAR (0x80000000)
+
+#define PCIE_MSI_REGION (0xce000000)
+#define PCIE_MSI_SIZE (KBYTE(4) - 1)
+#define PCIE_MSI_CH (1)
+
+/* size of config region */
+#define PCIE_CFG_SIZE (0x0000ffff)
+
+#define PCIE_ATU_DIR_IB (BIT(31))
+#define PCIE_ATU_DIR_OB (0)
+#define PCIE_ATU_DIR_CFG (2)
+#define PCIE_ATU_DIR_MATCH_IB (BIT(31) | BIT(30))
+
+#define PCIE_DMA_WR_0 (0)
+#define PCIE_DMA_WR_1 (1)
+#define PCIE_DMA_RD_0 (2)
+#define PCIE_DMA_RD_1 (3)
+
+#define PCIE_DMA_CHNL_CNTRL_CB (BIT(0))
+#define PCIE_DMA_CHNL_CNTRL_TCB (BIT(1))
+#define PCIE_DMA_CHNL_CNTRL_LLP (BIT(2))
+#define PCIE_DMA_CHNL_CNTRL_LIE (BIT(3))
+#define PCIE_DMA_CHNL_CNTRL_RIE (BIT(4))
+#define PCIE_DMA_CHNL_CNTRL_CSS (BIT(8))
+#define PCIE_DMA_CHNL_CNTRL_LLE (BIT(9))
+#define PCIE_DMA_CHNL_CNTRL_TLP (BIT(26))
+
+#define PCIE_DMA_CHNL_CONTEXT_RD (BIT(31))
+#define PCIE_DMA_CHNL_CONTEXT_WR (0)
+#define PCIE_MAX_BAR (6)
+
+/* PCIe HDP interrupt status definition */
+#define PCIE_HDP_INT_EP_RXDMA (BIT(0))
+#define PCIE_HDP_INT_HBM_UF (BIT(1))
+#define PCIE_HDP_INT_RX_LEN_ERR (BIT(2))
+#define PCIE_HDP_INT_RX_HDR_LEN_ERR (BIT(3))
+#define PCIE_HDP_INT_EP_TXDMA (BIT(12))
+#define PCIE_HDP_INT_EP_TXEMPTY (BIT(15))
+#define PCIE_HDP_INT_IPC (BIT(29))
+
+/* PCIe interrupt status definition */
+#define PCIE_INT_MSI (BIT(24))
+#define PCIE_INT_INTX (BIT(23))
+
+/* PCIe legacy INTx */
+#define PEARL_PCIE_CFG0_OFFSET (0x6C)
+#define PEARL_ASSERT_INTX (BIT(9))
+
+/* SYS CTL regs */
+#define QTN_PEARL_SYSCTL_LHOST_IRQ_OFFSET (0x001C)
+
+#define QTN_PEARL_IPC_IRQ_WORD(irq) (BIT(irq) | BIT(irq + 16))
+#define QTN_PEARL_LHOST_IPC_IRQ (6)
+
+#endif /* __PEARL_PCIE_H */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h
new file mode 100644
index 0000000..1416344
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h
@@ -0,0 +1,907 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_QLINK_H_
+#define _QTN_QLINK_H_
+
+#include <linux/ieee80211.h>
+
+#define QLINK_PROTO_VER 2
+
+#define QLINK_MACID_RSVD 0xFF
+#define QLINK_VIFID_RSVD 0xFF
+
+/* Common QLINK protocol messages definitions.
+ */
+
+/**
+ * enum qlink_msg_type - QLINK message types
+ *
+ * Used to distinguish between message types of QLINK protocol.
+ *
+ * @QLINK_MSG_TYPE_CMD: Message is carrying data of a command sent from
+ * driver to wireless hardware.
+ * @QLINK_MSG_TYPE_CMDRSP: Message is carrying data of a response to a command.
+ * Sent from wireless HW to driver in reply to previously issued command.
+ * @QLINK_MSG_TYPE_EVENT: Data for an event originated in wireless hardware and
+ * sent asynchronously to driver.
+ */
+enum qlink_msg_type {
+ QLINK_MSG_TYPE_CMD = 1,
+ QLINK_MSG_TYPE_CMDRSP = 2,
+ QLINK_MSG_TYPE_EVENT = 3
+};
+
+/**
+ * struct qlink_msg_header - common QLINK protocol message header
+ *
+ * Portion of QLINK protocol header common for all message types.
+ *
+ * @type: Message type, one of &enum qlink_msg_type.
+ * @len: Total length of message including all headers.
+ */
+struct qlink_msg_header {
+ __le16 type;
+ __le16 len;
+} __packed;
+
+/* Generic definitions of data and information carried in QLINK messages
+ */
+
+enum qlink_hw_capab {
+ QLINK_HW_SUPPORTS_REG_UPDATE = BIT(0),
+};
+
+enum qlink_phy_mode {
+ QLINK_PHYMODE_BGN = BIT(0),
+ QLINK_PHYMODE_AN = BIT(1),
+ QLINK_PHYMODE_AC = BIT(2),
+};
+
+enum qlink_iface_type {
+ QLINK_IFTYPE_AP = 1,
+ QLINK_IFTYPE_STATION = 2,
+ QLINK_IFTYPE_ADHOC = 3,
+ QLINK_IFTYPE_MONITOR = 4,
+ QLINK_IFTYPE_WDS = 5,
+};
+
+/**
+ * struct qlink_intf_info - information on virtual interface.
+ *
+ * Data describing a single virtual interface.
+ *
+ * @if_type: Mode of interface operation, one of &enum qlink_iface_type
+ * @flags: interface flagsmap.
+ * @mac_addr: MAC address of virtual interface.
+ */
+struct qlink_intf_info {
+ __le16 if_type;
+ __le16 flags;
+ u8 mac_addr[ETH_ALEN];
+} __packed;
+
+enum qlink_sta_flags {
+ QLINK_STA_FLAG_INVALID = 0,
+ QLINK_STA_FLAG_AUTHORIZED = BIT(0),
+ QLINK_STA_FLAG_SHORT_PREAMBLE = BIT(1),
+ QLINK_STA_FLAG_WME = BIT(2),
+ QLINK_STA_FLAG_MFP = BIT(3),
+ QLINK_STA_FLAG_AUTHENTICATED = BIT(4),
+ QLINK_STA_FLAG_TDLS_PEER = BIT(5),
+ QLINK_STA_FLAG_ASSOCIATED = BIT(6),
+};
+
+enum qlink_channel_width {
+ QLINK_CHAN_WIDTH_5 = BIT(0),
+ QLINK_CHAN_WIDTH_10 = BIT(1),
+ QLINK_CHAN_WIDTH_20_NOHT = BIT(2),
+ QLINK_CHAN_WIDTH_20 = BIT(3),
+ QLINK_CHAN_WIDTH_40 = BIT(4),
+ QLINK_CHAN_WIDTH_80 = BIT(5),
+ QLINK_CHAN_WIDTH_80P80 = BIT(6),
+ QLINK_CHAN_WIDTH_160 = BIT(7),
+};
+
+/* QLINK Command messages related definitions
+ */
+
+enum qlink_cmd_action {
+ QLINK_CMD_ACTION_GET = 0,
+ QLINK_CMD_ACTION_SET = 1
+};
+
+/**
+ * enum qlink_cmd_type - list of supported commands
+ *
+ * Commands are QLINK messages of type @QLINK_MSG_TYPE_CMD, sent by driver to
+ * wireless network device for processing. Device is expected to send back a
+ * reply message of type &QLINK_MSG_TYPE_CMDRSP, containing at least command
+ * execution status (one of &enum qlink_cmd_result) at least. Reply message
+ * may also contain data payload specific to the command type.
+ *
+ * @QLINK_CMD_CHANS_INFO_GET: for the specified MAC and specified band, get
+ * number of operational channels and information on each of the channel.
+ * This command is generic to a specified MAC, interface index must be set
+ * to QLINK_VIFID_RSVD in command header.
+ */
+enum qlink_cmd_type {
+ QLINK_CMD_FW_INIT = 0x0001,
+ QLINK_CMD_FW_DEINIT = 0x0002,
+ QLINK_CMD_REGISTER_MGMT = 0x0003,
+ QLINK_CMD_SEND_MGMT_FRAME = 0x0004,
+ QLINK_CMD_MGMT_SET_APPIE = 0x0005,
+ QLINK_CMD_PHY_PARAMS = 0x0011,
+ QLINK_CMD_GET_HW_INFO = 0x0013,
+ QLINK_CMD_MAC_INFO = 0x0014,
+ QLINK_CMD_ADD_INTF = 0x0015,
+ QLINK_CMD_DEL_INTF = 0x0016,
+ QLINK_CMD_CHANGE_INTF = 0x0017,
+ QLINK_CMD_UPDOWN_INTF = 0x0018,
+ QLINK_CMD_REG_REGION = 0x0019,
+ QLINK_CMD_CHANS_INFO_GET = 0x001A,
+ QLINK_CMD_CONFIG_AP = 0x0020,
+ QLINK_CMD_START_AP = 0x0021,
+ QLINK_CMD_STOP_AP = 0x0022,
+ QLINK_CMD_GET_STA_INFO = 0x0030,
+ QLINK_CMD_ADD_KEY = 0x0040,
+ QLINK_CMD_DEL_KEY = 0x0041,
+ QLINK_CMD_SET_DEFAULT_KEY = 0x0042,
+ QLINK_CMD_SET_DEFAULT_MGMT_KEY = 0x0043,
+ QLINK_CMD_CHANGE_STA = 0x0051,
+ QLINK_CMD_DEL_STA = 0x0052,
+ QLINK_CMD_SCAN = 0x0053,
+ QLINK_CMD_CONNECT = 0x0060,
+ QLINK_CMD_DISCONNECT = 0x0061,
+};
+
+/**
+ * struct qlink_cmd - QLINK command message header
+ *
+ * Header used for QLINK messages of QLINK_MSG_TYPE_CMD type.
+ *
+ * @mhdr: Common QLINK message header.
+ * @cmd_id: command id, one of &enum qlink_cmd_type.
+ * @seq_num: sequence number of command message, used for matching with
+ * response message.
+ * @result: unused.
+ * @macid: index of physical radio device the command is destined to or
+ * QLINK_MACID_RSVD if not applicable.
+ * @vifid: index of virtual wireless interface on specified @macid the command
+ * is destined to or QLINK_VIFID_RSVD if not applicable.
+ */
+struct qlink_cmd {
+ struct qlink_msg_header mhdr;
+ __le16 cmd_id;
+ __le16 seq_num;
+ __le16 result;
+ u8 macid;
+ u8 vifid;
+} __packed;
+
+/**
+ * struct qlink_cmd_manage_intf - interface management command
+ *
+ * Data for interface management commands QLINK_CMD_ADD_INTF, QLINK_CMD_DEL_INTF
+ * and QLINK_CMD_CHANGE_INTF.
+ *
+ * @action: command action, one of &enum qlink_cmd_action.
+ * @intf_info: interface description.
+ */
+struct qlink_cmd_manage_intf {
+ struct qlink_cmd chdr;
+ __le16 action;
+ struct qlink_intf_info intf_info;
+} __packed;
+
+enum qlink_mgmt_frame_type {
+ QLINK_MGMT_FRAME_ASSOC_REQ = 0x00,
+ QLINK_MGMT_FRAME_ASSOC_RESP = 0x01,
+ QLINK_MGMT_FRAME_REASSOC_REQ = 0x02,
+ QLINK_MGMT_FRAME_REASSOC_RESP = 0x03,
+ QLINK_MGMT_FRAME_PROBE_REQ = 0x04,
+ QLINK_MGMT_FRAME_PROBE_RESP = 0x05,
+ QLINK_MGMT_FRAME_BEACON = 0x06,
+ QLINK_MGMT_FRAME_ATIM = 0x07,
+ QLINK_MGMT_FRAME_DISASSOC = 0x08,
+ QLINK_MGMT_FRAME_AUTH = 0x09,
+ QLINK_MGMT_FRAME_DEAUTH = 0x0A,
+ QLINK_MGMT_FRAME_ACTION = 0x0B,
+
+ QLINK_MGMT_FRAME_TYPE_COUNT
+};
+
+/**
+ * struct qlink_cmd_mgmt_frame_register - data for QLINK_CMD_REGISTER_MGMT
+ *
+ * @frame_type: MGMT frame type the registration request describes, one of
+ * &enum qlink_mgmt_frame_type.
+ * @do_register: 0 - unregister, otherwise register for reception of specified
+ * MGMT frame type.
+ */
+struct qlink_cmd_mgmt_frame_register {
+ struct qlink_cmd chdr;
+ __le16 frame_type;
+ u8 do_register;
+} __packed;
+
+enum qlink_mgmt_frame_tx_flags {
+ QLINK_MGMT_FRAME_TX_FLAG_NONE = 0,
+ QLINK_MGMT_FRAME_TX_FLAG_OFFCHAN = BIT(0),
+ QLINK_MGMT_FRAME_TX_FLAG_NO_CCK = BIT(1),
+ QLINK_MGMT_FRAME_TX_FLAG_ACK_NOWAIT = BIT(2),
+};
+
+/**
+ * struct qlink_cmd_mgmt_frame_tx - data for QLINK_CMD_SEND_MGMT_FRAME command
+ *
+ * @cookie: opaque request identifier.
+ * @freq: Frequency to use for frame transmission.
+ * @flags: Transmission flags, one of &enum qlink_mgmt_frame_tx_flags.
+ * @frame_data: frame to transmit.
+ */
+struct qlink_cmd_mgmt_frame_tx {
+ struct qlink_cmd chdr;
+ __le32 cookie;
+ __le16 freq;
+ __le16 flags;
+ u8 frame_data[0];
+} __packed;
+
+/**
+ * struct qlink_cmd_mgmt_append_ie - data for QLINK_CMD_MGMT_SET_APPIE command
+ *
+ * @type: type of MGMT frame to appent requested IEs to, one of
+ * &enum qlink_mgmt_frame_type.
+ * @flags: for future use.
+ * @ie_data: IEs data to append.
+ */
+struct qlink_cmd_mgmt_append_ie {
+ struct qlink_cmd chdr;
+ u8 type;
+ u8 flags;
+ u8 ie_data[0];
+} __packed;
+
+/**
+ * struct qlink_cmd_get_sta_info - data for QLINK_CMD_GET_STA_INFO command
+ *
+ * @sta_addr: MAC address of the STA statistics is requested for.
+ */
+struct qlink_cmd_get_sta_info {
+ struct qlink_cmd chdr;
+ u8 sta_addr[ETH_ALEN];
+} __packed;
+
+/**
+ * struct qlink_cmd_add_key - data for QLINK_CMD_ADD_KEY command.
+ *
+ * @key_index: index of the key being installed.
+ * @pairwise: whether to use pairwise key.
+ * @addr: MAC address of a STA key is being installed to.
+ * @cipher: cipher suite.
+ * @key_data: key data itself.
+ */
+struct qlink_cmd_add_key {
+ struct qlink_cmd chdr;
+ u8 key_index;
+ u8 pairwise;
+ u8 addr[ETH_ALEN];
+ __le32 cipher;
+ u8 key_data[0];
+} __packed;
+
+/**
+ * struct qlink_cmd_del_key_req - data for QLINK_CMD_DEL_KEY command
+ *
+ * @key_index: index of the key being removed.
+ * @pairwise: whether to use pairwise key.
+ * @addr: MAC address of a STA for which a key is removed.
+ */
+struct qlink_cmd_del_key {
+ struct qlink_cmd chdr;
+ u8 key_index;
+ u8 pairwise;
+ u8 addr[ETH_ALEN];
+} __packed;
+
+/**
+ * struct qlink_cmd_set_def_key - data for QLINK_CMD_SET_DEFAULT_KEY command
+ *
+ * @key_index: index of the key to be set as default one.
+ * @unicast: key is unicast.
+ * @multicast: key is multicast.
+ */
+struct qlink_cmd_set_def_key {
+ struct qlink_cmd chdr;
+ u8 key_index;
+ u8 unicast;
+ u8 multicast;
+} __packed;
+
+/**
+ * struct qlink_cmd_set_def_mgmt_key - data for QLINK_CMD_SET_DEFAULT_MGMT_KEY
+ *
+ * @key_index: index of the key to be set as default MGMT key.
+ */
+struct qlink_cmd_set_def_mgmt_key {
+ struct qlink_cmd chdr;
+ u8 key_index;
+} __packed;
+
+/**
+ * struct qlink_cmd_change_sta - data for QLINK_CMD_CHANGE_STA command
+ *
+ * @sta_flags_mask: STA flags mask, bitmap of &enum qlink_sta_flags
+ * @sta_flags_set: STA flags values, bitmap of &enum qlink_sta_flags
+ * @sta_addr: address of the STA for which parameters are set.
+ */
+struct qlink_cmd_change_sta {
+ struct qlink_cmd chdr;
+ __le32 sta_flags_mask;
+ __le32 sta_flags_set;
+ u8 sta_addr[ETH_ALEN];
+} __packed;
+
+/**
+ * struct qlink_cmd_del_sta - data for QLINK_CMD_DEL_STA command.
+ *
+ * See &struct station_del_parameters
+ */
+struct qlink_cmd_del_sta {
+ struct qlink_cmd chdr;
+ __le16 reason_code;
+ u8 subtype;
+ u8 sta_addr[ETH_ALEN];
+} __packed;
+
+enum qlink_sta_connect_flags {
+ QLINK_STA_CONNECT_DISABLE_HT = BIT(0),
+ QLINK_STA_CONNECT_DISABLE_VHT = BIT(1),
+ QLINK_STA_CONNECT_USE_RRM = BIT(2),
+};
+
+/**
+ * struct qlink_cmd_connect - data for QLINK_CMD_CONNECT command
+ *
+ * @flags: for future use.
+ * @freq: center frequence of a channel which should be used to connect.
+ * @bg_scan_period: period of background scan.
+ * @bssid: BSSID of the BSS to connect to.
+ * @payload: variable portion of connection request.
+ */
+struct qlink_cmd_connect {
+ struct qlink_cmd chdr;
+ __le32 flags;
+ __le16 freq;
+ __le16 bg_scan_period;
+ u8 bssid[ETH_ALEN];
+ u8 payload[0];
+} __packed;
+
+/**
+ * struct qlink_cmd_disconnect - data for QLINK_CMD_DISCONNECT command
+ *
+ * @reason: code of the reason of disconnect, see &enum ieee80211_reasoncode.
+ */
+struct qlink_cmd_disconnect {
+ struct qlink_cmd chdr;
+ __le16 reason;
+} __packed;
+
+/**
+ * struct qlink_cmd_updown - data for QLINK_CMD_UPDOWN_INTF command
+ *
+ * @if_up: bring specified interface DOWN (if_up==0) or UP (otherwise).
+ * Interface is specified in common command header @chdr.
+ */
+struct qlink_cmd_updown {
+ struct qlink_cmd chdr;
+ u8 if_up;
+} __packed;
+
+/**
+ * enum qlink_band - a list of frequency bands
+ *
+ * @QLINK_BAND_2GHZ: 2.4GHz band
+ * @QLINK_BAND_5GHZ: 5GHz band
+ * @QLINK_BAND_60GHZ: 60GHz band
+ */
+enum qlink_band {
+ QLINK_BAND_2GHZ = BIT(0),
+ QLINK_BAND_5GHZ = BIT(1),
+ QLINK_BAND_60GHZ = BIT(2),
+};
+
+/**
+ * struct qlink_cmd_chans_info_get - data for QLINK_CMD_CHANS_INFO_GET command
+ *
+ * @band: a PHY band for which channels info is needed, one of @enum qlink_band
+ */
+struct qlink_cmd_chans_info_get {
+ struct qlink_cmd chdr;
+ u8 band;
+} __packed;
+
+/* QLINK Command Responses messages related definitions
+ */
+
+enum qlink_cmd_result {
+ QLINK_CMD_RESULT_OK = 0,
+ QLINK_CMD_RESULT_INVALID,
+ QLINK_CMD_RESULT_ENOTSUPP,
+ QLINK_CMD_RESULT_ENOTFOUND,
+};
+
+/**
+ * struct qlink_resp - QLINK command response message header
+ *
+ * Header used for QLINK messages of QLINK_MSG_TYPE_CMDRSP type.
+ *
+ * @mhdr: see &struct qlink_msg_header.
+ * @cmd_id: command ID the response corresponds to, one of &enum qlink_cmd_type.
+ * @seq_num: sequence number of command message, used for matching with
+ * response message.
+ * @result: result of the command execution, one of &enum qlink_cmd_result.
+ * @macid: index of physical radio device the response is sent from or
+ * QLINK_MACID_RSVD if not applicable.
+ * @vifid: index of virtual wireless interface on specified @macid the response
+ * is sent from or QLINK_VIFID_RSVD if not applicable.
+ */
+struct qlink_resp {
+ struct qlink_msg_header mhdr;
+ __le16 cmd_id;
+ __le16 seq_num;
+ __le16 result;
+ u8 macid;
+ u8 vifid;
+} __packed;
+
+/**
+ * struct qlink_resp_get_mac_info - response for QLINK_CMD_MAC_INFO command
+ *
+ * Data describing specific physical device providing wireless MAC
+ * functionality.
+ *
+ * @dev_mac: MAC address of physical WMAC device (used for first BSS on
+ * specified WMAC).
+ * @num_tx_chain: Number of transmit chains used by WMAC.
+ * @num_rx_chain: Number of receive chains used by WMAC.
+ * @vht_cap: VHT capabilities.
+ * @ht_cap: HT capabilities.
+ * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band.
+ * @phymode_cap: PHY modes WMAC can operate in, bitmap of &enum qlink_phy_mode.
+ * @max_ap_assoc_sta: Maximum number of associations supported by WMAC.
+ * @radar_detect_widths: bitmask of channels BW for which WMAC can detect radar.
+ * @var_info: variable-length WMAC info data.
+ */
+struct qlink_resp_get_mac_info {
+ struct qlink_resp rhdr;
+ u8 dev_mac[ETH_ALEN];
+ u8 num_tx_chain;
+ u8 num_rx_chain;
+ struct ieee80211_vht_cap vht_cap;
+ struct ieee80211_ht_cap ht_cap;
+ u8 bands_cap;
+ u8 phymode_cap;
+ __le16 max_ap_assoc_sta;
+ __le16 radar_detect_widths;
+ u8 var_info[0];
+} __packed;
+
+/**
+ * struct qlink_resp_get_hw_info - response for QLINK_CMD_GET_HW_INFO command
+ *
+ * Description of wireless hardware capabilities and features.
+ *
+ * @fw_ver: wireless hardware firmware version.
+ * @hw_capab: Bitmap of capabilities supported by firmware.
+ * @ql_proto_ver: Version of QLINK protocol used by firmware.
+ * @country_code: country code ID firmware is configured to.
+ * @num_mac: Number of separate physical radio devices provided by hardware.
+ * @mac_bitmap: Bitmap of MAC IDs that are active and can be used in firmware.
+ * @total_tx_chains: total number of transmit chains used by device.
+ * @total_rx_chains: total number of receive chains.
+ */
+struct qlink_resp_get_hw_info {
+ struct qlink_resp rhdr;
+ __le32 fw_ver;
+ __le32 hw_capab;
+ __le16 ql_proto_ver;
+ u8 alpha2_code[2];
+ u8 num_mac;
+ u8 mac_bitmap;
+ u8 total_tx_chain;
+ u8 total_rx_chain;
+} __packed;
+
+/**
+ * struct qlink_resp_manage_intf - response for interface management commands
+ *
+ * Response data for QLINK_CMD_ADD_INTF and QLINK_CMD_CHANGE_INTF commands.
+ *
+ * @rhdr: Common Command Response message header.
+ * @intf_info: interface description.
+ */
+struct qlink_resp_manage_intf {
+ struct qlink_resp rhdr;
+ struct qlink_intf_info intf_info;
+} __packed;
+
+/**
+ * struct qlink_resp_get_sta_info - response for QLINK_CMD_GET_STA_INFO command
+ *
+ * Response data containing statistics for specified STA.
+ *
+ * @sta_addr: MAC address of STA the response carries statistic for.
+ * @info: statistics for specified STA.
+ */
+struct qlink_resp_get_sta_info {
+ struct qlink_resp rhdr;
+ u8 sta_addr[ETH_ALEN];
+ u8 info[0];
+} __packed;
+
+/**
+ * struct qlink_resp_get_chan_info - response for QLINK_CMD_CHANS_INFO_GET cmd
+ *
+ * @band: frequency band to which channels belong to, one of @enum qlink_band.
+ * @num_chans: total number of channels info data contained in reply data.
+ * @info: variable-length channels info.
+ */
+struct qlink_resp_get_chan_info {
+ struct qlink_resp rhdr;
+ u8 band;
+ u8 num_chans;
+ u8 rsvd[2];
+ u8 info[0];
+} __packed;
+
+/**
+ * struct qlink_resp_phy_params - response for QLINK_CMD_PHY_PARAMS command
+ *
+ * @info: variable-length array of PHY params.
+ */
+struct qlink_resp_phy_params {
+ struct qlink_resp rhdr;
+ u8 info[0];
+} __packed;
+
+/* QLINK Events messages related definitions
+ */
+
+enum qlink_event_type {
+ QLINK_EVENT_STA_ASSOCIATED = 0x0021,
+ QLINK_EVENT_STA_DEAUTH = 0x0022,
+ QLINK_EVENT_MGMT_RECEIVED = 0x0023,
+ QLINK_EVENT_SCAN_RESULTS = 0x0024,
+ QLINK_EVENT_SCAN_COMPLETE = 0x0025,
+ QLINK_EVENT_BSS_JOIN = 0x0026,
+ QLINK_EVENT_BSS_LEAVE = 0x0027,
+};
+
+/**
+ * struct qlink_event - QLINK event message header
+ *
+ * Header used for QLINK messages of QLINK_MSG_TYPE_EVENT type.
+ *
+ * @mhdr: Common QLINK message header.
+ * @event_id: Specifies specific event ID, one of &enum qlink_event_type.
+ * @macid: index of physical radio device the event was generated on or
+ * QLINK_MACID_RSVD if not applicable.
+ * @vifid: index of virtual wireless interface on specified @macid the event
+ * was generated on or QLINK_VIFID_RSVD if not applicable.
+ */
+struct qlink_event {
+ struct qlink_msg_header mhdr;
+ __le16 event_id;
+ u8 macid;
+ u8 vifid;
+} __packed;
+
+/**
+ * struct qlink_event_sta_assoc - data for QLINK_EVENT_STA_ASSOCIATED event
+ *
+ * @sta_addr: Address of a STA for which new association event was generated
+ * @frame_control: control bits from 802.11 ASSOC_REQUEST header.
+ * @payload: IEs from association request.
+ */
+struct qlink_event_sta_assoc {
+ struct qlink_event ehdr;
+ u8 sta_addr[ETH_ALEN];
+ __le16 frame_control;
+ u8 ies[0];
+} __packed;
+
+/**
+ * struct qlink_event_sta_deauth - data for QLINK_EVENT_STA_DEAUTH event
+ *
+ * @sta_addr: Address of a deauthenticated STA.
+ * @reason: reason for deauthentication.
+ */
+struct qlink_event_sta_deauth {
+ struct qlink_event ehdr;
+ u8 sta_addr[ETH_ALEN];
+ __le16 reason;
+} __packed;
+
+/**
+ * struct qlink_event_bss_join - data for QLINK_EVENT_BSS_JOIN event
+ *
+ * @bssid: BSSID of a BSS which interface tried to joined.
+ * @status: status of joining attempt, see &enum ieee80211_statuscode.
+ */
+struct qlink_event_bss_join {
+ struct qlink_event ehdr;
+ u8 bssid[ETH_ALEN];
+ __le16 status;
+} __packed;
+
+/**
+ * struct qlink_event_bss_leave - data for QLINK_EVENT_BSS_LEAVE event
+ *
+ * @reason: reason of disconnecting from BSS.
+ */
+struct qlink_event_bss_leave {
+ struct qlink_event ehdr;
+ u16 reason;
+} __packed;
+
+enum qlink_rxmgmt_flags {
+ QLINK_RXMGMT_FLAG_ANSWERED = 1 << 0,
+};
+
+/**
+ * struct qlink_event_rxmgmt - data for QLINK_EVENT_MGMT_RECEIVED event
+ *
+ * @freq: Frequency on which the frame was received in MHz.
+ * @sig_dbm: signal strength in dBm.
+ * @flags: bitmap of &enum qlink_rxmgmt_flags.
+ * @frame_data: data of Rx'd frame itself.
+ */
+struct qlink_event_rxmgmt {
+ struct qlink_event ehdr;
+ __le32 freq;
+ __le32 sig_dbm;
+ __le32 flags;
+ u8 frame_data[0];
+} __packed;
+
+enum qlink_frame_type {
+ QLINK_BSS_FTYPE_UNKNOWN,
+ QLINK_BSS_FTYPE_BEACON,
+ QLINK_BSS_FTYPE_PRESP,
+};
+
+/**
+ * struct qlink_event_scan_result - data for QLINK_EVENT_SCAN_RESULTS event
+ *
+ * @tsf: TSF timestamp indicating when scan results were generated.
+ * @freq: Center frequency of the channel where BSS for which the scan result
+ * event was generated was discovered.
+ * @capab: capabilities field.
+ * @bintval: beacon interval announced by discovered BSS.
+ * @signal: signal strength.
+ * @frame_type: frame type used to get scan result, see &enum qlink_frame_type.
+ * @bssid: BSSID announced by discovered BSS.
+ * @ssid_len: length of SSID announced by BSS.
+ * @ssid: SSID announced by discovered BSS.
+ * @payload: IEs that are announced by discovered BSS in its MGMt frames.
+ */
+struct qlink_event_scan_result {
+ struct qlink_event ehdr;
+ __le64 tsf;
+ __le16 freq;
+ __le16 capab;
+ __le16 bintval;
+ s8 signal;
+ u8 frame_type;
+ u8 bssid[ETH_ALEN];
+ u8 ssid_len;
+ u8 ssid[IEEE80211_MAX_SSID_LEN];
+ u8 payload[0];
+} __packed;
+
+/**
+ * enum qlink_scan_complete_flags - indicates result of scan request.
+ *
+ * @QLINK_SCAN_NONE: Scan request was processed.
+ * @QLINK_SCAN_ABORTED: Scan was aborted.
+ */
+enum qlink_scan_complete_flags {
+ QLINK_SCAN_NONE = 0,
+ QLINK_SCAN_ABORTED = BIT(0),
+};
+
+/**
+ * struct qlink_event_scan_complete - data for QLINK_EVENT_SCAN_COMPLETE event
+ *
+ * @flags: flags indicating the status of pending scan request,
+ * see &enum qlink_scan_complete_flags.
+ */
+struct qlink_event_scan_complete {
+ struct qlink_event ehdr;
+ __le32 flags;
+} __packed;
+
+/* QLINK TLVs (Type-Length Values) definitions
+ */
+
+enum qlink_tlv_id {
+ QTN_TLV_ID_FRAG_THRESH = 0x0201,
+ QTN_TLV_ID_RTS_THRESH = 0x0202,
+ QTN_TLV_ID_SRETRY_LIMIT = 0x0203,
+ QTN_TLV_ID_LRETRY_LIMIT = 0x0204,
+ QTN_TLV_ID_BCN_PERIOD = 0x0205,
+ QTN_TLV_ID_DTIM = 0x0206,
+ QTN_TLV_ID_CHANNEL = 0x020F,
+ QTN_TLV_ID_COVERAGE_CLASS = 0x0213,
+ QTN_TLV_ID_IFACE_LIMIT = 0x0214,
+ QTN_TLV_ID_NUM_IFACE_COMB = 0x0215,
+ QTN_TLV_ID_STA_BASIC_COUNTERS = 0x0300,
+ QTN_TLV_ID_STA_GENERIC_INFO = 0x0301,
+ QTN_TLV_ID_KEY = 0x0302,
+ QTN_TLV_ID_SEQ = 0x0303,
+ QTN_TLV_ID_CRYPTO = 0x0304,
+ QTN_TLV_ID_IE_SET = 0x0305,
+};
+
+struct qlink_tlv_hdr {
+ __le16 type;
+ __le16 len;
+ u8 val[0];
+} __packed;
+
+struct qlink_iface_limit {
+ __le16 max_num;
+ __le16 type_mask;
+} __packed;
+
+struct qlink_iface_comb_num {
+ __le16 iface_comb_num;
+} __packed;
+
+struct qlink_sta_stat_basic_counters {
+ __le64 rx_bytes;
+ __le64 tx_bytes;
+ __le64 rx_beacons;
+ __le32 rx_packets;
+ __le32 tx_packets;
+ __le32 rx_dropped;
+ __le32 tx_failed;
+} __packed;
+
+enum qlink_sta_info_rate_flags {
+ QLINK_STA_INFO_RATE_FLAG_INVALID = 0,
+ QLINK_STA_INFO_RATE_FLAG_HT_MCS = BIT(0),
+ QLINK_STA_INFO_RATE_FLAG_VHT_MCS = BIT(1),
+ QLINK_STA_INFO_RATE_FLAG_SHORT_GI = BIT(2),
+ QLINK_STA_INFO_RATE_FLAG_60G = BIT(3),
+};
+
+enum qlink_sta_info_rate_bw {
+ QLINK_STA_INFO_RATE_BW_5 = 0,
+ QLINK_STA_INFO_RATE_BW_10 = 1,
+ QLINK_STA_INFO_RATE_BW_20 = 2,
+ QLINK_STA_INFO_RATE_BW_40 = 3,
+ QLINK_STA_INFO_RATE_BW_80 = 4,
+ QLINK_STA_INFO_RATE_BW_160 = 5,
+};
+
+/**
+ * struct qlink_sta_info_rate - STA rate statistics
+ *
+ * @rate: data rate in Mbps.
+ * @flags: bitmap of &enum qlink_sta_flags.
+ * @mcs: 802.11-defined MCS index.
+ * nss: Number of Spatial Streams.
+ * @bw: bandwidth, one of &enum qlink_sta_info_rate_bw.
+ */
+struct qlink_sta_info_rate {
+ __le16 rate;
+ u8 flags;
+ u8 mcs;
+ u8 nss;
+ u8 bw;
+} __packed;
+
+struct qlink_sta_info_state {
+ __le32 mask;
+ __le32 value;
+} __packed;
+
+#define QLINK_RSSI_OFFSET 120
+
+struct qlink_sta_info_generic {
+ struct qlink_sta_info_state state;
+ __le32 connected_time;
+ __le32 inactive_time;
+ struct qlink_sta_info_rate rx_rate;
+ struct qlink_sta_info_rate tx_rate;
+ u8 rssi;
+ u8 rssi_avg;
+} __packed;
+
+struct qlink_tlv_frag_rts_thr {
+ struct qlink_tlv_hdr hdr;
+ __le16 thr;
+} __packed;
+
+struct qlink_tlv_rlimit {
+ struct qlink_tlv_hdr hdr;
+ u8 rlimit;
+} __packed;
+
+struct qlink_tlv_cclass {
+ struct qlink_tlv_hdr hdr;
+ u8 cclass;
+} __packed;
+
+enum qlink_dfs_state {
+ QLINK_DFS_USABLE,
+ QLINK_DFS_UNAVAILABLE,
+ QLINK_DFS_AVAILABLE,
+};
+
+enum qlink_channel_flags {
+ QLINK_CHAN_DISABLED = BIT(0),
+ QLINK_CHAN_NO_IR = BIT(1),
+ QLINK_CHAN_RADAR = BIT(3),
+ QLINK_CHAN_NO_HT40PLUS = BIT(4),
+ QLINK_CHAN_NO_HT40MINUS = BIT(5),
+ QLINK_CHAN_NO_OFDM = BIT(6),
+ QLINK_CHAN_NO_80MHZ = BIT(7),
+ QLINK_CHAN_NO_160MHZ = BIT(8),
+ QLINK_CHAN_INDOOR_ONLY = BIT(9),
+ QLINK_CHAN_IR_CONCURRENT = BIT(10),
+ QLINK_CHAN_NO_20MHZ = BIT(11),
+ QLINK_CHAN_NO_10MHZ = BIT(12),
+};
+
+struct qlink_tlv_channel {
+ struct qlink_tlv_hdr hdr;
+ __le16 hw_value;
+ __le16 center_freq;
+ __le32 flags;
+ u8 band;
+ u8 max_antenna_gain;
+ u8 max_power;
+ u8 max_reg_power;
+ __le32 dfs_cac_ms;
+ u8 dfs_state;
+ u8 beacon_found;
+ u8 rsvd[2];
+} __packed;
+
+#define QLINK_MAX_NR_CIPHER_SUITES 5
+#define QLINK_MAX_NR_AKM_SUITES 2
+
+struct qlink_auth_encr {
+ __le32 wpa_versions;
+ __le32 cipher_group;
+ __le32 n_ciphers_pairwise;
+ __le32 ciphers_pairwise[QLINK_MAX_NR_CIPHER_SUITES];
+ __le32 n_akm_suites;
+ __le32 akm_suites[QLINK_MAX_NR_AKM_SUITES];
+ __le16 control_port_ethertype;
+ u8 auth_type;
+ u8 privacy;
+ u8 mfp;
+ u8 control_port;
+ u8 control_port_no_encrypt;
+} __packed;
+
+#endif /* _QTN_QLINK_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c
new file mode 100644
index 0000000..49ae652
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/nl80211.h>
+
+#include "qlink_util.h"
+
+u16 qlink_iface_type_mask_to_nl(u16 qlink_mask)
+{
+ u16 result = 0;
+
+ if (qlink_mask & QLINK_IFTYPE_AP)
+ result |= BIT(NL80211_IFTYPE_AP);
+
+ if (qlink_mask & QLINK_IFTYPE_STATION)
+ result |= BIT(NL80211_IFTYPE_STATION);
+
+ if (qlink_mask & QLINK_IFTYPE_ADHOC)
+ result |= BIT(NL80211_IFTYPE_ADHOC);
+
+ if (qlink_mask & QLINK_IFTYPE_MONITOR)
+ result |= BIT(NL80211_IFTYPE_MONITOR);
+
+ if (qlink_mask & QLINK_IFTYPE_WDS)
+ result |= BIT(NL80211_IFTYPE_WDS);
+
+ return result;
+}
+
+u8 qlink_chan_width_mask_to_nl(u16 qlink_mask)
+{
+ u8 result = 0;
+
+ if (qlink_mask & QLINK_CHAN_WIDTH_5)
+ result |= BIT(NL80211_CHAN_WIDTH_5);
+
+ if (qlink_mask & QLINK_CHAN_WIDTH_10)
+ result |= BIT(NL80211_CHAN_WIDTH_10);
+
+ if (qlink_mask & QLINK_CHAN_WIDTH_20_NOHT)
+ result |= BIT(NL80211_CHAN_WIDTH_20_NOHT);
+
+ if (qlink_mask & QLINK_CHAN_WIDTH_20)
+ result |= BIT(NL80211_CHAN_WIDTH_20);
+
+ if (qlink_mask & QLINK_CHAN_WIDTH_40)
+ result |= BIT(NL80211_CHAN_WIDTH_40);
+
+ if (qlink_mask & QLINK_CHAN_WIDTH_80)
+ result |= BIT(NL80211_CHAN_WIDTH_80);
+
+ if (qlink_mask & QLINK_CHAN_WIDTH_80P80)
+ result |= BIT(NL80211_CHAN_WIDTH_80P80);
+
+ if (qlink_mask & QLINK_CHAN_WIDTH_160)
+ result |= BIT(NL80211_CHAN_WIDTH_160);
+
+ return result;
+}
diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h
new file mode 100644
index 0000000..d8de484
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_QLINK_UTIL_H_
+#define _QTN_FMAC_QLINK_UTIL_H_
+
+#include <linux/types.h>
+#include <linux/skbuff.h>
+
+#include "qlink.h"
+
+static inline void qtnf_cmd_skb_put_action(struct sk_buff *skb, u16 action)
+{
+ __le16 *buf_ptr;
+
+ buf_ptr = (__le16 *)skb_put(skb, sizeof(action));
+ *buf_ptr = cpu_to_le16(action);
+}
+
+static inline void
+qtnf_cmd_skb_put_buffer(struct sk_buff *skb, const u8 *buf_src, size_t len)
+{
+ u8 *buf_dst;
+
+ buf_dst = skb_put(skb, len);
+ memcpy(buf_dst, buf_src, len);
+}
+
+static inline void qtnf_cmd_skb_put_tlv_arr(struct sk_buff *skb,
+ u16 tlv_id, const u8 arr[],
+ size_t arr_len)
+{
+ struct qlink_tlv_hdr *hdr =
+ (void *)skb_put(skb, sizeof(*hdr) + arr_len);
+
+ hdr->type = cpu_to_le16(tlv_id);
+ hdr->len = cpu_to_le16(arr_len);
+ memcpy(hdr->val, arr, arr_len);
+}
+
+static inline void qtnf_cmd_skb_put_tlv_u8(struct sk_buff *skb, u16 tlv_id,
+ u8 value)
+{
+ struct qlink_tlv_hdr *hdr =
+ (void *)skb_put(skb, sizeof(*hdr) + sizeof(value));
+
+ hdr->type = cpu_to_le16(tlv_id);
+ hdr->len = cpu_to_le16(sizeof(value));
+ *hdr->val = value;
+}
+
+static inline void qtnf_cmd_skb_put_tlv_u16(struct sk_buff *skb,
+ u16 tlv_id, u16 value)
+{
+ struct qlink_tlv_hdr *hdr =
+ (void *)skb_put(skb, sizeof(*hdr) + sizeof(value));
+ __le16 tmp = cpu_to_le16(value);
+
+ hdr->type = cpu_to_le16(tlv_id);
+ hdr->len = cpu_to_le16(sizeof(value));
+ memcpy(hdr->val, &tmp, sizeof(tmp));
+}
+
+u16 qlink_iface_type_mask_to_nl(u16 qlink_mask);
+u8 qlink_chan_width_mask_to_nl(u16 qlink_mask);
+
+#endif /* _QTN_FMAC_QLINK_UTIL_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h b/drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h
new file mode 100644
index 0000000..c4ad40d
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_HW_IDS_H_
+#define _QTN_HW_IDS_H_
+
+#include <linux/pci_ids.h>
+
+#define PCIE_VENDOR_ID_QUANTENNA (0x1bb5)
+
+/* PCIE Device IDs */
+
+#define PCIE_DEVICE_ID_QTN_PEARL (0x0008)
+
+/* FW names */
+
+#define QTN_PCI_PEARL_FW_NAME "qtn/fmac_qsr10g.img"
+
+#endif /* _QTN_HW_IDS_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c
new file mode 100644
index 0000000..061be56
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/types.h>
+#include <linux/io.h>
+
+#include "shm_ipc.h"
+
+#undef pr_fmt
+#define pr_fmt(fmt) "qtnfmac shm_ipc: %s: " fmt, __func__
+
+static bool qtnf_shm_ipc_has_new_data(struct qtnf_shm_ipc *ipc)
+{
+ const u32 flags = readl(&ipc->shm_region->headroom.hdr.flags);
+
+ return (flags & QTNF_SHM_IPC_NEW_DATA);
+}
+
+static void qtnf_shm_handle_new_data(struct qtnf_shm_ipc *ipc)
+{
+ size_t size;
+ bool rx_buff_ok = true;
+ struct qtnf_shm_ipc_region_header __iomem *shm_reg_hdr;
+
+ shm_reg_hdr = &ipc->shm_region->headroom.hdr;
+
+ size = readw(&shm_reg_hdr->data_len);
+
+ if (unlikely(size == 0 || size > QTN_IPC_MAX_DATA_SZ)) {
+ pr_err("wrong rx packet size: %zu\n", size);
+ rx_buff_ok = false;
+ } else {
+ memcpy_fromio(ipc->rx_data, ipc->shm_region->data, size);
+ }
+
+ writel(QTNF_SHM_IPC_ACK, &shm_reg_hdr->flags);
+ readl(&shm_reg_hdr->flags); /* flush PCIe write */
+
+ ipc->interrupt.fn(ipc->interrupt.arg);
+
+ if (likely(rx_buff_ok)) {
+ ipc->rx_packet_count++;
+ ipc->rx_callback.fn(ipc->rx_callback.arg, ipc->rx_data, size);
+ }
+}
+
+static void qtnf_shm_ipc_irq_work(struct work_struct *work)
+{
+ struct qtnf_shm_ipc *ipc = container_of(work, struct qtnf_shm_ipc,
+ irq_work);
+
+ while (qtnf_shm_ipc_has_new_data(ipc))
+ qtnf_shm_handle_new_data(ipc);
+}
+
+static void qtnf_shm_ipc_irq_inbound_handler(struct qtnf_shm_ipc *ipc)
+{
+ u32 flags;
+
+ flags = readl(&ipc->shm_region->headroom.hdr.flags);
+
+ if (flags & QTNF_SHM_IPC_NEW_DATA)
+ queue_work(ipc->workqueue, &ipc->irq_work);
+}
+
+static void qtnf_shm_ipc_irq_outbound_handler(struct qtnf_shm_ipc *ipc)
+{
+ u32 flags;
+
+ if (!READ_ONCE(ipc->waiting_for_ack))
+ return;
+
+ flags = readl(&ipc->shm_region->headroom.hdr.flags);
+
+ if (flags & QTNF_SHM_IPC_ACK) {
+ WRITE_ONCE(ipc->waiting_for_ack, 0);
+ complete(&ipc->tx_completion);
+ }
+}
+
+int qtnf_shm_ipc_init(struct qtnf_shm_ipc *ipc,
+ enum qtnf_shm_ipc_direction direction,
+ struct qtnf_shm_ipc_region __iomem *shm_region,
+ struct workqueue_struct *workqueue,
+ const struct qtnf_shm_ipc_int *interrupt,
+ const struct qtnf_shm_ipc_rx_callback *rx_callback)
+{
+ BUILD_BUG_ON(offsetof(struct qtnf_shm_ipc_region, data) !=
+ QTN_IPC_REG_HDR_SZ);
+ BUILD_BUG_ON(sizeof(struct qtnf_shm_ipc_region) > QTN_IPC_REG_SZ);
+
+ ipc->shm_region = shm_region;
+ ipc->direction = direction;
+ ipc->interrupt = *interrupt;
+ ipc->rx_callback = *rx_callback;
+ ipc->tx_packet_count = 0;
+ ipc->rx_packet_count = 0;
+ ipc->workqueue = workqueue;
+ ipc->waiting_for_ack = 0;
+ ipc->tx_timeout_count = 0;
+
+ switch (direction) {
+ case QTNF_SHM_IPC_OUTBOUND:
+ ipc->irq_handler = qtnf_shm_ipc_irq_outbound_handler;
+ break;
+ case QTNF_SHM_IPC_INBOUND:
+ ipc->irq_handler = qtnf_shm_ipc_irq_inbound_handler;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ INIT_WORK(&ipc->irq_work, qtnf_shm_ipc_irq_work);
+ init_completion(&ipc->tx_completion);
+
+ return 0;
+}
+
+void qtnf_shm_ipc_free(struct qtnf_shm_ipc *ipc)
+{
+ complete_all(&ipc->tx_completion);
+}
+
+int qtnf_shm_ipc_send(struct qtnf_shm_ipc *ipc, const u8 *buf, size_t size)
+{
+ int ret = 0;
+ struct qtnf_shm_ipc_region_header __iomem *shm_reg_hdr;
+
+ shm_reg_hdr = &ipc->shm_region->headroom.hdr;
+
+ if (unlikely(size > QTN_IPC_MAX_DATA_SZ))
+ return -E2BIG;
+
+ ipc->tx_packet_count++;
+
+ writew(size, &shm_reg_hdr->data_len);
+ memcpy_toio(ipc->shm_region->data, buf, size);
+
+ WRITE_ONCE(ipc->waiting_for_ack, 1);
+
+ wmb(); /* sync previous writes before announcing new data ready */
+
+ writel(QTNF_SHM_IPC_NEW_DATA, &shm_reg_hdr->flags);
+ readl(&shm_reg_hdr->flags); /* flush PCIe write */
+
+ ipc->interrupt.fn(ipc->interrupt.arg);
+
+ if (!wait_for_completion_timeout(&ipc->tx_completion,
+ QTN_SHM_IPC_ACK_TIMEOUT)) {
+ ret = -ETIMEDOUT;
+ ipc->tx_timeout_count++;
+ pr_err("TX ACK timeout\n");
+ }
+
+ /* now we're not waiting for ACK even in case of timeout */
+ WRITE_ONCE(ipc->waiting_for_ack, 0);
+
+ return ret;
+}
diff --git a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h
new file mode 100644
index 0000000..453dd64
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_SHM_IPC_H_
+#define _QTN_FMAC_SHM_IPC_H_
+
+#include <linux/workqueue.h>
+#include <linux/completion.h>
+#include <linux/mutex.h>
+#include <linux/spinlock.h>
+
+#include "shm_ipc_defs.h"
+
+#define QTN_SHM_IPC_ACK_TIMEOUT (2 * HZ)
+
+struct qtnf_shm_ipc_int {
+ void (*fn)(void *arg);
+ void *arg;
+};
+
+struct qtnf_shm_ipc_rx_callback {
+ void (*fn)(void *arg, const u8 *buf, size_t len);
+ void *arg;
+};
+
+enum qtnf_shm_ipc_direction {
+ QTNF_SHM_IPC_OUTBOUND = BIT(0),
+ QTNF_SHM_IPC_INBOUND = BIT(1),
+};
+
+struct qtnf_shm_ipc {
+ struct qtnf_shm_ipc_region __iomem *shm_region;
+ enum qtnf_shm_ipc_direction direction;
+ size_t tx_packet_count;
+ size_t rx_packet_count;
+
+ size_t tx_timeout_count;
+
+ u8 waiting_for_ack;
+
+ u8 rx_data[QTN_IPC_MAX_DATA_SZ] __aligned(sizeof(u32));
+
+ struct qtnf_shm_ipc_int interrupt;
+ struct qtnf_shm_ipc_rx_callback rx_callback;
+
+ void (*irq_handler)(struct qtnf_shm_ipc *ipc);
+
+ struct workqueue_struct *workqueue;
+ struct work_struct irq_work;
+ struct completion tx_completion;
+};
+
+int qtnf_shm_ipc_init(struct qtnf_shm_ipc *ipc,
+ enum qtnf_shm_ipc_direction direction,
+ struct qtnf_shm_ipc_region __iomem *shm_region,
+ struct workqueue_struct *workqueue,
+ const struct qtnf_shm_ipc_int *interrupt,
+ const struct qtnf_shm_ipc_rx_callback *rx_callback);
+void qtnf_shm_ipc_free(struct qtnf_shm_ipc *ipc);
+int qtnf_shm_ipc_send(struct qtnf_shm_ipc *ipc, const u8 *buf, size_t size);
+
+static inline void qtnf_shm_ipc_irq_handler(struct qtnf_shm_ipc *ipc)
+{
+ ipc->irq_handler(ipc);
+}
+
+#endif /* _QTN_FMAC_SHM_IPC_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h
new file mode 100644
index 0000000..95a5f89
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_SHM_IPC_DEFS_H_
+#define _QTN_FMAC_SHM_IPC_DEFS_H_
+
+#include <linux/types.h>
+
+#define QTN_IPC_REG_HDR_SZ (32)
+#define QTN_IPC_REG_SZ (4096)
+#define QTN_IPC_MAX_DATA_SZ (QTN_IPC_REG_SZ - QTN_IPC_REG_HDR_SZ)
+
+enum qtnf_shm_ipc_region_flags {
+ QTNF_SHM_IPC_NEW_DATA = BIT(0),
+ QTNF_SHM_IPC_ACK = BIT(1),
+};
+
+struct qtnf_shm_ipc_region_header {
+ __le32 flags;
+ __le16 data_len;
+} __packed;
+
+union qtnf_shm_ipc_region_headroom {
+ struct qtnf_shm_ipc_region_header hdr;
+ u8 headroom[QTN_IPC_REG_HDR_SZ];
+} __packed;
+
+struct qtnf_shm_ipc_region {
+ union qtnf_shm_ipc_region_headroom headroom;
+ u8 data[QTN_IPC_MAX_DATA_SZ];
+} __packed;
+
+#endif /* _QTN_FMAC_SHM_IPC_DEFS_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/trans.c b/drivers/net/wireless/quantenna/qtnfmac/trans.c
new file mode 100644
index 0000000..ccddfeb
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/trans.c
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/types.h>
+#include <linux/export.h>
+#include <linux/slab.h>
+
+#include "core.h"
+#include "commands.h"
+#include "event.h"
+#include "bus.h"
+
+#define QTNF_DEF_SYNC_CMD_TIMEOUT (5 * HZ)
+
+int qtnf_trans_send_cmd_with_resp(struct qtnf_bus *bus, struct sk_buff *cmd_skb,
+ struct sk_buff **response_skb)
+{
+ struct qtnf_cmd_ctl_node *ctl_node = &bus->trans.curr_cmd;
+ struct qlink_cmd *cmd = (void *)cmd_skb->data;
+ int ret = 0;
+ long status;
+ bool resp_not_handled = true;
+ struct sk_buff *resp_skb = NULL;
+
+ if (unlikely(!response_skb))
+ return -EFAULT;
+
+ spin_lock(&ctl_node->resp_lock);
+ ctl_node->seq_num++;
+ cmd->seq_num = cpu_to_le16(ctl_node->seq_num);
+ WARN(ctl_node->resp_skb, "qtnfmac: response skb not empty\n");
+ ctl_node->waiting_for_resp = true;
+ spin_unlock(&ctl_node->resp_lock);
+
+ ret = qtnf_bus_control_tx(bus, cmd_skb);
+ dev_kfree_skb(cmd_skb);
+
+ if (unlikely(ret))
+ goto out;
+
+ status = wait_for_completion_interruptible_timeout(
+ &ctl_node->cmd_resp_completion,
+ QTNF_DEF_SYNC_CMD_TIMEOUT);
+
+ spin_lock(&ctl_node->resp_lock);
+ resp_not_handled = ctl_node->waiting_for_resp;
+ resp_skb = ctl_node->resp_skb;
+ ctl_node->resp_skb = NULL;
+ ctl_node->waiting_for_resp = false;
+ spin_unlock(&ctl_node->resp_lock);
+
+ if (unlikely(status <= 0)) {
+ if (status == 0) {
+ ret = -ETIMEDOUT;
+ pr_err("response timeout\n");
+ } else {
+ ret = -EINTR;
+ pr_debug("interrupted\n");
+ }
+ }
+
+ if (unlikely(!resp_skb || resp_not_handled)) {
+ if (!ret)
+ ret = -EFAULT;
+
+ goto out;
+ }
+
+ ret = 0;
+ *response_skb = resp_skb;
+
+out:
+ if (unlikely(resp_skb && resp_not_handled))
+ dev_kfree_skb(resp_skb);
+
+ return ret;
+}
+
+static void qtnf_trans_signal_cmdresp(struct qtnf_bus *bus, struct sk_buff *skb)
+{
+ struct qtnf_cmd_ctl_node *ctl_node = &bus->trans.curr_cmd;
+ const struct qlink_resp *resp = (const struct qlink_resp *)skb->data;
+ const u16 recvd_seq_num = le16_to_cpu(resp->seq_num);
+
+ spin_lock(&ctl_node->resp_lock);
+
+ if (unlikely(!ctl_node->waiting_for_resp)) {
+ pr_err("unexpected response\n");
+ goto out_err;
+ }
+
+ if (unlikely(recvd_seq_num != ctl_node->seq_num)) {
+ pr_err("seq num mismatch\n");
+ goto out_err;
+ }
+
+ ctl_node->resp_skb = skb;
+ ctl_node->waiting_for_resp = false;
+
+ spin_unlock(&ctl_node->resp_lock);
+
+ complete(&ctl_node->cmd_resp_completion);
+ return;
+
+out_err:
+ spin_unlock(&ctl_node->resp_lock);
+ dev_kfree_skb(skb);
+}
+
+static int qtnf_trans_event_enqueue(struct qtnf_bus *bus, struct sk_buff *skb)
+{
+ struct qtnf_qlink_transport *trans = &bus->trans;
+
+ if (likely(skb_queue_len(&trans->event_queue) <
+ trans->event_queue_max_len)) {
+ skb_queue_tail(&trans->event_queue, skb);
+ queue_work(bus->workqueue, &bus->event_work);
+ } else {
+ pr_warn("event dropped due to queue overflow\n");
+ dev_kfree_skb(skb);
+ return -1;
+ }
+
+ return 0;
+}
+
+void qtnf_trans_init(struct qtnf_bus *bus)
+{
+ struct qtnf_qlink_transport *trans = &bus->trans;
+
+ init_completion(&trans->curr_cmd.cmd_resp_completion);
+ spin_lock_init(&trans->curr_cmd.resp_lock);
+
+ spin_lock(&trans->curr_cmd.resp_lock);
+ trans->curr_cmd.seq_num = 0;
+ trans->curr_cmd.waiting_for_resp = false;
+ trans->curr_cmd.resp_skb = NULL;
+ spin_unlock(&trans->curr_cmd.resp_lock);
+
+ /* Init event handling related fields */
+ skb_queue_head_init(&trans->event_queue);
+ trans->event_queue_max_len = QTNF_MAX_EVENT_QUEUE_LEN;
+}
+
+static void qtnf_trans_free_events(struct qtnf_bus *bus)
+{
+ struct sk_buff_head *event_queue = &bus->trans.event_queue;
+ struct sk_buff *current_event_skb = skb_dequeue(event_queue);
+
+ while (current_event_skb) {
+ dev_kfree_skb_any(current_event_skb);
+ current_event_skb = skb_dequeue(event_queue);
+ }
+}
+
+void qtnf_trans_free(struct qtnf_bus *bus)
+{
+ if (!bus) {
+ pr_err("invalid bus pointer\n");
+ return;
+ }
+
+ qtnf_trans_free_events(bus);
+}
+
+int qtnf_trans_handle_rx_ctl_packet(struct qtnf_bus *bus, struct sk_buff *skb)
+{
+ const struct qlink_msg_header *header = (void *)skb->data;
+ int ret = -1;
+
+ if (unlikely(skb->len < sizeof(*header))) {
+ pr_warn("packet is too small: %u\n", skb->len);
+ dev_kfree_skb(skb);
+ return -EINVAL;
+ }
+
+ if (unlikely(skb->len != le16_to_cpu(header->len))) {
+ pr_warn("cmd reply length mismatch: %u != %u\n",
+ skb->len, le16_to_cpu(header->len));
+ dev_kfree_skb(skb);
+ return -EFAULT;
+ }
+
+ switch (le16_to_cpu(header->type)) {
+ case QLINK_MSG_TYPE_CMDRSP:
+ if (unlikely(skb->len < sizeof(struct qlink_cmd))) {
+ pr_warn("cmd reply too short: %u\n", skb->len);
+ dev_kfree_skb(skb);
+ break;
+ }
+
+ qtnf_trans_signal_cmdresp(bus, skb);
+ break;
+ case QLINK_MSG_TYPE_EVENT:
+ if (unlikely(skb->len < sizeof(struct qlink_event))) {
+ pr_warn("event too short: %u\n", skb->len);
+ dev_kfree_skb(skb);
+ break;
+ }
+
+ ret = qtnf_trans_event_enqueue(bus, skb);
+ break;
+ default:
+ pr_warn("unknown packet type: %x\n", le16_to_cpu(header->type));
+ dev_kfree_skb(skb);
+ break;
+ }
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(qtnf_trans_handle_rx_ctl_packet);
diff --git a/drivers/net/wireless/quantenna/qtnfmac/trans.h b/drivers/net/wireless/quantenna/qtnfmac/trans.h
new file mode 100644
index 0000000..9a473e0
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/trans.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _QTN_FMAC_TRANS_H_
+#define _QTN_FMAC_TRANS_H_
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/mutex.h>
+
+#include "qlink.h"
+
+#define QTNF_CMD_FLAG_RESP_REQ BIT(0)
+
+#define QTNF_MAX_CMD_BUF_SIZE 2048
+#define QTNF_DEF_CMD_HROOM 4
+
+struct qtnf_bus;
+
+struct qtnf_cmd_ctl_node {
+ struct completion cmd_resp_completion;
+ struct sk_buff *resp_skb;
+ u16 seq_num;
+ bool waiting_for_resp;
+ spinlock_t resp_lock; /* lock for resp_skb & waiting_for_resp changes */
+};
+
+struct qtnf_qlink_transport {
+ struct qtnf_cmd_ctl_node curr_cmd;
+ struct sk_buff_head event_queue;
+ size_t event_queue_max_len;
+};
+
+void qtnf_trans_init(struct qtnf_bus *bus);
+void qtnf_trans_free(struct qtnf_bus *bus);
+
+int qtnf_trans_send_next_cmd(struct qtnf_bus *bus);
+int qtnf_trans_handle_rx_ctl_packet(struct qtnf_bus *bus, struct sk_buff *skb);
+int qtnf_trans_send_cmd_with_resp(struct qtnf_bus *bus,
+ struct sk_buff *cmd_skb,
+ struct sk_buff **response_skb);
+
+#endif /* _QTN_FMAC_TRANS_H_ */
diff --git a/drivers/net/wireless/quantenna/qtnfmac/util.c b/drivers/net/wireless/quantenna/qtnfmac/util.c
new file mode 100644
index 0000000..ed38e87
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/util.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include "util.h"
+
+void qtnf_sta_list_init(struct qtnf_sta_list *list)
+{
+ if (unlikely(!list))
+ return;
+
+ INIT_LIST_HEAD(&list->head);
+ atomic_set(&list->size, 0);
+}
+
+struct qtnf_sta_node *qtnf_sta_list_lookup(struct qtnf_sta_list *list,
+ const u8 *mac)
+{
+ struct qtnf_sta_node *node;
+
+ if (unlikely(!mac))
+ return NULL;
+
+ list_for_each_entry(node, &list->head, list) {
+ if (ether_addr_equal(node->mac_addr, mac))
+ return node;
+ }
+
+ return NULL;
+}
+
+struct qtnf_sta_node *qtnf_sta_list_lookup_index(struct qtnf_sta_list *list,
+ size_t index)
+{
+ struct qtnf_sta_node *node;
+
+ if (qtnf_sta_list_size(list) <= index)
+ return NULL;
+
+ list_for_each_entry(node, &list->head, list) {
+ if (index-- == 0)
+ return node;
+ }
+
+ return NULL;
+}
+
+struct qtnf_sta_node *qtnf_sta_list_add(struct qtnf_sta_list *list,
+ const u8 *mac)
+{
+ struct qtnf_sta_node *node;
+
+ if (unlikely(!mac))
+ return NULL;
+
+ node = qtnf_sta_list_lookup(list, mac);
+
+ if (node)
+ goto done;
+
+ node = kzalloc(sizeof(*node), GFP_KERNEL);
+ if (unlikely(!node))
+ goto done;
+
+ ether_addr_copy(node->mac_addr, mac);
+ list_add_tail(&node->list, &list->head);
+ atomic_inc(&list->size);
+
+done:
+ return node;
+}
+
+bool qtnf_sta_list_del(struct qtnf_sta_list *list, const u8 *mac)
+{
+ struct qtnf_sta_node *node;
+ bool ret = false;
+
+ node = qtnf_sta_list_lookup(list, mac);
+
+ if (node) {
+ list_del(&node->list);
+ atomic_dec(&list->size);
+ kfree(node);
+ ret = true;
+ }
+
+ return ret;
+}
+
+void qtnf_sta_list_free(struct qtnf_sta_list *list)
+{
+ struct qtnf_sta_node *node, *tmp;
+
+ atomic_set(&list->size, 0);
+
+ list_for_each_entry_safe(node, tmp, &list->head, list) {
+ list_del(&node->list);
+ kfree(node);
+ }
+
+ INIT_LIST_HEAD(&list->head);
+}
diff --git a/drivers/net/wireless/quantenna/qtnfmac/util.h b/drivers/net/wireless/quantenna/qtnfmac/util.h
new file mode 100644
index 0000000..0359eae
--- /dev/null
+++ b/drivers/net/wireless/quantenna/qtnfmac/util.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015 Quantenna Communications
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef QTNFMAC_UTIL_H
+#define QTNFMAC_UTIL_H
+
+#include <linux/kernel.h>
+#include "core.h"
+
+void qtnf_sta_list_init(struct qtnf_sta_list *list);
+
+struct qtnf_sta_node *qtnf_sta_list_lookup(struct qtnf_sta_list *list,
+ const u8 *mac);
+struct qtnf_sta_node *qtnf_sta_list_lookup_index(struct qtnf_sta_list *list,
+ size_t index);
+struct qtnf_sta_node *qtnf_sta_list_add(struct qtnf_sta_list *list,
+ const u8 *mac);
+bool qtnf_sta_list_del(struct qtnf_sta_list *list, const u8 *mac);
+
+void qtnf_sta_list_free(struct qtnf_sta_list *list);
+
+static inline size_t qtnf_sta_list_size(const struct qtnf_sta_list *list)
+{
+ return atomic_read(&list->size);
+}
+
+static inline bool qtnf_sta_list_empty(const struct qtnf_sta_list *list)
+{
+ return list_empty(&list->head);
+}
+
+#endif /* QTNFMAC_UTIL_H */
--
1.9.1
^ permalink raw reply related
* [OSSTEST PATCH 0/3] Fix rump tests for lzma et al
From: Ian Jackson @ 2016-11-09 14:30 UTC (permalink / raw)
To: xen-devel
Between my last series for fixing the rump tests in osstest, xen.git
grew a dependency on liblzma which causese the rump build of the Xen
tools to fail.
Here I fix this by disabling lots of unwanted stuff by passing
appropriate --disable-whatever options to the xen.git configure
script.
I ran an adhoc flight of the rump parts and it all passed.
This series is next in the queue for osstest pretest.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply
* Re: [Qemu-devel] [PATCH V5] docs: add PCIe devices placement guidelines
From: Marcel Apfelbaum @ 2016-11-09 14:30 UTC (permalink / raw)
To: Marcel Apfelbaum, qemu-devel, mst
Cc: drjones, abologna, alex.williamson, kraxel, laine, lersek
In-Reply-To: <1478007587-4560-1-git-send-email-marcel@redhat.com>
On 11/01/2016 03:39 PM, Marcel Apfelbaum wrote:
> Proposes best practices on how to use PCI Express/PCI device
> in PCI Express based machines and explain the reasoning behind them.
>
Hi Michael,
Can you please apply this doc for 2.8 ?
Thanks,
Marcel
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
> ---
>
> Hi,
>
> v4->v5:
> - Addressed Laine's comments:
> - Advertize (slot,chassis) parameters as mandatory
> - Stated the Downstream ports are not hot-pluggable
> - Other minor typos
>
> v3->v4:
> - Addressed minor typos spotted by Laszlo, thanks!
>
> v2->v3:
> - Addressed the comments from Andrea Bolognani and Laszlo Ersek, which are
> much appreciated!
> - Added links to presentations that may help the understanding of the document.
>
> RFC->v2:
> - Addressed a lot of comments from the reviewers (many thanks to all, especially to Laszlo)
>
>
> Thanks,
> Marcel
>
>
> docs/pcie.txt | 311 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 311 insertions(+)
> create mode 100644 docs/pcie.txt
>
> diff --git a/docs/pcie.txt b/docs/pcie.txt
> new file mode 100644
> index 0000000..1d9bd18
> --- /dev/null
> +++ b/docs/pcie.txt
> @@ -0,0 +1,311 @@
> +PCI EXPRESS GUIDELINES
> +======================
> +
> +1. Introduction
> +================
> +The doc proposes best practices on how to use PCI Express/PCI device
> +in PCI Express based machines and explains the reasoning behind them.
> +
> +The following presentations accompany this document:
> + (1) Q35 overview.
> + http://wiki.qemu.org/images/4/4e/Q35.pdf
> + (2) A comparison between PCI and PCI Express technologies.
> + http://wiki.qemu.org/images/f/f6/PCIvsPCIe.pdf
> +
> +Note: The usage examples are not intended to replace the full
> +documentation, please use QEMU help to retrieve all options.
> +
> +2. Device placement strategy
> +============================
> +QEMU does not have a clear socket-device matching mechanism
> +and allows any PCI/PCI Express device to be plugged into any
> +PCI/PCI Express slot.
> +Plugging a PCI device into a PCI Express slot might not always work and
> +is weird anyway since it cannot be done for "bare metal".
> +Plugging a PCI Express device into a PCI slot will hide the Extended
> +Configuration Space thus is also not recommended.
> +
> +The recommendation is to separate the PCI Express and PCI hierarchies.
> +PCI Express devices should be plugged only into PCI Express Root Ports and
> +PCI Express Downstream ports.
> +
> +2.1 Root Bus (pcie.0)
> +=====================
> +Place only the following kinds of devices directly on the Root Complex:
> + (1) PCI Devices (e.g. network card, graphics card, IDE controller),
> + not controllers. Place only legacy PCI devices on
> + the Root Complex. These will be considered Integrated Endpoints.
> + Note: Integrated Endpoints are not hot-pluggable.
> +
> + Although the PCI Express spec does not forbid PCI Express devices as
> + Integrated Endpoints, existing hardware mostly integrates legacy PCI
> + devices with the Root Complex. Guest OSes are suspected to behave
> + strangely when PCI Express devices are integrated
> + with the Root Complex.
> +
> + (2) PCI Express Root Ports (ioh3420), for starting exclusively PCI Express
> + hierarchies.
> +
> + (3) DMI-PCI Bridges (i82801b11-bridge), for starting legacy PCI
> + hierarchies.
> +
> + (4) Extra Root Complexes (pxb-pcie), if multiple PCI Express Root Buses
> + are needed.
> +
> + pcie.0 bus
> + ----------------------------------------------------------------------------
> + | | | |
> + ----------- ------------------ ------------------ --------------
> + | PCI Dev | | PCIe Root Port | | DMI-PCI Bridge | | pxb-pcie |
> + ----------- ------------------ ------------------ --------------
> +
> +2.1.1 To plug a device into pcie.0 as a Root Complex Integrated Endpoint use:
> + -device <dev>[,bus=pcie.0]
> +2.1.2 To expose a new PCI Express Root Bus use:
> + -device pxb-pcie,id=pcie.1,bus_nr=x[,numa_node=y][,addr=z]
> + Only PCI Express Root Ports and DMI-PCI bridges can be connected
> + to the pcie.1 bus:
> + -device ioh3420,id=root_port1[,bus=pcie.1][,chassis=x][,slot=y][,addr=z] \
> + -device i82801b11-bridge,id=dmi_pci_bridge1,bus=pcie.1
> +
> +
> +2.2 PCI Express only hierarchy
> +==============================
> +Always use PCI Express Root Ports to start PCI Express hierarchies.
> +
> +A PCI Express Root bus supports up to 32 devices. Since each
> +PCI Express Root Port is a function and a multi-function
> +device may support up to 8 functions, the maximum possible
> +number of PCI Express Root Ports per PCI Express Root Bus is 256.
> +
> +Prefer grouping PCI Express Root Ports into multi-function devices
> +to keep a simple flat hierarchy that is enough for most scenarios.
> +Only use PCI Express Switches (x3130-upstream, xio3130-downstream)
> +if there is no more room for PCI Express Root Ports.
> +Please see section 4. for further justifications.
> +
> +Plug only PCI Express devices into PCI Express Ports.
> +
> +
> + pcie.0 bus
> + ----------------------------------------------------------------------------------
> + | | |
> + ------------- ------------- -------------
> + | Root Port | | Root Port | | Root Port |
> + ------------ ------------- -------------
> + | -------------------------|------------------------
> + ------------ | ----------------- |
> + | PCIe Dev | | PCI Express | Upstream Port | |
> + ------------ | Switch ----------------- |
> + | | | |
> + | ------------------- ------------------- |
> + | | Downstream Port | | Downstream Port | |
> + | ------------------- ------------------- |
> + -------------|-----------------------|------------
> + ------------
> + | PCIe Dev |
> + ------------
> +
> +2.2.1 Plugging a PCI Express device into a PCI Express Root Port:
> + -device ioh3420,id=root_port1,chassis=x,slot=y[,bus=pcie.0][,addr=z] \
> + -device <dev>,bus=root_port1
> +2.2.2 Using multi-function PCI Express Root Ports:
> + -device ioh3420,id=root_port1,multifunction=on,chassis=x,slot=y[,bus=pcie.0][,addr=z.0] \
> + -device ioh3420,id=root_port2,chassis=x1,slot=y1[,bus=pcie.0][,addr=z.1] \
> + -device ioh3420,id=root_port3,chassis=x2,slot=y2[,bus=pcie.0][,addr=z.2] \
> +2.2.2 Plugging a PCI Express device into a Switch:
> + -device ioh3420,id=root_port1,chassis=x,slot=y[,bus=pcie.0][,addr=z] \
> + -device x3130-upstream,id=upstream_port1,bus=root_port1[,addr=x] \
> + -device xio3130-downstream,id=downstream_port1,bus=upstream_port1,chassis=x1,slot=y1[,addr=z1]] \
> + -device <dev>,bus=downstream_port1
> +
> +Notes:
> + - (slot, chassis) pair is mandatory and must be
> + unique for each PCI Express Root Port.
> + - 'addr' parameter can be 0 for all the examples above.
> +
> +
> +2.3 PCI only hierarchy
> +======================
> +Legacy PCI devices can be plugged into pcie.0 as Integrated Endpoints,
> +but, as mentioned in section 5, doing so means the legacy PCI
> +device in question will be incapable of hot-unplugging.
> +Besides that use DMI-PCI Bridges (i82801b11-bridge) in combination
> +with PCI-PCI Bridges (pci-bridge) to start PCI hierarchies.
> +
> +Prefer flat hierarchies. For most scenarios a single DMI-PCI Bridge
> +(having 32 slots) and several PCI-PCI Bridges attached to it
> +(each supporting also 32 slots) will support hundreds of legacy devices.
> +The recommendation is to populate one PCI-PCI Bridge under the DMI-PCI Bridge
> +until is full and then plug a new PCI-PCI Bridge...
> +
> + pcie.0 bus
> + ----------------------------------------------
> + | |
> + ----------- ------------------
> + | PCI Dev | | DMI-PCI BRIDGE |
> + ---------- ------------------
> + | |
> + ------------------ ------------------
> + | PCI-PCI Bridge | | PCI-PCI Bridge | ...
> + ------------------ ------------------
> + | |
> + ----------- -----------
> + | PCI Dev | | PCI Dev |
> + ----------- -----------
> +
> +2.3.1 To plug a PCI device into pcie.0 as an Integrated Endpoint use:
> + -device <dev>[,bus=pcie.0]
> +2.3.2 Plugging a PCI device into a PCI-PCI Bridge:
> + -device i82801b11-bridge,id=dmi_pci_bridge1[,bus=pcie.0] \
> + -device pci-bridge,id=pci_bridge1,bus=dmi_pci_bridge1[,chassis_nr=x][,addr=y] \
> + -device <dev>,bus=pci_bridge1[,addr=x]
> + Note that 'addr' cannot be 0 unless shpc=off parameter is passed to
> + the PCI Bridge.
> +
> +3. IO space issues
> +===================
> +The PCI Express Root Ports and PCI Express Downstream ports are seen by
> +Firmware/Guest OS as PCI-PCI Bridges. As required by the PCI spec, each
> +such Port should be reserved a 4K IO range for, even though only one
> +(multifunction) device can be plugged into each Port. This results in
> +poor IO space utilization.
> +
> +The firmware used by QEMU (SeaBIOS/OVMF) may try further optimizations
> +by not allocating IO space for each PCI Express Root / PCI Express
> +Downstream port if:
> + (1) the port is empty, or
> + (2) the device behind the port has no IO BARs.
> +
> +The IO space is very limited, to 65536 byte-wide IO ports, and may even be
> +fragmented by fixed IO ports owned by platform devices resulting in at most
> +10 PCI Express Root Ports or PCI Express Downstream Ports per system
> +if devices with IO BARs are used in the PCI Express hierarchy. Using the
> +proposed device placing strategy solves this issue by using only
> +PCI Express devices within PCI Express hierarchy.
> +
> +The PCI Express spec requires that PCI Express devices work properly
> +without using IO ports. The PCI hierarchy has no such limitations.
> +
> +
> +4. Bus numbers issues
> +======================
> +Each PCI domain can have up to only 256 buses and the QEMU PCI Express
> +machines do not support multiple PCI domains even if extra Root
> +Complexes (pxb-pcie) are used.
> +
> +Each element of the PCI Express hierarchy (Root Complexes,
> +PCI Express Root Ports, PCI Express Downstream/Upstream ports)
> +uses one bus number. Since only one (multifunction) device
> +can be attached to a PCI Express Root Port or PCI Express Downstream
> +Port it is advised to plan in advance for the expected number of
> +devices to prevent bus number starvation.
> +
> +Avoiding PCI Express Switches (and thereby striving for a 'flatter' PCI
> +Express hierarchy) enables the hierarchy to not spend bus numbers on
> +Upstream Ports.
> +
> +The bus_nr properties of the pxb-pcie devices partition the 0..255 bus
> +number space. All bus numbers assigned to the buses recursively behind a
> +given pxb-pcie device's root bus must fit between the bus_nr property of
> +that pxb-pcie device, and the lowest of the higher bus_nr properties
> +that the command line sets for other pxb-pcie devices.
> +
> +
> +5. Hot-plug
> +============
> +The PCI Express root buses (pcie.0 and the buses exposed by pxb-pcie devices)
> +do not support hot-plug, so any devices plugged into Root Complexes
> +cannot be hot-plugged/hot-unplugged:
> + (1) PCI Express Integrated Endpoints
> + (2) PCI Express Root Ports
> + (3) DMI-PCI Bridges
> + (4) pxb-pcie
> +
> +Be aware that PCI Express Downstream Ports can't be hot-plugged into
> +an existing PCI Express Upstream Port.
> +
> +PCI devices can be hot-plugged into PCI-PCI Bridges. The PCI hot-plug is ACPI
> +based and can work side by side with the PCI Express native hot-plug.
> +
> +PCI Express devices can be natively hot-plugged/hot-unplugged into/from
> +PCI Express Root Ports (and PCI Express Downstream Ports).
> +
> +5.1 Planning for hot-plug:
> + (1) PCI hierarchy
> + Leave enough PCI-PCI Bridge slots empty or add one
> + or more empty PCI-PCI Bridges to the DMI-PCI Bridge.
> +
> + For each such PCI-PCI Bridge the Guest Firmware is expected to reserve
> + 4K IO space and 2M MMIO range to be used for all devices behind it.
> +
> + Because of the hard IO limit of around 10 PCI Bridges (~ 40K space)
> + per system don't use more than 9 PCI-PCI Bridges, leaving 4K for the
> + Integrated Endpoints. (The PCI Express Hierarchy needs no IO space).
> +
> + (2) PCI Express hierarchy:
> + Leave enough PCI Express Root Ports empty. Use multifunction
> + PCI Express Root Ports (up to 8 ports per pcie.0 slot)
> + on the Root Complex(es), for keeping the
> + hierarchy as flat as possible, thereby saving PCI bus numbers.
> + Don't use PCI Express Switches if you don't have
> + to, each one of those uses an extra PCI bus (for its Upstream Port)
> + that could be put to better use with another Root Port or Downstream
> + Port, which may come handy for hot-plugging another device.
> +
> +
> +5.3 Hot-plug example:
> +Using HMP: (add -monitor stdio to QEMU command line)
> + device_add <dev>,id=<id>,bus=<PCI Express Root Port Id/PCI Express Downstream Port Id/PCI-PCI Bridge Id/>
> +
> +
> +6. Device assignment
> +====================
> +Host devices are mostly PCI Express and should be plugged only into
> +PCI Express Root Ports or PCI Express Downstream Ports.
> +PCI-PCI Bridge slots can be used for legacy PCI host devices.
> +
> +6.1 How to detect if a device is PCI Express:
> + > lspci -s 03:00.0 -v (as root)
> +
> + 03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83)
> + Subsystem: Intel Corporation Dual Band Wireless-AC 7260
> + Flags: bus master, fast devsel, latency 0, IRQ 50
> + Memory at f0400000 (64-bit, non-prefetchable) [size=8K]
> + Capabilities: [c8] Power Management version 3
> + Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
> + Capabilities: [40] Express Endpoint, MSI 00
> + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> + Capabilities: [100] Advanced Error Reporting
> + Capabilities: [140] Device Serial Number 7c-7a-91-ff-ff-90-db-20
> + Capabilities: [14c] Latency Tolerance Reporting
> + Capabilities: [154] Vendor Specific Information: ID=cafe Rev=1 Len=014
> +
> +If you can see the "Express Endpoint" capability in the
> +output, then the device is indeed PCI Express.
> +
> +
> +7. Virtio devices
> +=================
> +Virtio devices plugged into the PCI hierarchy or as Integrated Endpoints
> +will remain PCI and have transitional behaviour as default.
> +Transitional virtio devices work in both IO and MMIO modes depending on
> +the guest support. The Guest firmware will assign both IO and MMIO resources
> +to transitional virtio devices.
> +
> +Virtio devices plugged into PCI Express ports are PCI Express devices and
> +have "1.0" behavior by default without IO support.
> +In both cases disable-legacy and disable-modern properties can be used
> +to override the behaviour.
> +
> +Note that setting disable-legacy=off will enable legacy mode (enabling
> +legacy behavior) for PCI Express virtio devices causing them to
> +require IO space, which, given the limited available IO space, may quickly
> +lead to resource exhaustion, and is therefore strongly discouraged.
> +
> +
> +8. Conclusion
> +==============
> +The proposal offers a usage model that is easy to understand and follow
> +and at the same time overcomes the PCI Express architecture limitations.
> +
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.