Need help with diagnostics

2015-04-12 Thread Michael BlackHeart
In a log

Apr 11 10:10:23 diablo kernel: Q1[  0] (nseg=2) (DS.V:0xfe0121174a00
DS.P:0x2f74a00) I: 168cc117 L:02fc6300 F:0004
Apr 11 10:10:23 diablo kernel: (D[0] = a7174ed2(002c), D[1] =
03016000(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17600 swtry: 0 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4ba99c7e 407c05fe 6000c000 04348000 00858687
81bf8197
Apr 11 10:10:23 diablo kernel: 81f1 08f00cf6 709039ce 2000 
 
Apr 11 10:10:23 diablo kernel: [end]
Apr 11 10:10:23 diablo kernel: (DS.V:0xfe01211c6300 DS.P:0x2fc6300) I:
168cc117 L: F:0004
Apr 11 10:10:23 diablo kernel: (D[0] = 29cd87d2(002c), D[1] =
81646004(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17616 swtry: 0 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4baa709f 403c05fe 4000c000 04348000 00858687
86058572
Apr 11 10:10:23 diablo kernel: 86c4 0800  2000 
 
Apr 11 10:10:23 diablo kernel: [end]
Apr 11 10:10:23 diablo kernel: Q1[  0] (nseg=2) (DS.V:0xfe0121174a00
DS.P:0x2f74a00) I: 168cc117 L:02fc6300 F:0004
Apr 11 10:10:23 diablo kernel: (D[0] = a7174ed2(002c), D[1] =
03016000(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17600 swtry: 1 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4ba99c7e 407c05fe 6000c000 04348000 00858687
829a825a
Apr 11 10:10:23 diablo kernel: 82ea 08f013ea 709039ce 2000 
 
Apr 11 10:10:23 diablo kernel: [end]
Apr 11 10:10:23 diablo kernel: (DS.V:0xfe01211c6300 DS.P:0x2fc6300) I:
168cc117 L:02f48400 F:0004
Apr 11 10:10:23 diablo kernel: (D[0] = 29cd87d2(002c), D[1] =
81646004(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17616 swtry: 1 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4baaf794 403c05fe 6000c000 04348000 00858687
86058572
Apr 11 10:10:23 diablo kernel: 86c4 08f0  2000 
 
Apr 11 10:10:23 diablo kernel: [end]
Apr 11 10:10:23 diablo kernel: (DS.V:0xfe0121148400 DS.P:0x2f48400) I:
168cc117 L: F:0014
Apr 11 10:10:23 diablo kernel: (D[0] = aebe6dd2(002c), D[1] =
7f960804(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17648 swtry: 0 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4bac81c2 403c05fe 4000c000 24348000 81858687
80e380d1
Apr 11 10:10:23 diablo kernel: 837a80fc 0800  2000 
 
Apr 11 10:10:23 diablo kernel: [end]
Apr 11 10:10:23 diablo kernel: Q1[  0] (nseg=2) (DS.V:0xfe0121174a00
DS.P:0x2f74a00) I: 168cc117 L:02fc6300 F:0004
Apr 11 10:10:23 diablo kernel: (D[0] = a7174ed2(002c), D[1] =
03016000(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17600 swtry: 2 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4ba99c7e 407c05fe 6000c000 04348000 00858687
852a84ac
Apr 11 10:10:23 diablo kernel: 85cc 08f028c6 709039ce 2000 
 
Apr 11 10:10:23 diablo kernel: [end]
Apr 11 10:10:23 diablo kernel: (DS.V:0xfe01211c6300 DS.P:0x2fc6300) I:
168cc117 L:02f48400 F:0004
Apr 11 10:10:23 diablo kernel: (D[0] = 29cd87d2(002c), D[1] =
81646004(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17616 swtry: 2 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4baaf794 403c05fe 6000c000 04348000 00858687
86058572
Apr 11 10:10:23 diablo kernel: 86c4 08f0  2000 
 
Apr 11 10:10:23 diablo kernel: [end]
Apr 11 10:10:23 diablo kernel: (DS.V:0xfe0121148400 DS.P:0x2f48400) I:
168cc117 L:02f3df00 F:0014
Apr 11 10:10:23 diablo kernel: (D[0] = aebe6dd2(002c), D[1] =
7f960804(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17648 swtry: 1 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4bac63b6 403c05fe 6000c000 24348000 81858687
80e380d1
Apr 11 10:10:23 diablo kernel: 837a80fc 08f0  2000 
 
Apr 11 10:10:23 diablo kernel: [end]
Apr 11 10:10:23 diablo kernel: (DS.V:0xfe012113df00 DS.P:0x2f3df00) I:
168cc117 L:02f74f00 F:0004
Apr 11 10:10:23 diablo kernel: (D[0] = 832a9cd2(002c), D[1] =
1aa35004(05c8)
Apr 11 10:10:23 diablo kernel: (D[2] = (), D[3] =
()
Apr 11 10:10:23 diablo kernel: Seq: 17696 swtry: 0 ADDBAW?: 1 DOBAW?: 1
Apr 11 10:10:23 diablo kernel: 4bafba32 403c05fe 6000c000 24348000 81858687
80e380d1
Apr 11 10:10:23 diablo kernel

msk msk0 watchdog timeout freeze hang lock stop problem

2015-04-12 Thread Gareth Wyn Roberts
I've run in to problems using the msk device where initially it works well 
enough to set DHCP etc. but stops/freezes as soon as any appreciable network 
traffic occurs . There are several threads describing similar symptoms over the 
past two years or more.  I've been following several false leads but have 
finally found a solution (at least it solves my problem).

I'm running a standard FreeBSD 10.1-RELEASE and the NIC is detected as:

mskc0:  mem 0xfa00-0xfa003fff irq 
19 at device 0.0 on pci6
msk0:  on mskc0
msk0: Ethernet address: 00:13:77:e9:df:eb
miibus0:  on msk0
e1000phy0:  PHY 0 on miibus0
e1000phy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-ma
ster, auto, auto-flow

The network worked when using the i386 release, but failed for the amd64 
release (as reported previously) which prompted me to disable 64-bit DMA (the 
patch for this is attached below).  This worked for the first kernel built but 
mysteriously failed when another unrelated part of the kernel was changed (a 
usb driver) and the kernel recompiled.  So identical msk driver code worked in 
one kernel but not the second! This suggested that alignment differences 
between the two kernels were causing the msk driver to fail. Others have 
reported varying behaviour depending on different circumstances.

It transpires that changing just one value in the if_mskreg.h file solved all 
my problems.  Subsequently I have not been able to make it fail under heavy 
network traffic in either 32-bit or 64-bit mode.
I'm working on 10.1-RELEASE source, i.e. if_msk.c revision 262524 and 
if_mskreg.h revision 264442.

Here's the patch to if_mskreg.h
--- if_mskreg.h-orig2014-11-11 20:02:58.0 +
+++ if_mskreg.h 2015-04-12 18:47:20.0 +0100
@@ -2179,9 +2179,11 @@
  * At first I guessed 8 bytes, the size of a single descriptor, would be
  * required alignment constraints. But, it seems that Yukon II have 4096
  * bytes boundary alignment constraints.
+ * And it seems that the DMA status region for the Yukon Ultra 2 (88E8057)
+ * requires 8192 byte alignment to prevent locking.
  */
 #define MSK_RING_ALIGN 4096
-#defineMSK_STAT_ALIGN  4096
+#defineMSK_STAT_ALIGN  8192


The patches to both files which also implement a MSK_64BIT_DMA_DISABLE flag are 
attached.  Perhaps the developers would consider committing these as it may be 
useful for future debugging.

Gareth.
--- if_mskreg.h-orig	2014-11-11 20:02:58.0 +
+++ if_mskreg.h	2015-04-12 18:47:20.0 +0100
@@ -2179,9 +2179,11 @@
  * At first I guessed 8 bytes, the size of a single descriptor, would be
  * required alignment constraints. But, it seems that Yukon II have 4096
  * bytes boundary alignment constraints.
+ * And it seems that the DMA status region for the Yukon Ultra 2 (88E8057)
+ * requires 8192 byte alignment to prevent locking.
  */
 #define MSK_RING_ALIGN	4096
-#define	MSK_STAT_ALIGN	4096
+#define	MSK_STAT_ALIGN	8192
 
 /* Rx descriptor data structure */
 struct msk_rx_desc {
--- if_msk.c-orig	2014-11-11 20:02:58.0 +
+++ if_msk.c	2015-04-12 02:15:12.551005000 +0100
@@ -2164,8 +2164,8 @@
 	error = bus_dma_tag_create(
 		bus_get_dma_tag(sc->msk_dev),	/* parent */
 		MSK_STAT_ALIGN, 0,		/* alignment, boundary */
-		BUS_SPACE_MAXADDR,		/* lowaddr */
-		BUS_SPACE_MAXADDR,		/* highaddr */
+		BUS_DMA_TAG_LOWADDR,	/* lowaddr */
+		BUS_DMA_TAG_HIGHADDR,	/* highaddr */
 		NULL, NULL,			/* filter, filterarg */
 		stat_sz,			/* maxsize */
 		1,/* nsegments */
@@ -2235,8 +2235,8 @@
 	error = bus_dma_tag_create(
 		bus_get_dma_tag(sc_if->msk_if_dev),	/* parent */
 		1, 0,			/* alignment, boundary */
-		BUS_SPACE_MAXADDR,		/* lowaddr */
-		BUS_SPACE_MAXADDR,		/* highaddr */
+		BUS_DMA_TAG_LOWADDR,	/* lowaddr */
+		BUS_DMA_TAG_HIGHADDR,	/* highaddr */
 		NULL, NULL,			/* filter, filterarg */
 		BUS_SPACE_MAXSIZE_32BIT,	/* maxsize */
 		0,/* nsegments */
@@ -2252,8 +2252,8 @@
 	/* Create tag for Tx ring. */
 	error = bus_dma_tag_create(sc_if->msk_cdata.msk_parent_tag,/* parent */
 		MSK_RING_ALIGN, 0,		/* alignment, boundary */
-		BUS_SPACE_MAXADDR,		/* lowaddr */
-		BUS_SPACE_MAXADDR,		/* highaddr */
+		BUS_DMA_TAG_LOWADDR,	/* lowaddr */
+		BUS_DMA_TAG_HIGHADDR,	/* highaddr */
 		NULL, NULL,			/* filter, filterarg */
 		MSK_TX_RING_SZ,		/* maxsize */
 		1,/* nsegments */
@@ -2270,8 +2270,8 @@
 	/* Create tag for Rx ring. */
 	error = bus_dma_tag_create(sc_if->msk_cdata.msk_parent_tag,/* parent */
 		MSK_RING_ALIGN, 0,		/* alignment, boundary */
-		BUS_SPACE_MAXADDR,		/* lowaddr */
-		BUS_SPACE_MAXADDR,		/* highaddr */
+		BUS_DMA_TAG_LOWADDR,	/* lowaddr */
+		BUS_DMA_TAG_HIGHADDR,	/* highaddr */
 		NULL, NULL,			/* filter, filterarg */
 		MSK_RX_RING_SZ,		/* maxsize */
 		1,/* nsegments */
@@ -2288,8 +2288,8 @@
 	/* Create

Re: msk msk0 watchdog timeout freeze hang lock stop problem

2015-04-12 Thread Kurt Jaeger
Hi!

> I've run in to problems using the msk device [...]

> I'm working on 10.1-RELEASE source, i.e. if_msk.c revision 262524 and 
> if_mskreg.h revision 264442.
> 
> Here's the patch to if_mskreg.h
[...]

Thanks for the suggested fix.

There are five PRs, all describe similar things:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197887
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197002
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189404
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186872
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=166727

I added some pointer to your posting, maybe someone can test it ?

-- 
p...@opsec.eu+49 171 3101372 5 years to go !
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Jenkins build is back to normal : FreeBSD_stable_10 #1341

2015-04-12 Thread jenkins-admin
See 

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"