Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 3/3] mac80211: Set lower memory limit for non-VHT devices
From: Toke Høiland-Jørgensen @ 2016-09-30 12:41 UTC (permalink / raw)
  To: Johannes Berg; +Cc: make-wifi-fast, linux-wireless, netdev
In-Reply-To: <1475235230.17481.43.camel@sipsolutions.net>

Johannes Berg <johannes@sipsolutions.net> writes:

> On Fri, 2016-09-23 at 21:59 +0200, Toke Høiland-Jørgensen wrote:
>> Small devices can run out of memory from queueing too many packets.
>> If VHT is not supported by the PHY, having more than 4 MBytes of
>> total queue in the TXQ intermediate queues is not needed, and so we
>> can safely limit the memory usage in these cases and avoid OOM.
>
> I kinda see the logic here - we really don't need to queue as much if
> we can't possibly transmit it out quickly - but it seems to me we
> should also throw in some kind of limit that's relative to the amount
> of memory you have on the system?

Yes, ideally. That goes for FQ-CoDel as well, BTW. LEDE currently
carries a patch for that which just changes the hard-coded default to
another hard-coded default. Not sure how to get a good value to use,
though; and deciding on how large a fraction of memory to use for
packets starts smelling an awful lot like setting policy in the kernel,
doesn't it?

> I've applied these anyway though. I just don't like your assumption (b)
> much as the rationale for it.

Right, thanks. I'll come up with a better rationale next time ;)

-Toke

^ permalink raw reply

* [PATCH v2] cw1200: Don't leak memory if krealloc failes
From: Johannes Thumshirn @ 2016-09-30 12:39 UTC (permalink / raw)
  To: Solomon Peachy, Kalle Valo
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Johannes Thumshirn,
	Johannes Berg

The call to krealloc() in wsm_buf_reserve() directly assigns the newly
returned memory to buf->begin. This is all fine except when krealloc()
failes we loose the ability to free the old memory pointed to by
buf->begin. If we just create a temporary variable to assign memory to
and assign the memory to it we can mitigate the memory leak.

Signed-off-by: Johannes Thumshirn <jthumshirn-l3A5Bk7waGM@public.gmane.org>
Cc: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
---
 drivers/net/wireless/st/cw1200/wsm.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

Changes from v1:
* Do the correct check for a failed re-allocation (Johannes Berg)

diff --git a/drivers/net/wireless/st/cw1200/wsm.c b/drivers/net/wireless/st/cw1200/wsm.c
index 680d60e..ffb245e 100644
--- a/drivers/net/wireless/st/cw1200/wsm.c
+++ b/drivers/net/wireless/st/cw1200/wsm.c
@@ -1807,16 +1807,18 @@ static int wsm_buf_reserve(struct wsm_buf *buf, size_t extra_size)
 {
 	size_t pos = buf->data - buf->begin;
 	size_t size = pos + extra_size;
+	u8 *tmp;
 
 	size = round_up(size, FWLOAD_BLOCK_SIZE);
 
-	buf->begin = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA);
-	if (buf->begin) {
-		buf->data = &buf->begin[pos];
-		buf->end = &buf->begin[size];
-		return 0;
-	} else {
-		buf->end = buf->data = buf->begin;
+	tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA);
+	if (!tmp) {
+		wsm_buf_deinit(buf);
 		return -ENOMEM;
 	}
+
+	buf->begin = tmp;
+	buf->data = &buf->begin[pos];
+	buf->end = &buf->begin[size];
+	return 0;
 }
-- 
1.8.5.6

^ permalink raw reply related

* Re: [PATCH 1/3] cw1200: Don't leak memory if krealloc failes
From: Johannes Thumshirn @ 2016-09-30 12:33 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Solomon Peachy, Kalle Valo, linux-wireless, netdev, linux-kernel
In-Reply-To: <1475238579.17481.56.camel@sipsolutions.net>

On Fri, Sep 30, 2016 at 02:29:39PM +0200, Johannes Berg wrote:
> 
> > +	tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA);
> > +	if (tmp) {
> > 
> I think that check is inverted?
> 
> johannes

Fu.. you're right, of cause it's !tmp.

I'll resend.

Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply

* Re: [PATCH 1/3] cw1200: Don't leak memory if krealloc failes
From: Johannes Berg @ 2016-09-30 12:29 UTC (permalink / raw)
  To: Johannes Thumshirn, Solomon Peachy, Kalle Valo
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1475237495-15030-1-git-send-email-jthumshirn-l3A5Bk7waGM@public.gmane.org>


> +	tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA);
> +	if (tmp) {
> 
I think that check is inverted?

johannes

^ permalink raw reply

* [PATCH 1/3] cw1200: Don't leak memory if krealloc failes
From: Johannes Thumshirn @ 2016-09-30 12:11 UTC (permalink / raw)
  To: Solomon Peachy, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel, Johannes Thumshirn

The call to krealloc() in wsm_buf_reserve() directly assigns the newly
returned memory to buf->begin. This is all fine except when krealloc()
failes we loose the ability to free the old memory pointed to by
buf->begin. If we just create a temporary variable to assign memory to
and assign the memory to it we can mitigate the memory leak.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/net/wireless/st/cw1200/wsm.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/st/cw1200/wsm.c b/drivers/net/wireless/st/cw1200/wsm.c
index 680d60e..12fad99 100644
--- a/drivers/net/wireless/st/cw1200/wsm.c
+++ b/drivers/net/wireless/st/cw1200/wsm.c
@@ -1807,16 +1807,18 @@ static int wsm_buf_reserve(struct wsm_buf *buf, size_t extra_size)
 {
 	size_t pos = buf->data - buf->begin;
 	size_t size = pos + extra_size;
+	u8 *tmp;
 
 	size = round_up(size, FWLOAD_BLOCK_SIZE);
 
-	buf->begin = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA);
-	if (buf->begin) {
-		buf->data = &buf->begin[pos];
-		buf->end = &buf->begin[size];
-		return 0;
-	} else {
-		buf->end = buf->data = buf->begin;
+	tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA);
+	if (tmp) {
+		wsm_buf_deinit(buf);
 		return -ENOMEM;
 	}
+
+	buf->begin = tmp;
+	buf->data = &buf->begin[pos];
+	buf->end = &buf->begin[size];
+	return 0;
 }
-- 
1.8.5.6

^ permalink raw reply related

* Re: [PATCH 3/3] mac80211: Set lower memory limit for non-VHT devices
From: Johannes Berg @ 2016-09-30 11:33 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, make-wifi-fast, linux-wireless,
	netdev
In-Reply-To: <20160923195911.4572-4-toke@toke.dk>

On Fri, 2016-09-23 at 21:59 +0200, Toke Høiland-Jørgensen wrote:
> Small devices can run out of memory from queueing too many packets.
> If VHT is not supported by the PHY, having more than 4 MBytes of
> total queue in the TXQ intermediate queues is not needed, and so we
> can safely limit the memory usage in these cases and avoid OOM.

I kinda see the logic here - we really don't need to queue as much if
we can't possibly transmit it out quickly - but it seems to me we
should also throw in some kind of limit that's relative to the amount
of memory you have on the system?

I've applied these anyway though. I just don't like your assumption (b)
much as the rationale for it.

johannes

^ permalink raw reply

* Kernel panic + grsec patch kernel
From: vorohin907 @ 2016-09-30 11:33 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

Hello!
I would like to deal with the issue of kernel panic when using PAX.
Kernel panic occurs when you use wi fi.

All reports are in this thread.

https://forums.grsecurity.net/viewtopic.php?f=3&t=4574

I applied to the letter dmesg ( pax_size_overflow_report_only )

Said to write to this address.

Thank you!

[-- Attachment #2: dmesg --]
[-- Type: text/plain, Size: 66637 bytes --]

[    0.000000]  gran_size: 1M 	chunk_size: 64M 	num_reg: 10  	lose cover RAM: 0G
[    0.000000]  gran_size: 1M 	chunk_size: 128M 	num_reg: 10  	lose cover RAM: 0G
[    0.000000]  gran_size: 1M 	chunk_size: 256M 	num_reg: 10  	lose cover RAM: 0G
[    0.000000] *BAD*gran_size: 1M 	chunk_size: 512M 	num_reg: 10  	lose cover RAM: -256M
[    0.000000]  gran_size: 1M 	chunk_size: 1G 	num_reg: 10  	lose cover RAM: 0G
[    0.000000] *BAD*gran_size: 1M 	chunk_size: 2G 	num_reg: 10  	lose cover RAM: -1G
[    0.000000]  gran_size: 2M 	chunk_size: 2M 	num_reg: 10  	lose cover RAM: 54M
[    0.000000]  gran_size: 2M 	chunk_size: 4M 	num_reg: 10  	lose cover RAM: 54M
[    0.000000]  gran_size: 2M 	chunk_size: 8M 	num_reg: 10  	lose cover RAM: 54M
[    0.000000]  gran_size: 2M 	chunk_size: 16M 	num_reg: 10  	lose cover RAM: 0G
[    0.000000]  gran_size: 2M 	chunk_size: 32M 	num_reg: 10  	lose cover RAM: 0G
[    0.000000]  gran_size: 2M 	chunk_size: 64M 	num_reg: 10  	lose cover RAM: 0G
[    0.000000]  gran_size: 2M 	chunk_size: 128M 	num_reg: 10  	lose cover RAM: 0G
[    0.000000]  gran_size: 2M 	chunk_size: 256M 	num_reg: 10  	lose cover RAM: 0G
[    0.000000] *BAD*gran_size: 2M 	chunk_size: 512M 	num_reg: 10  	lose cover RAM: -256M
[    0.000000]  gran_size: 2M 	chunk_size: 1G 	num_reg: 10  	lose cover RAM: 0G
[    0.000000] *BAD*gran_size: 2M 	chunk_size: 2G 	num_reg: 10  	lose cover RAM: -1G
[    0.000000]  gran_size: 4M 	chunk_size: 4M 	num_reg: 10  	lose cover RAM: 54M
[    0.000000]  gran_size: 4M 	chunk_size: 8M 	num_reg: 10  	lose cover RAM: 54M
[    0.000000]  gran_size: 4M 	chunk_size: 16M 	num_reg: 10  	lose cover RAM: 2M
[    0.000000]  gran_size: 4M 	chunk_size: 32M 	num_reg: 10  	lose cover RAM: 2M
[    0.000000]  gran_size: 4M 	chunk_size: 64M 	num_reg: 10  	lose cover RAM: 2M
[    0.000000]  gran_size: 4M 	chunk_size: 128M 	num_reg: 10  	lose cover RAM: 2M
[    0.000000]  gran_size: 4M 	chunk_size: 256M 	num_reg: 10  	lose cover RAM: 2M
[    0.000000] *BAD*gran_size: 4M 	chunk_size: 512M 	num_reg: 10  	lose cover RAM: -254M
[    0.000000]  gran_size: 4M 	chunk_size: 1G 	num_reg: 10  	lose cover RAM: 2M
[    0.000000] *BAD*gran_size: 4M 	chunk_size: 2G 	num_reg: 10  	lose cover RAM: -1022M
[    0.000000]  gran_size: 8M 	chunk_size: 8M 	num_reg: 10  	lose cover RAM: 54M
[    0.000000]  gran_size: 8M 	chunk_size: 16M 	num_reg: 10  	lose cover RAM: 22M
[    0.000000]  gran_size: 8M 	chunk_size: 32M 	num_reg: 9  	lose cover RAM: 6M
[    0.000000]  gran_size: 8M 	chunk_size: 64M 	num_reg: 9  	lose cover RAM: 6M
[    0.000000]  gran_size: 8M 	chunk_size: 128M 	num_reg: 9  	lose cover RAM: 6M
[    0.000000]  gran_size: 8M 	chunk_size: 256M 	num_reg: 9  	lose cover RAM: 6M
[    0.000000]  gran_size: 8M 	chunk_size: 512M 	num_reg: 10  	lose cover RAM: 6M
[    0.000000]  gran_size: 8M 	chunk_size: 1G 	num_reg: 9  	lose cover RAM: 6M
[    0.000000]  gran_size: 8M 	chunk_size: 2G 	num_reg: 10  	lose cover RAM: 6M
[    0.000000]  gran_size: 16M 	chunk_size: 16M 	num_reg: 10  	lose cover RAM: 30M
[    0.000000]  gran_size: 16M 	chunk_size: 32M 	num_reg: 9  	lose cover RAM: 14M
[    0.000000]  gran_size: 16M 	chunk_size: 64M 	num_reg: 9  	lose cover RAM: 14M
[    0.000000]  gran_size: 16M 	chunk_size: 128M 	num_reg: 9  	lose cover RAM: 14M
[    0.000000]  gran_size: 16M 	chunk_size: 256M 	num_reg: 9  	lose cover RAM: 14M
[    0.000000]  gran_size: 16M 	chunk_size: 512M 	num_reg: 10  	lose cover RAM: 14M
[    0.000000]  gran_size: 16M 	chunk_size: 1G 	num_reg: 9  	lose cover RAM: 14M
[    0.000000]  gran_size: 16M 	chunk_size: 2G 	num_reg: 10  	lose cover RAM: 14M
[    0.000000]  gran_size: 32M 	chunk_size: 32M 	num_reg: 9  	lose cover RAM: 46M
[    0.000000]  gran_size: 32M 	chunk_size: 64M 	num_reg: 9  	lose cover RAM: 46M
[    0.000000]  gran_size: 32M 	chunk_size: 128M 	num_reg: 9  	lose cover RAM: 46M
[    0.000000]  gran_size: 32M 	chunk_size: 256M 	num_reg: 9  	lose cover RAM: 46M
[    0.000000]  gran_size: 32M 	chunk_size: 512M 	num_reg: 10  	lose cover RAM: 46M
[    0.000000]  gran_size: 32M 	chunk_size: 1G 	num_reg: 9  	lose cover RAM: 46M
[    0.000000]  gran_size: 32M 	chunk_size: 2G 	num_reg: 10  	lose cover RAM: 46M
[    0.000000]  gran_size: 64M 	chunk_size: 64M 	num_reg: 7  	lose cover RAM: 110M
[    0.000000]  gran_size: 64M 	chunk_size: 128M 	num_reg: 7  	lose cover RAM: 110M
[    0.000000]  gran_size: 64M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 110M
[    0.000000]  gran_size: 64M 	chunk_size: 512M 	num_reg: 9  	lose cover RAM: 110M
[    0.000000]  gran_size: 64M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 110M
[    0.000000]  gran_size: 64M 	chunk_size: 2G 	num_reg: 9  	lose cover RAM: 110M
[    0.000000]  gran_size: 128M 	chunk_size: 128M 	num_reg: 6  	lose cover RAM: 174M
[    0.000000]  gran_size: 128M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 174M
[    0.000000]  gran_size: 128M 	chunk_size: 512M 	num_reg: 9  	lose cover RAM: 174M
[    0.000000]  gran_size: 128M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 174M
[    0.000000]  gran_size: 128M 	chunk_size: 2G 	num_reg: 9  	lose cover RAM: 174M
[    0.000000]  gran_size: 256M 	chunk_size: 256M 	num_reg: 4  	lose cover RAM: 430M
[    0.000000]  gran_size: 256M 	chunk_size: 512M 	num_reg: 4  	lose cover RAM: 430M
[    0.000000]  gran_size: 256M 	chunk_size: 1G 	num_reg: 5  	lose cover RAM: 430M
[    0.000000]  gran_size: 256M 	chunk_size: 2G 	num_reg: 6  	lose cover RAM: 430M
[    0.000000]  gran_size: 512M 	chunk_size: 512M 	num_reg: 4  	lose cover RAM: 430M
[    0.000000]  gran_size: 512M 	chunk_size: 1G 	num_reg: 5  	lose cover RAM: 430M
[    0.000000]  gran_size: 512M 	chunk_size: 2G 	num_reg: 6  	lose cover RAM: 430M
[    0.000000]  gran_size: 1G 	chunk_size: 1G 	num_reg: 3  	lose cover RAM: 942M
[    0.000000]  gran_size: 1G 	chunk_size: 2G 	num_reg: 3  	lose cover RAM: 942M
[    0.000000]  gran_size: 2G 	chunk_size: 2G 	num_reg: 2  	lose cover RAM: 1966M
[    0.000000] mtrr_cleanup: can not find optimal value
[    0.000000] please specify mtrr_gran_size/mtrr_chunk_size
[    0.000000] e820: update [mem 0xcb800000-0xffffffff] usable ==> reserved
[    0.000000] e820: last_pfn = 0xcb000 max_arch_pfn = 0x400000000
[    0.000000] found SMP MP-table at [mem 0x000fd820-0x000fd82f] mapped at [ffff8800000fd820]
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] Base memory trampoline at [ffff880000097000] 97000 size 24576
[    0.000000] BRK [0x02c90000, 0x02c90fff] PGTABLE
[    0.000000] BRK [0x02c91000, 0x02c91fff] PGTABLE
[    0.000000] BRK [0x02c92000, 0x02c92fff] PGTABLE
[    0.000000] BRK [0x02c93000, 0x02c93fff] PGTABLE
[    0.000000] BRK [0x02c94000, 0x02c94fff] PGTABLE
[    0.000000] BRK [0x02c95000, 0x02c95fff] PGTABLE
[    0.000000] RAMDISK: [mem 0x346a4000-0x36349fff]
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI: RSDP 0x00000000000F0490 000024 (v02 ALASKA)
[    0.000000] ACPI: XSDT 0x00000000C9EDF078 000074 (v01 ALASKA A M I    01072009 AMI  00010013)
[    0.000000] ACPI: FACP 0x00000000C9EE9D58 00010C (v05 ALASKA A M I    01072009 AMI  00010013)
[    0.000000] ACPI: DSDT 0x00000000C9EDF188 00ABCD (v02 ALASKA A M I    00000023 INTL 20051117)
[    0.000000] ACPI: FACS 0x00000000C9F21080 000040
[    0.000000] ACPI: APIC 0x00000000C9EE9E68 000072 (v03 ALASKA A M I    01072009 AMI  00010013)
[    0.000000] ACPI: FPDT 0x00000000C9EE9EE0 000044 (v01 ALASKA A M I    01072009 AMI  00010013)
[    0.000000] ACPI: MCFG 0x00000000C9EE9F28 00003C (v01 ALASKA A M I    01072009 MSFT 00000097)
[    0.000000] ACPI: SSDT 0x00000000C9EE9F68 000F92 (v01 TrmRef PtidDevc 00001000 INTL 20091112)
[    0.000000] ACPI: HPET 0x00000000C9EEAF00 000038 (v01 ALASKA A M I    01072009 AMI. 00000005)
[    0.000000] ACPI: SSDT 0x00000000C9EEAF38 000315 (v01 SataRe SataTabl 00001000 INTL 20091112)
[    0.000000] ACPI: SSDT 0x00000000C9EEB250 000968 (v01 PmRef  Cpu0Ist  00003000 INTL 20051117)
[    0.000000] ACPI: SSDT 0x00000000C9EEBBB8 000B22 (v01 PmRef  CpuPm    00003000 INTL 20051117)
[    0.000000] ACPI: SSDT 0x00000000C9EEC6E0 000D30 (v01 NvdRef NvdTabl  00001000 INTL 20091112)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000022f5fffff]
[    0.000000] NODE_DATA(0) allocated [mem 0x22f5f4000-0x22f5f7fff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000022f5fffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009cfff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x000000001fffffff]
[    0.000000]   node   0: [mem 0x0000000020200000-0x0000000040003fff]
[    0.000000]   node   0: [mem 0x0000000040005000-0x00000000c96cefff]
[    0.000000]   node   0: [mem 0x00000000c9dcd000-0x00000000c9e5afff]
[    0.000000]   node   0: [mem 0x00000000ca5b7000-0x00000000ca5b7fff]
[    0.000000]   node   0: [mem 0x00000000ca5fb000-0x00000000cad5ffff]
[    0.000000]   node   0: [mem 0x00000000caff3000-0x00000000caffffff]
[    0.000000]   node   0: [mem 0x0000000100000000-0x000000022f5fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000022f5fffff]
[    0.000000] On node 0 totalpages: 2069099
[    0.000000]   DMA zone: 64 pages used for memmap
[    0.000000]   DMA zone: 21 pages reserved
[    0.000000]   DMA zone: 3996 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 12852 pages used for memmap
[    0.000000]   DMA32 zone: 822479 pages, LIFO batch:31
[    0.000000]   Normal zone: 19416 pages used for memmap
[    0.000000]   Normal zone: 1242624 pages, LIFO batch:31
[    0.000000] Reserving Intel graphics stolen memory at 0xcba00000-0xcf9fffff
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
[    0.000000] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[    0.000000] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009d000-0x0009dfff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009e000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000dffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000e0000-0x000fffff]
[    0.000000] PM: Registered nosave memory: [mem 0x20000000-0x201fffff]
[    0.000000] PM: Registered nosave memory: [mem 0x40004000-0x40004fff]
[    0.000000] PM: Registered nosave memory: [mem 0xc96cf000-0xc9dccfff]
[    0.000000] PM: Registered nosave memory: [mem 0xc9e5b000-0xc9f22fff]
[    0.000000] PM: Registered nosave memory: [mem 0xc9f23000-0xca5b6fff]
[    0.000000] PM: Registered nosave memory: [mem 0xca5b8000-0xca5fafff]
[    0.000000] PM: Registered nosave memory: [mem 0xcad60000-0xcaff2fff]
[    0.000000] PM: Registered nosave memory: [mem 0xcb000000-0xcb7fffff]
[    0.000000] PM: Registered nosave memory: [mem 0xcb800000-0xcf9fffff]
[    0.000000] PM: Registered nosave memory: [mem 0xcfa00000-0xf7ffffff]
[    0.000000] PM: Registered nosave memory: [mem 0xf8000000-0xfbffffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfc000000-0xfebfffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfec00000-0xfec00fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfec01000-0xfecfffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed00000-0xfed03fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed04000-0xfed1bfff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed1c000-0xfed1ffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfed20000-0xfedfffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xfeffffff]
[    0.000000] PM: Registered nosave memory: [mem 0xff000000-0xffffffff]
[    0.000000] e820: [mem 0xcfa00000-0xf7ffffff] available for PCI devices
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[    0.000000] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:4 nr_node_ids:1
[    0.000000] percpu: Embedded 30 pages/cpu @ffff88022f200000 s85464 r8192 d29224 u524288
[    0.000000] pcpu-alloc: s85464 r8192 d29224 u524288 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 2 3 
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 2036746
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.7.4-grsec root=UUID=f53d38fd-758e-40b1-b63a-4d5751a3982a pax_size_overflow_report_only ro quiet
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 8019812K/8276396K available (10004K kernel code, 3194K rwdata, 8252K rodata, 3056K init, 1572K bss, 256584K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	Build-time adjustment of leaf fanout to 64.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4
[    0.000000] NR_IRQS:16640 nr_irqs:456 16
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484882848 ns
[    0.000000] hpet clockevent registered
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.000000] tsc: Detected 2494.554 MHz processor
[    0.000016] Calibrating delay loop (skipped), value calculated using timer frequency.. 4989.10 BogoMIPS (lpj=9978216)
[    0.000019] pid_max: default: 32768 minimum: 501
[    0.000026] ACPI: Core revision 20160422
[    0.007719] ACPI: 6 ACPI AML tables successfully acquired and loaded

[    0.007739] Security Framework initialized
[    0.007746] AppArmor: AppArmor initialized
[    0.008257] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.010235] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.011109] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.011119] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.011398] CPU: Physical Processor ID: 0
[    0.011400] CPU: Processor Core ID: 0
[    0.011404] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.011405] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[    0.011407] PAX: PCID detected
[    0.011409] mce: CPU supports 7 MCE banks
[    0.011418] CPU0: Thermal monitoring enabled (TM1)
[    0.011428] process: using mwait in idle threads
[    0.011431] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 8
[    0.011432] Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32, 1GB 0
[    0.023705] Freeing SMP alternatives memory: 40K (ffffffff82afc000 - ffffffff82b06000)
[    0.035616] ftrace: allocating 30797 entries in 121 pages
[    0.058658] smpboot: Max logical packages: 2
[    0.058661] smpboot: APIC(0) Converting physical 0 to logical package 0
[    0.058735] x2apic: IRQ remapping doesn't support X2APIC mode
[    0.059152] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.098839] TSC deadline timer enabled
[    0.098842] smpboot: CPU0: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz (family: 0x6, model: 0x3a, stepping: 0x9)
[    0.098847] Performance Events: PEBS fmt1+, 16-deep LBR, IvyBridge events, full-width counters, Intel PMU driver.
[    0.098873] ... version:                3
[    0.098875] ... bit width:              48
[    0.098876] ... generic registers:      4
[    0.098877] ... value mask:             0000ffffffffffff
[    0.098878] ... max period:             0000ffffffffffff
[    0.098879] ... fixed-purpose events:   3
[    0.098880] ... event mask:             000000070000000f
[    0.099525] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[    0.099637] x86: Booting SMP configuration:
[    0.099639] .... node  #0, CPUs:      #1
[    0.099906] PAX: PCID detected
[    0.181027]  #2
[    0.181309] PAX: PCID detected
[    0.261321]  #3
[    0.261321] PAX: PCID detected
[    0.340990] x86: Booted up 1 node, 4 CPUs
[    0.340995] smpboot: Total of 4 processors activated (19960.80 BogoMIPS)
[    0.343946] devtmpfs: initialized
[    0.344009] x86/mm: Memory block size: 128MB
[    0.347170] evm: security.selinux
[    0.347172] evm: security.SMACK64
[    0.347173] evm: security.SMACK64EXEC
[    0.347173] evm: security.SMACK64TRANSMUTE
[    0.347174] evm: security.SMACK64MMAP
[    0.347175] evm: security.ima
[    0.347176] evm: security.capability
[    0.347240] PM: Registering ACPI NVS region [mem 0xc9e5b000-0xc9f22fff] (819200 bytes)
[    0.347253] PM: Registering ACPI NVS region [mem 0xca5b8000-0xca5fafff] (274432 bytes)
[    0.347318] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.347357] pinctrl core: initialized pinctrl subsystem
[    0.347467] RTC time:  2:40:03, date: 09/30/16
[    0.347557] NET: Registered protocol family 16
[    0.359638] cpuidle: using governor ladder
[    0.364968] cpuidle: using governor menu
[    0.365060] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.365062] ACPI: bus type PCI registered
[    0.365064] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.365134] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[    0.365137] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[    0.365145] pmd_set_huge: Cannot satisfy [mem 0xf8000000-0xf8200000] with a huge-page mapping due to MTRR override.
[    0.365198] PCI: Using configuration type 1 for base access
[    0.365239] core: PMU erratum BJ122, BV98, HSD29 worked around, HT is on
[    0.373131] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.373367] ACPI: Added _OSI(Module Device)
[    0.373369] ACPI: Added _OSI(Processor Device)
[    0.373370] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.373371] ACPI: Added _OSI(Processor Aggregator Device)
[    0.373546] ACPI: Executed 1 blocks of module-level executable AML code
[    0.377234] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.377661] ACPI: Dynamic OEM Table Load:
[    0.377668] ACPI: SSDT 0xFFFF8802258E9000 00083B (v01 PmRef  Cpu0Cst  00003001 INTL 20051117)
[    0.378187] ACPI: Dynamic OEM Table Load:
[    0.378192] ACPI: SSDT 0xFFFF880225980000 000303 (v01 PmRef  ApIst    00003000 INTL 20051117)
[    0.378636] ACPI: Dynamic OEM Table Load:
[    0.378640] ACPI: SSDT 0xFFFF88022595D000 000119 (v01 PmRef  ApCst    00003000 INTL 20051117)
[    0.379535] ACPI : EC: EC started
[    1.329536] ACPI: Interpreter enabled
[    1.329556] ACPI: (supports S0 S3 S4 S5)
[    1.329558] ACPI: Using IOAPIC for interrupt routing
[    1.329582] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    1.337996] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    1.338002] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    1.338234] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug PME]
[    1.338381] acpi PNP0A08:00: _OSC: OS now controls [AER PCIeCapability]
[    1.338383] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration
[    1.338793] PCI host bridge to bus 0000:00
[    1.338796] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    1.338798] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    1.338799] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    1.338801] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff window]
[    1.338802] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff window]
[    1.338804] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff window]
[    1.338805] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff window]
[    1.338807] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff window]
[    1.338808] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff window]
[    1.338810] pci_bus 0000:00: root bus resource [mem 0xcfa00000-0xfeafffff window]
[    1.338811] pci_bus 0000:00: root bus resource [bus 00-3e]
[    1.338819] pci 0000:00:00.0: [8086:0154] type 00 class 0x060000
[    1.338913] pci 0000:00:01.0: [8086:0151] type 01 class 0x060400
[    1.338945] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[    1.338992] pci 0000:00:01.0: System wakeup disabled by ACPI
[    1.339026] pci 0000:00:01.1: [8086:0155] type 01 class 0x060400
[    1.339056] pci 0000:00:01.1: PME# supported from D0 D3hot D3cold
[    1.339099] pci 0000:00:01.1: System wakeup disabled by ACPI
[    1.339137] pci 0000:00:02.0: [8086:0166] type 00 class 0x030000
[    1.339146] pci 0000:00:02.0: reg 0x10: [mem 0xf7400000-0xf77fffff 64bit]
[    1.339152] pci 0000:00:02.0: reg 0x18: [mem 0xd0000000-0xdfffffff 64bit pref]
[    1.339156] pci 0000:00:02.0: reg 0x20: [io  0xf000-0xf03f]
[    1.339291] pci 0000:00:14.0: [8086:1e31] type 00 class 0x0c0330
[    1.339311] pci 0000:00:14.0: reg 0x10: [mem 0xf7a00000-0xf7a0ffff 64bit]
[    1.339382] pci 0000:00:14.0: PME# supported from D3hot D3cold
[    1.339428] pci 0000:00:14.0: System wakeup disabled by ACPI
[    1.339467] pci 0000:00:16.0: [8086:1e3a] type 00 class 0x078000
[    1.339487] pci 0000:00:16.0: reg 0x10: [mem 0xf7a1a000-0xf7a1a00f 64bit]
[    1.339561] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    1.339648] pci 0000:00:1a.0: [8086:1e2d] type 00 class 0x0c0320
[    1.339665] pci 0000:00:1a.0: reg 0x10: [mem 0xf7a18000-0xf7a183ff]
[    1.339751] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    1.339809] pci 0000:00:1a.0: System wakeup disabled by ACPI
[    1.339848] pci 0000:00:1b.0: [8086:1e20] type 00 class 0x040300
[    1.339864] pci 0000:00:1b.0: reg 0x10: [mem 0xf7a10000-0xf7a13fff 64bit]
[    1.339938] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    1.339989] pci 0000:00:1b.0: System wakeup disabled by ACPI
[    1.340025] pci 0000:00:1c.0: [8086:1e10] type 01 class 0x060400
[    1.340103] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    1.340153] pci 0000:00:1c.0: System wakeup disabled by ACPI
[    1.340190] pci 0000:00:1c.2: [8086:1e14] type 01 class 0x060400
[    1.340267] pci 0000:00:1c.2: PME# supported from D0 D3hot D3cold
[    1.340317] pci 0000:00:1c.2: System wakeup disabled by ACPI
[    1.340353] pci 0000:00:1c.3: [8086:1e16] type 01 class 0x060400
[    1.340430] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    1.340481] pci 0000:00:1c.3: System wakeup disabled by ACPI
[    1.340522] pci 0000:00:1d.0: [8086:1e26] type 00 class 0x0c0320
[    1.340539] pci 0000:00:1d.0: reg 0x10: [mem 0xf7a17000-0xf7a173ff]
[    1.340625] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    1.340682] pci 0000:00:1d.0: System wakeup disabled by ACPI
[    1.340721] pci 0000:00:1f.0: [8086:1e59] type 00 class 0x060100
[    1.340896] pci 0000:00:1f.2: [8086:1e03] type 00 class 0x010601
[    1.340910] pci 0000:00:1f.2: reg 0x10: [io  0xf0b0-0xf0b7]
[    1.340918] pci 0000:00:1f.2: reg 0x14: [io  0xf0a0-0xf0a3]
[    1.340925] pci 0000:00:1f.2: reg 0x18: [io  0xf090-0xf097]
[    1.340932] pci 0000:00:1f.2: reg 0x1c: [io  0xf080-0xf083]
[    1.340940] pci 0000:00:1f.2: reg 0x20: [io  0xf060-0xf07f]
[    1.340947] pci 0000:00:1f.2: reg 0x24: [mem 0xf7a16000-0xf7a167ff]
[    1.340988] pci 0000:00:1f.2: PME# supported from D3hot
[    1.341064] pci 0000:00:1f.3: [8086:1e22] type 00 class 0x0c0500
[    1.341079] pci 0000:00:1f.3: reg 0x10: [mem 0xf7a15000-0xf7a150ff 64bit]
[    1.341100] pci 0000:00:1f.3: reg 0x20: [io  0xf040-0xf05f]
[    1.341226] pci 0000:01:00.0: [10de:0fd9] type 00 class 0x030000
[    1.341233] pci 0000:01:00.0: reg 0x10: [mem 0xf6000000-0xf6ffffff]
[    1.341240] pci 0000:01:00.0: reg 0x14: [mem 0xe0000000-0xefffffff 64bit pref]
[    1.341246] pci 0000:01:00.0: reg 0x1c: [mem 0xf0000000-0xf1ffffff 64bit pref]
[    1.341250] pci 0000:01:00.0: reg 0x24: [io  0xe000-0xe07f]
[    1.341254] pci 0000:01:00.0: reg 0x30: [mem 0xf7000000-0xf707ffff pref]
[    1.341332] pci 0000:01:00.0: System wakeup disabled by ACPI
[    1.349489] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.349496] pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
[    1.349503] pci 0000:00:01.0:   bridge window [mem 0xf6000000-0xf70fffff]
[    1.349509] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xf1ffffff 64bit pref]
[    1.349557] pci 0000:00:01.1: PCI bridge to [bus 02]
[    1.349611] pci 0000:00:1c.0: PCI bridge to [bus 03]
[    1.349696] pci 0000:04:00.0: [168c:002e] type 00 class 0x028000
[    1.349735] pci 0000:04:00.0: reg 0x10: [mem 0xf7900000-0xf790ffff 64bit]
[    1.349939] pci 0000:04:00.0: supports D1
[    1.349940] pci 0000:04:00.0: PME# supported from D0 D1 D3hot
[    1.349998] pci 0000:04:00.0: System wakeup disabled by ACPI
[    1.357505] pci 0000:00:1c.2: PCI bridge to [bus 04]
[    1.357515] pci 0000:00:1c.2:   bridge window [mem 0xf7900000-0xf79fffff]
[    1.357686] pci 0000:05:00.0: [10ec:5289] type 00 class 0xff0000
[    1.357756] pci 0000:05:00.0: reg 0x10: [mem 0xf7800000-0xf780ffff]
[    1.358304] pci 0000:05:00.0: supports D1 D2
[    1.358306] pci 0000:05:00.0: PME# supported from D1 D2 D3hot D3cold
[    1.358396] pci 0000:05:00.0: System wakeup disabled by ACPI
[    1.358491] pci 0000:05:00.2: [10ec:8168] type 00 class 0x020000
[    1.358561] pci 0000:05:00.2: reg 0x10: [io  0xd000-0xd0ff]
[    1.358672] pci 0000:05:00.2: reg 0x18: [mem 0xf2104000-0xf2104fff 64bit pref]
[    1.358740] pci 0000:05:00.2: reg 0x20: [mem 0xf2100000-0xf2103fff 64bit pref]
[    1.359066] pci 0000:05:00.2: supports D1 D2
[    1.359068] pci 0000:05:00.2: PME# supported from D0 D1 D2 D3hot D3cold
[    1.359186] pci 0000:05:00.2: System wakeup disabled by ACPI
[    1.365570] pci 0000:00:1c.3: PCI bridge to [bus 05]
[    1.365574] pci 0000:00:1c.3:   bridge window [io  0xd000-0xdfff]
[    1.365578] pci 0000:00:1c.3:   bridge window [mem 0xf7800000-0xf78fffff]
[    1.365583] pci 0000:00:1c.3:   bridge window [mem 0xf2100000-0xf21fffff 64bit pref]
[    1.366135] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.366185] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.366234] ACPI: PCI Interrupt Link [LNKC] (IRQs *3 4 5 6 10 11 12 14 15)
[    1.366283] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 *10 11 12 14 15)
[    1.366333] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.366381] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.366428] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.366475] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 *4 5 6 10 11 12 14 15)
[    1.367085] ACPI: Enabled 5 GPEs in block 00 to 3F
[    1.367133] ACPI : EC: EC stopped
[    1.367160] ACPI : EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62
[    1.367162] ACPI : EC: EC started
[    2.318113] vgaarb: setting as boot device: PCI:0000:00:02.0
[    2.318116] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    2.318120] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=none,locks=none
[    2.318121] vgaarb: loaded
[    2.318122] vgaarb: bridge control possible 0000:01:00.0
[    2.318123] vgaarb: no bridge control possible 0000:00:02.0
[    2.318295] SCSI subsystem initialized
[    2.318346] libata version 3.00 loaded.
[    2.318351] ACPI: bus type USB registered
[    2.318368] usbcore: registered new interface driver usbfs
[    2.318378] usbcore: registered new interface driver hub
[    2.318393] usbcore: registered new device driver usb
[    2.318482] PCI: Using ACPI for IRQ routing
[    2.320015] PCI: pci_cache_line_size set to 64 bytes
[    2.320071] e820: reserve RAM buffer [mem 0x0009d800-0x0009ffff]
[    2.320073] e820: reserve RAM buffer [mem 0x40004000-0x43ffffff]
[    2.320075] e820: reserve RAM buffer [mem 0xc96cf000-0xcbffffff]
[    2.320077] e820: reserve RAM buffer [mem 0xc9e5b000-0xcbffffff]
[    2.320079] e820: reserve RAM buffer [mem 0xca5b8000-0xcbffffff]
[    2.320080] e820: reserve RAM buffer [mem 0xcad60000-0xcbffffff]
[    2.320081] e820: reserve RAM buffer [mem 0xcb000000-0xcbffffff]
[    2.320083] e820: reserve RAM buffer [mem 0x22f600000-0x22fffffff]
[    2.320171] PAX: network_header:0 off:0
[    2.320191] NetLabel: Initializing
[    2.320192] NetLabel:  domain hash size = 128
[    2.320193] NetLabel:  protocols = UNLABELED CIPSOv4
[    2.320200] PAX: network_header:0 off:0
[    2.320204] PAX: network_header:0 off:0
[    2.320208] PAX: network_header:0 off:0
[    2.320210] NetLabel:  unlabeled traffic allowed by default
[    2.320305] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    2.320310] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[    2.322329] clocksource: Switched to clocksource hpet
[    2.325757] VFS: Disk quotas dquot_6.6.0
[    2.325772] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.325779] PAX: network_header:0 off:0
[    2.325782] PAX: network_header:0 off:0
[    2.325837] AppArmor: AppArmor Filesystem Enabled
[    2.325876] PAX: network_header:0 off:0
[    2.325878] PAX: network_header:0 off:0
[    2.325885] pnp: PnP ACPI init
[    2.325973] system 00:00: [mem 0xfed40000-0xfed44fff] has been reserved
[    2.325977] system 00:00: Plug and Play ACPI device, IDs PNP0c01 (active)
[    2.326083] system 00:01: [io  0x0680-0x069f] has been reserved
[    2.326085] system 00:01: [io  0x1000-0x100f] has been reserved
[    2.326087] system 00:01: [io  0xffff] has been reserved
[    2.326089] system 00:01: [io  0xffff] has been reserved
[    2.326090] system 00:01: [io  0x0400-0x0453] has been reserved
[    2.326092] system 00:01: [io  0x0458-0x047f] has been reserved
[    2.326093] system 00:01: [io  0x0500-0x057f] has been reserved
[    2.326095] system 00:01: [io  0x164e-0x164f] has been reserved
[    2.326096] system 00:01: [io  0x3322-0x3323] has been reserved
[    2.326099] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
[    2.326125] pnp 00:02: Plug and Play ACPI device, IDs PNP0b00 (active)
[    2.326175] system 00:03: [io  0x0454-0x0457] has been reserved
[    2.326178] system 00:03: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[    2.326204] pnp 00:04: Plug and Play ACPI device, IDs PNP0303 (active)
[    2.326272] pnp 00:05: Plug and Play ACPI device, IDs ETD0403 PNP0f13 (active)
[    2.326333] system 00:06: [io  0x04d0-0x04d1] has been reserved
[    2.326336] system 00:06: Plug and Play ACPI device, IDs PNP0c02 (active)
[    2.326593] system 00:07: [mem 0xfed1c000-0xfed1ffff] has been reserved
[    2.326595] system 00:07: [mem 0xfed10000-0xfed17fff] has been reserved
[    2.326597] system 00:07: [mem 0xfed18000-0xfed18fff] has been reserved
[    2.326599] system 00:07: [mem 0xfed19000-0xfed19fff] has been reserved
[    2.326601] system 00:07: [mem 0xf8000000-0xfbffffff] has been reserved
[    2.326602] system 00:07: [mem 0xfed20000-0xfed3ffff] has been reserved
[    2.326604] system 00:07: [mem 0xfed90000-0xfed93fff] has been reserved
[    2.326605] system 00:07: [mem 0xfed45000-0xfed8ffff] has been reserved
[    2.326607] system 00:07: [mem 0xff000000-0xffffffff] has been reserved
[    2.326609] system 00:07: [mem 0xfee00000-0xfeefffff] could not be reserved
[    2.326611] system 00:07: [mem 0xcfa00000-0xcfa00fff] has been reserved
[    2.326613] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[    2.326762] system 00:08: [mem 0x20000000-0x201fffff] has been reserved
[    2.326764] system 00:08: [mem 0x40004000-0x40004fff] has been reserved
[    2.326767] system 00:08: Plug and Play ACPI device, IDs PNP0c01 (active)
[    2.327145] pnp: PnP ACPI: found 9 devices
[    2.328917] PAX: network_header:0 off:0
[    2.328920] PAX: network_header:0 off:0
[    2.333405] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    2.333441] pci 0000:00:01.0: PCI bridge to [bus 01]
[    2.333443] pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
[    2.333446] pci 0000:00:01.0:   bridge window [mem 0xf6000000-0xf70fffff]
[    2.333448] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xf1ffffff 64bit pref]
[    2.333452] pci 0000:00:01.1: PCI bridge to [bus 02]
[    2.333457] pci 0000:00:1c.0: PCI bridge to [bus 03]
[    2.333468] pci 0000:00:1c.2: PCI bridge to [bus 04]
[    2.333472] pci 0000:00:1c.2:   bridge window [mem 0xf7900000-0xf79fffff]
[    2.333480] pci 0000:00:1c.3: PCI bridge to [bus 05]
[    2.333483] pci 0000:00:1c.3:   bridge window [io  0xd000-0xdfff]
[    2.333487] pci 0000:00:1c.3:   bridge window [mem 0xf7800000-0xf78fffff]
[    2.333491] pci 0000:00:1c.3:   bridge window [mem 0xf2100000-0xf21fffff 64bit pref]
[    2.333497] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    2.333499] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    2.333500] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[    2.333502] pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000d3fff window]
[    2.333503] pci_bus 0000:00: resource 8 [mem 0x000d4000-0x000d7fff window]
[    2.333505] pci_bus 0000:00: resource 9 [mem 0x000d8000-0x000dbfff window]
[    2.333506] pci_bus 0000:00: resource 10 [mem 0x000dc000-0x000dffff window]
[    2.333508] pci_bus 0000:00: resource 11 [mem 0x000e0000-0x000e3fff window]
[    2.333509] pci_bus 0000:00: resource 12 [mem 0x000e4000-0x000e7fff window]
[    2.333511] pci_bus 0000:00: resource 13 [mem 0xcfa00000-0xfeafffff window]
[    2.333512] pci_bus 0000:01: resource 0 [io  0xe000-0xefff]
[    2.333514] pci_bus 0000:01: resource 1 [mem 0xf6000000-0xf70fffff]
[    2.333515] pci_bus 0000:01: resource 2 [mem 0xe0000000-0xf1ffffff 64bit pref]
[    2.333517] pci_bus 0000:04: resource 1 [mem 0xf7900000-0xf79fffff]
[    2.333518] pci_bus 0000:05: resource 0 [io  0xd000-0xdfff]
[    2.333520] pci_bus 0000:05: resource 1 [mem 0xf7800000-0xf78fffff]
[    2.333521] pci_bus 0000:05: resource 2 [mem 0xf2100000-0xf21fffff 64bit pref]
[    2.333547] NET: Registered protocol family 2
[    2.333719] TCP established hash table entries: 65536 (order: 7, 524288 bytes)
[    2.333849] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    2.333966] TCP: Hash tables configured (established 65536 bind 65536)
[    2.333981] PAX: network_header:0 off:0
[    2.333992] UDP hash table entries: 4096 (order: 5, 131072 bytes)
[    2.334017] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)
[    2.334075] NET: Registered protocol family 1
[    2.334090] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    2.334582] PCI: CLS mismatch (64 != 32), using 64 bytes
[    2.334640] Trying to unpack rootfs image as initramfs...
[    2.796591] Freeing initrd memory: 29336K (ffff8800346a4000 - ffff88003634a000)
[    2.796597] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    2.796600] software IO TLB [mem 0xc56cf000-0xc96cf000] (64MB) mapped at [ffff8800c56cf000-ffff8800c96cefff]
[    2.796684] RAPL PMU: API unit is 2^-32 Joules, 3 fixed counters, 163840 ms ovfl timer
[    2.796687] RAPL PMU: hw unit of domain pp0-core 2^-16 Joules
[    2.796688] RAPL PMU: hw unit of domain package 2^-16 Joules
[    2.796689] RAPL PMU: hw unit of domain pp1-gpu 2^-16 Joules
[    2.796829] Scanning for low memory corruption every 60 seconds
[    2.797127] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    2.797149] audit: initializing netlink subsys (disabled)
[    2.797164] audit: type=2000 audit(1475203205.776:1): initialized
[    2.797518] Initialise system trusted keyrings
[    2.797613] workingset: timestamp_bits=38 max_order=21 bucket_order=0
[    2.797628] zbud: loaded
[    2.797849] qnx6: QNX6 filesystem 1.0.0 registered.
[    2.797851] fuse init (API version 7.25)
[    2.797917] Key type big_key registered
[    2.798274] Key type asymmetric registered
[    2.798276] Asymmetric key parser 'x509' registered
[    2.798303] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    2.798336] io scheduler noop registered
[    2.798338] io scheduler deadline registered (default)
[    2.798349] io scheduler cfq registered
[    2.799014] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    2.799019] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    2.799049] intel_idle: MWAIT substates: 0x21120
[    2.799051] intel_idle: v0.4.1 model 0x3A
[    2.799191] intel_idle: lapic_timer_reliable_states 0xffffffff
[    2.799252] ACPI: AC Adapter [AC] (on-line)
[    2.799313] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    2.799316] ACPI: Power Button [PWRB]
[    2.799351] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1
[    2.799353] ACPI: Sleep Button [SLPB]
[    2.799387] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input2
[    2.799751] ACPI: Lid Switch [LID0]
[    2.799788] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[    2.799790] ACPI: Power Button [PWRF]
[    2.803476] thermal LNXTHERM:00: registered as thermal_zone0
[    2.803479] ACPI: Thermal Zone [TZ0] (77 C)
[    2.803511] GHES: HEST is not enabled!
[    2.803580] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[    2.808723] Linux agpgart interface v0.103
[    2.811540] brd: module loaded
[    2.812746] loop: module loaded
[    2.812912] cnic: QLogic cnicDriver v2.5.22 (July 20, 2015)
[    2.812950] PPP generic driver version 2.4.2
[    2.813005] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.813009] ehci-pci: EHCI PCI platform driver
[    2.813124] ehci-pci 0000:00:1a.0: EHCI Host Controller
[    2.813130] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 1
[    2.813145] ehci-pci 0000:00:1a.0: debug port 2
[    2.813286] ACPI: Battery Slot [BAT0] (battery present)
[    2.817057] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[    2.817076] ehci-pci 0000:00:1a.0: irq 16, io mem 0xf7a18000
[    2.826294] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[    2.826339] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.826341] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.826342] usb usb1: Product: EHCI Host Controller
[    2.826343] usb usb1: Manufacturer: Linux 4.7.4-grsec ehci_hcd
[    2.826345] usb usb1: SerialNumber: 0000:00:1a.0
[    2.826552] hub 1-0:1.0: USB hub found
[    2.826561] hub 1-0:1.0: 2 ports detected
[    2.826769] ehci-pci 0000:00:1d.0: EHCI Host Controller
[    2.826774] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 2
[    2.826785] ehci-pci 0000:00:1d.0: debug port 2
[    2.830668] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[    2.830677] ehci-pci 0000:00:1d.0: irq 23, io mem 0xf7a17000
[    2.842359] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[    2.842433] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    2.842436] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.842438] usb usb2: Product: EHCI Host Controller
[    2.842439] usb usb2: Manufacturer: Linux 4.7.4-grsec ehci_hcd
[    2.842441] usb usb2: SerialNumber: 0000:00:1d.0
[    2.842709] hub 2-0:1.0: USB hub found
[    2.842725] hub 2-0:1.0: 2 ports detected
[    2.842881] ehci-platform: EHCI generic platform driver
[    2.842902] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.842910] ohci-pci: OHCI PCI platform driver
[    2.842925] ohci-platform: OHCI generic platform driver
[    2.842936] uhci_hcd: USB Universal Host Controller Interface driver
[    2.843096] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    2.843102] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
[    2.844183] xhci_hcd 0000:00:14.0: hcc params 0x20007181 hci version 0x100 quirks 0x0000b930
[    2.844188] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[    2.844287] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    2.844288] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.844290] usb usb3: Product: xHCI Host Controller
[    2.844291] usb usb3: Manufacturer: Linux 4.7.4-grsec xhci-hcd
[    2.844293] usb usb3: SerialNumber: 0000:00:14.0
[    2.844484] hub 3-0:1.0: USB hub found
[    2.844496] hub 3-0:1.0: 4 ports detected
[    2.844837] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    2.844842] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 4
[    2.844887] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
[    2.844889] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.844891] usb usb4: Product: xHCI Host Controller
[    2.844892] usb usb4: Manufacturer: Linux 4.7.4-grsec xhci-hcd
[    2.844893] usb usb4: SerialNumber: 0000:00:14.0
[    2.845064] hub 4-0:1.0: USB hub found
[    2.845076] hub 4-0:1.0: 4 ports detected
[    2.845461] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:ELNM] at 0x60,0x64 irq 1,12
[    2.848975] i8042: Detected active multiplexing controller, rev 1.1
[    2.850960] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.850964] serio: i8042 AUX0 port at 0x60,0x64 irq 12
[    2.850997] serio: i8042 AUX1 port at 0x60,0x64 irq 12
[    2.851022] serio: i8042 AUX2 port at 0x60,0x64 irq 12
[    2.851048] serio: i8042 AUX3 port at 0x60,0x64 irq 12
[    2.851266] mousedev: PS/2 mouse device common for all mice
[    2.851705] rtc_cmos 00:02: RTC can wake from S4
[    2.851844] rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
[    2.851870] rtc_cmos 00:02: alarms up to one month, y3k, 0 bytes nvram, hpet irqs
[    2.851877] i2c /dev entries driver
[    2.851898] intel_pstate: Intel P-state driver initializing
[    2.852552] NET: Registered protocol family 17
[    2.852584] NET: Registered protocol family 33
[    2.852590] Key type rxrpc registered
[    2.852594] Key type rxrpc_s registered
[    2.852633] Key type dns_resolver registered
[    2.853015] microcode: CPU0 sig=0x306a9, pf=0x10, revision=0x15
[    2.853027] microcode: CPU1 sig=0x306a9, pf=0x10, revision=0x15
[    2.853039] microcode: CPU2 sig=0x306a9, pf=0x10, revision=0x15
[    2.853053] microcode: CPU3 sig=0x306a9, pf=0x10, revision=0x15
[    2.853130] microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    2.853365] PAX: network_header:0 off:0
[    2.853369] registered taskstats version 1
[    2.853382] Loading compiled-in X.509 certificates
[    2.853907] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[    2.858417] Loaded X.509 cert 'Build time autogenerated kernel key: e22bc5dc3b06dd08a8a48ee11adc27aa47c9dbb9'
[    2.858459] zswap: loaded using pool lzo/zbud
[    2.864179] Key type trusted registered
[    2.866298] Key type encrypted registered
[    2.866302] AppArmor: AppArmor sha1 policy hashing enabled
[    2.866305] ima: No TPM chip found, activating TPM-bypass!
[    2.866329] evm: HMAC attrs: 0x1
[    2.866669]   Magic number: 0:615:663
[    2.866763] rtc_cmos 00:02: setting system clock to 2016-09-30 02:40:06 UTC (1475203206)
[    2.866805] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[    2.866806] EDD information not available.
[    2.866879] PM: Hibernation image not present or could not be loaded.
[    2.867222] Freeing unused kernel memory: 3056K (ffffffff82800000 - ffffffff82afc000)
[    2.867224] Write protecting the kernel read-only data: 20480k
[    2.875185] systemd-udevd[141]: starting version 215
[    2.875456] random: systemd-udevd: uninitialized urandom read (16 bytes read, 8 bits of entropy available)
[    2.931944] rtsx_pci 0000:05:00.0: rtsx_pci_acquire_irq: pcr->msi_en = 1, pci->irq = 27
[    2.985180] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    2.985192] r8169 0000:05:00.2: can't disable ASPM; OS doesn't have ASPM control
[    2.985933] r8169 0000:05:00.2 eth0: RTL8411 at 0xffffc90000c6e000, 00:90:f5:df:a4:ec, XID 08800800 IRQ 28
[    2.985936] r8169 0000:05:00.2 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    2.987037] ahci 0000:00:1f.2: version 3.0
[    2.987175] ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled
[    2.997263] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x11 impl SATA mode
[    2.997266] ahci 0000:00:1f.2: flags: 64bit ncq stag pm led clo pio slum part ems sxs apst 
[    3.003583] scsi host0: ahci
[    3.003781] scsi host1: ahci
[    3.003936] scsi host2: ahci
[    3.004058] scsi host3: ahci
[    3.004172] scsi host4: ahci
[    3.004276] scsi host5: ahci
[    3.004335] ata1: SATA max UDMA/133 abar m2048@0xf7a16000 port 0xf7a16100 irq 29
[    3.004338] ata2: DUMMY
[    3.004340] ata3: DUMMY
[    3.004341] ata4: DUMMY
[    3.004344] ata5: SATA max UDMA/133 abar m2048@0xf7a16000 port 0xf7a16300 irq 29
[    3.004345] ata6: DUMMY
[    3.054403] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd
[    3.070970] usb 4-1: New USB device found, idVendor=2537, idProduct=1066
[    3.070974] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.070975] usb 4-1: Product: HE-072(NS1066 2.45)
[    3.070976] usb 4-1: Manufacturer: SSK
[    3.070977] usb 4-1: SerialNumber: 0123456789ABD58
[    3.081117] usb-storage 4-1:1.0: USB Mass Storage device detected
[    3.081302] scsi host6: usb-storage 4-1:1.0
[    3.081374] usbcore: registered new interface driver usb-storage
[    3.086348] usbcore: registered new interface driver uas
[    3.154277] usb 2-1: new high-speed USB device number 2 using ehci-pci
[    3.182273] usb 3-2: new high-speed USB device number 2 using xhci_hcd
[    3.203996] usb 1-1: new high-speed USB device number 2 using ehci-pci
[    3.286760] usb 2-1: New USB device found, idVendor=8087, idProduct=0024
[    3.286768] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.287172] hub 2-1:1.0: USB hub found
[    3.287331] hub 2-1:1.0: 6 ports detected
[    3.313472] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.313949] usb 3-2: New USB device found, idVendor=0951, idProduct=1653
[    3.313955] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.313960] usb 3-2: Product: DT 100 G2
[    3.313963] usb 3-2: Manufacturer: Kingston
[    3.313967] usb 3-2: SerialNumber: 001CC0EC33EEBCB127180094
[    3.314407] usb-storage 3-2:1.0: USB Mass Storage device detected
[    3.314566] scsi host7: usb-storage 3-2:1.0
[    3.315133] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    3.315137] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    3.315148] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    3.317073] ata1.00: ATA-8: WDC WD3200BEVT-22A23T0, 01.01A01, max UDMA/133
[    3.317079] ata1.00: 625142448 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    3.318904] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    3.318911] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    3.318916] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    3.320666] ata1.00: configured for UDMA/133
[    3.320945] scsi 0:0:0:0: Direct-Access     ATA      WDC WD3200BEVT-2 1A01 PQ: 0 ANSI: 5
[    3.335077] usb 1-1: New USB device found, idVendor=8087, idProduct=0024
[    3.335080] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.335436] hub 1-1:1.0: USB hub found
[    3.335587] hub 1-1:1.0: 6 ports detected
[    3.350625] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    3.350630] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    3.350827] sd 0:0:0:0: [sda] Write Protect is off
[    3.350834] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.350915] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.610257] usb 1-1.2: new high-speed USB device number 3 using ehci-pci
[    3.658440] ata5: SATA link down (SStatus 0 SControl 300)
[    3.703691] usb 1-1.2: New USB device found, idVendor=05e3, idProduct=0608
[    3.703694] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    3.703696] usb 1-1.2: Product: USB2.0 Hub
[    3.768111] hub 1-1.2:1.0: USB hub found
[    3.768433] hub 1-1.2:1.0: 4 ports detected
[    3.794234] tsc: Refined TSC clocksource calibration: 2494.333 MHz
[    3.794238] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x23f45085418, max_idle_ns: 440795285711 ns
[    3.805435] psmouse serio2: elantech: assuming hardware version 3 (with firmware version 0x250f01)
[    3.904095] psmouse serio2: elantech: Synaptics capabilities query result 0x18, 0x17, 0x0b.
[    4.002736] psmouse serio2: elantech: Elan sample query result 05, 0e, 00
[    4.042205] usb 1-1.2.4: new low-speed USB device number 4 using ehci-pci
[    4.139870] usb 1-1.2.4: New USB device found, idVendor=04fc, idProduct=05da
[    4.139874] usb 1-1.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.139876] usb 1-1.2.4: Product: Defender 2.4GHz Nano mouse
[    4.139878] usb 1-1.2.4: Manufacturer: MLK
[    4.224521] hidraw: raw HID events driver (C) Jiri Kosina
[    4.240009] usbcore: registered new interface driver usbhid
[    4.240011] usbhid: USB HID core driver
[    4.313804] usbcore: registered new interface driver usbmouse
[    4.315129] input: MLK Defender 2.4GHz Nano mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.0/0003:04FC:05DA.0001/input/input11
[    4.316992] scsi 7:0:0:0: Direct-Access     Kingston DT 100 G2        PMAP PQ: 0 ANSI: 4
[    4.327292] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio2/input/input10
[    4.370777] hid-generic 0003:04FC:05DA.0001: input,hiddev0,hidraw0: USB HID v1.10 Mouse [MLK Defender 2.4GHz Nano mouse] on usb-0000:00:1a.0-1.2.4/input0
[    4.794352] clocksource: Switched to clocksource tsc
[    5.046032] sd 0:0:0:0: [sda] Attached SCSI disk
[    5.624119] scsi 6:0:0:0: Direct-Access     ATA      TOSHIBA MK3263GS 2M   PQ: 0 ANSI: 6
[    5.624614] sd 6:0:0:0: Attached scsi generic sg1 type 0
[    5.624865] sd 7:0:0:0: Attached scsi generic sg2 type 0
[    5.625326] sd 6:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    5.625483] sd 7:0:0:0: [sdc] 31125120 512-byte logical blocks: (15.9 GB/14.8 GiB)
[    5.625636] sd 7:0:0:0: [sdc] Write Protect is off
[    5.625640] sd 7:0:0:0: [sdc] Mode Sense: 23 00 00 00
[    5.625741] sd 6:0:0:0: [sdb] Write Protect is off
[    5.625744] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00
[    5.625773] sd 7:0:0:0: [sdc] No Caching mode page found
[    5.625797] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[    5.625938] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    5.628193]  sdc: sdc1
[    5.629271] sd 7:0:0:0: [sdc] Attached SCSI removable disk
[    7.854226]  sdb: sdb1 sdb2
[    7.855358] sd 6:0:0:0: [sdb] Attached SCSI disk
[    8.285943] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com
[    8.287932] random: lvm: uninitialized urandom read (4 bytes read, 107 bits of entropy available)
[   13.368460] random: nonblocking pool is initialized
[   13.369105] EXT4-fs (sdb2): INFO: recovery required on readonly filesystem
[   13.369108] EXT4-fs (sdb2): write access will be enabled during recovery
[   13.684765] EXT4-fs (sdb2): recovery complete
[   13.685292] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)
[   14.145795] grsec: time set by /lib/systemd/systemd[systemd:1] uid/euid:0/0 gid/egid:0/0, parent /[swapper/0:0] uid/euid:0/0 gid/egid:0/0
[   14.433776] systemd[1]: Failed to insert module 'ipv6'
[   14.443608] PAX: network_header:0 off:0
[   14.443661] PAX: network_header:0 off:0
[   14.443667] PAX: network_header:0 off:0
[   14.443672] PAX: network_header:0 off:0
[   15.982269] systemd[1]: Configuration file /etc/systemd/system/temptroll.service is marked executable. Please remove executable permission bits. Proceeding anyway.
[   16.022247] systemd[1]: Configuration file /etc/systemd/system/ramclean.service is marked executable. Please remove executable permission bits. Proceeding anyway.
[   16.992326] systemd-udevd[297]: starting version 215
[   17.081769] EXT4-fs (sdb2): re-mounted. Opts: (null)
[   17.731347] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x0000000000000400-0x000000000000047F (\PMIO) (20160422/utaddress-255)
[   17.731356] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   17.731360] ACPI Warning: SystemIO range 0x0000000000000540-0x000000000000054F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20160422/utaddress-255)
[   17.731364] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   17.731365] ACPI Warning: SystemIO range 0x0000000000000530-0x000000000000053F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20160422/utaddress-255)
[   17.731369] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   17.731370] ACPI Warning: SystemIO range 0x0000000000000500-0x000000000000052F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20160422/utaddress-255)
[   17.731374] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   17.731375] lpc_ich: Resource conflict(s) found affecting gpio_ich
[   17.793601] i801_smbus 0000:00:1f.3: SMBus using PCI interrupt
[   17.830844] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[   17.866706] wmi: Mapper loaded
[   18.481737] iTCO_vendor_support: vendor-support=0
[   18.562537] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
[   18.562575] iTCO_wdt: Found a Panther Point TCO device (Version=2, TCOBASE=0x0460)
[   18.562675] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[   18.757049] nvidiafb 0000:01:00.0: enabling device (0000 -> 0003)
[   18.757331] nvidiafb: Device ID: 10de0fd9 
[   18.757333] nvidiafb: unknown NV_ARCH
[   18.840487] snd_hda_codec_via hdaudioC0D0: autoconfig for VT1802: line_outs=1 (0x24/0x0/0x0/0x0/0x0) type:speaker
[   18.840491] snd_hda_codec_via hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   18.840493] snd_hda_codec_via hdaudioC0D0:    hp_outs=1 (0x25/0x0/0x0/0x0/0x0)
[   18.840494] snd_hda_codec_via hdaudioC0D0:    mono: mono_out=0x0
[   18.840495] snd_hda_codec_via hdaudioC0D0:    inputs:
[   18.840497] snd_hda_codec_via hdaudioC0D0:      Mic=0x2b
[   18.840498] snd_hda_codec_via hdaudioC0D0:      Internal Mic=0x29
[   18.863392] AVX version of gcm_enc/dec engaged.
[   18.863395] AES CTR mode by8 optimization enabled
[   19.073973] [drm] Initialized drm 1.1.0 20060810
[   19.137718] PAX: network_header:0 off:0
[   19.137724] PAX: network_header:0 off:0
[   19.137727] PAX: network_header:0 off:0
[   19.137730] PAX: network_header:0 off:0
[   19.137733] PAX: network_header:0 off:0
[   19.137736] PAX: network_header:0 off:0
[   20.065247] [drm] Memory usable by graphics device = 2048M
[   20.065251] [drm] Replacing VGA console driver
[   20.065728] Console: switching to colour dummy device 80x25
[   20.070866] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   20.070872] [drm] Driver supports precise vblank timestamp query.
[   20.073460] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=none:owns=io+mem
[   20.265483] ACPI Exception: AE_NOT_FOUND, Evaluating _DOD (20160422/video-1251)
[   20.265488] ACPI: Video Device [PEGP] (multi-head: no  rom: yes  post: no)
[   20.265609] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:08/LNXVIDEO:00/input/input17
[   20.266064] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[   20.266162] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input18
[   20.345019] intel_rapl: Found RAPL domain package
[   20.345025] intel_rapl: Found RAPL domain core
[   20.345028] intel_rapl: Found RAPL domain uncore
[   20.345034] intel_rapl: RAPL package 0 domain package locked by BIOS
[   20.393524] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops ffffffffc09276b0)
[   20.393532] [drm] Initialized i915 1.6.0 20160425 for 0000:00:02.0 on minor 0
[   20.394265] fbcon: inteldrmfb (fb0) is primary device
[   20.405595] ath: phy0: ASPM enabled: 0x43
[   20.405596] ath: EEPROM regdomain: 0x65
[   20.405597] ath: EEPROM indicates we should expect a direct regpair map
[   20.405598] ath: Country alpha2 being used: 00
[   20.405598] ath: Regpair used: 0x65
[   20.406689] PAX: network_header:0 off:0
[   20.422555] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   20.422985] ieee80211 phy0: Atheros AR9287 Rev:2 mem=0xffffc900013c0000, irq=18
[   21.250019] Console: switching to colour frame buffer device 200x56
[   21.252971] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[   21.267689] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
[   21.267795] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
[   21.267880] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input19
[   22.065583] systemd-journald[273]: Received request to flush runtime journal from PID 1
[   22.591209] audit: type=1400 audit(1475203226.219:2): apparmor="STATUS" operation="profile_load" name="docker-default" pid=472 comm="apparmor_parser"
[   22.600008] audit: type=1400 audit(1475203226.227:3): apparmor="STATUS" operation="profile_load" name="system_tor" pid=472 comm="apparmor_parser"
[   22.601590] audit: type=1400 audit(1475203226.231:4): apparmor="STATUS" operation="profile_load" name="/usr/bin/obfsproxy" pid=472 comm="apparmor_parser"
[   22.602580] audit: type=1400 audit(1475203226.231:5): apparmor="STATUS" operation="profile_load" name="/usr/lib/libvirt/virt-aa-helper" pid=472 comm="apparmor_parser"
[   22.603695] audit: type=1400 audit(1475203226.231:6): apparmor="STATUS" operation="profile_load" name="/usr/sbin/libvirtd" pid=472 comm="apparmor_parser"
[   29.806908] r8169 0000:05:00.2 eth0: link down
[   29.807711] PAX: network_header:0 off:0
[   29.826904] PAX: network_header:0 off:0
[   30.963052] PAX: network_header:0 off:0
[   31.000155] PAX: network_header:0 off:0
[   31.000187] PAX: network_header:0 off:0
[   31.000215] PAX: network_header:0 off:0
[   31.000324] PAX: network_header:0 off:0
[   31.000335] PAX: network_header:0 off:0
[   31.000409] PAX: network_header:0 off:0
[   31.000500] PAX: network_header:0 off:0
[   31.000549] PAX: network_header:0 off:0
[   31.000619] PAX: network_header:0 off:0
[   31.384200] PAX: network_header:0 off:0
[   32.223727] PAX: network_header:0 off:0
[   32.223743] PAX: network_header:0 off:0
[   33.423690] PAX: network_header:0 off:0
[   34.502022] grsec: denied resource overstep by requesting 148439040 for RLIMIT_MEMLOCK against limit 65536 for /usr/sbin/lightdm-gtk-greeter[lightdm-gtk-gre:651] uid/euid:105/105 gid/egid:111/111, parent /usr/sbin/lightdm[lightdm:645] uid/euid:0/0 gid/egid:0/0
[   35.327892] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[   35.348024] Bridge firewalling registered
[   35.399805] nf_conntrack version 0.5.0 (65536 buckets, 262144 max)
[   35.542242] ip_tables: (C) 2000-2006 Netfilter Core Team
[   35.844215] Initializing XFRM netlink socket
[   35.947179] PAX: network_header:0 off:0
[   35.947199] PAX: network_header:0 off:0
[   35.947214] PAX: network_header:0 off:0
[   35.947233] PAX: network_header:0 off:0
[   55.034709] PAX: network_header:0 off:0
[   55.873765] PAX: network_header:0 off:0
[   55.873811] PAX: network_header:0 off:0
[   88.051139] PAX: network_header:0 off:0
[   88.890704] PAX: network_header:0 off:0
[   88.890720] PAX: network_header:0 off:0
[  131.024426] PAX: network_header:0 off:0
[  131.862987] PAX: network_header:0 off:0
[  131.863000] PAX: network_header:0 off:0
[  134.077390] grsec: denied resource overstep by requesting 148439040 for RLIMIT_MEMLOCK against limit 65536 for /usr/sbin/lightdm-gtk-greeter[lightdm-gtk-gre:880] uid/euid:105/105 gid/egid:111/111, parent /usr/sbin/lightdm[lightdm:877] uid/euid:0/0 gid/egid:0/0
[  184.014889] PAX: network_header:0 off:0
[  184.854393] PAX: network_header:0 off:0
[  184.854412] PAX: network_header:0 off:0
[  276.512954] r8169 0000:05:00.2 eth0: link down
[  276.513780] PAX: network_header:0 off:0
[  276.536065] PAX: network_header:0 off:0
[  276.536625] PAX: network_header:0 off:0
[  276.536642] PAX: network_header:0 off:0
[  276.536711] PAX: network_header:0 off:0
[  276.536810] PAX: network_header:0 off:0
[  276.536847] PAX: network_header:0 off:0
[  276.536921] PAX: network_header:0 off:0
[  276.599039] PAX: network_header:0 off:0
[  277.438113] PAX: network_header:0 off:0
[  277.438131] PAX: network_header:0 off:0
[  300.017259] PAX: network_header:0 off:0
[  300.855982] PAX: network_header:0 off:0
[  300.856013] PAX: network_header:0 off:0
[  306.967992] PAX: network_header:0 off:0
[  307.811351] PAX: network_header:0 off:0
[  307.811397] PAX: network_header:0 off:0
[  307.812022] wlan0: authenticate with cc:b2:66:a2:6f:d7
[  307.836416] PAX: network_header:0 off:0
[  307.836423] wlan0: send auth to cc:b2:66:a2:6f:d7 (try 1/3)
[  307.838163] wlan0: authenticated
[  307.838170] PAX: network_header:0 off:0
[  307.839324] wlan0: associate with cc:b2:66:a2:6f:d7 (try 1/3)
[  307.839340] PAX: network_header:4 off:a
[  307.843062] wlan0: RX AssocResp from cc:b2:66:a2:6f:d7 (capab=0x401 status=0 aid=4)
[  307.843170] wlan0: associated
[  307.843195] PAX: network_header:0 off:0
[  307.843199] PAX: network_header:0 off:0
[  307.843222] PAX: network_header:0 off:0
[  307.843225] PAX: network_header:0 off:0
[  307.843964] PAX: network_header:0 off:ffffffc4
[  307.843968] PAX: size overflow detected in function skb_headers_offset_update net/core/skbuff.c:1052 cicus.735_41 min, count: 22, decl: network_header; num: 0; context: sk_buff;
[  307.843972] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.7.4-grsec #2
[  307.843974] Hardware name: Notebook                         W250EGQ / W270EGQ                /W250EGQ / W270EGQ                 , BIOS 4.6.5 10/19/2012
[  307.843976]  0000000000000246 e94b0b0a1b171f26 ffff88022f383ad0 ffffffff814c2f9b
[  307.843980]  000000000000041c e94b0b0a1b171f26 ffffffff81e40660 000000000000041c
[  307.843983]  ffff88022f383b00 ffffffff8126c8b3 ffff8800c33bad00 00000000ffffffc4
[  307.843986] Call Trace:
[  307.843988]  <IRQ>  [<ffffffff814c2f9b>] dump_stack+0x60/0xb5
[  307.843998]  [<ffffffff8126c8b3>] report_size_overflow+0x73/0x90
[  307.844002]  [<ffffffff8187ea26>] skb_headers_offset_update+0x156/0x1e0
[  307.844005]  [<ffffffff81881255>] skb_copy_expand+0x115/0x1e0
[  307.844035]  [<ffffffffc052b63f>] ieee80211_rx_handlers+0x15ef/0x2600 [mac80211]
[  307.844040]  [<ffffffff814e1965>] ? find_next_bit+0x15/0x40
[  307.844043]  [<ffffffff814c2d5f>] ? cpumask_next_and+0x2f/0x60
[  307.844065]  [<ffffffffc052cf02>] ieee80211_prepare_and_rx_handle+0x632/0x1600 [mac80211]
[  307.844068]  [<ffffffff8188afa8>] ? __build_skb+0x48/0x240
[  307.844088]  [<ffffffffc052e51a>] ieee80211_rx_napi+0x64a/0xca0 [mac80211]
[  307.844092]  [<ffffffff8150008a>] ? swiotlb_tbl_map_single+0x2aa/0x2d0
[  307.844099]  [<ffffffffc064cb1c>] ath_rx_tasklet+0xb2c/0xe80 [ath9k]
[  307.844102]  [<ffffffff815006e0>] ? swiotlb_tbl_unmap_single+0x130/0x130
[  307.844107]  [<ffffffffc0649a9e>] ath9k_tasklet+0xee/0x2b0 [ath9k]
[  307.844112]  [<ffffffff8108564a>] tasklet_action+0x20a/0x230
[  307.844116]  [<ffffffff819bdb1e>] __do_softirq+0x11e/0x2d4
[  307.844119]  [<ffffffff81085c33>] irq_exit+0x93/0xb0
[  307.844122]  [<ffffffff819bd774>] do_IRQ+0x54/0x110
[  307.844126]  [<ffffffff819bbc4b>] common_interrupt+0x8b/0x8b
[  307.844128]  <EOI>  [<ffffffff8181b049>] ? cpuidle_enter_state+0x129/0x2b0
[  307.844135]  [<ffffffff8181b237>] cpuidle_enter+0x17/0x30
[  307.844139]  [<ffffffff810cd8d3>] call_cpuidle+0x23/0x50
[  307.844142]  [<ffffffff810cdd87>] cpu_startup_entry+0x2a7/0x350
[  307.844145]  [<ffffffff81046acf>] start_secondary+0x24f/0x2f0
[  307.844150] PAX: network_header:4 off:12
[  317.567068] PAX: network_header:0 off:0
[  317.567077] PAX: network_header:0 off:0
[  317.567082] PAX: network_header:0 off:0
[  317.567087] PAX: network_header:0 off:0
[  317.569539] PAX: network_header:0 off:0
[  317.569626] PAX: network_header:0 off:0
[  317.569672] PAX: network_header:0 off:0
[  317.569808] PAX: network_header:0 off:0
[  318.992651] PAX: network_header:0 off:0
[  318.992754] PAX: network_header:0 off:0
[  318.992843] PAX: network_header:0 off:0
[  324.991224] PAX: network_header:0 off:0
[  324.991330] PAX: network_header:0 off:0
[  324.991408] PAX: network_header:0 off:0
[  325.095277] PAX: network_header:0 off:0
[  325.095351] PAX: network_header:0 off:0
[  325.095357] PAX: network_header:0 off:0
[  325.095362] PAX: network_header:0 off:0
[  325.095367] PAX: network_header:0 off:0
[  325.096955] wlan0: deauthenticating from cc:b2:66:a2:6f:d7 by local choice (Reason: 3=DEAUTH_LEAVING)
[  325.097948] PAX: network_header:0 off:0
[  325.106552] PAX: network_header:0 off:0
[  325.106556] PAX: network_header:0 off:0
[  325.106580] PAX: network_header:0 off:0
[  325.133345] PAX: network_header:0 off:0
[  325.973730] PAX: network_header:0 off:0
[  325.973745] PAX: network_header:0 off:0
[  328.004153] PAX: network_header:0 off:0
[  328.841541] PAX: network_header:0 off:0
[  328.841555] PAX: network_header:0 off:0

^ permalink raw reply

* [PATCH v2] net: fec: set mac address unconditionally
From: Gavin Schenk @ 2016-09-30  9:46 UTC (permalink / raw)
  To: fugang.duan; +Cc: netdev, kernel, Gavin Schenk

If the mac address origin is not dt, you can only safely assign a mac
address after "link up" of the device. If the link is off the clocks are
disabled and because of issues assigning registers when clocks are off the
new mac address cannot be written in .ndo_set_mac_address() on some soc's.
This fix sets the mac address unconditionally in fec_restart(...) and
ensures consistency between fec registers and the network layer.

Signed-off-by: Gavin Schenk <g.schenk@eckelmann.de>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 9638d19e4816 ("net: fec: add netif status check before set mac address")
---
Changes since (implicit) v1:
- reword commit log as suggested by Uwe
- added Acks

 drivers/net/ethernet/freescale/fec_main.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 2a03857cca18..bdabea6cd981 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -903,13 +903,11 @@ fec_restart(struct net_device *ndev)
 	 * enet-mac reset will reset mac address registers too,
 	 * so need to reconfigure it.
 	 */
-	if (fep->quirks & FEC_QUIRK_ENET_MAC) {
-		memcpy(&temp_mac, ndev->dev_addr, ETH_ALEN);
-		writel((__force u32)cpu_to_be32(temp_mac[0]),
-		       fep->hwp + FEC_ADDR_LOW);
-		writel((__force u32)cpu_to_be32(temp_mac[1]),
-		       fep->hwp + FEC_ADDR_HIGH);
-	}
+	memcpy(&temp_mac, ndev->dev_addr, ETH_ALEN);
+	writel((__force u32)cpu_to_be32(temp_mac[0]),
+	       fep->hwp + FEC_ADDR_LOW);
+	writel((__force u32)cpu_to_be32(temp_mac[1]),
+	       fep->hwp + FEC_ADDR_HIGH);
 
 	/* Clear any outstanding interrupt. */
 	writel(0xffffffff, fep->hwp + FEC_IEVENT);
-- 
1.9.1


Eckelmann AG
Vorstand: Dipl.-Ing. Peter Frankenbach (Sprecher) Dipl.-Wi.-Ing. Philipp Eckelmann
Dr.-Ing. Frank-Thomas Mellert Dr.-Ing. Marco Münchhof Dr.-Ing. Frank Uhlemann
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht Wiesbaden HRB 12636
http://www.eckelmann.de 

^ permalink raw reply related

* Re: [PATCH v2 net-next 1/2] net: centralize net_device min/max MTU checking
From: Jakub Sitnicki @ 2016-09-30  9:37 UTC (permalink / raw)
  To: Jarod Wilson; +Cc: linux-kernel, David S. Miller, netdev
In-Reply-To: <20160928222053.33697-2-jarod@redhat.com>

On Wed, Sep 28, 2016 at 10:20 PM GMT, Jarod Wilson wrote:
> While looking into an MTU issue with sfc, I started noticing that almost
> every NIC driver with an ndo_change_mtu function implemented almost
> exactly the same range checks, and in many cases, that was the only
> practical thing their ndo_change_mtu function was doing. Quite a few
> drivers have either 68, 64, 60 or 46 as their minimum MTU value checked,
> and then various sizes from 1500 to 65535 for their maximum MTU value. We
> can remove a whole lot of redundant code here if we simple store min_mtu
> and max_mtu in net_device, and check against those in net/core/dev.c's
> dev_set_mtu().
>
> In theory, there should be zero functional change with this patch, it just
> puts the infrastructure in place. Subsequent patches will attempt to start
> using said infrastructure, with theoretically zero change in
> functionality.
>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: netdev@vger.kernel.org
> Signed-off-by: Jarod Wilson <jarod@redhat.com>
> ---

[...]

> diff --git a/net/core/dev.c b/net/core/dev.c
> index c0c291f..5343799 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -6493,9 +6493,17 @@ int dev_set_mtu(struct net_device *dev, int new_mtu)
>  	if (new_mtu == dev->mtu)
>  		return 0;
>  
> -	/*	MTU must be positive.	 */
> -	if (new_mtu < 0)
> +	if (new_mtu < dev->min_mtu) {

Ouch, integral promotions. Looks like you need to keep the < 0 check.
Otherwise new_mtu gets promoted to unsigned int and negative values will
pass the check.

Thanks,
Jakub

^ permalink raw reply

* [PATCH net] vti6: flush x-netns xfrm cache when vti interface is removed
From: Nicolas Dichtel @ 2016-09-30  9:11 UTC (permalink / raw)
  To: davem, steffen.klassert; +Cc: netdev, Nicolas Dichtel, Lance Richardson

This is the same fix than commit a5d0dc810abf ("vti: flush x-netns xfrm
cache when vti interface is removed")

This patch fixes a refcnt problem when a x-netns vti6 interface is removed:
unregister_netdevice: waiting for vti6_test to become free. Usage count = 1

Here is a script to reproduce the problem:

ip link set dev ntfp2 up
ip addr add dev ntfp2 2001::1/64
ip link add vti6_test type vti6 local 2001::1 remote 2001::2 key 1
ip netns add secure
ip link set vti6_test netns secure
ip netns exec secure ip link set vti6_test up
ip netns exec secure ip link s lo up
ip netns exec secure ip addr add dev vti6_test 2003::1/64
ip -6 xfrm policy add dir out tmpl src 2001::1 dst 2001::2 proto esp \
	   mode tunnel mark 1
ip -6 xfrm policy add dir in tmpl src 2001::2 dst 2001::1 proto esp \
	   mode tunnel mark 1
ip xfrm state add src 2001::1 dst 2001::2 proto esp spi 1 mode tunnel \
	   enc des3_ede 0x112233445566778811223344556677881122334455667788 mark 1
ip xfrm state add src 2001::2 dst 2001::1 proto esp spi 1 mode tunnel \
	   enc des3_ede 0x112233445566778811223344556677881122334455667788 mark 1
ip netns exec secure  ping6 -c 4 2003::2
ip netns del secure

CC: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 net/ipv6/ip6_vti.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index 5bd3afdcc771..cc7f7e9a8e8d 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -1138,6 +1138,33 @@ static struct xfrm6_protocol vti_ipcomp6_protocol __read_mostly = {
 	.priority	=	100,
 };
 
+static bool is_vti6_tunnel(const struct net_device *dev)
+{
+	return dev->netdev_ops == &vti6_netdev_ops;
+}
+
+static int vti6_device_event(struct notifier_block *unused,
+			     unsigned long event, void *ptr)
+{
+	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
+	struct ip6_tnl *t = netdev_priv(dev);
+
+	if (!is_vti6_tunnel(dev))
+		return NOTIFY_DONE;
+
+	switch (event) {
+	case NETDEV_DOWN:
+		if (!net_eq(t->net, dev_net(dev)))
+			xfrm_garbage_collect(t->net);
+		break;
+	}
+	return NOTIFY_DONE;
+}
+
+static struct notifier_block vti6_notifier_block __read_mostly = {
+	.notifier_call = vti6_device_event,
+};
+
 /**
  * vti6_tunnel_init - register protocol and reserve needed resources
  *
@@ -1148,6 +1175,8 @@ static int __init vti6_tunnel_init(void)
 	const char *msg;
 	int err;
 
+	register_netdevice_notifier(&vti6_notifier_block);
+
 	msg = "tunnel device";
 	err = register_pernet_device(&vti6_net_ops);
 	if (err < 0)
@@ -1180,6 +1209,7 @@ xfrm_proto_ah_failed:
 xfrm_proto_esp_failed:
 	unregister_pernet_device(&vti6_net_ops);
 pernet_dev_failed:
+	unregister_netdevice_notifier(&vti6_notifier_block);
 	pr_err("vti6 init: failed to register %s\n", msg);
 	return err;
 }
@@ -1194,6 +1224,7 @@ static void __exit vti6_tunnel_cleanup(void)
 	xfrm6_protocol_deregister(&vti_ah6_protocol, IPPROTO_AH);
 	xfrm6_protocol_deregister(&vti_esp6_protocol, IPPROTO_ESP);
 	unregister_pernet_device(&vti6_net_ops);
+	unregister_netdevice_notifier(&vti6_notifier_block);
 }
 
 module_init(vti6_tunnel_init);
-- 
2.8.1

^ permalink raw reply related

* Re: [PATCH v8 0/8] thunderbolt: Introducing Thunderbolt(TM) Networking
From: gregkh @ 2016-09-30  8:50 UTC (permalink / raw)
  To: Levy, Amir (Jer)
  Cc: David Miller, andreas.noever@gmail.com, bhelgaas@google.com,
	corbet@lwn.net, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, netdev@vger.kernel.org,
	linux-doc@vger.kernel.org, mario_limonciello@dell.com,
	thunderbolt-linux, Westerberg, Mika, Winkler, Tomas,
	Zhang, Xiong Y
In-Reply-To: <E607265CB020454880711A6F96C05A03AB7CF632@hasmsx107.ger.corp.intel.com>

On Fri, Sep 30, 2016 at 08:37:36AM +0000, Levy, Amir (Jer) wrote:
> On Fri, Sep 30 2016, 09:40 AM, David Miller wrote:
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Date: Fri, 30 Sep 2016 08:30:05 +0200
> > 
> > > On Fri, Sep 30, 2016 at 01:55:55AM -0400, David Miller wrote:
> > >> From: Amir Levy <amir.jer.levy@intel.com>
> > >> Date: Wed, 28 Sep 2016 17:44:22 +0300
> > >>
> > >> > This driver enables Thunderbolt Networking on non-Apple platforms
> > >> > running Linux.
> > >>
> > >> Greg, any idea where this should get merged once fully vetted?  I can
> > >> take it through the net-next tree, but I'm fine with another more
> > >> appropriate tree taking it as well.
> > >
> > > I am supposed to be taking thunderbolt patches, but if this really is
> > > a network driver, it should go under drivers/net/ somewhere.  It needs
> > > more review though, it's not ready to go through anyone's tree just
> > > yet :)
> > >
> > > I'll let the thunderbolt maintainer go through it first before asking
> > > for a netdev review.
> > 
> > Ok, thanks Greg.
> 
> Greg, David,
> Andreas replied to similar request on patch v6:
> "This driver is independent from mine. It uses an interface provided
> by the firmware which is not present on Apple hardware and with which
> I am not familiar (also it does networking, not pci with which I am
> also not familiar). So I cannot comment on the driver itself. I don't
> mind a second driver, if that is what you are asking."

Yes, but I still need an ack from the thunderbolt maintainer that you
aren't doing anything foolish with that interface before I can take the
code.

> Note that Thunderbolt Networking is the first feature we would like to
> submit, but the next features aren't related to network, but more to
> Thunderbolt functionality. 

If this really is a real network device, it should probably live in
drivers/net/ like other network drivers.

> This is the reason I created the directory thunderbolt/icm, since the
> next features requires ICM to be enabled as well.

As long as you have ICM split out so that other drivers can use it, it
should be fine, no matter where in the tree it lives, right?

> I also followed the firewire as example that includes net.c (in
> drivers/firewire directory) along with other firewire functionality. 

That's the old-style of placing files.  We have moved the USB network
drivers out of drivers/usb/ a while ago.  The current thought is to
group drivers of specific types, not busses, together wherever possible,
as that is usually the majority of the logic in the driver (i.e. a USB
network driver has more network-driver specific logic than USB-specific
logic.)

Hope this helps explain things.  I'll get to your patches next week,
they are in my queue at the moment, but have conferences to deal with at
the moment.  Don't let my delay stop you from working on further "ICM"
drivers if needed, you can always send new series of patches that build
on this one when you have it ready.

thanks,

greg k-h

^ permalink raw reply

* RE: [PATCH v8 0/8] thunderbolt: Introducing Thunderbolt(TM) Networking
From: Levy, Amir (Jer) @ 2016-09-30  8:37 UTC (permalink / raw)
  To: David Miller, gregkh@linuxfoundation.org
  Cc: andreas.noever@gmail.com, bhelgaas@google.com, corbet@lwn.net,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org,
	mario_limonciello@dell.com, thunderbolt-linux, Westerberg, Mika,
	Winkler, Tomas, Zhang, Xiong Y
In-Reply-To: <20160930.024026.274720546666401005.davem@davemloft.net>

On Fri, Sep 30 2016, 09:40 AM, David Miller wrote:
> From: Greg KH <gregkh@linuxfoundation.org>
> Date: Fri, 30 Sep 2016 08:30:05 +0200
> 
> > On Fri, Sep 30, 2016 at 01:55:55AM -0400, David Miller wrote:
> >> From: Amir Levy <amir.jer.levy@intel.com>
> >> Date: Wed, 28 Sep 2016 17:44:22 +0300
> >>
> >> > This driver enables Thunderbolt Networking on non-Apple platforms
> >> > running Linux.
> >>
> >> Greg, any idea where this should get merged once fully vetted?  I can
> >> take it through the net-next tree, but I'm fine with another more
> >> appropriate tree taking it as well.
> >
> > I am supposed to be taking thunderbolt patches, but if this really is
> > a network driver, it should go under drivers/net/ somewhere.  It needs
> > more review though, it's not ready to go through anyone's tree just
> > yet :)
> >
> > I'll let the thunderbolt maintainer go through it first before asking
> > for a netdev review.
> 
> Ok, thanks Greg.

Greg, David,
Andreas replied to similar request on patch v6:
"This driver is independent from mine. It uses an interface provided by the firmware which is not present on Apple hardware and with which I am not familiar (also it does networking, not pci with which I am also not familiar). So I cannot comment on the driver itself. I don't mind a second driver, if that is what you are asking."

Note that Thunderbolt Networking is the first feature we would like to submit, but the next features aren't related to network, but more to Thunderbolt functionality. 
This is the reason I created the directory thunderbolt/icm, since the next features requires ICM to be enabled as well.
I also followed the firewire as example that includes net.c (in drivers/firewire directory) along with other firewire functionality. 

Thanks,
Amir


^ permalink raw reply

* Re: [PATCH] brcmfmac: implement more accurate skb tracking
From: Arend Van Spriel @ 2016-09-30  8:29 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Kalle Valo, Franky Lin, Hante Meuleman, Pieter-Paul Giesberts,
	Franky Lin,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER,
	Network Development, Linux Kernel Mailing List,
	Rafał Miłecki
In-Reply-To: <CACna6rxg5r=YWh7m1TYAhD5OrG3+KXAWMihs9mgh-EBVfKvt+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 29-9-2016 23:57, Rafał Miłecki wrote:
> On 27 September 2016 at 11:24, Arend Van Spriel
> <arend.vanspriel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> wrote:
>> On 26-9-2016 14:38, Rafał Miłecki wrote:
>>> On 26 September 2016 at 14:13, Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>> On 26 September 2016 at 13:46, Arend Van Spriel
>>>> <arend.vanspriel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> wrote:
>>>>> On 26-9-2016 12:23, Rafał Miłecki wrote:
>>>>>> From: Rafał Miłecki <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
>>>>>>
>>>>>> We need to track 802.1x packets to know if there are any pending ones
>>>>>> for transmission. This is required for performing key update in the
>>>>>> firmware.
>>>>>
>>>>> The problem we are trying to solve is a pretty old one. The problem is
>>>>> that wpa_supplicant uses two separate code paths: EAPOL messaging
>>>>> through data path and key configuration though nl80211.
>>>>
>>>> Can I find it described/reported somewhere?
>>>>
>>>>
>>>>>> Unfortunately our old tracking code wasn't very accurate. It was
>>>>>> treating skb as pending as soon as it was passed by the netif. Actual
>>>>>> handling packet to the firmware was happening later as brcmfmac
>>>>>> internally queues them and uses its own worker(s).
>>>>>
>>>>> That does not seem right. As soon as we get a 1x packet we need to wait
>>>>> with key configuration regardless whether it is still in the driver or
>>>>> handed over to firmware already.
>>>>
>>>> OK, thanks.
>>>
>>> Actually, it's not OK. I was trying to report/describe/discuss this
>>> problem for over a week. I couldn't get much of answer from you.
>>>
>>> I had to come with a patch I worked on for quite some time. Only then
>>> you decided to react and reply with a reason for a nack. I see this
>>> patch may be wrong (but it's still hard to know what's going wrong
>>> without a proper hostapd bug report). I'd expect you to somehow work &
>>> communicate with open source community.
>>
>> We do or at least make an honest attempt, but there is more on our plate
>> so responses may be delayed. It also does not help when you get anal and
>> preachy when we do respond. Also not OK. In this case the delay is
>> caused because I had to pick up the thread(s) as Hante is on vacation
>> (he needed a break :-p ). However, you started sending patches so I
>> decided to look at and respond to those. Sorry if you felt like we left
>> you hanging to dry.
> 
> I believe I get easily irritated due to my communication experience I
> got so far :(
> 
> 
> Over a year ago I reported brcmfmac can't recover from failed
> register_netdev(ice). This bug remains unfixed.
> 
> In 2014 I reported problem with 80 MHz support. I didn't have hardware
> to fix & test it on my own (you weren't able/allowed to send me one of
> your PCIe cards). In remained broken until I fixed it year later.
> 
> You missed my crash bug report about caused by missing eth_type_trans
> and came with patch on your own a month later.
> 
> Earlier this year I reported you problem with BCM4366 and multiple
> interfaces. I didn't get much help. 3 months later I came with patch
> to workaround the problem but you said there's a better way to do
> this. It took me 2 weeks to figure out a new wlioctl API for that
> while all I needed was a simple hint on "interface_remove".
> 
> Right now I'm waiting to get any answer from you about 4366c0
> firmware. It's still less than 2 weeks since I asked for it, but a
> simple ETA would be nice. I'm actually not sure if I should report
> more problems to you to don't distract you from pending things.

This is a difficult question. All upstream firmware releases for router
chips are put on hold until further notice. Some decisions have been
made, but I have not seen a detailed plan to give an ETA.

> Problems with brcmf_netdev_wait_pend8021x were reported multiples
> times for last few months. When I finally got time for that it took me
> a week to debug them.

For the pend8021x you were sending a number of messages showing debug
progress so not sure whether you wanted our feedback on that. If so a
ping might have done it.

> As you can see, it takes me months to get help on some things. And in
> few cases I never got much help at all. Yes, I was hoping to have you
> more involved into brcmfmac development and problems solving. I guess
> things didn't meet my expectations and I got grumpy & preachy.

Thanks for listing all our failures. Somehow we are very good at getting
each other grumpy. When we provide a patch and you break it up and
submit that to Kalle, we get grumpy and it all piles up to the point
where we have this kind of conversation. As long as it helps to get
things of our chest I can live with that. Hope you can too. We strive to
give support to the community, but the priority is low as it is not
full-time activity.

Regards,
Arend

^ permalink raw reply

* Re: [PATCH net-next 2/2] openvswitch: remove skb_mpls_header
From: Jiri Benc @ 2016-09-30  8:06 UTC (permalink / raw)
  To: pravin shelar; +Cc: Linux Kernel Network Developers, David Ahern
In-Reply-To: <CAOrHB_DJunwVXJse8XyVMqAxt2sf4BZ67vospaKD0Lj-6HS_yQ@mail.gmail.com>

On Thu, 29 Sep 2016 16:03:19 -0700, pravin shelar wrote:
> > --- a/include/net/mpls.h
> > +++ b/include/net/mpls.h
> > @@ -25,15 +25,4 @@ static inline bool eth_p_mpls(__be16 eth_type)
> >                 eth_type == htons(ETH_P_MPLS_MC);
> >  }
> >
> > -/*
> > - * For non-MPLS skbs this will correspond to the network header.
> > - * For MPLS skbs it will be before the network_header as the MPLS
> > - * label stack lies between the end of the mac header and the network
> > - * header. That is, for MPLS skbs the end of the mac header
> > - * is the top of the MPLS label stack.
> > - */
> > -static inline unsigned char *skb_mpls_header(struct sk_buff *skb)
> > -{
> > -       return skb_mac_header(skb) + skb->mac_len;
> > -}
> 
> I think we should keep this API, so that it is clear that MPLS header
> mapped skb network header.

I was pondering this but I don't think it really gains us anything.
Wrappers like ip_hdr() are useful as they do type conversion; it's much
nicer to write
	ip_hdr(skb)->daddr
than 
	(struct iphdr *)skb_network_header(skb)->daddr.

But we don't really have a good type to return from skb_mpls_header, it
boils down to be 100% equivalent to skb_network_header. In fact, you
could just do:
#define skb_mpls_header skb_network_header

In the code, I don't think there's much benefit from calling the
wrapper, meaning of skb_network_header itself is clear enough. It *is*
the network header, after all. In the whole openvswitch code, MPLS is
treated as L3 header - no dissection is performed after the MPLS
headers, the network header and mac_len is set as expected now, etc.

 Jiri

^ permalink raw reply

* [PATCH 2/2] qed: remove unused function in qed_cxt.c
From: Baoyou Xie @ 2016-09-30  8:02 UTC (permalink / raw)
  To: Yuval.Mintz, Ariel.Elior
  Cc: everest-linux-l2, netdev, linux-kernel, arnd, baoyou.xie,
	xie.baoyou, han.fei, tang.qiang007

We get 3 warnings when building kernel with W=1:
drivers/net/ethernet/qlogic/qed/qed_cxt.c:1941:1: warning: no previous prototype for 'qed_cxt_dynamic_ilt_alloc' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_cxt.c:2158:5: warning: no previous prototype for 'qed_cxt_free_proto_ilt' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_cxt.c:2186:5: warning: no previous prototype for 'qed_cxt_get_task_ctx' [-Wmissing-prototypes]

In fact, these functions are unused in
drivers/net/ethernet/qlogic/qed/qed_cxt.c, but should be removed.

So this patch removes these unused functions.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/net/ethernet/qlogic/qed/qed_cxt.c | 319 ------------------------------
 1 file changed, 319 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index d7e9b14..f12c7ea 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
@@ -386,24 +386,6 @@ u32 qed_cxt_get_proto_cid_count(struct qed_hwfn *p_hwfn,
 	return p_hwfn->p_cxt_mngr->conn_cfg[type].cid_count;
 }
 
-static u32 qed_cxt_get_proto_cid_start(struct qed_hwfn *p_hwfn,
-				       enum protocol_type type)
-{
-	return p_hwfn->p_cxt_mngr->acquired[type].start_cid;
-}
-
-static u32 qed_cxt_get_proto_tid_count(struct qed_hwfn *p_hwfn,
-				       enum protocol_type type)
-{
-	u32 cnt = 0;
-	int i;
-
-	for (i = 0; i < TASK_SEGMENTS; i++)
-		cnt += p_hwfn->p_cxt_mngr->conn_cfg[type].tid_seg[i].count;
-
-	return cnt;
-}
-
 static void qed_cxt_set_proto_tid_count(struct qed_hwfn *p_hwfn,
 					enum protocol_type proto,
 					u8 seg,
@@ -1933,304 +1915,3 @@ int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn,
 
 	return 0;
 }
-
-/* This function is very RoCE oriented, if another protocol in the future
- * will want this feature we'll need to modify the function to be more generic
- */
-int
-qed_cxt_dynamic_ilt_alloc(struct qed_hwfn *p_hwfn,
-			  enum qed_cxt_elem_type elem_type, u32 iid)
-{
-	u32 reg_offset, shadow_line, elem_size, hw_p_size, elems_per_p, line;
-	struct qed_ilt_client_cfg *p_cli;
-	struct qed_ilt_cli_blk *p_blk;
-	struct qed_ptt *p_ptt;
-	dma_addr_t p_phys;
-	u64 ilt_hw_entry;
-	void *p_virt;
-	int rc = 0;
-
-	switch (elem_type) {
-	case QED_ELEM_CXT:
-		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
-		elem_size = CONN_CXT_SIZE(p_hwfn);
-		p_blk = &p_cli->pf_blks[CDUC_BLK];
-		break;
-	case QED_ELEM_SRQ:
-		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM];
-		elem_size = SRQ_CXT_SIZE;
-		p_blk = &p_cli->pf_blks[SRQ_BLK];
-		break;
-	case QED_ELEM_TASK:
-		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
-		elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn);
-		p_blk = &p_cli->pf_blks[CDUT_SEG_BLK(QED_CXT_ROCE_TID_SEG)];
-		break;
-	default:
-		DP_NOTICE(p_hwfn, "-EINVALID elem type = %d", elem_type);
-		return -EINVAL;
-	}
-
-	/* Calculate line in ilt */
-	hw_p_size = p_cli->p_size.val;
-	elems_per_p = ILT_PAGE_IN_BYTES(hw_p_size) / elem_size;
-	line = p_blk->start_line + (iid / elems_per_p);
-	shadow_line = line - p_hwfn->p_cxt_mngr->pf_start_line;
-
-	/* If line is already allocated, do nothing, otherwise allocate it and
-	 * write it to the PSWRQ2 registers.
-	 * This section can be run in parallel from different contexts and thus
-	 * a mutex protection is needed.
-	 */
-
-	mutex_lock(&p_hwfn->p_cxt_mngr->mutex);
-
-	if (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_virt)
-		goto out0;
-
-	p_ptt = qed_ptt_acquire(p_hwfn);
-	if (!p_ptt) {
-		DP_NOTICE(p_hwfn,
-			  "QED_TIME_OUT on ptt acquire - dynamic allocation");
-		rc = -EBUSY;
-		goto out0;
-	}
-
-	p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
-				    p_blk->real_size_in_page,
-				    &p_phys, GFP_KERNEL);
-	if (!p_virt) {
-		rc = -ENOMEM;
-		goto out1;
-	}
-	memset(p_virt, 0, p_blk->real_size_in_page);
-
-	/* configuration of refTagMask to 0xF is required for RoCE DIF MR only,
-	 * to compensate for a HW bug, but it is configured even if DIF is not
-	 * enabled. This is harmless and allows us to avoid a dedicated API. We
-	 * configure the field for all of the contexts on the newly allocated
-	 * page.
-	 */
-	if (elem_type == QED_ELEM_TASK) {
-		u32 elem_i;
-		u8 *elem_start = (u8 *)p_virt;
-		union type1_task_context *elem;
-
-		for (elem_i = 0; elem_i < elems_per_p; elem_i++) {
-			elem = (union type1_task_context *)elem_start;
-			SET_FIELD(elem->roce_ctx.tdif_context.flags1,
-				  TDIF_TASK_CONTEXT_REFTAGMASK, 0xf);
-			elem_start += TYPE1_TASK_CXT_SIZE(p_hwfn);
-		}
-	}
-
-	p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_virt = p_virt;
-	p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_phys = p_phys;
-	p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].size =
-	    p_blk->real_size_in_page;
-
-	/* compute absolute offset */
-	reg_offset = PSWRQ2_REG_ILT_MEMORY +
-	    (line * ILT_REG_SIZE_IN_BYTES * ILT_ENTRY_IN_REGS);
-
-	ilt_hw_entry = 0;
-	SET_FIELD(ilt_hw_entry, ILT_ENTRY_VALID, 1ULL);
-	SET_FIELD(ilt_hw_entry,
-		  ILT_ENTRY_PHY_ADDR,
-		  (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_phys >> 12));
-
-	/* Write via DMAE since the PSWRQ2_REG_ILT_MEMORY line is a wide-bus */
-	qed_dmae_host2grc(p_hwfn, p_ptt, (u64) (uintptr_t)&ilt_hw_entry,
-			  reg_offset, sizeof(ilt_hw_entry) / sizeof(u32), 0);
-
-	if (elem_type == QED_ELEM_CXT) {
-		u32 last_cid_allocated = (1 + (iid / elems_per_p)) *
-		    elems_per_p;
-
-		/* Update the relevant register in the parser */
-		qed_wr(p_hwfn, p_ptt, PRS_REG_ROCE_DEST_QP_MAX_PF,
-		       last_cid_allocated - 1);
-
-		if (!p_hwfn->b_rdma_enabled_in_prs) {
-			/* Enable RoCE search */
-			qed_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 1);
-			p_hwfn->b_rdma_enabled_in_prs = true;
-		}
-	}
-
-out1:
-	qed_ptt_release(p_hwfn, p_ptt);
-out0:
-	mutex_unlock(&p_hwfn->p_cxt_mngr->mutex);
-
-	return rc;
-}
-
-/* This function is very RoCE oriented, if another protocol in the future
- * will want this feature we'll need to modify the function to be more generic
- */
-static int
-qed_cxt_free_ilt_range(struct qed_hwfn *p_hwfn,
-		       enum qed_cxt_elem_type elem_type,
-		       u32 start_iid, u32 count)
-{
-	u32 start_line, end_line, shadow_start_line, shadow_end_line;
-	u32 reg_offset, elem_size, hw_p_size, elems_per_p;
-	struct qed_ilt_client_cfg *p_cli;
-	struct qed_ilt_cli_blk *p_blk;
-	u32 end_iid = start_iid + count;
-	struct qed_ptt *p_ptt;
-	u64 ilt_hw_entry = 0;
-	u32 i;
-
-	switch (elem_type) {
-	case QED_ELEM_CXT:
-		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
-		elem_size = CONN_CXT_SIZE(p_hwfn);
-		p_blk = &p_cli->pf_blks[CDUC_BLK];
-		break;
-	case QED_ELEM_SRQ:
-		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM];
-		elem_size = SRQ_CXT_SIZE;
-		p_blk = &p_cli->pf_blks[SRQ_BLK];
-		break;
-	case QED_ELEM_TASK:
-		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
-		elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn);
-		p_blk = &p_cli->pf_blks[CDUT_SEG_BLK(QED_CXT_ROCE_TID_SEG)];
-		break;
-	default:
-		DP_NOTICE(p_hwfn, "-EINVALID elem type = %d", elem_type);
-		return -EINVAL;
-	}
-
-	/* Calculate line in ilt */
-	hw_p_size = p_cli->p_size.val;
-	elems_per_p = ILT_PAGE_IN_BYTES(hw_p_size) / elem_size;
-	start_line = p_blk->start_line + (start_iid / elems_per_p);
-	end_line = p_blk->start_line + (end_iid / elems_per_p);
-	if (((end_iid + 1) / elems_per_p) != (end_iid / elems_per_p))
-		end_line--;
-
-	shadow_start_line = start_line - p_hwfn->p_cxt_mngr->pf_start_line;
-	shadow_end_line = end_line - p_hwfn->p_cxt_mngr->pf_start_line;
-
-	p_ptt = qed_ptt_acquire(p_hwfn);
-	if (!p_ptt) {
-		DP_NOTICE(p_hwfn,
-			  "QED_TIME_OUT on ptt acquire - dynamic allocation");
-		return -EBUSY;
-	}
-
-	for (i = shadow_start_line; i < shadow_end_line; i++) {
-		if (!p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt)
-			continue;
-
-		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
-				  p_hwfn->p_cxt_mngr->ilt_shadow[i].size,
-				  p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt,
-				  p_hwfn->p_cxt_mngr->ilt_shadow[i].p_phys);
-
-		p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt = NULL;
-		p_hwfn->p_cxt_mngr->ilt_shadow[i].p_phys = 0;
-		p_hwfn->p_cxt_mngr->ilt_shadow[i].size = 0;
-
-		/* compute absolute offset */
-		reg_offset = PSWRQ2_REG_ILT_MEMORY +
-		    ((start_line++) * ILT_REG_SIZE_IN_BYTES *
-		     ILT_ENTRY_IN_REGS);
-
-		/* Write via DMAE since the PSWRQ2_REG_ILT_MEMORY line is a
-		 * wide-bus.
-		 */
-		qed_dmae_host2grc(p_hwfn, p_ptt,
-				  (u64) (uintptr_t) &ilt_hw_entry,
-				  reg_offset,
-				  sizeof(ilt_hw_entry) / sizeof(u32),
-				  0);
-	}
-
-	qed_ptt_release(p_hwfn, p_ptt);
-
-	return 0;
-}
-
-int qed_cxt_free_proto_ilt(struct qed_hwfn *p_hwfn, enum protocol_type proto)
-{
-	int rc;
-	u32 cid;
-
-	/* Free Connection CXT */
-	rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_CXT,
-				    qed_cxt_get_proto_cid_start(p_hwfn,
-								proto),
-				    qed_cxt_get_proto_cid_count(p_hwfn,
-								proto, &cid));
-
-	if (rc)
-		return rc;
-
-	/* Free Task CXT */
-	rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_TASK, 0,
-				    qed_cxt_get_proto_tid_count(p_hwfn, proto));
-	if (rc)
-		return rc;
-
-	/* Free TSDM CXT */
-	rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_SRQ, 0,
-				    qed_cxt_get_srq_count(p_hwfn));
-
-	return rc;
-}
-
-int qed_cxt_get_task_ctx(struct qed_hwfn *p_hwfn,
-			 u32 tid, u8 ctx_type, void **pp_task_ctx)
-{
-	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
-	struct qed_ilt_client_cfg *p_cli;
-	struct qed_ilt_cli_blk *p_seg;
-	struct qed_tid_seg *p_seg_info;
-	u32 proto, seg;
-	u32 total_lines;
-	u32 tid_size, ilt_idx;
-	u32 num_tids_per_block;
-
-	/* Verify the personality */
-	switch (p_hwfn->hw_info.personality) {
-	case QED_PCI_ISCSI:
-		proto = PROTOCOLID_ISCSI;
-		seg = QED_CXT_ISCSI_TID_SEG;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	p_cli = &p_mngr->clients[ILT_CLI_CDUT];
-	if (!p_cli->active)
-		return -EINVAL;
-
-	p_seg_info = &p_mngr->conn_cfg[proto].tid_seg[seg];
-
-	if (ctx_type == QED_CTX_WORKING_MEM) {
-		p_seg = &p_cli->pf_blks[CDUT_SEG_BLK(seg)];
-	} else if (ctx_type == QED_CTX_FL_MEM) {
-		if (!p_seg_info->has_fl_mem)
-			return -EINVAL;
-		p_seg = &p_cli->pf_blks[CDUT_FL_SEG_BLK(seg, PF)];
-	} else {
-		return -EINVAL;
-	}
-	total_lines = DIV_ROUND_UP(p_seg->total_size, p_seg->real_size_in_page);
-	tid_size = p_mngr->task_type_size[p_seg_info->type];
-	num_tids_per_block = p_seg->real_size_in_page / tid_size;
-
-	if (total_lines < tid / num_tids_per_block)
-		return -EINVAL;
-
-	ilt_idx = tid / num_tids_per_block + p_seg->start_line -
-		  p_mngr->pf_start_line;
-	*pp_task_ctx = (u8 *)p_mngr->ilt_shadow[ilt_idx].p_virt +
-		       (tid % num_tids_per_block) * tid_size;
-
-	return 0;
-}
-- 
2.7.4

^ permalink raw reply related

* [PATCH 1/2] qed: mark symbols static where possible
From: Baoyou Xie @ 2016-09-30  7:56 UTC (permalink / raw)
  To: Yuval.Mintz, Ariel.Elior
  Cc: everest-linux-l2, netdev, linux-kernel, arnd, baoyou.xie,
	xie.baoyou, han.fei, tang.qiang007

We get 12 warnings when building kernel with W=1:
drivers/net/ethernet/qlogic/qed/qed_cxt.c:346:6: warning: no previous prototype for 'qed_cxt_set_srq_count' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_cxt.c:353:5: warning: no previous prototype for 'qed_cxt_get_srq_count' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_cxt.c:389:5: warning: no previous prototype for 'qed_cxt_get_proto_cid_start' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_cxt.c:395:5: warning: no previous prototype for 'qed_cxt_get_proto_tid_count' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_cxt.c:1801:6: warning: no previous prototype for 'qed_rdma_set_pf_params' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_debug.c:4031:17: warning: no previous prototype for 'qed_mcp_trace_dump' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_debug.c:4133:17: warning: no previous prototype for 'qed_reg_fifo_dump' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_debug.c:4195:17: warning: no previous prototype for 'qed_igu_fifo_dump' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_debug.c:4258:17: warning: no previous prototype for 'qed_protection_override_dump' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_debug.c:6342:17: warning: no previous prototype for 'qed_print_idle_chk_results_wrapper' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_debug.c:6416:17: warning: no previous prototype for 'format_feature' [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qed/qed_debug.c:6483:17: warning: no previous prototype for 'qed_dbg_dump' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/net/ethernet/qlogic/qed/qed_cxt.c   | 16 ++++-----
 drivers/net/ethernet/qlogic/qed/qed_debug.c | 51 +++++++++++++++--------------
 2 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index dd579b2..d7e9b14 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
@@ -343,14 +343,14 @@ static struct qed_tid_seg *qed_cxt_tid_seg_info(struct qed_hwfn *p_hwfn,
 	return NULL;
 }
 
-void qed_cxt_set_srq_count(struct qed_hwfn *p_hwfn, u32 num_srqs)
+static void qed_cxt_set_srq_count(struct qed_hwfn *p_hwfn, u32 num_srqs)
 {
 	struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr;
 
 	p_mgr->srq_count = num_srqs;
 }
 
-u32 qed_cxt_get_srq_count(struct qed_hwfn *p_hwfn)
+static u32 qed_cxt_get_srq_count(struct qed_hwfn *p_hwfn)
 {
 	struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr;
 
@@ -386,14 +386,14 @@ u32 qed_cxt_get_proto_cid_count(struct qed_hwfn *p_hwfn,
 	return p_hwfn->p_cxt_mngr->conn_cfg[type].cid_count;
 }
 
-u32 qed_cxt_get_proto_cid_start(struct qed_hwfn *p_hwfn,
-				enum protocol_type type)
+static u32 qed_cxt_get_proto_cid_start(struct qed_hwfn *p_hwfn,
+				       enum protocol_type type)
 {
 	return p_hwfn->p_cxt_mngr->acquired[type].start_cid;
 }
 
-u32 qed_cxt_get_proto_tid_count(struct qed_hwfn *p_hwfn,
-				enum protocol_type type)
+static u32 qed_cxt_get_proto_tid_count(struct qed_hwfn *p_hwfn,
+				       enum protocol_type type)
 {
 	u32 cnt = 0;
 	int i;
@@ -1798,8 +1798,8 @@ int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn, struct qed_cxt_info *p_info)
 	return 0;
 }
 
-void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn,
-			    struct qed_rdma_pf_params *p_params)
+static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn,
+				   struct qed_rdma_pf_params *p_params)
 {
 	u32 num_cons, num_tasks, num_qps, num_mrs, num_srqs;
 	enum protocol_type proto;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c
index 88e7d5b..6f1d54e 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_debug.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c
@@ -4028,10 +4028,10 @@ static enum dbg_status qed_mcp_trace_read_meta(struct qed_hwfn *p_hwfn,
 }
 
 /* Dump MCP Trace */
-enum dbg_status qed_mcp_trace_dump(struct qed_hwfn *p_hwfn,
-				   struct qed_ptt *p_ptt,
-				   u32 *dump_buf,
-				   bool dump, u32 *num_dumped_dwords)
+static enum dbg_status qed_mcp_trace_dump(struct qed_hwfn *p_hwfn,
+					  struct qed_ptt *p_ptt,
+					  u32 *dump_buf,
+					  bool dump, u32 *num_dumped_dwords)
 {
 	u32 trace_data_grc_addr, trace_data_size_bytes, trace_data_size_dwords;
 	u32 trace_meta_size_dwords, running_bundle_id, offset = 0;
@@ -4130,10 +4130,10 @@ enum dbg_status qed_mcp_trace_dump(struct qed_hwfn *p_hwfn,
 }
 
 /* Dump GRC FIFO */
-enum dbg_status qed_reg_fifo_dump(struct qed_hwfn *p_hwfn,
-				  struct qed_ptt *p_ptt,
-				  u32 *dump_buf,
-				  bool dump, u32 *num_dumped_dwords)
+static enum dbg_status qed_reg_fifo_dump(struct qed_hwfn *p_hwfn,
+					 struct qed_ptt *p_ptt,
+					 u32 *dump_buf,
+					 bool dump, u32 *num_dumped_dwords)
 {
 	u32 offset = 0, dwords_read, size_param_offset;
 	bool fifo_has_data;
@@ -4192,10 +4192,10 @@ enum dbg_status qed_reg_fifo_dump(struct qed_hwfn *p_hwfn,
 }
 
 /* Dump IGU FIFO */
-enum dbg_status qed_igu_fifo_dump(struct qed_hwfn *p_hwfn,
-				  struct qed_ptt *p_ptt,
-				  u32 *dump_buf,
-				  bool dump, u32 *num_dumped_dwords)
+static enum dbg_status qed_igu_fifo_dump(struct qed_hwfn *p_hwfn,
+					 struct qed_ptt *p_ptt,
+					 u32 *dump_buf,
+					 bool dump, u32 *num_dumped_dwords)
 {
 	u32 offset = 0, dwords_read, size_param_offset;
 	bool fifo_has_data;
@@ -4255,10 +4255,11 @@ enum dbg_status qed_igu_fifo_dump(struct qed_hwfn *p_hwfn,
 }
 
 /* Protection Override dump */
-enum dbg_status qed_protection_override_dump(struct qed_hwfn *p_hwfn,
-					     struct qed_ptt *p_ptt,
-					     u32 *dump_buf,
-					     bool dump, u32 *num_dumped_dwords)
+static enum
+dbg_status qed_protection_override_dump(struct qed_hwfn *p_hwfn,
+					struct qed_ptt *p_ptt,
+					u32 *dump_buf,
+					bool dump, u32 *num_dumped_dwords)
 {
 	u32 offset = 0, size_param_offset, override_window_dwords;
 
@@ -6339,10 +6340,11 @@ enum dbg_status qed_print_fw_asserts_results(struct qed_hwfn *p_hwfn,
 }
 
 /* Wrapper for unifying the idle_chk and mcp_trace api */
-enum dbg_status qed_print_idle_chk_results_wrapper(struct qed_hwfn *p_hwfn,
-						   u32 *dump_buf,
-						   u32 num_dumped_dwords,
-						   char *results_buf)
+static enum
+dbg_status qed_print_idle_chk_results_wrapper(struct qed_hwfn *p_hwfn,
+					      u32 *dump_buf,
+					      u32 num_dumped_dwords,
+					      char *results_buf)
 {
 	u32 num_errors, num_warnnings;
 
@@ -6413,8 +6415,8 @@ static void qed_dbg_print_feature(u8 *p_text_buf, u32 text_size)
 
 #define QED_RESULTS_BUF_MIN_SIZE 16
 /* Generic function for decoding debug feature info */
-enum dbg_status format_feature(struct qed_hwfn *p_hwfn,
-			       enum qed_dbg_features feature_idx)
+static enum dbg_status format_feature(struct qed_hwfn *p_hwfn,
+				      enum qed_dbg_features feature_idx)
 {
 	struct qed_dbg_feature *feature =
 	    &p_hwfn->cdev->dbg_params.features[feature_idx];
@@ -6480,8 +6482,9 @@ enum dbg_status format_feature(struct qed_hwfn *p_hwfn,
 }
 
 /* Generic function for performing the dump of a debug feature. */
-enum dbg_status qed_dbg_dump(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			     enum qed_dbg_features feature_idx)
+static enum
+dbg_status qed_dbg_dump(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
+			enum qed_dbg_features feature_idx)
 {
 	struct qed_dbg_feature *feature =
 	    &p_hwfn->cdev->dbg_params.features[feature_idx];
-- 
2.7.4

^ permalink raw reply related

* [PATCH] net: ethernet: mediatek: mark symbols static where possible
From: Baoyou Xie @ 2016-09-30  7:48 UTC (permalink / raw)
  To: nbd, blogic, matthias.bgg
  Cc: netdev, linux-arm-kernel, linux-mediatek, linux-kernel, arnd,
	baoyou.xie, xie.baoyou, han.fei, tang.qiang007

We get 2 warnings when building kernel with W=1:
drivers/net/ethernet/mediatek/mtk_eth_soc.c:2041:5: warning: no previous prototype for 'mtk_get_link_ksettings' [-Wmissing-prototypes]
drivers/net/ethernet/mediatek/mtk_eth_soc.c:2052:5: warning: no previous prototype for 'mtk_set_link_ksettings' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index ddf20a0..ad4ab97 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2038,8 +2038,8 @@ static int mtk_cleanup(struct mtk_eth *eth)
 	return 0;
 }
 
-int mtk_get_link_ksettings(struct net_device *ndev,
-			   struct ethtool_link_ksettings *cmd)
+static int mtk_get_link_ksettings(struct net_device *ndev,
+				  struct ethtool_link_ksettings *cmd)
 {
 	struct mtk_mac *mac = netdev_priv(ndev);
 
@@ -2049,8 +2049,8 @@ int mtk_get_link_ksettings(struct net_device *ndev,
 	return phy_ethtool_ksettings_get(ndev->phydev, cmd);
 }
 
-int mtk_set_link_ksettings(struct net_device *ndev,
-			   const struct ethtool_link_ksettings *cmd)
+static int mtk_set_link_ksettings(struct net_device *ndev,
+				  const struct ethtool_link_ksettings *cmd)
 {
 	struct mtk_mac *mac = netdev_priv(ndev);
 
-- 
2.7.4

^ permalink raw reply related

* [PATCH 2/2] net: hns: add missing function declaration
From: Baoyou Xie @ 2016-09-30  7:41 UTC (permalink / raw)
  To: yisen.zhuang, salil.mehta, davem, huangdaode, lisheng011,
	xieqianqian, fabf, oulijun, arnd, vinod.koul, lipeng321, andrew,
	tremyfr, chenny.xu
  Cc: netdev, linux-kernel, baoyou.xie, xie.baoyou, han.fei,
	tang.qiang007

We get 1 warning when building kernel with W=1:
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2784:5: warning: no previous prototype for 'hns_dsaf_roce_reset' [-Wmissing-prototypes]

In fact, this function is not declared in any file, but should be
declared in a header file. thus can be recognized in other file.

so this patch adds the missing function declaration into
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h
index f3681d5..c655ecb 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h
@@ -449,7 +449,10 @@ void hns_dsaf_srst_chns(struct dsaf_device *dsaf_dev, u32 msk, bool enable);
 
 void hns_dsaf_roce_srst(struct dsaf_device *dsaf_dev, bool enable);
 
+int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool enable);
+
 int hns_dsaf_ae_init(struct dsaf_device *dsaf_dev);
+
 void hns_dsaf_ae_uninit(struct dsaf_device *dsaf_dev);
 
 void hns_dsaf_update_stats(struct dsaf_device *dsaf_dev, u32 inode_num);
-- 
2.7.4

^ permalink raw reply related

* [PATCH 1/2] net: hns: mark symbols static where possible
From: Baoyou Xie @ 2016-09-30  7:38 UTC (permalink / raw)
  To: yisen.zhuang, salil.mehta, davem, huangdaode, lisheng011,
	xieqianqian, fabf, oulijun, arnd, vinod.koul, lipeng321, andrew,
	tremyfr, chenny.xu
  Cc: netdev, linux-kernel, baoyou.xie, xie.baoyou, han.fei,
	tang.qiang007

We get a few warnings when building kernel with W=1:
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:76:21: warning: no previous prototype for 'hns_ae_get_handle' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:274:6: warning: no previous prototype for 'hns_ae_stop' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:302:6: warning: no previous prototype for 'hns_ae_toggle_ring_irq' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:490:6: warning: no previous prototype for 'hns_ae_update_stats' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:573:6: warning: no previous prototype for 'hns_ae_get_stats' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:605:6: warning: no previous prototype for 'hns_ae_get_strings' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:638:5: warning: no previous prototype for 'hns_ae_get_sset_count' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:687:6: warning: no previous prototype for 'hns_ae_update_led_status' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:698:5: warning: no previous prototype for 'hns_ae_cpld_set_led_id' [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:710:6: warning: no previous prototype for 'hns_ae_get_regs' [-Wmissing-prototypes]
....

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c  | 30 +++++++++++-----------
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c |  2 +-
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c  |  8 +++---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c |  7 ++---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c |  2 +-
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c  |  7 ++---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c  |  4 +--
 .../net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c    |  2 +-
 drivers/net/ethernet/hisilicon/hns/hns_enet.c      | 13 +++++-----
 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c   | 24 +++++++++--------
 10 files changed, 53 insertions(+), 46 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
index e28d960..a1150e9 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
@@ -73,8 +73,8 @@ static struct ring_pair_cb *hns_ae_get_ring_pair(struct hnae_queue *q)
 	return container_of(q, struct ring_pair_cb, q);
 }
 
-struct hnae_handle *hns_ae_get_handle(struct hnae_ae_dev *dev,
-				      u32 port_id)
+static struct hnae_handle *hns_ae_get_handle(struct hnae_ae_dev *dev,
+					     u32 port_id)
 {
 	int vfnum_per_port;
 	int qnum_per_vf;
@@ -271,7 +271,7 @@ static int hns_ae_start(struct hnae_handle *handle)
 	return 0;
 }
 
-void hns_ae_stop(struct hnae_handle *handle)
+static void hns_ae_stop(struct hnae_handle *handle)
 {
 	struct hns_mac_cb *mac_cb = hns_get_mac_cb(handle);
 
@@ -299,7 +299,7 @@ static void hns_ae_reset(struct hnae_handle *handle)
 	}
 }
 
-void hns_ae_toggle_ring_irq(struct hnae_ring *ring, u32 mask)
+static void hns_ae_toggle_ring_irq(struct hnae_ring *ring, u32 mask)
 {
 	u32 flag;
 
@@ -487,8 +487,8 @@ static void hns_ae_get_coalesce_range(struct hnae_handle *handle,
 	*rx_usecs_high  = HNS_RCB_MAX_COALESCED_USECS;
 }
 
-void hns_ae_update_stats(struct hnae_handle *handle,
-			 struct net_device_stats *net_stats)
+static void hns_ae_update_stats(struct hnae_handle *handle,
+				struct net_device_stats *net_stats)
 {
 	int port;
 	int idx;
@@ -570,7 +570,7 @@ void hns_ae_update_stats(struct hnae_handle *handle,
 	net_stats->multicast = mac_cb->hw_stats.rx_mc_pkts;
 }
 
-void hns_ae_get_stats(struct hnae_handle *handle, u64 *data)
+static void hns_ae_get_stats(struct hnae_handle *handle, u64 *data)
 {
 	int idx;
 	struct hns_mac_cb *mac_cb;
@@ -602,8 +602,8 @@ void hns_ae_get_stats(struct hnae_handle *handle, u64 *data)
 		hns_dsaf_get_stats(vf_cb->dsaf_dev, p, vf_cb->port_index);
 }
 
-void hns_ae_get_strings(struct hnae_handle *handle,
-			u32 stringset, u8 *data)
+static void hns_ae_get_strings(struct hnae_handle *handle,
+			       u32 stringset, u8 *data)
 {
 	int port;
 	int idx;
@@ -635,7 +635,7 @@ void hns_ae_get_strings(struct hnae_handle *handle,
 		hns_dsaf_get_strings(stringset, p, port, dsaf_dev);
 }
 
-int hns_ae_get_sset_count(struct hnae_handle *handle, int stringset)
+static int hns_ae_get_sset_count(struct hnae_handle *handle, int stringset)
 {
 	u32 sset_count = 0;
 	struct hns_mac_cb *mac_cb;
@@ -684,7 +684,7 @@ static int hns_ae_config_loopback(struct hnae_handle *handle,
 	return ret;
 }
 
-void hns_ae_update_led_status(struct hnae_handle *handle)
+static void hns_ae_update_led_status(struct hnae_handle *handle)
 {
 	struct hns_mac_cb *mac_cb;
 
@@ -695,8 +695,8 @@ void hns_ae_update_led_status(struct hnae_handle *handle)
 	hns_set_led_opt(mac_cb);
 }
 
-int hns_ae_cpld_set_led_id(struct hnae_handle *handle,
-			   enum hnae_led_state status)
+static int hns_ae_cpld_set_led_id(struct hnae_handle *handle,
+				  enum hnae_led_state status)
 {
 	struct hns_mac_cb *mac_cb;
 
@@ -707,7 +707,7 @@ int hns_ae_cpld_set_led_id(struct hnae_handle *handle,
 	return hns_cpld_led_set_id(mac_cb, status);
 }
 
-void hns_ae_get_regs(struct hnae_handle *handle, void *data)
+static void hns_ae_get_regs(struct hnae_handle *handle, void *data)
 {
 	u32 *p = data;
 	int i;
@@ -732,7 +732,7 @@ void hns_ae_get_regs(struct hnae_handle *handle, void *data)
 		hns_dsaf_get_regs(vf_cb->dsaf_dev, vf_cb->port_index, p);
 }
 
-int hns_ae_get_regs_len(struct hnae_handle *handle)
+static int hns_ae_get_regs_len(struct hnae_handle *handle)
 {
 	u32 total_num;
 	struct hnae_vf_cb *vf_cb = hns_ae_get_vf_cb(handle);
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
index 1e1eb92..f0c63c8 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
@@ -327,7 +327,7 @@ static void hns_gmac_init(void *mac_drv)
 		hns_gmac_set_uc_match(mac_drv, 0);
 }
 
-void hns_gmac_update_stats(void *mac_drv)
+static void hns_gmac_update_stats(void *mac_drv)
 {
 	struct mac_hw_stats *hw_stats = NULL;
 	struct mac_driver *drv = (struct mac_driver *)mac_drv;
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
index a834774..7ac3e11 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
@@ -897,8 +897,9 @@ static int hns_mac_get_mode(phy_interface_t phy_if)
 	}
 }
 
-u8 __iomem *hns_mac_get_vaddr(struct dsaf_device *dsaf_dev,
-			      struct hns_mac_cb *mac_cb, u32 mac_mode_idx)
+static u8 __iomem *
+hns_mac_get_vaddr(struct dsaf_device *dsaf_dev,
+		  struct hns_mac_cb *mac_cb, u32 mac_mode_idx)
 {
 	u8 __iomem *base = dsaf_dev->io_base;
 	int mac_id = mac_cb->mac_id;
@@ -916,7 +917,8 @@ u8 __iomem *hns_mac_get_vaddr(struct dsaf_device *dsaf_dev,
  * @mac_cb: mac control block
  * return 0 - success , negative --fail
  */
-int hns_mac_get_cfg(struct dsaf_device *dsaf_dev, struct hns_mac_cb *mac_cb)
+static int
+hns_mac_get_cfg(struct dsaf_device *dsaf_dev, struct hns_mac_cb *mac_cb)
 {
 	int ret;
 	u32 mac_mode_idx;
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
index eb448df..c882729 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
@@ -42,7 +42,7 @@ static const struct acpi_device_id hns_dsaf_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, hns_dsaf_acpi_match);
 
-int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev)
+static int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev)
 {
 	int ret, i;
 	u32 desc_num;
@@ -2085,8 +2085,9 @@ static void hns_dsaf_pfc_unit_cnt(struct dsaf_device *dsaf_dev, int  mac_id,
  * @dsaf_id: dsa fabric id
  * @xge_ge_work_mode
  */
-void hns_dsaf_port_work_rate_cfg(struct dsaf_device *dsaf_dev, int mac_id,
-				 enum dsaf_port_rate_mode rate_mode)
+static void
+hns_dsaf_port_work_rate_cfg(struct dsaf_device *dsaf_dev, int mac_id,
+			    enum dsaf_port_rate_mode rate_mode)
 {
 	u32 port_work_mode;
 
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
index 36b9f79..8dc4ec8 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
@@ -453,7 +453,7 @@ static phy_interface_t hns_mac_get_phy_if_acpi(struct hns_mac_cb *mac_cb)
 	return phy_if;
 }
 
-int hns_mac_get_sfp_prsnt(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
+static int hns_mac_get_sfp_prsnt(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
 {
 	if (!mac_cb->cpld_ctrl)
 		return -ENODEV;
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
index 6ea8722..04e674c 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
@@ -73,7 +73,7 @@ hns_ppe_common_get_ioaddr(struct ppe_common_cb *ppe_common)
  * comm_index: common index
  * retuen 0 - success , negative --fail
  */
-int hns_ppe_common_get_cfg(struct dsaf_device *dsaf_dev, int comm_index)
+static int hns_ppe_common_get_cfg(struct dsaf_device *dsaf_dev, int comm_index)
 {
 	struct ppe_common_cb *ppe_common;
 	int ppe_num;
@@ -104,7 +104,8 @@ int hns_ppe_common_get_cfg(struct dsaf_device *dsaf_dev, int comm_index)
 	return 0;
 }
 
-void hns_ppe_common_free_cfg(struct dsaf_device *dsaf_dev, u32 comm_index)
+static void
+hns_ppe_common_free_cfg(struct dsaf_device *dsaf_dev, u32 comm_index)
 {
 	dsaf_dev->ppe_common[comm_index] = NULL;
 }
@@ -337,7 +338,7 @@ static void hns_ppe_uninit_hw(struct hns_ppe_cb *ppe_cb)
 	}
 }
 
-void hns_ppe_uninit_ex(struct ppe_common_cb *ppe_common)
+static void hns_ppe_uninit_ex(struct ppe_common_cb *ppe_common)
 {
 	u32 i;
 
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
index ef11077..ded4506 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
@@ -612,7 +612,7 @@ void hns_rcb_get_queue_mode(enum dsaf_mode dsaf_mode, u16 *max_vfn,
 	}
 }
 
-int hns_rcb_get_ring_num(struct dsaf_device *dsaf_dev)
+static int hns_rcb_get_ring_num(struct dsaf_device *dsaf_dev)
 {
 	switch (dsaf_dev->dsaf_mode) {
 	case DSAF_MODE_ENABLE_FIX:
@@ -648,7 +648,7 @@ int hns_rcb_get_ring_num(struct dsaf_device *dsaf_dev)
 	}
 }
 
-void __iomem *hns_rcb_common_get_vaddr(struct rcb_common_cb *rcb_common)
+static void __iomem *hns_rcb_common_get_vaddr(struct rcb_common_cb *rcb_common)
 {
 	struct dsaf_device *dsaf_dev = rcb_common->dsaf_dev;
 
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c
index 8f4f0e8..3198890 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c
@@ -306,7 +306,7 @@ static void hns_xgmac_config_max_frame_length(void *mac_drv, u16 newval)
 	dsaf_write_dev(drv, XGMAC_MAC_MAX_PKT_SIZE_REG, newval);
 }
 
-void hns_xgmac_update_stats(void *mac_drv)
+static void hns_xgmac_update_stats(void *mac_drv)
 {
 	struct mac_driver *drv = (struct mac_driver *)mac_drv;
 	struct mac_hw_stats *hw_stats = &drv->mac_cb->hw_stats;
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 059aaed..e5f956c 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -1082,7 +1082,7 @@ static int hns_nic_net_set_mac_address(struct net_device *ndev, void *p)
 	return 0;
 }
 
-void hns_nic_update_stats(struct net_device *netdev)
+static void hns_nic_update_stats(struct net_device *netdev)
 {
 	struct hns_nic_priv *priv = netdev_priv(netdev);
 	struct hnae_handle *h = priv->ae_handle;
@@ -1369,7 +1369,7 @@ static int hns_nic_do_ioctl(struct net_device *netdev, struct ifreq *ifr,
 
 /* use only for netconsole to poll with the device without interrupt */
 #ifdef CONFIG_NET_POLL_CONTROLLER
-void hns_nic_poll_controller(struct net_device *ndev)
+static void hns_nic_poll_controller(struct net_device *ndev)
 {
 	struct hns_nic_priv *priv = netdev_priv(ndev);
 	unsigned long flags;
@@ -1482,7 +1482,7 @@ static netdev_features_t hns_nic_fix_features(
  *
  * return void
  */
-void hns_set_multicast_list(struct net_device *ndev)
+static void hns_set_multicast_list(struct net_device *ndev)
 {
 	struct hns_nic_priv *priv = netdev_priv(ndev);
 	struct hnae_handle *h = priv->ae_handle;
@@ -1500,7 +1500,7 @@ void hns_set_multicast_list(struct net_device *ndev)
 	}
 }
 
-void hns_nic_set_rx_mode(struct net_device *ndev)
+static void hns_nic_set_rx_mode(struct net_device *ndev)
 {
 	struct hns_nic_priv *priv = netdev_priv(ndev);
 	struct hnae_handle *h = priv->ae_handle;
@@ -1515,8 +1515,9 @@ void hns_nic_set_rx_mode(struct net_device *ndev)
 	hns_set_multicast_list(ndev);
 }
 
-struct rtnl_link_stats64 *hns_nic_get_stats64(struct net_device *ndev,
-					      struct rtnl_link_stats64 *stats)
+static struct rtnl_link_stats64 *
+hns_nic_get_stats64(struct net_device *ndev,
+		    struct rtnl_link_stats64 *stats)
 {
 	int idx = 0;
 	u64 tx_bytes = 0;
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
index 47e59bb..7c06436 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -676,8 +676,8 @@ static void hns_nic_get_drvinfo(struct net_device *net_dev,
  * @dev: net device
  * @param: ethtool parameter
  */
-void hns_get_ringparam(struct net_device *net_dev,
-		       struct ethtool_ringparam *param)
+static void hns_get_ringparam(struct net_device *net_dev,
+			      struct ethtool_ringparam *param)
 {
 	struct hns_nic_priv *priv = netdev_priv(net_dev);
 	struct hnae_ae_ops *ops;
@@ -825,7 +825,8 @@ static int hns_set_coalesce(struct net_device *net_dev,
  * @dev: net device
  * @ch: channel info.
  */
-void hns_get_channels(struct net_device *net_dev, struct ethtool_channels *ch)
+static void
+hns_get_channels(struct net_device *net_dev, struct ethtool_channels *ch)
 {
 	struct hns_nic_priv *priv = netdev_priv(net_dev);
 
@@ -842,8 +843,8 @@ void hns_get_channels(struct net_device *net_dev, struct ethtool_channels *ch)
  * @stats: statistics info.
  * @data: statistics data.
  */
-void hns_get_ethtool_stats(struct net_device *netdev,
-			   struct ethtool_stats *stats, u64 *data)
+static void hns_get_ethtool_stats(struct net_device *netdev,
+				  struct ethtool_stats *stats, u64 *data)
 {
 	u64 *p = data;
 	struct hns_nic_priv *priv = netdev_priv(netdev);
@@ -900,7 +901,7 @@ void hns_get_ethtool_stats(struct net_device *netdev,
  * @stats: string set ID.
  * @data: objects data.
  */
-void hns_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
+static void hns_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
 {
 	struct hns_nic_priv *priv = netdev_priv(netdev);
 	struct hnae_handle *h = priv->ae_handle;
@@ -990,7 +991,7 @@ void hns_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
  *
  * Return string set count.
  */
-int hns_get_sset_count(struct net_device *netdev, int stringset)
+static int hns_get_sset_count(struct net_device *netdev, int stringset)
 {
 	struct hns_nic_priv *priv = netdev_priv(netdev);
 	struct hnae_handle *h = priv->ae_handle;
@@ -1022,7 +1023,7 @@ int hns_get_sset_count(struct net_device *netdev, int stringset)
  *
  * Return 0 on success, negative on failure.
  */
-int hns_phy_led_set(struct net_device *netdev, int value)
+static int hns_phy_led_set(struct net_device *netdev, int value)
 {
 	int retval;
 	struct phy_device *phy_dev = netdev->phydev;
@@ -1044,7 +1045,8 @@ int hns_phy_led_set(struct net_device *netdev, int value)
  *
  * Return 0 on success, negative on failure.
  */
-int hns_set_phys_id(struct net_device *netdev, enum ethtool_phys_id_state state)
+static int
+hns_set_phys_id(struct net_device *netdev, enum ethtool_phys_id_state state)
 {
 	struct hns_nic_priv *priv = netdev_priv(netdev);
 	struct hnae_handle *h = priv->ae_handle;
@@ -1118,8 +1120,8 @@ int hns_set_phys_id(struct net_device *netdev, enum ethtool_phys_id_state state)
  * @cmd: ethtool cmd
  * @date: register data
  */
-void hns_get_regs(struct net_device *net_dev, struct ethtool_regs *cmd,
-		  void *data)
+static void hns_get_regs(struct net_device *net_dev, struct ethtool_regs *cmd,
+			 void *data)
 {
 	struct hns_nic_priv *priv = netdev_priv(net_dev);
 	struct hnae_ae_ops *ops;
-- 
2.7.4

^ permalink raw reply related

* [PATCH] cxgb4: mark cxgb_setup_tc() static
From: Baoyou Xie @ 2016-09-30  7:34 UTC (permalink / raw)
  To: hariprasad
  Cc: netdev, linux-kernel, arnd, baoyou.xie, xie.baoyou, han.fei,
	tang.qiang007

We get 1 warning when building kernel with W=1:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:2715:5: warning: no previous prototype for 'cxgb_setup_tc' [-Wmissing-prototypes]

In fact, this function is only used in the file in which it is
declared and don't need a declaration, but can be made static.
so this patch marks this function with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index c8a5c43..08e69d3 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2712,8 +2712,8 @@ static int cxgb_set_tx_maxrate(struct net_device *dev, int index, u32 rate)
 	return err;
 }
 
-int cxgb_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
-		  struct tc_to_netdev *tc)
+static int cxgb_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
+			 struct tc_to_netdev *tc)
 {
 	struct port_info *pi = netdev2pinfo(dev);
 	struct adapter *adap = netdev2adap(dev);
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH ipsec-next] xfrm: remove unused helper
From: Steffen Klassert @ 2016-09-30  7:26 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netdev
In-Reply-To: <1474991638-10666-1-git-send-email-fw@strlen.de>

On Tue, Sep 27, 2016 at 05:53:58PM +0200, Florian Westphal wrote:
> Not used anymore since 2009 (9e0d57fd6dad37,
> 'xfrm: SAD entries do not expire correctly after suspend-resume').
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>

Applied to ipsec-next, thanks!

^ permalink raw reply

* Re: [PATCH v8 0/8] thunderbolt: Introducing Thunderbolt(TM) Networking
From: David Miller @ 2016-09-30  6:40 UTC (permalink / raw)
  To: gregkh
  Cc: amir.jer.levy, andreas.noever, bhelgaas, corbet, linux-kernel,
	linux-pci, netdev, linux-doc, mario_limonciello,
	thunderbolt-linux, mika.westerberg, tomas.winkler, xiong.y.zhang
In-Reply-To: <20160930063005.GA7571@kroah.com>

From: Greg KH <gregkh@linuxfoundation.org>
Date: Fri, 30 Sep 2016 08:30:05 +0200

> On Fri, Sep 30, 2016 at 01:55:55AM -0400, David Miller wrote:
>> From: Amir Levy <amir.jer.levy@intel.com>
>> Date: Wed, 28 Sep 2016 17:44:22 +0300
>> 
>> > This driver enables Thunderbolt Networking on non-Apple platforms
>> > running Linux.
>> 
>> Greg, any idea where this should get merged once fully vetted?  I can
>> take it through the net-next tree, but I'm fine with another more
>> appropriate tree taking it as well.
> 
> I am supposed to be taking thunderbolt patches, but if this really is a
> network driver, it should go under drivers/net/ somewhere.  It needs
> more review though, it's not ready to go through anyone's tree just yet :)
> 
> I'll let the thunderbolt maintainer go through it first before asking
> for a netdev review.

Ok, thanks Greg.

^ permalink raw reply

* Re: [net-next PATCH] i40e: Clean up handling of msg_enable flags and debug parameter
From: Stefan Assmann @ 2016-09-30  6:35 UTC (permalink / raw)
  To: Alexander Duyck, intel-wired-lan, jeffrey.t.kirsher, netdev
  Cc: davem, linville
In-Reply-To: <20160929115832.42066.71367.stgit@ahduyck-blue-test.jf.intel.com>

On 29.09.2016 14:05, Alexander Duyck wrote:
> So the i40e driver had a really convoluted configuration for how to handle
> the debug flags contained in msg_enable.  Part of the issue is that the
> driver has its own 32 bit mask that it was using to track a separate set of
> debug features.  From what I can tell it was trying to use the upper 4 bits
> to determine if the value was meant to represent a bit-mask or the numeric
> value provided by debug level.
> 
> What this patch does is clean this up by compressing those 4 bits into bit
> 31, as a result we just have to perform a check against the value being
> negative to determine if we are looking at a debug level (positive), or a
> debug mask (negative).  The debug level will populate the msg_level, and
> the debug mask will populate the debug_mask in the hardware struct.
> 
> I added similar logic for ethtool.  If the value being provided has bit 31
> set we assume the value being provided is a debug mask, otherwise we assume
> it is a msg_enable mask.  For displaying we only provide the msg_enable,
> and if debug_mask is in use we will print it to the dmesg log.
> 
> Lastly I removed the debugfs interface.  It is redundant with what we
> already have in ethtool and really doesn't belong anyway.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
> 
> So I am running this through a slightly different process than standard
> because there are some items here that might be objectionable so I want to
> have that ironed out before I deal with the out-of-tree Intel driver.
> 
> I just want to verify if this fix for this will work for net-next or if I
> need to look at taking a different approach.  Once I get the go-no-go, I
> will back-port this into the out-of-tree i40e driver.
> 
>  drivers/net/ethernet/intel/i40e/i40e_debugfs.c |   18 ---------------
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c |    7 +++++-
>  drivers/net/ethernet/intel/i40e/i40e_main.c    |   28 ++++++++++++------------
>  3 files changed, 20 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> index 0c1875b..acb0f13 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> @@ -1210,24 +1210,6 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
>  			dev_info(&pf->pdev->dev,
>  				 "dump debug fwdata <cluster_id> <table_id> <index>\n");
>  		}
> -
> -	} else if (strncmp(cmd_buf, "msg_enable", 10) == 0) {
> -		u32 level;
> -		cnt = sscanf(&cmd_buf[10], "%i", &level);
> -		if (cnt) {
> -			if (I40E_DEBUG_USER & level) {
> -				pf->hw.debug_mask = level;
> -				dev_info(&pf->pdev->dev,
> -					 "set hw.debug_mask = 0x%08x\n",
> -					 pf->hw.debug_mask);
> -			}
> -			pf->msg_enable = level;
> -			dev_info(&pf->pdev->dev, "set msg_enable = 0x%08x\n",
> -				 pf->msg_enable);
> -		} else {
> -			dev_info(&pf->pdev->dev, "msg_enable = 0x%08x\n",
> -				 pf->msg_enable);
> -		}
>  	} else if (strncmp(cmd_buf, "pfr", 3) == 0) {
>  		dev_info(&pf->pdev->dev, "debugfs: forcing PFR\n");
>  		i40e_do_reset_safe(pf, BIT(__I40E_PF_RESET_REQUESTED));
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> index e79a920..b133a77 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> @@ -978,6 +978,10 @@ static u32 i40e_get_msglevel(struct net_device *netdev)
>  {
>  	struct i40e_netdev_priv *np = netdev_priv(netdev);
>  	struct i40e_pf *pf = np->vsi->back;
> +	u32 debug_mask = pf->hw.debug_mask;
> +
> +	if (debug_mask)
> +		netdev_info(netdev, "i40e debug_mask: 0x%08X\n", debug_mask);
>  
>  	return pf->msg_enable;
>  }
> @@ -989,7 +993,8 @@ static void i40e_set_msglevel(struct net_device *netdev, u32 data)
>  
>  	if (I40E_DEBUG_USER & data)
>  		pf->hw.debug_mask = data;
> -	pf->msg_enable = data;
> +	else
> +		pf->msg_enable = data;
>  }
>  
>  static int i40e_get_regs_len(struct net_device *netdev)
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index b93fa2a..b24c6eb 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -93,8 +93,8 @@ MODULE_DEVICE_TABLE(pci, i40e_pci_tbl);
>  
>  #define I40E_MAX_VF_COUNT 128
>  static int debug = -1;
> -module_param(debug, int, 0);
> -MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
> +module_param(debug, uint, 0);
> +MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all), Debug mask (0x8XXXXXXX)");
>  
>  MODULE_AUTHOR("Intel Corporation, <e1000-devel@lists.sourceforge.net>");
>  MODULE_DESCRIPTION("Intel(R) Ethernet Connection XL710 Network Driver");
> @@ -8481,14 +8481,12 @@ static int i40e_sw_init(struct i40e_pf *pf)
>  	int err = 0;
>  	int size;
>  
> -	pf->msg_enable = netif_msg_init(I40E_DEFAULT_MSG_ENABLE,
> -				(NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK));
> -	if (debug != -1 && debug != I40E_DEFAULT_MSG_ENABLE) {
> -		if (I40E_DEBUG_USER & debug)
> -			pf->hw.debug_mask = debug;
> -		pf->msg_enable = netif_msg_init((debug & ~I40E_DEBUG_USER),
> -						I40E_DEFAULT_MSG_ENABLE);
> -	}
> +	pf->msg_enable = netif_msg_init(debug,
> +					NETIF_MSG_DRV |
> +					NETIF_MSG_PROBE |
> +					NETIF_MSG_LINK);
> +	if (debug < -1)
> +		pf->hw.debug_mask = debug;

It's enough to set msg_enable and debug_mask once. Better to choose the
i40e_probe() location, as that's the earliest possible point to set
those values.

  Stefan

>  	/* Set default capability flags */
>  	pf->flags = I40E_FLAG_RX_CSUM_ENABLED |
> @@ -10790,10 +10788,12 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	mutex_init(&hw->aq.asq_mutex);
>  	mutex_init(&hw->aq.arq_mutex);
>  
> -	if (debug != -1) {
> -		pf->msg_enable = pf->hw.debug_mask;
> -		pf->msg_enable = debug;
> -	}
> +	pf->msg_enable = netif_msg_init(debug,
> +					NETIF_MSG_DRV |
> +					NETIF_MSG_PROBE |
> +					NETIF_MSG_LINK);
> +	if (debug < -1)
> +		pf->hw.debug_mask = debug;
>  
>  	/* do a special CORER for clearing PXE mode once at init */
>  	if (hw->revision_id == 0 &&
> 

^ permalink raw reply

* Re: [PATCH v8 0/8] thunderbolt: Introducing Thunderbolt(TM) Networking
From: Greg KH @ 2016-09-30  6:30 UTC (permalink / raw)
  To: David Miller
  Cc: amir.jer.levy, andreas.noever, bhelgaas, corbet, linux-kernel,
	linux-pci, netdev, linux-doc, mario_limonciello,
	thunderbolt-linux, mika.westerberg, tomas.winkler, xiong.y.zhang
In-Reply-To: <20160930.015555.2177533749954623343.davem@davemloft.net>

On Fri, Sep 30, 2016 at 01:55:55AM -0400, David Miller wrote:
> From: Amir Levy <amir.jer.levy@intel.com>
> Date: Wed, 28 Sep 2016 17:44:22 +0300
> 
> > This driver enables Thunderbolt Networking on non-Apple platforms
> > running Linux.
> 
> Greg, any idea where this should get merged once fully vetted?  I can
> take it through the net-next tree, but I'm fine with another more
> appropriate tree taking it as well.

I am supposed to be taking thunderbolt patches, but if this really is a
network driver, it should go under drivers/net/ somewhere.  It needs
more review though, it's not ready to go through anyone's tree just yet :)

I'll let the thunderbolt maintainer go through it first before asking
for a netdev review.

thanks,

greg k-h

^ permalink raw reply

* Loan
From: Sarah Collins @ 2016-09-30  5:51 UTC (permalink / raw)
  To: Recipients

Do You Need A Loan Of Any Kind ? If Yes Email Now For More Info on internationalloanplc2@gmail.com

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox