Netdev List
 help / color / mirror / Atom feed
* Re: PROBLEM: reproducible crash KVM+nf_conntrack all recent 2.6 kernels
From: Patrick McHardy @ 2010-01-28 12:19 UTC (permalink / raw)
  To: Jon Masters; +Cc: linux-kernel, netdev, netfilter-devel
In-Reply-To: <1264658364.2793.105.camel@tonnant>

Jon Masters wrote:
> On Thu, 2010-01-28 at 00:46 -0500, Jon Masters wrote:
> 
>> A number of people seem to have reported this crash in various forms,
>> but I have yet to see a solution, and can reproduce on 2.6.33-rc5 this
>> evening so I know it's still present in the latest upstream kernels too.
>> Userspace is Fedora 12, and this happens on both all recent F12 kernels
>> (sporadic in 2.6.31 until recently, solidly reproducible on 2.6.32) and
>> upstream 2.6.32, and 2.6.33-rc5 also - hard to find a "known good".
> 
> Now I can capture the panic()s, I'm rebuilding the 2.6.33-rc5 kernel
> with some better debugging options to at least get some more data.

Could you try "ip6tables -t raw -I PREROUTING -j TRACE" after loading
the ip6t_LOG module? That way we can hopefully see the entire packet
paths through netfilter.

^ permalink raw reply

* Intel 82598, RSS and PPPoE
From: Alexander Lapidus @ 2010-01-28 11:34 UTC (permalink / raw)
  To: netdev

Hello, everybody!
 Help is needed in such case. We have a linux-box, running under CentOS 5.4 
with a latest kernel. Intel 10 Gigabit AF DA Dual Port Server Adapter (based 
on Intel 82598EB) is used for routing purposes. Linux-box is dual CPU Xeon 
E5530 server.  Interface eth0 is an uplink to the network core with pure IPv4 
trafic on it. Interface eth1 is an downlink to customers. We have 3000 802.1q 
VLANs on it. PPPoE server daemon is running on all VLAN interfaces. So we have 
ethernet frames with 802.1q VLAN tag and PPPoE header incapsulated. Our 
problem is with RX packet distribution between rx-queues on this  interface. 
All those packets are coming to RX-queue-0. As i understood from Intel 
specification on 82598 chipset, problem is with RSS, which can't decode PPPoE 
header, so packet is going only to queue 0. My question is how to force such 
packets to spread between different queues. May be it's possible to use VMDq 
in this configuration, or any other solution?

P.S. We tried this configuration with in-kernel driver and with latest driver 
from Intel (ixgbe-2.0.44.14). Situation is the same.


-- 
Thanks a lot,
Alexander Lapidus
AL546-RIPE
WildPark ISP,
Nikolaev, UA

^ permalink raw reply

* Re: PROBLEM: reproducible crash KVM+nf_conntrack all recent 2.6 kernels
From: Jon Masters @ 2010-01-28 11:21 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: netdev, netfilter-devel, linux-kernel
In-Reply-To: <b6fcc0a1001280119t1394d956paa4865c078b52c9f@mail.gmail.com>

On Thu, 2010-01-28 at 11:19 +0200, Alexey Dobriyan wrote:
> > RIP: 0010:[<ffffffff813b4115>]  [<ffffffff813b4115>] destroy_conntrack+0x82/0x114
> 
> Rebuild kernel with CONFIG_DEBUG_INFO=y.
> Double sure conntracking is compiled-in.
> Then run
> 
>     addr2line -e vmlinux $RIP
> 
> it will tell exact line where kernel is oopsing.

I posted a followup with that detail later in the thread. In every case
the kernel has CONFIG_DEBUG_INFO set, and in the latter example I posted
I had turned on almost every other debugging option. I currently have a
kernel with netfilter debugging turned on but that's proving harder to
cause to fall over (likely because I changed several other options, so I
will rebuild it to be identical to earlier with just NF debug on).

Jon.



^ permalink raw reply

* Re: PROBLEM: reproducible crash KVM+nf_conntrack all recent 2.6 kernels
From: Alexey Dobriyan @ 2010-01-28  9:19 UTC (permalink / raw)
  To: jonathan; +Cc: netdev, netfilter-devel, linux-kernel

> RIP: 0010:[<ffffffff813b4115>]  [<ffffffff813b4115>] destroy_conntrack+0x82/0x114

Rebuild kernel with CONFIG_DEBUG_INFO=y.
Double sure conntracking is compiled-in.
Then run

    addr2line -e vmlinux $RIP

it will tell exact line where kernel is oopsing.

^ permalink raw reply

* Re: 0% cpu usasge after fresh boot or net restart but 10% CPU if kernel flush route cache
From: cold cold @ 2010-01-28  9:14 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev
In-Reply-To: <1264627088.2892.7.camel@edumazet-laptop>

On Wed, Jan 27, 2010 at 11:18 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le mercredi 27 janvier 2010 à 21:53 +0200, cold cold a écrit :
>
>>
>> btw atm i have 1k ip on that router but plan to put 10k so route cache
>> will grow 10 time fast.
>> i try to keep low  rhash_entries but garbage collector  is non stop
>> running and eat CPU
>> atm i have around 7k  entries per second for second for first minute.
>>
>> i think it will be better if i flush cache on secret interval instead
>> of giving work to gc.
>> i test with 512MB cache and CPU is 0% and flushing entire hash dont take a lot,
>> I'm not sure is there some side effects from flushing.
>
> Flush is immediate, it only marks entries as invalid and they are
> cleaned up later.
>
> 512 MB cache is quite small for your needs, each entry uses 384 bytes
> (assuming you use a 64bit kernel)
>
> In my experiments, I found using gc (and no flushing) was the most
> reliable way to have an equilibrium.
>
> WHen setting gc_interval to 1,  the garbage collector is fired every
> second and handles 1/300 of entries, from a work queue (thus doesnt stop
> packets to be handled by irqs), in a smooth way.
>
> You can post "perf top" results to check where cpu is consumed.
>
>
>

RX Kpps : 57 TX Kpps : 53  RX Kbits : 331184 TX Kbits : 306213
RX Kpps : 59 TX Kpps : 54  RX Kbits : 345517 TX Kbits : 304323
RX Kpps : 56 TX Kpps : 52  RX Kbits : 331418 TX Kbits : 296032
RX Kpps : 60 TX Kpps : 54  RX Kbits : 362007 TX Kbits : 297371
RX Kpps : 59 TX Kpps : 52  RX Kbits : 360455 TX Kbits : 280603


ON  one cpu, gc_interval to 1, gc_elasticity 2

Cpu0  :  0.0%us,  0.0%sy,  0.0%ni, 72.0%id,  0.0%wa,  8.3%hi, 19.7%si,  0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

------------------------------------------------------------------------------
   PerfTop:   17064 irqs/sec  kernel:98.0% [100000 cycles],  (all, 4 CPUs)
------------------------------------------------------------------------------

             samples    pcnt   kernel function
             _______   _____   _______________

            40388.00 - 27.8% : acpi_idle_do_entry
            24651.00 - 17.0% : read_hpet
             4271.00 -  2.9% : _spin_lock
             3388.00 -  2.3% : pskb_expand_head
             3288.00 -  2.3% : igb_poll [igb]
             3246.00 -  2.2% : irq_entries_start
             2868.00 -  2.0% : dev_gro_receive
             2665.00 -  1.8% : igb_xmit_frame_adv       [igb]
             2513.00 -  1.7% : ip_route_input
             2144.00 -  1.5% : igb_clean_tx_irq [igb]
             1842.00 -  1.3% : __slab_free
             1544.00 -  1.1% : dev_queue_xmit
             1423.00 -  1.0% : igb_msix_rx      [igb]
             1353.00 -  0.9% : __alloc_skb
             1285.00 -  0.9% : eth_type_trans

^ permalink raw reply

* receive-side performance issue (ixgbe, core-i7, softirq cpu%)
From: Andrew Dickinson @ 2010-01-28  8:23 UTC (permalink / raw)
  To: netdev

Hi,

I'm running into some unexpected performance issues.  I say
"unexpected" because I was running the same tests on this same box 5
months ago and getting very different (and much better) results.


=== Background ===

The box is a dual Core i7 box with a pair of Intel 82598EB's.  I'm
running 2.6.30 with the in-kernel ixgbe driver.  My tests 5 months ago
were using 2.6.30-rc3 (with a tiny patch from David Miller as seen
here: http://kerneltrap.org/mailarchive/linux-netdev/2009/4/30/5605924).
 The box is configured with both NICs in a bridge; normally I'm doing
some packet processing using ebtables, but for the sake of keeping
things simple, I'm not doing anything special.. just straight bridging
(no ebtables rules, etc).  I'm not running irqbalance and instead
pinning my interrupts, one per core.  I've re-read and double checked
various settings based on Intel's README (i.e. gso off, tso off, etc).

In my previous tests, i was able to pass 3+Mpps regardless of how that
was divided across the two NICS (i.e. 3Mpps all in one direction,
1.5Mpps in each direction simultaneously, etc).  Now, I'm hardly able
to exceed about 750kpps x 2 (i.e. 750k in both directions), and I
can't do more than 750kpps in one direction even with the other
direction having no traffic).

Unfortunately, I didn't take very good notes when I did this last time
so I don't have my previous .config and I'm not 100% positive I've got
identical ethtool settings, etc.  That being said, I've worked through
seemingly every combination of factors that I can think of and I'm
still unable to see the old performance (NUMA on/off, Hyperthreading
on/off, various irq coelescing settings, etc).

I have two identical boxes, they both see the same thing; so a
hardware issue seems unlikely.  My next step is to grab 2.6.30-rc3 and
see if I can repro the good performance with that kernel again and
determine if there was a regression between 2.6.30-rc3 and 2.6.30...
but I'm skeptical that that's the issue since I'm sure other people
would have noticed this as well.


=== What I'm seeing ===

CPU% (almost entirely softirq time, which is expected) ramps extremely
quickly as packet rate increases.  The following table show the packet
rate ("150 x 2" means 150kpps in each direction simultaneously), the
right side is the cpu utilization (as measured by %si in top).

150 x 2:   4%
300 x 2:   8%
450 x 2:  18%
483 x 2:  50%
525 x 2:  66%
600 x 2:  85%
750 x 2: 100% (and dropping frames)

I _am_ seeing interrupts getting spread nicely across cores, so in the
"150 x 2" case, that's about 4% soft-interrupt time per each of the 16
cores.   The CPUs are otherwise idle bar a small amount of hardware
interrupt time (less than 1%).


=== Where it gets weird... ===

Trying to isolate the problem, I added an ebtables rule to drop
everything on the forward chain.  I was expecting to see the CPU
utilization drop since I'd no longer be dealing with the TX-side... no
change.

I then decided to switch from a bridge to a route-based solution.  I
tore down the bridge, enabled ip_forward, setup some IPs and route
entries, etc.  Nothing changes.  CPU performance is identical to
what's shown above.  Additionally, if I add an iptables drop on
FORWARD, the CPU utilization remains unchanged (just like in the
bridging case above).

The point that [I think] I'm driving to is that there's something
fishy going on with the receive-side of the packets.  I wish I could
point to something more specific or a section of code, but I haven't
been able to par this down to anything more granular in my testing.


=== Questions ===

Has anybody seen this before?  If so, what was wrong?
Do you have any recommendations on things to try (either as guesses
or, even better, to help eliminate possibilities)
And along those lines... can anybody think of any possible reasons for this?

This is so frustrating since I _know_ this hardware is capable of so
much more.  It's relatively painless for me to re-run tests in my lab,
so feel free to throw something at me that you think will stick :D

-Andrew

^ permalink raw reply

* Re: [Bugme-new] [Bug 15147] New: phylib: no re-negotiation after link partner abilities changed
From: Danny Baumann @ 2010-01-28  7:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: netdev, bugzilla-daemon, bugme-daemon, Haavard Skinnemoen
In-Reply-To: <20100127164833.f0c96ded.akpm@linux-foundation.org>

Hi,

> >            Summary: phylib: no re-negotiation after link partner abilities
> >                     changed

[...]

> >          Component: Network
> >         AssignedTo: drivers_network@kernel-bugs.osdl.org
> >         ReportedBy: dannybaumann@web.de
> >         Regression: No
            ^^^^^^^^^^^^^^

;-)

> > E.g. with the macb driver, which uses phylib, there is no link anymore when the
> > link partner changes its abilities. This is because no autonegotiation is done
> > again on link changes and hence the LPA register is not updated.
> > 
> > Steps for reproduction:
> > - Connect a 10/100 device to a 10/100 switch, configure switch port to 100Full
> > - Enable interface, link will be present
> > - Configure device to 10Full, link will be lost
> > - Configure switch to 10Full
> > 
> > Result:
> > Link should be present at that point, but isn't ... debug messages in
> > genphy_read_status show that lpa is still at 0x4101 (100Full).
> > 
> > Note that all that is on an AT91SAM9G20 board (hence macb driver) with a
> > Dawicom 9161 PHY connected to its Ethernet port, but AFAICT all phylib enabled
> > drivers should suffer from this.
> > 
> 
> From the above it appears that this is a regression.
> 
> Can you tell us which kernel version(s) were OK and which are not?

As far as I am aware of, this is not a regression, at least not in
phylib (if any, it's a regression for drivers that were converted to
phylib). A code part that does re-negotiation when link is down after
link was up for some time has never been present in the state machine.
In the PHY_NOLINK state, all that has ever been done is doing
phy_read_status and checking the new link state calculated from there.

Unfortunately, I don't have a good idea what would be the best thing to
do there. As far as I can tell from the basic MII PHY registers, there
is no way to distinct the "no link and no carrier = no cable connected"
and the "no link, but carrier = negotiation failed" states. If there was
such a way, the fix probably would involve re-negotiating when going
from state 1 to state 2 (or regularly using a timer when staying in
state 2). But maybe I am missing something.

Regards,

Danny


^ permalink raw reply

* Re: PROBLEM: reproducible crash KVM+nf_conntrack all recent 2.6 kernels
From: Jon Masters @ 2010-01-28  8:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, netfilter-devel
In-Reply-To: <1264663210.2793.110.camel@tonnant>

On Thu, 2010-01-28 at 02:20 -0500, Jon Masters wrote:
> On Thu, 2010-01-28 at 00:46 -0500, Jon Masters wrote:
> 
> > A number of people seem to have reported this crash in various forms,
> > but I have yet to see a solution, and can reproduce on 2.6.33-rc5 this
> > evening so I know it's still present in the latest upstream kernels too.
> > Userspace is Fedora 12, and this happens on both all recent F12 kernels
> > (sporadic in 2.6.31 until recently, solidly reproducible on 2.6.32) and
> > upstream 2.6.32, and 2.6.33-rc5 also - hard to find a "known good".
> > 
> > The problem happens when using netfilter with KVM (problem does not
> > occur without the firewall loaded, for example) and will occur within a
> > few minutes of attempting to start or stop a guest that is connecting to
> > the network - the easiest way to reproduce so far is simply to start up
> > a bunch of Fedora guests and have them do a "yum update" cycle.
> > 
> > All of the crashes appear similar to the following (2.6.33-rc5):
> 
> Rebuilt the kernel with all debug options turned on, got some lockdep
> warnings (haven't looked further yet). Here's the output (attached full
> boot log also):

> [  339.730086] RIP: 0010:[<ffffffff813e5f3e>]  [<ffffffff813e5f3e>]
> nf_ct_remove_expectations+0x49/0x5c

This appears to be in the hlist_for_each_entry_safe iteration within
nf_ct_remove_expectations, iterating over the list of nf_conn_help(ers)
returned by nfct_help. I don't know what that code does (I have an idea
but only at a high level at this stage), though I'm poking a little here
to see if I can understand enough of netfilter to be useful. Feel free
to give me some pointers to help you guys debug this faster.

Jon.



^ permalink raw reply

* [PATCH] be2net: Bug fix to support newer generation of BE ASIC
From: Ajit Khaparde @ 2010-01-28  7:56 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Bug fix in be2net for newer generation of BladeEngine ASIC.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be.h      |    5 +++++
 drivers/net/benet/be_cmds.h |    3 ++-
 drivers/net/benet/be_main.c |   25 +++++++++++++++++++++++--
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 9fd8e5e..5bc7459 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -276,8 +276,13 @@ struct be_adapter {
 	int link_speed;
 	u8 port_type;
 	u8 transceiver;
+	u8 generation;		/* BladeEngine ASIC generation */
 };
 
+/* BladeEngine Generation numbers */
+#define BE_GEN2 2
+#define BE_GEN3 3
+
 extern const struct ethtool_ops be_ethtool_ops;
 
 #define drvr_stats(adapter)		(&adapter->stats.drvr_stats)
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index c002b83..13b33c8 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -164,7 +164,8 @@ struct be_cmd_req_hdr {
 	u8 domain;		/* dword 0 */
 	u32 timeout;		/* dword 1 */
 	u32 request_length;	/* dword 2 */
-	u32 rsvd;		/* dword 3 */
+	u8 version;		/* dword 3 */
+	u8 rsvd[3];		/* dword 3 */
 };
 
 #define RESP_HDR_INFO_OPCODE_SHIFT	0	/* bits 0 - 7 */
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 33ab8c7..90c5661 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -2051,6 +2051,7 @@ static void be_unmap_pci_bars(struct be_adapter *adapter)
 static int be_map_pci_bars(struct be_adapter *adapter)
 {
 	u8 __iomem *addr;
+	int pcicfg_reg;
 
 	addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2),
 			pci_resource_len(adapter->pdev, 2));
@@ -2064,8 +2065,13 @@ static int be_map_pci_bars(struct be_adapter *adapter)
 		goto pci_map_err;
 	adapter->db = addr;
 
-	addr = ioremap_nocache(pci_resource_start(adapter->pdev, 1),
-			pci_resource_len(adapter->pdev, 1));
+	if (adapter->generation == BE_GEN2)
+		pcicfg_reg = 1;
+	else
+		pcicfg_reg = 0;
+
+	addr = ioremap_nocache(pci_resource_start(adapter->pdev, pcicfg_reg),
+			pci_resource_len(adapter->pdev, pcicfg_reg));
 	if (addr == NULL)
 		goto pci_map_err;
 	adapter->pcicfg = addr;
@@ -2162,6 +2168,7 @@ static int be_stats_init(struct be_adapter *adapter)
 	cmd->va = pci_alloc_consistent(adapter->pdev, cmd->size, &cmd->dma);
 	if (cmd->va == NULL)
 		return -1;
+	memset(cmd->va, cmd->size, 0);
 	return 0;
 }
 
@@ -2240,6 +2247,20 @@ static int __devinit be_probe(struct pci_dev *pdev,
 		goto rel_reg;
 	}
 	adapter = netdev_priv(netdev);
+
+	switch (pdev->device) {
+	case BE_DEVICE_ID1:
+	case OC_DEVICE_ID1:
+		adapter->generation = BE_GEN2;
+		break;
+	case BE_DEVICE_ID2:
+	case OC_DEVICE_ID2:
+		adapter->generation = BE_GEN3;
+		break;
+	default:
+		adapter->generation = 0;
+	}
+
 	adapter->pdev = pdev;
 	pci_set_drvdata(pdev, adapter);
 	adapter->netdev = netdev;
-- 
1.6.3.3


^ permalink raw reply related

* [PATCH 1/1 V5] net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver
From: Kristoffer Glembo @ 2010-01-28  7:43 UTC (permalink / raw)
  To: netdev; +Cc: davem, shemminger, Kristoffer Glembo
In-Reply-To: <1264664629-25128-1-git-send-email-kristoffer@gaisler.com>

Adds device driver for Aeroflex Gaisler 10/100 and 10/100/1G Ethernet MAC IP cores.

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
---
 MAINTAINERS          |    6 +
 drivers/net/Kconfig  |    9 +
 drivers/net/Makefile |    1 +
 drivers/net/greth.c  | 1668 ++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/greth.h  |  149 +++++
 5 files changed, 1833 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/greth.c
 create mode 100644 drivers/net/greth.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 745643b..45c047c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2372,6 +2372,12 @@ F:	Documentation/isdn/README.gigaset
 F:	drivers/isdn/gigaset/
 F:	include/linux/gigaset_dev.h
 
+GRETH 10/100/1G Ethernet MAC device driver
+M:	Kristoffer Glembo <kristoffer@gaisler.com>
+L:	netdev@vger.kernel.org
+S:	Maintained
+F:	drivers/net/greth*
+
 HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER
 M:	Frank Seidel <frank@f-seidel.de>
 L:	lm-sensors@lm-sensors.org
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index dd9a09c..d600074 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1955,6 +1955,15 @@ source "drivers/net/fs_enet/Kconfig"
 
 source "drivers/net/octeon/Kconfig"
 
+config GRETH
+	tristate "Aeroflex Gaisler GRETH Ethernet MAC support"
+	depends on OF
+	select PHYLIB
+	select CRC32
+	help
+	  Say Y here if you want to use the Aeroflex Gaisler GRETH Ethernet MAC.
+
+
 endif # NET_ETHERNET
 
 #
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index ad1346d..9f12170 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -246,6 +246,7 @@ pasemi_mac_driver-objs := pasemi_mac.o pasemi_mac_ethtool.o
 obj-$(CONFIG_MLX4_CORE) += mlx4/
 obj-$(CONFIG_ENC28J60) += enc28j60.o
 obj-$(CONFIG_ETHOC) += ethoc.o
+obj-$(CONFIG_GRETH) += greth.o
 
 obj-$(CONFIG_XTENSA_XT2000_SONIC) += xtsonic.o
 
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
new file mode 100644
index 0000000..a43b276
--- /dev/null
+++ b/drivers/net/greth.c
@@ -0,0 +1,1668 @@
+/*
+ * Aeroflex Gaisler GRETH 10/100/1G Ethernet MAC.
+ *
+ * 2005-2009 (c) Aeroflex Gaisler AB
+ *
+ * This driver supports GRETH 10/100 and GRETH 10/100/1G Ethernet MACs
+ * available in the GRLIB VHDL IP core library.
+ *
+ * Full documentation of both cores can be found here:
+ * http://www.gaisler.com/products/grlib/grip.pdf
+ *
+ * The Gigabit version supports scatter/gather DMA, any alignment of
+ * buffers and checksum offloading.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * Contributors: Kristoffer Glembo
+ *               Daniel Hellstrom
+ *               Marko Isomaki
+ */
+
+#include <linux/module.h>
+#include <linux/uaccess.h>
+#include <linux/init.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/ethtool.h>
+#include <linux/skbuff.h>
+#include <linux/io.h>
+#include <linux/crc32.h>
+#include <linux/mii.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
+#include <asm/cacheflush.h>
+#include <asm/byteorder.h>
+
+#ifdef CONFIG_SPARC
+#include <asm/idprom.h>
+#endif
+
+#include "greth.h"
+
+#define GRETH_DEF_MSG_ENABLE	  \
+	(NETIF_MSG_DRV		| \
+	 NETIF_MSG_PROBE	| \
+	 NETIF_MSG_LINK		| \
+	 NETIF_MSG_IFDOWN	| \
+	 NETIF_MSG_IFUP		| \
+	 NETIF_MSG_RX_ERR	| \
+	 NETIF_MSG_TX_ERR)
+
+static int greth_debug = -1;	/* -1 == use GRETH_DEF_MSG_ENABLE as value */
+module_param(greth_debug, int, 0);
+MODULE_PARM_DESC(greth_debug, "GRETH bitmapped debugging message enable value");
+
+/* Accept MAC address of the form macaddr=0x08,0x00,0x20,0x30,0x40,0x50 */
+static int macaddr[6];
+module_param_array(macaddr, int, NULL, 0);
+MODULE_PARM_DESC(macaddr, "GRETH Ethernet MAC address");
+
+static int greth_edcl;
+module_param(greth_edcl, int, 0);
+MODULE_PARM_DESC(greth_edcl, "GRETH EDCL usage indicator. Set to 1 if EDCL is used.");
+
+static int greth_open(struct net_device *dev);
+static int greth_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static int greth_start_xmit_gbit(struct sk_buff *skb, struct net_device *dev);
+static int greth_rx(struct net_device *dev, int limit);
+static int greth_rx_gbit(struct net_device *dev, int limit);
+static void greth_clean_tx(struct net_device *dev);
+static void greth_clean_tx_gbit(struct net_device *dev);
+static irqreturn_t greth_interrupt(int irq, void *dev_id);
+static int greth_close(struct net_device *dev);
+static int greth_set_mac_add(struct net_device *dev, void *p);
+static void greth_set_multicast_list(struct net_device *dev);
+
+#define GRETH_REGLOAD(a)	    (be32_to_cpu(__raw_readl(&(a))))
+#define GRETH_REGSAVE(a, v)         (__raw_writel(cpu_to_be32(v), &(a)))
+#define GRETH_REGORIN(a, v)         (GRETH_REGSAVE(a, (GRETH_REGLOAD(a) | (v))))
+#define GRETH_REGANDIN(a, v)        (GRETH_REGSAVE(a, (GRETH_REGLOAD(a) & (v))))
+
+#define NEXT_TX(N)      (((N) + 1) & GRETH_TXBD_NUM_MASK)
+#define SKIP_TX(N, C)   (((N) + C) & GRETH_TXBD_NUM_MASK)
+#define NEXT_RX(N)      (((N) + 1) & GRETH_RXBD_NUM_MASK)
+
+static void greth_print_rx_packet(void *addr, int len)
+{
+	print_hex_dump(KERN_DEBUG, "RX: ", DUMP_PREFIX_OFFSET, 16, 1,
+			addr, len, true);
+}
+
+static void greth_print_tx_packet(struct sk_buff *skb)
+{
+	int i;
+	int length;
+
+	if (skb_shinfo(skb)->nr_frags == 0)
+		length = skb->len;
+	else
+		length = skb_headlen(skb);
+
+	print_hex_dump(KERN_DEBUG, "TX: ", DUMP_PREFIX_OFFSET, 16, 1,
+			skb->data, length, true);
+
+	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+
+		print_hex_dump(KERN_DEBUG, "TX: ", DUMP_PREFIX_OFFSET, 16, 1,
+			       phys_to_virt(page_to_phys(skb_shinfo(skb)->frags[i].page)) +
+			       skb_shinfo(skb)->frags[i].page_offset,
+			       length, true);
+	}
+}
+
+static inline void greth_enable_tx(struct greth_private *greth)
+{
+	wmb();
+	GRETH_REGORIN(greth->regs->control, GRETH_TXEN);
+}
+
+static inline void greth_disable_tx(struct greth_private *greth)
+{
+	GRETH_REGANDIN(greth->regs->control, ~GRETH_TXEN);
+}
+
+static inline void greth_enable_rx(struct greth_private *greth)
+{
+	wmb();
+	GRETH_REGORIN(greth->regs->control, GRETH_RXEN);
+}
+
+static inline void greth_disable_rx(struct greth_private *greth)
+{
+	GRETH_REGANDIN(greth->regs->control, ~GRETH_RXEN);
+}
+
+static inline void greth_enable_irqs(struct greth_private *greth)
+{
+	GRETH_REGORIN(greth->regs->control, GRETH_RXI | GRETH_TXI);
+}
+
+static inline void greth_disable_irqs(struct greth_private *greth)
+{
+	GRETH_REGANDIN(greth->regs->control, ~(GRETH_RXI|GRETH_TXI));
+}
+
+static inline void greth_write_bd(u32 *bd, u32 val)
+{
+	__raw_writel(cpu_to_be32(val), bd);
+}
+
+static inline u32 greth_read_bd(u32 *bd)
+{
+	return be32_to_cpu(__raw_readl(bd));
+}
+
+static void greth_clean_rings(struct greth_private *greth)
+{
+	int i;
+	struct greth_bd *rx_bdp = greth->rx_bd_base;
+	struct greth_bd *tx_bdp = greth->tx_bd_base;
+
+	if (greth->gbit_mac) {
+
+		/* Free and unmap RX buffers */
+		for (i = 0; i < GRETH_RXBD_NUM; i++, rx_bdp++) {
+			if (greth->rx_skbuff[i] != NULL) {
+				dev_kfree_skb(greth->rx_skbuff[i]);
+				dma_unmap_single(greth->dev,
+						 greth_read_bd(&rx_bdp->addr),
+						 MAX_FRAME_SIZE+NET_IP_ALIGN,
+						 DMA_FROM_DEVICE);
+			}
+		}
+
+		/* TX buffers */
+		while (greth->tx_free < GRETH_TXBD_NUM) {
+
+			struct sk_buff *skb = greth->tx_skbuff[greth->tx_last];
+			int nr_frags = skb_shinfo(skb)->nr_frags;
+			tx_bdp = greth->tx_bd_base + greth->tx_last;
+			greth->tx_last = NEXT_TX(greth->tx_last);
+
+			dma_unmap_single(greth->dev,
+					 greth_read_bd(&tx_bdp->addr),
+					 skb_headlen(skb),
+					 DMA_TO_DEVICE);
+
+			for (i = 0; i < nr_frags; i++) {
+				skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
+				tx_bdp = greth->tx_bd_base + greth->tx_last;
+
+				dma_unmap_page(greth->dev,
+					       greth_read_bd(&tx_bdp->addr),
+					       frag->size,
+					       DMA_TO_DEVICE);
+
+				greth->tx_last = NEXT_TX(greth->tx_last);
+			}
+			greth->tx_free += nr_frags+1;
+			dev_kfree_skb(skb);
+		}
+
+
+	} else { /* 10/100 Mbps MAC */
+
+		for (i = 0; i < GRETH_RXBD_NUM; i++, rx_bdp++) {
+			kfree(greth->rx_bufs[i]);
+			dma_unmap_single(greth->dev,
+					 greth_read_bd(&rx_bdp->addr),
+					 MAX_FRAME_SIZE,
+					 DMA_FROM_DEVICE);
+		}
+		for (i = 0; i < GRETH_TXBD_NUM; i++, tx_bdp++) {
+			kfree(greth->tx_bufs[i]);
+			dma_unmap_single(greth->dev,
+					 greth_read_bd(&tx_bdp->addr),
+					 MAX_FRAME_SIZE,
+					 DMA_TO_DEVICE);
+		}
+	}
+}
+
+static int greth_init_rings(struct greth_private *greth)
+{
+	struct sk_buff *skb;
+	struct greth_bd *rx_bd, *tx_bd;
+	u32 dma_addr;
+	int i;
+
+	rx_bd = greth->rx_bd_base;
+	tx_bd = greth->tx_bd_base;
+
+	/* Initialize descriptor rings and buffers */
+	if (greth->gbit_mac) {
+
+		for (i = 0; i < GRETH_RXBD_NUM; i++) {
+			skb = netdev_alloc_skb(greth->netdev, MAX_FRAME_SIZE+NET_IP_ALIGN);
+			if (skb == NULL) {
+				if (netif_msg_ifup(greth))
+					dev_err(greth->dev, "Error allocating DMA ring.\n");
+				goto cleanup;
+			}
+			skb_reserve(skb, NET_IP_ALIGN);
+			dma_addr = dma_map_single(greth->dev,
+						  skb->data,
+						  MAX_FRAME_SIZE+NET_IP_ALIGN,
+						  DMA_FROM_DEVICE);
+
+			if (dma_mapping_error(greth->dev, dma_addr)) {
+				if (netif_msg_ifup(greth))
+					dev_err(greth->dev, "Could not create initial DMA mapping\n");
+				goto cleanup;
+			}
+			greth->rx_skbuff[i] = skb;
+			greth_write_bd(&rx_bd[i].addr, dma_addr);
+			greth_write_bd(&rx_bd[i].stat, GRETH_BD_EN | GRETH_BD_IE);
+		}
+
+	} else {
+
+		/* 10/100 MAC uses a fixed set of buffers and copy to/from SKBs */
+		for (i = 0; i < GRETH_RXBD_NUM; i++) {
+
+			greth->rx_bufs[i] = kmalloc(MAX_FRAME_SIZE, GFP_KERNEL);
+
+			if (greth->rx_bufs[i] == NULL) {
+				if (netif_msg_ifup(greth))
+					dev_err(greth->dev, "Error allocating DMA ring.\n");
+				goto cleanup;
+			}
+
+			dma_addr = dma_map_single(greth->dev,
+						  greth->rx_bufs[i],
+						  MAX_FRAME_SIZE,
+						  DMA_FROM_DEVICE);
+
+			if (dma_mapping_error(greth->dev, dma_addr)) {
+				if (netif_msg_ifup(greth))
+					dev_err(greth->dev, "Could not create initial DMA mapping\n");
+				goto cleanup;
+			}
+			greth_write_bd(&rx_bd[i].addr, dma_addr);
+			greth_write_bd(&rx_bd[i].stat, GRETH_BD_EN | GRETH_BD_IE);
+		}
+		for (i = 0; i < GRETH_TXBD_NUM; i++) {
+
+			greth->tx_bufs[i] = kmalloc(MAX_FRAME_SIZE, GFP_KERNEL);
+
+			if (greth->tx_bufs[i] == NULL) {
+				if (netif_msg_ifup(greth))
+					dev_err(greth->dev, "Error allocating DMA ring.\n");
+				goto cleanup;
+			}
+
+			dma_addr = dma_map_single(greth->dev,
+						  greth->tx_bufs[i],
+						  MAX_FRAME_SIZE,
+						  DMA_TO_DEVICE);
+
+			if (dma_mapping_error(greth->dev, dma_addr)) {
+				if (netif_msg_ifup(greth))
+					dev_err(greth->dev, "Could not create initial DMA mapping\n");
+				goto cleanup;
+			}
+			greth_write_bd(&tx_bd[i].addr, dma_addr);
+			greth_write_bd(&tx_bd[i].stat, 0);
+		}
+	}
+	greth_write_bd(&rx_bd[GRETH_RXBD_NUM - 1].stat,
+		       greth_read_bd(&rx_bd[GRETH_RXBD_NUM - 1].stat) | GRETH_BD_WR);
+
+	/* Initialize pointers. */
+	greth->rx_cur = 0;
+	greth->tx_next = 0;
+	greth->tx_last = 0;
+	greth->tx_free = GRETH_TXBD_NUM;
+
+	/* Initialize descriptor base address */
+	GRETH_REGSAVE(greth->regs->tx_desc_p, greth->tx_bd_base_phys);
+	GRETH_REGSAVE(greth->regs->rx_desc_p, greth->rx_bd_base_phys);
+
+	return 0;
+
+cleanup:
+	greth_clean_rings(greth);
+	return -ENOMEM;
+}
+
+static int greth_open(struct net_device *dev)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	int err;
+
+	err = greth_init_rings(greth);
+	if (err) {
+		if (netif_msg_ifup(greth))
+			dev_err(&dev->dev, "Could not allocate memory for DMA rings\n");
+		return err;
+	}
+
+	err = request_irq(greth->irq, greth_interrupt, 0, "eth", (void *) dev);
+	if (err) {
+		if (netif_msg_ifup(greth))
+			dev_err(&dev->dev, "Could not allocate interrupt %d\n", dev->irq);
+		greth_clean_rings(greth);
+		return err;
+	}
+
+	if (netif_msg_ifup(greth))
+		dev_dbg(&dev->dev, " starting queue\n");
+	netif_start_queue(dev);
+
+	napi_enable(&greth->napi);
+
+	greth_enable_irqs(greth);
+	greth_enable_tx(greth);
+	greth_enable_rx(greth);
+	return 0;
+
+}
+
+static int greth_close(struct net_device *dev)
+{
+	struct greth_private *greth = netdev_priv(dev);
+
+	napi_disable(&greth->napi);
+
+	greth_disable_tx(greth);
+
+	netif_stop_queue(dev);
+
+	free_irq(greth->irq, (void *) dev);
+
+	greth_clean_rings(greth);
+
+	return 0;
+}
+
+static int greth_start_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	struct greth_bd *bdp;
+	int err = NETDEV_TX_OK;
+	u32 status, dma_addr;
+
+	bdp = greth->tx_bd_base + greth->tx_next;
+
+	if (unlikely(greth->tx_free <= 0)) {
+		netif_stop_queue(dev);
+		return NETDEV_TX_BUSY;
+	}
+
+	if (netif_msg_pktdata(greth))
+		greth_print_tx_packet(skb);
+
+
+	if (unlikely(skb->len > MAX_FRAME_SIZE)) {
+		dev->stats.tx_errors++;
+		goto out;
+	}
+
+	dma_addr = greth_read_bd(&bdp->addr);
+
+	memcpy((unsigned char *) phys_to_virt(dma_addr), skb->data, skb->len);
+
+	dma_sync_single_for_device(greth->dev, dma_addr, skb->len, DMA_TO_DEVICE);
+
+	status = GRETH_BD_EN | (skb->len & GRETH_BD_LEN);
+
+	/* Wrap around descriptor ring */
+	if (greth->tx_next == GRETH_TXBD_NUM_MASK) {
+		status |= GRETH_BD_WR;
+	}
+
+	greth->tx_next = NEXT_TX(greth->tx_next);
+	greth->tx_free--;
+
+	/* No more descriptors */
+	if (unlikely(greth->tx_free == 0)) {
+
+		/* Free transmitted descriptors */
+		greth_clean_tx(dev);
+
+		/* If nothing was cleaned, stop queue & wait for irq */
+		if (unlikely(greth->tx_free == 0)) {
+			status |= GRETH_BD_IE;
+			netif_stop_queue(dev);
+		}
+	}
+
+	/* Write descriptor control word and enable transmission */
+	greth_write_bd(&bdp->stat, status);
+	greth_enable_tx(greth);
+
+out:
+	dev_kfree_skb(skb);
+	return err;
+}
+
+
+static int greth_start_xmit_gbit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	struct greth_bd *bdp;
+	u32 status = 0, dma_addr;
+	int curr_tx, nr_frags, i, err = NETDEV_TX_OK;
+
+	nr_frags = skb_shinfo(skb)->nr_frags;
+
+	if (greth->tx_free < nr_frags + 1) {
+		netif_stop_queue(dev);
+		err = NETDEV_TX_BUSY;
+		goto out;
+	}
+
+	if (netif_msg_pktdata(greth))
+		greth_print_tx_packet(skb);
+
+	if (unlikely(skb->len > MAX_FRAME_SIZE)) {
+		dev->stats.tx_errors++;
+		goto out;
+	}
+
+	/* Save skb pointer. */
+	greth->tx_skbuff[greth->tx_next] = skb;
+
+	/* Linear buf */
+	if (nr_frags != 0)
+		status = GRETH_TXBD_MORE;
+
+	status |= GRETH_TXBD_CSALL;
+	status |= skb_headlen(skb) & GRETH_BD_LEN;
+	if (greth->tx_next == GRETH_TXBD_NUM_MASK)
+		status |= GRETH_BD_WR;
+
+
+	bdp = greth->tx_bd_base + greth->tx_next;
+	greth_write_bd(&bdp->stat, status);
+	dma_addr = dma_map_single(greth->dev, skb->data, skb_headlen(skb), DMA_TO_DEVICE);
+
+	if (unlikely(dma_mapping_error(greth->dev, dma_addr)))
+		goto map_error;
+
+	greth_write_bd(&bdp->addr, dma_addr);
+
+	curr_tx = NEXT_TX(greth->tx_next);
+
+	/* Frags */
+	for (i = 0; i < nr_frags; i++) {
+		skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
+		greth->tx_skbuff[curr_tx] = NULL;
+		bdp = greth->tx_bd_base + curr_tx;
+
+		status = GRETH_TXBD_CSALL;
+		status |= frag->size & GRETH_BD_LEN;
+
+		/* Wrap around descriptor ring */
+		if (curr_tx == GRETH_TXBD_NUM_MASK)
+			status |= GRETH_BD_WR;
+
+		/* More fragments left */
+		if (i < nr_frags - 1)
+			status |= GRETH_TXBD_MORE;
+
+		/* ... last fragment, check if out of descriptors  */
+		else if (greth->tx_free - nr_frags - 1 < (MAX_SKB_FRAGS + 1)) {
+
+			/* Enable interrupts and stop queue */
+			status |= GRETH_BD_IE;
+			netif_stop_queue(dev);
+		}
+
+		greth_write_bd(&bdp->stat, status);
+
+		dma_addr = dma_map_page(greth->dev,
+					frag->page,
+					frag->page_offset,
+					frag->size,
+					DMA_TO_DEVICE);
+
+		if (unlikely(dma_mapping_error(greth->dev, dma_addr)))
+			goto frag_map_error;
+
+		greth_write_bd(&bdp->addr, dma_addr);
+
+		curr_tx = NEXT_TX(curr_tx);
+	}
+
+	wmb();
+
+	/* Enable the descriptors that we configured ...  */
+	for (i = 0; i < nr_frags + 1; i++) {
+		bdp = greth->tx_bd_base + greth->tx_next;
+		greth_write_bd(&bdp->stat, greth_read_bd(&bdp->stat) | GRETH_BD_EN);
+		greth->tx_next = NEXT_TX(greth->tx_next);
+		greth->tx_free--;
+	}
+
+	greth_enable_tx(greth);
+
+	return NETDEV_TX_OK;
+
+frag_map_error:
+	/* Unmap SKB mappings that succeeded */
+	for (i = 0; greth->tx_next + i != curr_tx; i++) {
+		bdp = greth->tx_bd_base + greth->tx_next + i;
+		dma_unmap_single(greth->dev,
+				 greth_read_bd(&bdp->addr),
+				 greth_read_bd(&bdp->stat) & GRETH_BD_LEN,
+				 DMA_TO_DEVICE);
+	}
+map_error:
+	if (net_ratelimit())
+		dev_warn(greth->dev, "Could not create TX DMA mapping\n");
+	dev_kfree_skb(skb);
+	return NETDEV_TX_OK;
+
+out:
+	return err;
+}
+
+
+static irqreturn_t greth_interrupt(int irq, void *dev_id)
+{
+	struct net_device *dev = dev_id;
+	struct greth_private *greth;
+	u32 status;
+	irqreturn_t retval = IRQ_NONE;
+
+	greth = netdev_priv(dev);
+
+	spin_lock(&greth->devlock);
+
+	/* Get the interrupt events that caused us to be here. */
+	status = GRETH_REGLOAD(greth->regs->status);
+
+	/* Handle rx and tx interrupts through poll */
+	if (status & (GRETH_INT_RX | GRETH_INT_TX)) {
+
+		/* Clear interrupt status */
+		GRETH_REGORIN(greth->regs->status,
+			      status & (GRETH_INT_RX | GRETH_INT_TX));
+
+		retval = IRQ_HANDLED;
+
+		/* Disable interrupts and schedule poll() */
+		greth_disable_irqs(greth);
+		napi_schedule(&greth->napi);
+	}
+
+	mmiowb();
+	spin_unlock(&greth->devlock);
+
+	return retval;
+}
+
+static void greth_clean_tx(struct net_device *dev)
+{
+	struct greth_private *greth;
+	struct greth_bd *bdp;
+	u32 stat;
+
+	greth = netdev_priv(dev);
+
+	while (1) {
+		bdp = greth->tx_bd_base + greth->tx_last;
+		stat = greth_read_bd(&bdp->stat);
+
+		if (unlikely(stat & GRETH_BD_EN))
+			break;
+
+		if (greth->tx_free == GRETH_TXBD_NUM)
+			break;
+
+		/* Check status for errors */
+		if (unlikely(stat & GRETH_TXBD_STATUS)) {
+			dev->stats.tx_errors++;
+			if (stat & GRETH_TXBD_ERR_AL)
+				dev->stats.tx_aborted_errors++;
+			if (stat & GRETH_TXBD_ERR_UE)
+				dev->stats.tx_fifo_errors++;
+		}
+		dev->stats.tx_packets++;
+		greth->tx_last = NEXT_TX(greth->tx_last);
+		greth->tx_free++;
+	}
+
+	if (greth->tx_free > 0) {
+		netif_wake_queue(dev);
+	}
+
+}
+
+static inline void greth_update_tx_stats(struct net_device *dev, u32 stat)
+{
+	/* Check status for errors */
+	if (unlikely(stat & GRETH_TXBD_STATUS)) {
+		dev->stats.tx_errors++;
+		if (stat & GRETH_TXBD_ERR_AL)
+			dev->stats.tx_aborted_errors++;
+		if (stat & GRETH_TXBD_ERR_UE)
+			dev->stats.tx_fifo_errors++;
+		if (stat & GRETH_TXBD_ERR_LC)
+			dev->stats.tx_aborted_errors++;
+	}
+	dev->stats.tx_packets++;
+}
+
+static void greth_clean_tx_gbit(struct net_device *dev)
+{
+	struct greth_private *greth;
+	struct greth_bd *bdp, *bdp_last_frag;
+	struct sk_buff *skb;
+	u32 stat;
+	int nr_frags, i;
+
+	greth = netdev_priv(dev);
+
+	while (greth->tx_free < GRETH_TXBD_NUM) {
+
+		skb = greth->tx_skbuff[greth->tx_last];
+
+		nr_frags = skb_shinfo(skb)->nr_frags;
+
+		/* We only clean fully completed SKBs */
+		bdp_last_frag = greth->tx_bd_base + SKIP_TX(greth->tx_last, nr_frags);
+		stat = bdp_last_frag->stat;
+
+		if (stat & GRETH_BD_EN)
+			break;
+
+		greth->tx_skbuff[greth->tx_last] = NULL;
+
+		greth_update_tx_stats(dev, stat);
+
+		bdp = greth->tx_bd_base + greth->tx_last;
+
+		greth->tx_last = NEXT_TX(greth->tx_last);
+
+		dma_unmap_single(greth->dev,
+				 greth_read_bd(&bdp->addr),
+				 skb_headlen(skb),
+				 DMA_TO_DEVICE);
+
+		for (i = 0; i < nr_frags; i++) {
+			skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
+			bdp = greth->tx_bd_base + greth->tx_last;
+
+			dma_unmap_page(greth->dev,
+				       greth_read_bd(&bdp->addr),
+				       frag->size,
+				       DMA_TO_DEVICE);
+
+			greth->tx_last = NEXT_TX(greth->tx_last);
+		}
+		greth->tx_free += nr_frags+1;
+		dev_kfree_skb(skb);
+	}
+	if (greth->tx_free > (MAX_SKB_FRAGS + 1)) {
+		netif_wake_queue(dev);
+	}
+}
+
+static int greth_pending_packets(struct greth_private *greth)
+{
+	struct greth_bd *bdp;
+	u32 status;
+	bdp = greth->rx_bd_base + greth->rx_cur;
+	status = greth_read_bd(&bdp->stat);
+	if (status & GRETH_BD_EN)
+		return 0;
+	else
+		return 1;
+}
+
+static int greth_rx(struct net_device *dev, int limit)
+{
+	struct greth_private *greth;
+	struct greth_bd *bdp;
+	struct sk_buff *skb;
+	int pkt_len;
+	int bad, count;
+	u32 status, dma_addr;
+
+	greth = netdev_priv(dev);
+
+	for (count = 0; count < limit; ++count) {
+
+		bdp = greth->rx_bd_base + greth->rx_cur;
+		status = greth_read_bd(&bdp->stat);
+		dma_addr = greth_read_bd(&bdp->addr);
+		bad = 0;
+
+		if (unlikely(status & GRETH_BD_EN)) {
+			break;
+		}
+
+		/* Check status for errors. */
+		if (unlikely(status & GRETH_RXBD_STATUS)) {
+			if (status & GRETH_RXBD_ERR_FT) {
+				dev->stats.rx_length_errors++;
+				bad = 1;
+			}
+			if (status & (GRETH_RXBD_ERR_AE | GRETH_RXBD_ERR_OE)) {
+				dev->stats.rx_frame_errors++;
+				bad = 1;
+			}
+			if (status & GRETH_RXBD_ERR_CRC) {
+				dev->stats.rx_crc_errors++;
+				bad = 1;
+			}
+		}
+		if (unlikely(bad)) {
+			dev->stats.rx_errors++;
+
+		} else {
+
+			pkt_len = status & GRETH_BD_LEN;
+
+			skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN);
+
+			if (unlikely(skb == NULL)) {
+
+				if (net_ratelimit())
+					dev_warn(&dev->dev, "low on memory - " "packet dropped\n");
+
+				dev->stats.rx_dropped++;
+
+			} else {
+				skb_reserve(skb, NET_IP_ALIGN);
+				skb->dev = dev;
+
+				dma_sync_single_for_cpu(greth->dev,
+							dma_addr,
+							pkt_len,
+							DMA_FROM_DEVICE);
+
+				if (netif_msg_pktdata(greth))
+					greth_print_rx_packet(phys_to_virt(dma_addr), pkt_len);
+
+				memcpy(skb_put(skb, pkt_len), phys_to_virt(dma_addr), pkt_len);
+
+				skb->protocol = eth_type_trans(skb, dev);
+				dev->stats.rx_packets++;
+				netif_receive_skb(skb);
+			}
+		}
+
+		status = GRETH_BD_EN | GRETH_BD_IE;
+		if (greth->rx_cur == GRETH_RXBD_NUM_MASK) {
+			status |= GRETH_BD_WR;
+		}
+
+		wmb();
+		greth_write_bd(&bdp->stat, status);
+
+		dma_sync_single_for_device(greth->dev, dma_addr, MAX_FRAME_SIZE, DMA_FROM_DEVICE);
+
+		greth_enable_rx(greth);
+
+		greth->rx_cur = NEXT_RX(greth->rx_cur);
+	}
+
+	return count;
+}
+
+static inline int hw_checksummed(u32 status)
+{
+
+	if (status & GRETH_RXBD_IP_FRAG)
+		return 0;
+
+	if (status & GRETH_RXBD_IP && status & GRETH_RXBD_IP_CSERR)
+		return 0;
+
+	if (status & GRETH_RXBD_UDP && status & GRETH_RXBD_UDP_CSERR)
+		return 0;
+
+	if (status & GRETH_RXBD_TCP && status & GRETH_RXBD_TCP_CSERR)
+		return 0;
+
+	return 1;
+}
+
+static int greth_rx_gbit(struct net_device *dev, int limit)
+{
+	struct greth_private *greth;
+	struct greth_bd *bdp;
+	struct sk_buff *skb, *newskb;
+	int pkt_len;
+	int bad, count = 0;
+	u32 status, dma_addr;
+
+	greth = netdev_priv(dev);
+
+	for (count = 0; count < limit; ++count) {
+
+		bdp = greth->rx_bd_base + greth->rx_cur;
+		skb = greth->rx_skbuff[greth->rx_cur];
+		status = greth_read_bd(&bdp->stat);
+		bad = 0;
+
+		if (status & GRETH_BD_EN)
+			break;
+
+		/* Check status for errors. */
+		if (unlikely(status & GRETH_RXBD_STATUS)) {
+
+			if (status & GRETH_RXBD_ERR_FT) {
+				dev->stats.rx_length_errors++;
+				bad = 1;
+			} else if (status &
+				   (GRETH_RXBD_ERR_AE | GRETH_RXBD_ERR_OE | GRETH_RXBD_ERR_LE)) {
+				dev->stats.rx_frame_errors++;
+				bad = 1;
+			} else if (status & GRETH_RXBD_ERR_CRC) {
+				dev->stats.rx_crc_errors++;
+				bad = 1;
+			}
+		}
+
+		/* Allocate new skb to replace current */
+		newskb = netdev_alloc_skb(dev, MAX_FRAME_SIZE + NET_IP_ALIGN);
+
+		if (!bad && newskb) {
+			skb_reserve(newskb, NET_IP_ALIGN);
+
+			dma_addr = dma_map_single(greth->dev,
+						      newskb->data,
+						      MAX_FRAME_SIZE + NET_IP_ALIGN,
+						      DMA_FROM_DEVICE);
+
+			if (!dma_mapping_error(greth->dev, dma_addr)) {
+				/* Process the incoming frame. */
+				pkt_len = status & GRETH_BD_LEN;
+
+				dma_unmap_single(greth->dev,
+						 greth_read_bd(&bdp->addr),
+						 MAX_FRAME_SIZE + NET_IP_ALIGN,
+						 DMA_FROM_DEVICE);
+
+				if (netif_msg_pktdata(greth))
+					greth_print_rx_packet(phys_to_virt(greth_read_bd(&bdp->addr)), pkt_len);
+
+				skb_put(skb, pkt_len);
+
+				if (greth->flags & GRETH_FLAG_RX_CSUM && hw_checksummed(status))
+					skb->ip_summed = CHECKSUM_UNNECESSARY;
+				else
+					skb->ip_summed = CHECKSUM_NONE;
+
+				skb->dev = dev;
+				skb->protocol = eth_type_trans(skb, dev);
+				dev->stats.rx_packets++;
+				netif_receive_skb(skb);
+
+				greth->rx_skbuff[greth->rx_cur] = newskb;
+				greth_write_bd(&bdp->addr, dma_addr);
+			} else {
+				if (net_ratelimit())
+					dev_warn(greth->dev, "Could not create DMA mapping, dropping packet\n");
+				dev_kfree_skb(newskb);
+				dev->stats.rx_dropped++;
+			}
+		} else {
+			if (net_ratelimit())
+				dev_warn(greth->dev, "Could not allocate SKB, dropping packet\n");
+			dev->stats.rx_dropped++;
+		}
+
+		status = GRETH_BD_EN | GRETH_BD_IE;
+		if (greth->rx_cur == GRETH_RXBD_NUM_MASK) {
+			status |= GRETH_BD_WR;
+		}
+
+		wmb();
+		greth_write_bd(&bdp->stat, status);
+		greth_enable_rx(greth);
+		greth->rx_cur = NEXT_RX(greth->rx_cur);
+	}
+
+	return count;
+
+}
+
+static int greth_poll(struct napi_struct *napi, int budget)
+{
+	struct greth_private *greth;
+	int work_done = 0;
+	greth = container_of(napi, struct greth_private, napi);
+
+	if (greth->gbit_mac) {
+		greth_clean_tx_gbit(greth->netdev);
+	} else {
+		greth_clean_tx(greth->netdev);
+	}
+
+restart_poll:
+	if (greth->gbit_mac) {
+		work_done += greth_rx_gbit(greth->netdev, budget - work_done);
+	} else {
+		work_done += greth_rx(greth->netdev, budget - work_done);
+	}
+
+	if (work_done < budget) {
+
+		napi_complete(napi);
+
+		if (greth_pending_packets(greth)) {
+			napi_reschedule(napi);
+			goto restart_poll;
+		}
+	}
+
+	greth_enable_irqs(greth);
+	return work_done;
+}
+
+static int greth_set_mac_add(struct net_device *dev, void *p)
+{
+	struct sockaddr *addr = p;
+	struct greth_private *greth;
+	struct greth_regs *regs;
+
+	greth = (struct greth_private *) netdev_priv(dev);
+	regs = (struct greth_regs *) greth->regs;
+
+	if (!is_valid_ether_addr(addr->sa_data))
+		return -EINVAL;
+
+	memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+
+	GRETH_REGSAVE(regs->esa_msb, addr->sa_data[0] << 8 | addr->sa_data[1]);
+	GRETH_REGSAVE(regs->esa_lsb,
+		      addr->sa_data[2] << 24 | addr->
+		      sa_data[3] << 16 | addr->sa_data[4] << 8 | addr->sa_data[5]);
+	return 0;
+}
+
+static u32 greth_hash_get_index(__u8 *addr)
+{
+	return (ether_crc(6, addr)) & 0x3F;
+}
+
+static void greth_set_hash_filter(struct net_device *dev)
+{
+	struct dev_mc_list *curr;
+	struct greth_private *greth = (struct greth_private *) netdev_priv(dev);
+	struct greth_regs *regs = (struct greth_regs *) greth->regs;
+	u32 mc_filter[2];
+	unsigned int i, bitnr;
+
+	mc_filter[0] = mc_filter[1] = 0;
+
+	curr = dev->mc_list;
+
+	for (i = 0; i < dev->mc_count; i++, curr = curr->next) {
+
+		if (!curr)
+			break;	/* unexpected end of list */
+
+		bitnr = greth_hash_get_index(curr->dmi_addr);
+		mc_filter[bitnr >> 5] |= 1 << (bitnr & 31);
+	}
+
+	GRETH_REGSAVE(regs->hash_msb, mc_filter[1]);
+	GRETH_REGSAVE(regs->hash_lsb, mc_filter[0]);
+}
+
+static void greth_set_multicast_list(struct net_device *dev)
+{
+	int cfg;
+	struct greth_private *greth = netdev_priv(dev);
+	struct greth_regs *regs = (struct greth_regs *) greth->regs;
+
+	cfg = GRETH_REGLOAD(regs->control);
+	if (dev->flags & IFF_PROMISC)
+		cfg |= GRETH_CTRL_PR;
+	else
+		cfg &= ~GRETH_CTRL_PR;
+
+	if (greth->multicast) {
+		if (dev->flags & IFF_ALLMULTI) {
+			GRETH_REGSAVE(regs->hash_msb, -1);
+			GRETH_REGSAVE(regs->hash_lsb, -1);
+			cfg |= GRETH_CTRL_MCEN;
+			GRETH_REGSAVE(regs->control, cfg);
+			return;
+		}
+
+		if (dev->mc_count == 0) {
+			cfg &= ~GRETH_CTRL_MCEN;
+			GRETH_REGSAVE(regs->control, cfg);
+			return;
+		}
+
+		/* Setup multicast filter */
+		greth_set_hash_filter(dev);
+		cfg |= GRETH_CTRL_MCEN;
+	}
+	GRETH_REGSAVE(regs->control, cfg);
+}
+
+static u32 greth_get_msglevel(struct net_device *dev)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	return greth->msg_enable;
+}
+
+static void greth_set_msglevel(struct net_device *dev, u32 value)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	greth->msg_enable = value;
+}
+static int greth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	struct phy_device *phy = greth->phy;
+
+	if (!phy)
+		return -ENODEV;
+
+	return phy_ethtool_gset(phy, cmd);
+}
+
+static int greth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	struct phy_device *phy = greth->phy;
+
+	if (!phy)
+		return -ENODEV;
+
+	return phy_ethtool_sset(phy, cmd);
+}
+
+static int greth_get_regs_len(struct net_device *dev)
+{
+	return sizeof(struct greth_regs);
+}
+
+static void greth_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+	struct greth_private *greth = netdev_priv(dev);
+
+	strncpy(info->driver, dev_driver_string(greth->dev), 32);
+	strncpy(info->version, "revision: 1.0", 32);
+	strncpy(info->bus_info, greth->dev->bus->name, 32);
+	strncpy(info->fw_version, "N/A", 32);
+	info->eedump_len = 0;
+	info->regdump_len = sizeof(struct greth_regs);
+}
+
+static void greth_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
+{
+	int i;
+	struct greth_private *greth = netdev_priv(dev);
+	u32 __iomem *greth_regs = (u32 __iomem *) greth->regs;
+	u32 *buff = p;
+
+	for (i = 0; i < sizeof(struct greth_regs) / sizeof(u32); i++)
+		buff[i] = greth_read_bd(&greth_regs[i]);
+}
+
+static u32 greth_get_rx_csum(struct net_device *dev)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	return (greth->flags & GRETH_FLAG_RX_CSUM) != 0;
+}
+
+static int greth_set_rx_csum(struct net_device *dev, u32 data)
+{
+	struct greth_private *greth = netdev_priv(dev);
+
+	spin_lock_bh(&greth->devlock);
+
+	if (data)
+		greth->flags |= GRETH_FLAG_RX_CSUM;
+	else
+		greth->flags &= ~GRETH_FLAG_RX_CSUM;
+
+	spin_unlock_bh(&greth->devlock);
+
+	return 0;
+}
+
+static u32 greth_get_tx_csum(struct net_device *dev)
+{
+	return (dev->features & NETIF_F_IP_CSUM) != 0;
+}
+
+static int greth_set_tx_csum(struct net_device *dev, u32 data)
+{
+	netif_tx_lock_bh(dev);
+	ethtool_op_set_tx_csum(dev, data);
+	netif_tx_unlock_bh(dev);
+	return 0;
+}
+
+static const struct ethtool_ops greth_ethtool_ops = {
+	.get_msglevel		= greth_get_msglevel,
+	.set_msglevel		= greth_set_msglevel,
+	.get_settings		= greth_get_settings,
+	.set_settings		= greth_set_settings,
+	.get_drvinfo		= greth_get_drvinfo,
+	.get_regs_len           = greth_get_regs_len,
+	.get_regs               = greth_get_regs,
+	.get_rx_csum		= greth_get_rx_csum,
+	.set_rx_csum		= greth_set_rx_csum,
+	.get_tx_csum		= greth_get_tx_csum,
+	.set_tx_csum		= greth_set_tx_csum,
+	.get_link		= ethtool_op_get_link,
+};
+
+static struct net_device_ops greth_netdev_ops = {
+	.ndo_open = greth_open,
+	.ndo_stop = greth_close,
+	.ndo_start_xmit = greth_start_xmit,
+	.ndo_set_mac_address = greth_set_mac_add,
+};
+
+static inline int wait_for_mdio(struct greth_private *greth)
+{
+	unsigned long timeout = jiffies + 4*HZ/100;
+	while (GRETH_REGLOAD(greth->regs->mdio) & GRETH_MII_BUSY) {
+		if (time_after(jiffies, timeout))
+			return 0;
+	}
+	return 1;
+}
+
+static int greth_mdio_read(struct mii_bus *bus, int phy, int reg)
+{
+	struct greth_private *greth = bus->priv;
+	int data;
+
+	if (!wait_for_mdio(greth))
+		return -EBUSY;
+
+	GRETH_REGSAVE(greth->regs->mdio, ((phy & 0x1F) << 11) | ((reg & 0x1F) << 6) | 2);
+
+	if (!wait_for_mdio(greth))
+		return -EBUSY;
+
+	if (!(GRETH_REGLOAD(greth->regs->mdio) & GRETH_MII_NVALID)) {
+		data = (GRETH_REGLOAD(greth->regs->mdio) >> 16) & 0xFFFF;
+		return data;
+
+	} else {
+		return -1;
+	}
+}
+
+static int greth_mdio_write(struct mii_bus *bus, int phy, int reg, u16 val)
+{
+	struct greth_private *greth = bus->priv;
+
+	if (!wait_for_mdio(greth))
+		return -EBUSY;
+
+	GRETH_REGSAVE(greth->regs->mdio,
+		      ((val & 0xFFFF) << 16) | ((phy & 0x1F) << 11) | ((reg & 0x1F) << 6) | 1);
+
+	if (!wait_for_mdio(greth))
+		return -EBUSY;
+
+	return 0;
+}
+
+static int greth_mdio_reset(struct mii_bus *bus)
+{
+	return 0;
+}
+
+static void greth_link_change(struct net_device *dev)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	struct phy_device *phydev = greth->phy;
+	unsigned long flags;
+
+	int status_change = 0;
+
+	spin_lock_irqsave(&greth->devlock, flags);
+
+	if (phydev->link) {
+
+		if ((greth->speed != phydev->speed) || (greth->duplex != phydev->duplex)) {
+
+			GRETH_REGANDIN(greth->regs->control,
+				       ~(GRETH_CTRL_FD | GRETH_CTRL_SP | GRETH_CTRL_GB));
+
+			if (phydev->duplex)
+				GRETH_REGORIN(greth->regs->control, GRETH_CTRL_FD);
+
+			if (phydev->speed == SPEED_100) {
+
+				GRETH_REGORIN(greth->regs->control, GRETH_CTRL_SP);
+			}
+
+			else if (phydev->speed == SPEED_1000)
+				GRETH_REGORIN(greth->regs->control, GRETH_CTRL_GB);
+
+			greth->speed = phydev->speed;
+			greth->duplex = phydev->duplex;
+			status_change = 1;
+		}
+	}
+
+	if (phydev->link != greth->link) {
+		if (!phydev->link) {
+			greth->speed = 0;
+			greth->duplex = -1;
+		}
+		greth->link = phydev->link;
+
+		status_change = 1;
+	}
+
+	spin_unlock_irqrestore(&greth->devlock, flags);
+
+	if (status_change) {
+		if (phydev->link)
+			pr_debug("%s: link up (%d/%s)\n",
+				dev->name, phydev->speed,
+				DUPLEX_FULL == phydev->duplex ? "Full" : "Half");
+		else
+			pr_debug("%s: link down\n", dev->name);
+	}
+}
+
+static int greth_mdio_probe(struct net_device *dev)
+{
+	struct greth_private *greth = netdev_priv(dev);
+	struct phy_device *phy = NULL;
+	u32 interface;
+	int i;
+
+	/* Find the first PHY */
+	for (i = 0; i < PHY_MAX_ADDR; i++) {
+		if (greth->mdio->phy_map[i]) {
+			phy = greth->mdio->phy_map[i];
+			break;
+		}
+	}
+	if (!phy) {
+		if (netif_msg_probe(greth))
+			dev_err(&dev->dev, "no PHY found\n");
+		return -ENXIO;
+	}
+
+	if (greth->gbit_mac)
+		interface = PHY_INTERFACE_MODE_GMII;
+	else
+		interface = PHY_INTERFACE_MODE_MII;
+
+	phy = phy_connect(dev, dev_name(&phy->dev), &greth_link_change, 0, interface);
+
+	if (greth->gbit_mac)
+		phy->supported &= PHY_GBIT_FEATURES;
+	else
+		phy->supported &= PHY_BASIC_FEATURES;
+
+	phy->advertising = phy->supported;
+
+	if (IS_ERR(phy)) {
+		if (netif_msg_ifup(greth))
+			dev_err(&dev->dev, "could not attach to PHY\n");
+		return PTR_ERR(phy);
+	}
+
+	greth->link = 0;
+	greth->speed = 0;
+	greth->duplex = -1;
+	greth->phy = phy;
+
+	return 0;
+}
+
+static inline int phy_aneg_done(struct phy_device *phydev)
+{
+	int retval;
+
+	retval = phy_read(phydev, MII_BMSR);
+
+	return (retval < 0) ? retval : (retval & BMSR_ANEGCOMPLETE);
+}
+
+static int greth_mdio_init(struct greth_private *greth)
+{
+	int ret, phy;
+	unsigned long timeout;
+
+	greth->mdio = mdiobus_alloc();
+	if (!greth->mdio) {
+		return -ENOMEM;
+	}
+
+	greth->mdio->name = "greth-mdio";
+	snprintf(greth->mdio->id, MII_BUS_ID_SIZE, "%s-%d", greth->mdio->name, greth->irq);
+	greth->mdio->read = greth_mdio_read;
+	greth->mdio->write = greth_mdio_write;
+	greth->mdio->reset = greth_mdio_reset;
+	greth->mdio->priv = greth;
+
+	greth->mdio->irq = greth->mdio_irqs;
+
+	for (phy = 0; phy < PHY_MAX_ADDR; phy++)
+		greth->mdio->irq[phy] = PHY_POLL;
+
+	ret = mdiobus_register(greth->mdio);
+	if (ret) {
+		goto error;
+	}
+
+	ret = greth_mdio_probe(greth->netdev);
+	if (ret) {
+		if (netif_msg_probe(greth))
+			dev_err(&greth->netdev->dev, "failed to probe MDIO bus\n");
+		goto unreg_mdio;
+	}
+
+	phy_start(greth->phy);
+
+	/* If Ethernet debug link is used make autoneg happen right away */
+	if (greth->edcl && greth_edcl == 1) {
+		phy_start_aneg(greth->phy);
+		timeout = jiffies + 6*HZ;
+		while (!phy_aneg_done(greth->phy) && time_before(jiffies, timeout)) {
+		}
+		genphy_read_status(greth->phy);
+		greth_link_change(greth->netdev);
+	}
+
+	return 0;
+
+unreg_mdio:
+	mdiobus_unregister(greth->mdio);
+error:
+	mdiobus_free(greth->mdio);
+	return ret;
+}
+
+/* Initialize the GRETH MAC */
+static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_device_id *match)
+{
+	struct net_device *dev;
+	struct greth_private *greth;
+	struct greth_regs *regs;
+
+	int i;
+	int err;
+	int tmp;
+	unsigned long timeout;
+
+	unsigned int *irqs;
+	int irq;
+	struct amba_prom_registers *prom_regs;
+	unsigned int addr;
+
+	irqs = (int *) of_get_property(ofdev->node, "interrupts", NULL);
+	prom_regs = (struct amba_prom_registers *) of_get_property(ofdev->node, "reg", NULL);
+	if (!irqs || !prom_regs)
+		return -ENODEV;
+
+	addr = prom_regs->phys_addr;
+	irq = *irqs;
+
+	dev = alloc_etherdev(sizeof(struct greth_private));
+
+	if (dev == NULL)
+		return -ENOMEM;
+
+	greth = netdev_priv(dev);
+	greth->netdev = dev;
+	greth->dev = &ofdev->dev;
+
+	if (greth_debug > 0)
+		greth->msg_enable = greth_debug;
+	else
+		greth->msg_enable = GRETH_DEF_MSG_ENABLE;
+
+	spin_lock_init(&greth->devlock);
+
+	if (!request_mem_region(addr, 0x100, "grlib-greth")) {
+		if (netif_msg_probe(greth))
+			dev_err(greth->dev, "couldn't lock memory region at %x\n", addr);
+		err = -EBUSY;
+		goto error1;
+	}
+
+	greth->regs = (struct greth_regs *) ioremap(addr, sizeof(struct greth_regs));
+
+	if (greth->regs == NULL) {
+		if (netif_msg_probe(greth))
+			dev_err(greth->dev, "ioremap failure.\n");
+		err = -EIO;
+		goto error2;
+	}
+
+	regs = (struct greth_regs *) greth->regs;
+	greth->irq = irq;
+
+	dev_set_drvdata(greth->dev, dev);
+	SET_NETDEV_DEV(dev, greth->dev);
+
+	if (netif_msg_probe(greth))
+		dev_dbg(greth->dev, "reseting controller.\n");
+
+	/* Reset the controller. */
+	GRETH_REGSAVE(regs->control, GRETH_RESET);
+
+	/* Wait for MAC to reset itself */
+	timeout = jiffies + HZ/100;
+	while (GRETH_REGLOAD(regs->control) & GRETH_RESET) {
+		if (time_after(jiffies, timeout)) {
+			err = -EIO;
+			if (netif_msg_probe(greth))
+				dev_err(greth->dev, "timeout when waiting for reset.\n");
+			goto error3;
+		}
+	}
+
+	/* Get default PHY address  */
+	greth->phyaddr = (GRETH_REGLOAD(regs->mdio) >> 11) & 0x1F;
+
+	/* Check if we have GBIT capable MAC */
+	tmp = GRETH_REGLOAD(regs->control);
+	greth->gbit_mac = (tmp >> 27) & 1;
+
+	/* Check for multicast capability */
+	greth->multicast = (tmp >> 25) & 1;
+
+	greth->edcl = (tmp >> 31) & 1;
+
+	/* If we have EDCL we disable the EDCL speed-duplex FSM so
+	 * it doesn't interfere with the software */
+	if (greth->edcl != 0)
+		GRETH_REGORIN(regs->control, GRETH_CTRL_DISDUPLEX);
+
+	/* Check if MAC can handle MDIO interrupts */
+	greth->mdio_int_en = (tmp >> 26) & 1;
+
+	err = greth_mdio_init(greth);
+	if (err) {
+		if (netif_msg_probe(greth))
+			dev_err(greth->dev, "failed to register MDIO bus\n");
+		goto error3;
+	}
+
+	/* Allocate TX descriptor ring in coherent memory */
+	greth->tx_bd_base = (struct greth_bd *) dma_alloc_coherent(greth->dev,
+								   1024,
+								   &greth->tx_bd_base_phys,
+								   GFP_KERNEL);
+
+	if (!greth->tx_bd_base) {
+		if (netif_msg_probe(greth))
+			dev_err(&dev->dev, "could not allocate descriptor memory.\n");
+		err = -ENOMEM;
+		goto error4;
+	}
+
+	memset(greth->tx_bd_base, 0, 1024);
+
+	/* Allocate RX descriptor ring in coherent memory */
+	greth->rx_bd_base = (struct greth_bd *) dma_alloc_coherent(greth->dev,
+								   1024,
+								   &greth->rx_bd_base_phys,
+								   GFP_KERNEL);
+
+	if (!greth->rx_bd_base) {
+		if (netif_msg_probe(greth))
+			dev_err(greth->dev, "could not allocate descriptor memory.\n");
+		err = -ENOMEM;
+		goto error5;
+	}
+
+	memset(greth->rx_bd_base, 0, 1024);
+
+	/* Get MAC address from: module param, OF property or ID prom */
+	for (i = 0; i < 6; i++) {
+		if (macaddr[i] != 0)
+			break;
+	}
+	if (i == 6) {
+		const unsigned char *addr;
+		int len;
+		addr = of_get_property(ofdev->node, "local-mac-address", &len);
+		if (addr != NULL && len == 6) {
+			for (i = 0; i < 6; i++)
+				macaddr[i] = (unsigned int) addr[i];
+		} else {
+#ifdef CONFIG_SPARC
+			for (i = 0; i < 6; i++)
+				macaddr[i] = (unsigned int) idprom->id_ethaddr[i];
+#endif
+		}
+	}
+
+	for (i = 0; i < 6; i++)
+		dev->dev_addr[i] = macaddr[i];
+
+	macaddr[5]++;
+
+	if (!is_valid_ether_addr(&dev->dev_addr[0])) {
+		if (netif_msg_probe(greth))
+			dev_err(greth->dev, "no valid ethernet address, aborting.\n");
+		err = -EINVAL;
+		goto error6;
+	}
+
+	GRETH_REGSAVE(regs->esa_msb, dev->dev_addr[0] << 8 | dev->dev_addr[1]);
+	GRETH_REGSAVE(regs->esa_lsb, dev->dev_addr[2] << 24 | dev->dev_addr[3] << 16 |
+		      dev->dev_addr[4] << 8 | dev->dev_addr[5]);
+
+	/* Clear all pending interrupts except PHY irq */
+	GRETH_REGSAVE(regs->status, 0xFF);
+
+	dev->base_addr = (unsigned long) addr;
+
+	if (greth->gbit_mac) {
+		dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_HIGHDMA;
+		greth_netdev_ops.ndo_start_xmit = greth_start_xmit_gbit;
+		greth->flags = GRETH_FLAG_RX_CSUM;
+	}
+
+	if (greth->multicast) {
+		greth_netdev_ops.ndo_set_multicast_list = greth_set_multicast_list;
+		dev->flags |= IFF_MULTICAST;
+	} else {
+		dev->flags &= ~IFF_MULTICAST;
+	}
+
+	dev->netdev_ops = &greth_netdev_ops;
+	dev->ethtool_ops = &greth_ethtool_ops;
+
+	if (register_netdev(dev)) {
+		if (netif_msg_probe(greth))
+			dev_err(greth->dev, "netdevice registration failed.\n");
+		err = -ENOMEM;
+		goto error6;
+	}
+
+	/* setup NAPI */
+	memset(&greth->napi, 0, sizeof(greth->napi));
+	netif_napi_add(dev, &greth->napi, greth_poll, 64);
+
+	return 0;
+
+error6:
+	dma_free_coherent(greth->dev, 1024, greth->rx_bd_base, greth->rx_bd_base_phys);
+error5:
+	dma_free_coherent(greth->dev, 1024, greth->tx_bd_base, greth->tx_bd_base_phys);
+error4:
+	mdiobus_unregister(greth->mdio);
+error3:
+	iounmap(greth->regs);
+error2:
+	release_mem_region(addr, 0x100);
+error1:
+	free_netdev(dev);
+	return err;
+}
+
+static int __devexit greth_of_remove(struct of_device *of_dev)
+{
+	struct net_device *ndev = dev_get_drvdata(&of_dev->dev);
+	struct greth_private *greth = netdev_priv(ndev);
+
+	/* Free descriptor areas */
+	dma_free_coherent(&of_dev->dev, 1024, greth->rx_bd_base, greth->rx_bd_base_phys);
+
+	dma_free_coherent(&of_dev->dev, 1024, greth->tx_bd_base, greth->tx_bd_base_phys);
+
+	release_mem_region(ndev->base_addr, 0x100);
+	dev_set_drvdata(&of_dev->dev, NULL);
+
+	if (greth->phy)
+		phy_stop(greth->phy);
+	mdiobus_unregister(greth->mdio);
+
+	unregister_netdev(ndev);
+	free_netdev(ndev);
+
+	iounmap(greth->regs);
+
+	return 0;
+}
+
+static struct of_device_id greth_of_match[] = {
+	{
+	 .name = "GAISLER_ETHMAC",
+	 },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, greth_of_match);
+
+static struct of_platform_driver greth_of_driver = {
+	.name = "grlib-greth",
+	.match_table = greth_of_match,
+	.probe = greth_of_probe,
+	.remove = __devexit_p(greth_of_remove),
+	.driver = {
+		   .owner = THIS_MODULE,
+		   .name = "grlib-greth",
+		   },
+};
+
+static int __init greth_init(void)
+{
+	return of_register_platform_driver(&greth_of_driver);
+}
+
+static void __exit greth_cleanup(void)
+{
+	of_unregister_platform_driver(&greth_of_driver);
+}
+
+module_init(greth_init);
+module_exit(greth_cleanup);
+
+MODULE_AUTHOR("Aeroflex Gaisler AB.");
+MODULE_DESCRIPTION("Aeroflex Gaisler Ethernet MAC driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/greth.h b/drivers/net/greth.h
new file mode 100644
index 0000000..a73d733
--- /dev/null
+++ b/drivers/net/greth.h
@@ -0,0 +1,149 @@
+#ifndef GRETH_H
+#define GRETH_H
+
+#include <linux/phy.h>
+
+/* Register bits and masks */
+#define GRETH_RESET 0x40
+#define GRETH_MII_BUSY 0x8
+#define GRETH_MII_NVALID 0x10
+
+#define GRETH_CTRL_FD         0x10
+#define GRETH_CTRL_PR         0x20
+#define GRETH_CTRL_SP         0x80
+#define GRETH_CTRL_GB         0x100
+#define GRETH_CTRL_PSTATIEN   0x400
+#define GRETH_CTRL_MCEN       0x800
+#define GRETH_CTRL_DISDUPLEX  0x1000
+#define GRETH_STATUS_PHYSTAT  0x100
+
+#define GRETH_BD_EN 0x800
+#define GRETH_BD_WR 0x1000
+#define GRETH_BD_IE 0x2000
+#define GRETH_BD_LEN 0x7FF
+
+#define GRETH_TXEN 0x1
+#define GRETH_INT_TX 0x8
+#define GRETH_TXI 0x4
+#define GRETH_TXBD_STATUS 0x0001C000
+#define GRETH_TXBD_MORE 0x20000
+#define GRETH_TXBD_IPCS 0x40000
+#define GRETH_TXBD_TCPCS 0x80000
+#define GRETH_TXBD_UDPCS 0x100000
+#define GRETH_TXBD_CSALL (GRETH_TXBD_IPCS | GRETH_TXBD_TCPCS | GRETH_TXBD_UDPCS)
+#define GRETH_TXBD_ERR_LC 0x10000
+#define GRETH_TXBD_ERR_UE 0x4000
+#define GRETH_TXBD_ERR_AL 0x8000
+
+#define GRETH_INT_RX         0x4
+#define GRETH_RXEN           0x2
+#define GRETH_RXI            0x8
+#define GRETH_RXBD_STATUS    0xFFFFC000
+#define GRETH_RXBD_ERR_AE    0x4000
+#define GRETH_RXBD_ERR_FT    0x8000
+#define GRETH_RXBD_ERR_CRC   0x10000
+#define GRETH_RXBD_ERR_OE    0x20000
+#define GRETH_RXBD_ERR_LE    0x40000
+#define GRETH_RXBD_IP        0x80000
+#define GRETH_RXBD_IP_CSERR  0x100000
+#define GRETH_RXBD_UDP       0x200000
+#define GRETH_RXBD_UDP_CSERR 0x400000
+#define GRETH_RXBD_TCP       0x800000
+#define GRETH_RXBD_TCP_CSERR 0x1000000
+#define GRETH_RXBD_IP_FRAG   0x2000000
+#define GRETH_RXBD_MCAST     0x4000000
+
+/* Descriptor parameters */
+#define GRETH_TXBD_NUM 128
+#define GRETH_TXBD_NUM_MASK (GRETH_TXBD_NUM-1)
+#define GRETH_TX_BUF_SIZE 2048
+#define GRETH_RXBD_NUM 128
+#define GRETH_RXBD_NUM_MASK (GRETH_RXBD_NUM-1)
+#define GRETH_RX_BUF_SIZE 2048
+
+/* Buffers per page */
+#define GRETH_RX_BUF_PPGAE	(PAGE_SIZE/GRETH_RX_BUF_SIZE)
+#define GRETH_TX_BUF_PPGAE	(PAGE_SIZE/GRETH_TX_BUF_SIZE)
+
+/* How many pages are needed for buffers */
+#define GRETH_RX_BUF_PAGE_NUM	(GRETH_RXBD_NUM/GRETH_RX_BUF_PPGAE)
+#define GRETH_TX_BUF_PAGE_NUM	(GRETH_TXBD_NUM/GRETH_TX_BUF_PPGAE)
+
+/* Buffer size.
+ * Gbit MAC uses tagged maximum frame size which is 1518 excluding CRC.
+ * Set to 1520 to make all buffers word aligned for non-gbit MAC.
+ */
+#define MAX_FRAME_SIZE		1520
+
+/* Flags */
+#define GRETH_FLAG_RX_CSUM 0x1
+
+/* GRETH APB registers */
+struct greth_regs {
+	u32 control;
+	u32 status;
+	u32 esa_msb;
+	u32 esa_lsb;
+	u32 mdio;
+	u32 tx_desc_p;
+	u32 rx_desc_p;
+	u32 edclip;
+	u32 hash_msb;
+	u32 hash_lsb;
+};
+
+/* GRETH buffer descriptor */
+struct greth_bd {
+	u32 stat;
+	u32 addr;
+};
+
+struct greth_private {
+	struct sk_buff *rx_skbuff[GRETH_RXBD_NUM];
+	struct sk_buff *tx_skbuff[GRETH_TXBD_NUM];
+
+	unsigned char *tx_bufs[GRETH_TXBD_NUM];
+	unsigned char *rx_bufs[GRETH_RXBD_NUM];
+
+	u16 tx_next;
+	u16 tx_last;
+	u16 tx_free;
+	u16 rx_cur;
+
+	struct greth_regs *regs;	/* Address of controller registers. */
+	struct greth_bd *rx_bd_base;	/* Address of Rx BDs. */
+	struct greth_bd *tx_bd_base;	/* Address of Tx BDs. */
+	dma_addr_t rx_bd_base_phys;
+	dma_addr_t tx_bd_base_phys;
+
+	int irq;
+
+	struct device *dev;	        /* Pointer to of_device->dev */
+	struct net_device *netdev;
+	struct napi_struct napi;
+	spinlock_t devlock;
+
+	struct phy_device *phy;
+	struct mii_bus *mdio;
+	int mdio_irqs[PHY_MAX_ADDR];
+	unsigned int link;
+	unsigned int speed;
+	unsigned int duplex;
+
+	u32 msg_enable;
+	u32 flags;
+
+	u8 phyaddr;
+	u8 multicast;
+	u8 gbit_mac;
+	u8 mdio_int_en;
+	u8 edcl;
+};
+
+
+struct amba_prom_registers {
+	unsigned int phys_addr;
+	unsigned int reg_size;
+};
+
+#endif
-- 
1.6.4.1


^ permalink raw reply related

* [PATCH 0/1 V5] net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver
From: Kristoffer Glembo @ 2010-01-28  7:43 UTC (permalink / raw)
  To: netdev; +Cc: davem, shemminger, Kristoffer Glembo

Adds device driver for Aeroflex Gaisler 10/100 and 10/100/1G Ethernet MAC IP cores.

Issues pointed out by Stephen Hemminger fixed:
Added ethtool support, fixed erronous freeing of SKB, removed private stats structure, cleaned up ugly macro.

Kristoffer Glembo (1):
  net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver

 MAINTAINERS          |    6 +
 drivers/net/Kconfig  |    9 +
 drivers/net/Makefile |    1 +
 drivers/net/greth.c  | 1668 ++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/greth.h  |  149 +++++
 5 files changed, 1833 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/greth.c
 create mode 100644 drivers/net/greth.h


^ permalink raw reply

* Re: [PATCH] net/irda: sh_sir: Add SuperH IrDA driver
From: Kuninori Morimoto @ 2010-01-28  7:33 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Samuel Ortiz, David S. Miller
In-Reply-To: <20100127220835.287e972d@nehalam>


Dear Stephen

Thank you for checking my code.

> > +struct sh_sir_self {
> > +	void __iomem		*membase;
> > +	unsigned int		 irq;
> > +	struct clk		*clk;
> > +
> > +	struct net_device	*ndev;
> > +
> > +	struct net_device_stats	stats;
> 
> The network device has stats in netdev->stats now
> so devices don't have to keep their own data structure.

Ohh. Thank you I understand.
I will fix it in v2

> Does the device support Fast IR mode?

Sorry. this chip is not advanced one.
it is SIR only

Best regards
--
Kuninori Morimoto
 

^ permalink raw reply

* Re: PROBLEM: reproducible crash KVM+nf_conntrack all recent 2.6 kernels
From: Jon Masters @ 2010-01-28  7:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, netfilter-devel
In-Reply-To: <1264657559.2793.103.camel@tonnant>

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

On Thu, 2010-01-28 at 00:46 -0500, Jon Masters wrote:

> A number of people seem to have reported this crash in various forms,
> but I have yet to see a solution, and can reproduce on 2.6.33-rc5 this
> evening so I know it's still present in the latest upstream kernels too.
> Userspace is Fedora 12, and this happens on both all recent F12 kernels
> (sporadic in 2.6.31 until recently, solidly reproducible on 2.6.32) and
> upstream 2.6.32, and 2.6.33-rc5 also - hard to find a "known good".
> 
> The problem happens when using netfilter with KVM (problem does not
> occur without the firewall loaded, for example) and will occur within a
> few minutes of attempting to start or stop a guest that is connecting to
> the network - the easiest way to reproduce so far is simply to start up
> a bunch of Fedora guests and have them do a "yum update" cycle.
> 
> All of the crashes appear similar to the following (2.6.33-rc5):

Rebuilt the kernel with all debug options turned on, got some lockdep
warnings (haven't looked further yet). Here's the output (attached full
boot log also):

[  205.843071] 
[  205.843073] =======================================================
[  205.843769] [ INFO: possible circular locking dependency detected ]
[  205.843769] 2.6.33-rc5 #3
[  205.843769] -------------------------------------------------------
[  205.843769] libvirtd/3058 is trying to acquire lock:
[  205.843769]  (s_active){++++.+}, at: [<ffffffff81171a56>]
sysfs_addrm_finish+0x36/0x55
[  205.843769] 
[  205.843769] but task is already holding lock:
[  205.843769]  (rtnl_mutex){+.+.+.}, at: [<ffffffff813cedd9>] rtnl_lock
+0x17/0x19
[  205.843769] 
[  205.843769] which lock already depends on the new lock.
[  205.843769] 
[  205.843769] 
[  205.843769] the existing dependency chain (in reverse order) is:
[  205.843769] 
[  205.843769] -> #4 (rtnl_mutex){+.+.+.}:
[  205.843769]        [<ffffffff8107ea94>] __lock_acquire+0xb84/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff8145504b>] __mutex_lock_common
+0x4b/0x392
[  205.843769]        [<ffffffff81455456>] mutex_lock_nested+0x3e/0x43
[  205.843769]        [<ffffffff813cedd9>] rtnl_lock+0x17/0x19
[  205.843769]        [<ffffffff813d05c0>] linkwatch_event+0xe/0x2c
[  205.843769]        [<ffffffff8106713f>] worker_thread+0x266/0x35f
[  205.843769]        [<ffffffff8106b1d0>] kthread+0x9a/0xa2
[  205.843769]        [<ffffffff8100aaa4>] kernel_thread_helper+0x4/0x10
[  205.843769] 
[  205.843769] -> #3 ((linkwatch_work).work){+.+.+.}:
[  205.843769]        [<ffffffff8107ea94>] __lock_acquire+0xb84/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff81067136>] worker_thread+0x25d/0x35f
[  205.843769]        [<ffffffff8106b1d0>] kthread+0x9a/0xa2
[  205.843769]        [<ffffffff8100aaa4>] kernel_thread_helper+0x4/0x10
[  205.843769] 
[  205.843769] -> #2 (events){+.+.+.}:
[  205.843769]        [<ffffffff8107ea94>] __lock_acquire+0xb84/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff81067a8b>] flush_workqueue+0x63/0xb1
[  205.843769]        [<ffffffff81067aee>] flush_scheduled_work
+0x15/0x17
[  205.843769]        [<ffffffff8138168b>] do_md_stop+0x2c0/0x508
[  205.843769]        [<ffffffff81383b94>] md_ioctl+0x92f/0xf49
[  205.843769]        [<ffffffff8121442d>] __blkdev_driver_ioctl
+0x39/0xa3
[  205.843769]        [<ffffffff81214dc8>] blkdev_ioctl+0x67d/0x6b1
[  205.843769]        [<ffffffff8113ef34>] block_ioctl+0x37/0x3b
[  205.843769]        [<ffffffff81126294>] vfs_ioctl+0x32/0xa6
[  205.843769]        [<ffffffff81126814>] do_vfs_ioctl+0x490/0x4d6
[  205.843769]        [<ffffffff811268b0>] sys_ioctl+0x56/0x79
[  205.843769]        [<ffffffff81009c32>] system_call_fastpath
+0x16/0x1b
[  205.843769] 
[  205.843769] -> #1 (&new->reconfig_mutex){+.+.+.}:
[  205.843769]        [<ffffffff8107ea94>] __lock_acquire+0xb84/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff8145504b>] __mutex_lock_common
+0x4b/0x392
[  205.843769]        [<ffffffff814553d0>]
mutex_lock_interruptible_nested+0x3e/0x43
[  205.843769]        [<ffffffff8137bd62>] mddev_lock+0x17/0x19
[  205.843769]        [<ffffffff8137c039>] md_attr_show+0x32/0x5d
[  205.843769]        [<ffffffff811708dc>] sysfs_read_file+0xbd/0x17f
[  205.843769]        [<ffffffff8111983d>] vfs_read+0xab/0x108
[  205.843769]        [<ffffffff8111995a>] sys_read+0x4a/0x6e
[  205.843769]        [<ffffffff81009c32>] system_call_fastpath
+0x16/0x1b
[  205.843769] 
[  205.843769] -> #0 (s_active){++++.+}:
[  205.843769]        [<ffffffff8107e93e>] __lock_acquire+0xa2e/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff81171463>] sysfs_deactivate+0x9a/0x103
[  205.843769]        [<ffffffff81171a56>] sysfs_addrm_finish+0x36/0x55
[  205.843769]        [<ffffffff81171aab>] remove_dir+0x36/0x3e
[  205.843769]        [<ffffffff81171b60>] sysfs_remove_dir+0x9d/0xbe
[  205.843769]        [<ffffffff812206c1>] kobject_del+0x16/0x37
[  205.843769]        [<ffffffff8122078a>] kobject_release+0xa8/0xf8
[  205.843769]        [<ffffffff8122165d>] kref_put+0x43/0x4d
[  205.843769]        [<ffffffff8122063c>] kobject_put+0x47/0x4b
[  205.843769]        [<ffffffffa02d5ef5>] br_sysfs_delbr+0x21/0x43
[bridge]
[  205.843769]        [<ffffffffa02d20e9>] del_br+0x5a/0x6f [bridge]
[  205.843769]        [<ffffffffa02d24b2>] br_del_bridge+0x59/0x67
[bridge]
[  205.843769]        [<ffffffffa02d3764>] br_ioctl_deviceless_stub
+0x1fb/0x21b [bridge]
[  205.843769]        [<ffffffff813b32c4>] sock_ioctl+0x141/0x20d
[  205.843769]        [<ffffffff81126294>] vfs_ioctl+0x32/0xa6
[  205.843769]        [<ffffffff81126814>] do_vfs_ioctl+0x490/0x4d6
[  205.843769]        [<ffffffff811268b0>] sys_ioctl+0x56/0x79
[  205.843769]        [<ffffffff81009c32>] system_call_fastpath
+0x16/0x1b
[  205.843769] 
[  205.843769] other info that might help us debug this:
[  205.843769] 
[  205.843769] 2 locks held by libvirtd/3058:
[  205.843769]  #0:  (br_ioctl_mutex){+.+.+.}, at: [<ffffffff813b32a9>]
sock_ioctl+0x126/0x20d
[  205.843769]  #1:  (rtnl_mutex){+.+.+.}, at: [<ffffffff813cedd9>]
rtnl_lock+0x17/0x19
[  205.843769] 
[  205.843769] stack backtrace:
[  205.843769] Pid: 3058, comm: libvirtd Not tainted 2.6.33-rc5 #3
[  205.843769] Call Trace:
[  205.843769]  [<ffffffff8107dae0>] print_circular_bug+0xa8/0xb6
[  205.843769]  [<ffffffff8107e93e>] __lock_acquire+0xa2e/0xd3c
[  205.843769]  [<ffffffff81171a56>] ? sysfs_addrm_finish+0x36/0x55
[  205.843769]  [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]  [<ffffffff81171a56>] ? sysfs_addrm_finish+0x36/0x55
[  205.843769]  [<ffffffff81171463>] sysfs_deactivate+0x9a/0x103
[  205.843769]  [<ffffffff81171a56>] ? sysfs_addrm_finish+0x36/0x55
[  205.843769]  [<ffffffff8107c028>] ? trace_hardirqs_off+0xd/0xf
[  206.367937]  [<ffffffff81454e6a>] ? __mutex_unlock_slowpath
+0x120/0x132
[  206.367937]  [<ffffffff81171a56>] sysfs_addrm_finish+0x36/0x55
[  206.367937]  [<ffffffff81171aab>] remove_dir+0x36/0x3e
[  206.367937]  [<ffffffff81171b60>] sysfs_remove_dir+0x9d/0xbe
[  206.367937]  [<ffffffff812206c1>] kobject_del+0x16/0x37
[  206.367937]  [<ffffffff8122078a>] kobject_release+0xa8/0xf8
[  206.367937]  [<ffffffff812206e2>] ? kobject_release+0x0/0xf8
[  206.367937]  [<ffffffff8122165d>] kref_put+0x43/0x4d
[  206.367937]  [<ffffffff8122063c>] kobject_put+0x47/0x4b
[  206.367937]  [<ffffffff8105d218>] ? del_timer_sync+0x0/0xa6
[  206.367937]  [<ffffffffa02d5ef5>] br_sysfs_delbr+0x21/0x43 [bridge]
[  206.367937]  [<ffffffffa02d20e9>] del_br+0x5a/0x6f [bridge]
[  206.367937]  [<ffffffffa02d24b2>] br_del_bridge+0x59/0x67 [bridge]
[  206.367937]  [<ffffffffa02d3764>] br_ioctl_deviceless_stub
+0x1fb/0x21b [bridge]
[  206.367937]  [<ffffffff813b32c4>] sock_ioctl+0x141/0x20d
[  206.367937]  [<ffffffff81126294>] vfs_ioctl+0x32/0xa6
[  206.367937]  [<ffffffff81126814>] do_vfs_ioctl+0x490/0x4d6
[  206.367937]  [<ffffffff811268b0>] sys_ioctl+0x56/0x79
[  206.367937]  [<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
[  206.482734] kobject: 'brif' (ffff880213a243b8): calling ktype release
[  206.492872] kobject: (ffff880213a243b8): dynamic_kobj_release
[  206.498841] kobject: 'brif': free name
[  206.527833] kobject: 'virbr0' (ffff8801cf3b0500): kobject_uevent_env
[  206.534360] kobject: 'virbr0' (ffff8801cf3b0500): fill_kobj_path:
path = '/devices/virtual/net/virbr0'
[  206.551468] kobject: 'virbr0' (ffff8801cf3b0500): kobject_cleanup
[  206.557611] kobject: 'virbr0' (ffff8801cf3b0500): calling ktype
release
[  206.564358] kobject: 'virbr0': free name
[  208.575408] kobject: 'tun' (ffffffffa044b510): kobject_add_internal:
parent: 'module', set: 'module'
[  208.595562] kobject: 'holders' (ffff8801d352cf68):
kobject_add_internal: parent: 'tun', set: '<NULL>'
[  208.604990] kobject: 'tun' (ffffffffa044b510): kobject_uevent_env
[  208.611296] kobject: 'tun' (ffffffffa044b510): fill_kobj_path: path =
'/module/tun'
[  208.620119] kobject: 'notes' (ffff8801d352c660):
kobject_add_internal: parent: 'tun', set: '<NULL>'
[  208.630343] tun: Universal TUN/TAP device driver, 1.6
[  208.635421] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[  208.641721] kobject: 'tun' (ffff8801cd319e08): kobject_add_internal:
parent: 'misc', set: 'devices'
[  208.651194] kobject: 'tun' (ffff8801cd319e08): kobject_uevent_env
[  208.657386] kobject: 'tun' (ffff8801cd319e08): fill_kobj_path: path =
'/devices/virtual/misc/tun'
[  208.671916] kobject: 'vnet0' (ffff880207df35e0):
kobject_add_internal: parent: 'net', set: 'devices'
[  208.682667] kobject: 'vnet0' (ffff880207df35e0): kobject_uevent_env
[  208.689435] kobject: 'vnet0' (ffff880207df35e0): fill_kobj_path: path
= '/devices/virtual/net/vnet0'
[  208.712572] device vnet0 entered promiscuous mode
[  208.717571] kobject: 'brport' (ffff8801cd378e88):
kobject_add_internal: parent: 'vnet0', set: '<NULL>'
[  208.728149] kobject: 'brport' (ffff8801cd378e88): kobject_uevent_env
[  208.734561] kobject: 'brport' (ffff8801cd378e88): kobject_uevent_env:
filter function caused the event to drop!
[  208.748356] br0: port 2(vnet0) entering forwarding state
[  209.576245] kobject: 'vnet1' (ffff8801cc9a0500):
kobject_add_internal: parent: 'net', set: 'devices'
[  209.587167] kobject: 'vnet1' (ffff8801cc9a0500): kobject_uevent_env
[  209.593773] kobject: 'vnet1' (ffff8801cc9a0500): fill_kobj_path: path
= '/devices/virtual/net/vnet1'
[  209.614211] device vnet1 entered promiscuous mode
[  209.619898] kobject: 'brport' (ffff8801cee35308):
kobject_add_internal: parent: 'vnet1', set: '<NULL>'
[  209.631310] kobject: 'brport' (ffff8801cee35308): kobject_uevent_env
[  209.638303] kobject: 'brport' (ffff8801cee35308): kobject_uevent_env:
filter function caused the event to drop!
[  209.654971] br0: port 3(vnet1) entering forwarding state
[  210.268995] SELinux: initialized (dev mqueue, type mqueue), uses
transition SIDs
[  210.277526] kobject: 'pid_2' (ffff88020e222128):
kobject_add_internal: parent: 'slab', set: 'slab'
[  210.288037] kobject: 'pid_2' (ffff88020e222128): kobject_uevent_env
[  210.294431] kobject: 'pid_2' (ffff88020e222128): fill_kobj_path: path
= '/kernel/slab/pid_2'
[  210.304019] SELinux: initialized (dev proc, type proc), uses
genfs_contexts
[  210.397532] SELinux: initialized (dev mqueue, type mqueue), uses
transition SIDs
[  210.434435] lo: Disabled Privacy Extensions
[  210.443268] SELinux: initialized (dev proc, type proc), uses
genfs_contexts
[  210.787652] kobject: 'lo' (ffff880207b725a0): kobject_cleanup
[  210.793444] kobject: 'lo' (ffff880207b725a0): calling ktype release
[  210.799783] kobject: 'lo': free name
[  218.966215] vnet0: no IPv6 routers present
[  220.336219] vnet1: no IPv6 routers present
[  238.799662] kobject: 'vnet2' (ffff8801ccba8500):
kobject_add_internal: parent: 'net', set: 'devices'
[  238.811833] kobject: 'vnet2' (ffff8801ccba8500): kobject_uevent_env
[  238.818841] kobject: 'vnet2' (ffff8801ccba8500): fill_kobj_path: path
= '/devices/virtual/net/vnet2'
[  238.841088] device vnet2 entered promiscuous mode
[  238.846209] kobject: 'brport' (ffff8801cf2d92d0):
kobject_add_internal: parent: 'vnet2', set: '<NULL>'
[  238.856592] kobject: 'brport' (ffff8801cf2d92d0): kobject_uevent_env
[  238.863088] kobject: 'brport' (ffff8801cf2d92d0): kobject_uevent_env:
filter function caused the event to drop!
[  238.878798] br0: port 4(vnet2) entering forwarding state
[  249.395339] vnet2: no IPv6 routers present
[  339.729225] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
[  339.730086] last sysfs
file: /sys/devices/virtual/block/md0/md/sync_speed
[  339.730086] CPU 7 
[  339.730086] Pid: 3245, comm: qemu-kvm Not tainted 2.6.33-rc5 #3
0F9382/Precision WorkStation 490    
[  339.730086] RIP: 0010:[<ffffffff813e5f3e>]  [<ffffffff813e5f3e>]
nf_ct_remove_expectations+0x49/0x5c
[  339.730086] RSP: 0018:ffff880030603c18  EFLAGS: 00010206
[  339.730086] RAX: ffff8801c2ea530b RBX: 009ab2000008d300 RCX:
ffffffffa02925c1
[  339.730086] RDX: 000000000000006b RSI: ffff880030603be8 RDI:
009ab2000008d378
[  339.730086] RBP: ffff880030603c28 R08: 0000000000000002 R09:
0000000000000000
[  339.730086] R10: 0000000000000003 R11: ffff88019d28a268 R12:
ffffffff829a0400
[  339.730086] R13: ffffffffa02925c1 R14: 0000000000000000 R15:
ffff8801a18e4630
[  339.730086] FS:  00007fb6197ca780(0000) GS:ffff880030600000(0000)
knlGS:0000000000000000
[  339.730086] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  339.730086] CR2: 00007f747a184178 CR3: 00000001badd8000 CR4:
00000000000026e0
[  339.730086] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[  339.730086] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
0000000000000400
[  339.730086] Process qemu-kvm (pid: 3245, threadinfo ffff8801b9370000,
task ffff8801d53c48a0)
[  339.730086] Stack:
[  339.730086]  ffffffff81b045d0 ffffffff829a0400 ffff880030603c48
ffffffff813e3426
[  339.730086] <0> ffff8801a18e4600 ffff88019d28a250 ffff880030603c68
ffffffff813e10f8
[  339.730086] <0> ffff880030603c68 ffffffff81b045d0 ffff880030603c88
ffffffff813bc080
[  339.730086] Call Trace:
[  339.730086]  <IRQ> 
[  339.730086]  [<ffffffff813e3426>] destroy_conntrack+0x73/0x121
[  339.730086]  [<ffffffff813e10f8>] nf_conntrack_destroy+0x2c/0x33
[  339.730086]  [<ffffffff813bc080>] skb_release_head_state+0x77/0xb9
[  339.730086]  [<ffffffff813bbde2>] __kfree_skb+0x16/0x82
[  339.730086]  [<ffffffff813bbee7>] kfree_skb+0x6a/0x73
[  339.730086]  [<ffffffffa02925c1>] ip6_mc_input+0x214/0x221 [ipv6]
[  339.730086]  [<ffffffffa02925f5>] ip6_rcv_finish+0x27/0x2b [ipv6]
[  339.730086]  [<ffffffffa0292938>] ipv6_rcv+0x33f/0x37f [ipv6]
[  339.730086]  [<ffffffff813c416a>] netif_receive_skb+0x3b0/0x3da
[  339.730086]  [<ffffffffa02d2b6e>] br_handle_frame_finish+0x104/0x13c
[bridge]
[  339.730086]  [<ffffffffa02d2d37>] br_handle_frame+0x191/0x1aa
[bridge]
[  339.730086]  [<ffffffff813c40d6>] netif_receive_skb+0x31c/0x3da
[  339.730086]  [<ffffffff8106e6ee>] ? __run_hrtimer+0xec/0x11b
[  339.730086]  [<ffffffff813c4230>] process_backlog+0x9c/0xd8
[  339.730086]  [<ffffffff813c489b>] net_rx_action+0x7d/0x19c
[  339.730086]  [<ffffffff81055d08>] __do_softirq+0xf8/0x1cd
[  339.730086]  [<ffffffff8100ab9c>] call_softirq+0x1c/0x30
[  339.730086]  <EOI> 
[  339.730086]  [<ffffffff8100c38f>] ? do_softirq+0x4b/0xa3
[  339.730086]  [<ffffffff813c49e0>] netif_rx_ni+0x26/0x2b
[  339.730086]  [<ffffffffa0449d6d>] tun_chr_aio_write+0x3ce/0x429 [tun]
[  339.730086]  [<ffffffffa044999f>] ? tun_chr_aio_write+0x0/0x429 [tun]
[  339.730086]  [<ffffffff81118fd2>] do_sync_readv_writev+0xc1/0x100
[  339.730086]  [<ffffffff811e9ee1>] ? selinux_file_permission+0xa7/0xb3
[  339.730086]  [<ffffffff81118d36>] ? copy_from_user+0x2f/0x31
[  339.730086]  [<ffffffff811e02f5>] ? security_file_permission
+0x16/0x18
[  339.730086]  [<ffffffff81119d1f>] do_readv_writev+0xa7/0x127
[  339.730086]  [<ffffffff8111a1d7>] ? rcu_read_unlock+0x21/0x23
[  339.730086]  [<ffffffff8111a2bd>] ? fget_light+0xe4/0xf2
[  339.730086]  [<ffffffff8111a230>] ? fget_light+0x57/0xf2
[  339.730086]  [<ffffffff81119de2>] vfs_writev+0x43/0x4e
[  339.730086]  [<ffffffff81119ed2>] sys_writev+0x4a/0x93
[  339.730086]  [<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
[  339.730086] Code: 38 0f b6 d2 48 01 d0 74 30 48 8b 58 28 eb 13 48 89
df e8 fc f8 ff ff 48 89 df e8 c8 f8 ff ff 4c 89 e3 48 85 db 74 12 48 8d
7b 78 <4c> 8b 23 e8 e2 73 c7 ff 85 c0 74 e8 eb d6 5b 41 5c c9 c3 55 48 
[  339.730086] RIP  [<ffffffff813e5f3e>] nf_ct_remove_expectations
+0x49/0x5c
[  339.730086]  RSP <ffff880030603c18>
[  340.095082] ---[ end trace 7be6d51534d25d87 ]---
[  340.099728] Kernel panic - not syncing: Fatal exception in interrupt
[  340.106123] Pid: 3245, comm: qemu-kvm Tainted: G      D    2.6.33-rc5
#3
[  340.112853] Call Trace:
[  340.112860]  <IRQ>  [<ffffffff81453b1d>] panic+0x7a/0x142
[  340.112886]  [<ffffffff81458011>] oops_end+0xb7/0xc7
[  340.112898]  [<ffffffff8100d421>] die+0x5a/0x63
[  340.112909]  [<ffffffff81457bcc>] do_general_protection+0x12a/0x133
[  340.112922]  [<ffffffff81457100>] ? irq_return+0x0/0x10
[  340.112956]  [<ffffffffa02925c1>] ? ip6_mc_input+0x214/0x221 [ipv6]
[  340.112969]  [<ffffffff81457345>] general_protection+0x25/0x30
[  340.113002]  [<ffffffffa02925c1>] ? ip6_mc_input+0x214/0x221 [ipv6]

Jon.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: kvm_crash_20100128.txt --]
[-- Type: text/plain; name="kvm_crash_20100128.txt"; charset="UTF-8", Size: 81416 bytes --]

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.33-rc5 (jcm@perihelion.bos.jonmasters.org) (gcc version 4.4.2 20091222 (Red Hat 4.4.2-20) (GCC) ) #3 SMP Thu Jan 28 01:46:12 EST 2010
[    0.000000] Command line: ro root=/dev/mapper/perihelion-root  LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us console=tty0 console=ttyS0,115200,8N1 panic=30
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009ec00 (usable)
[    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 00000000dfe0ac00 (usable)
[    0.000000]  BIOS-e820: 00000000dfe0ac00 - 00000000dfe0cc00 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000dfe0ec00 - 00000000dfe5cc00 (reserved)
[    0.000000]  BIOS-e820: 00000000dfe5cc00 - 00000000dfe5ec00 (ACPI data)
[    0.000000]  BIOS-e820: 00000000dfe5ec00 - 00000000f0000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fe000000 - 00000000ff000000 (reserved)
[    0.000000]  BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: 0000000100000000 - 0000000220000000 (usable)
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] DMI 2.3 present.
[    0.000000] No AGP bridge found
[    0.000000] last_pfn = 0x220000 max_arch_pfn = 0x400000000
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] total RAM covered: 64767M
[    0.000000]  gran_size: 64K 	chunk_size: 64K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 64K 	chunk_size: 128K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 64K 	chunk_size: 256K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 64K 	chunk_size: 512K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 64K 	chunk_size: 1M 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 64K 	chunk_size: 2M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 64K 	chunk_size: 4M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 64K 	chunk_size: 8M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 64K 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 64K 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 64K 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 64K 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 64K 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000] *BAD*gran_size: 64K 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -256M
[    0.000000]  gran_size: 64K 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 64K 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 128K 	chunk_size: 128K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 128K 	chunk_size: 256K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 128K 	chunk_size: 512K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 128K 	chunk_size: 1M 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 128K 	chunk_size: 2M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 128K 	chunk_size: 4M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 128K 	chunk_size: 8M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 128K 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 128K 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 128K 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 128K 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 128K 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000] *BAD*gran_size: 128K 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -256M
[    0.000000]  gran_size: 128K 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 128K 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 256K 	chunk_size: 256K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 256K 	chunk_size: 512K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 256K 	chunk_size: 1M 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 256K 	chunk_size: 2M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 256K 	chunk_size: 4M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 256K 	chunk_size: 8M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 256K 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 256K 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 256K 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 256K 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 256K 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000] *BAD*gran_size: 256K 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -256M
[    0.000000]  gran_size: 256K 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 256K 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 512K 	chunk_size: 512K 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 512K 	chunk_size: 1M 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 512K 	chunk_size: 2M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 512K 	chunk_size: 4M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 512K 	chunk_size: 8M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 512K 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 512K 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 512K 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 512K 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 512K 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000] *BAD*gran_size: 512K 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -256M
[    0.000000]  gran_size: 512K 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 512K 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 1M 	chunk_size: 1M 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 1M 	chunk_size: 2M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 1M 	chunk_size: 4M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 1M 	chunk_size: 8M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 1M 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 1M 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 1M 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 1M 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000]  gran_size: 1M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16128M
[    0.000000] *BAD*gran_size: 1M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -256M
[    0.000000]  gran_size: 1M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 1M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 0G
[    0.000000]  gran_size: 2M 	chunk_size: 2M 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 2M 	chunk_size: 4M 	num_reg: 8  	lose cover RAM: 16129M
[    0.000000]  gran_size: 2M 	chunk_size: 8M 	num_reg: 8  	lose cover RAM: 16129M
[    0.000000]  gran_size: 2M 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 16129M
[    0.000000]  gran_size: 2M 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16129M
[    0.000000]  gran_size: 2M 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16129M
[    0.000000]  gran_size: 2M 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16129M
[    0.000000]  gran_size: 2M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16129M
[    0.000000] *BAD*gran_size: 2M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -255M
[    0.000000]  gran_size: 2M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 1M
[    0.000000]  gran_size: 2M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 1M
[    0.000000]  gran_size: 4M 	chunk_size: 4M 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 4M 	chunk_size: 8M 	num_reg: 8  	lose cover RAM: 16131M
[    0.000000]  gran_size: 4M 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 16131M
[    0.000000]  gran_size: 4M 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16131M
[    0.000000]  gran_size: 4M 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16131M
[    0.000000]  gran_size: 4M 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16131M
[    0.000000]  gran_size: 4M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16131M
[    0.000000] *BAD*gran_size: 4M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -253M
[    0.000000]  gran_size: 4M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 3M
[    0.000000]  gran_size: 4M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 3M
[    0.000000]  gran_size: 8M 	chunk_size: 8M 	num_reg: 8  	lose cover RAM: 61191M
[    0.000000]  gran_size: 8M 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 16135M
[    0.000000]  gran_size: 8M 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16135M
[    0.000000]  gran_size: 8M 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16135M
[    0.000000]  gran_size: 8M 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16135M
[    0.000000]  gran_size: 8M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16135M
[    0.000000] *BAD*gran_size: 8M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -249M
[    0.000000]  gran_size: 8M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 7M
[    0.000000]  gran_size: 8M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 7M
[    0.000000]  gran_size: 16M 	chunk_size: 16M 	num_reg: 8  	lose cover RAM: 57103M
[    0.000000]  gran_size: 16M 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 16143M
[    0.000000]  gran_size: 16M 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16143M
[    0.000000]  gran_size: 16M 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16143M
[    0.000000]  gran_size: 16M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16143M
[    0.000000] *BAD*gran_size: 16M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -241M
[    0.000000]  gran_size: 16M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 15M
[    0.000000]  gran_size: 16M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 15M
[    0.000000]  gran_size: 32M 	chunk_size: 32M 	num_reg: 8  	lose cover RAM: 48927M
[    0.000000]  gran_size: 32M 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 16159M
[    0.000000]  gran_size: 32M 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16159M
[    0.000000]  gran_size: 32M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16159M
[    0.000000] *BAD*gran_size: 32M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -225M
[    0.000000]  gran_size: 32M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 31M
[    0.000000]  gran_size: 32M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 31M
[    0.000000]  gran_size: 64M 	chunk_size: 64M 	num_reg: 8  	lose cover RAM: 32575M
[    0.000000]  gran_size: 64M 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16191M
[    0.000000]  gran_size: 64M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16191M
[    0.000000] *BAD*gran_size: 64M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -193M
[    0.000000]  gran_size: 64M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 63M
[    0.000000]  gran_size: 64M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 63M
[    0.000000]  gran_size: 128M 	chunk_size: 128M 	num_reg: 8  	lose cover RAM: 16255M
[    0.000000]  gran_size: 128M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 16255M
[    0.000000] *BAD*gran_size: 128M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -129M
[    0.000000]  gran_size: 128M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 127M
[    0.000000]  gran_size: 128M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 127M
[    0.000000]  gran_size: 256M 	chunk_size: 256M 	num_reg: 8  	lose cover RAM: 8191M
[    0.000000] *BAD*gran_size: 256M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: -1M
[    0.000000]  gran_size: 256M 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 255M
[    0.000000]  gran_size: 256M 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 255M
[    0.000000]  gran_size: 512M 	chunk_size: 512M 	num_reg: 8  	lose cover RAM: 4351M
[    0.000000]  gran_size: 512M 	chunk_size: 1G 	num_reg: 7  	lose cover RAM: 767M
[    0.000000]  gran_size: 512M 	chunk_size: 2G 	num_reg: 7  	lose cover RAM: 767M
[    0.000000]  gran_size: 1G 	chunk_size: 1G 	num_reg: 8  	lose cover RAM: 4351M
[    0.000000]  gran_size: 1G 	chunk_size: 2G 	num_reg: 7  	lose cover RAM: 1279M
[    0.000000]  gran_size: 2G 	chunk_size: 2G 	num_reg: 8  	lose cover RAM: 3327M
[    0.000000] mtrr_cleanup: can not find optimal value
[    0.000000] please specify mtrr_gran_size/mtrr_chunk_size
[    0.000000] last_pfn = 0xdfe0a max_arch_pfn = 0x400000000
[    0.000000] found SMP MP-table at [ffff8800000fe710] fe710
[    0.000000] init_memory_mapping: 0000000000000000-00000000dfe0a000
[    0.000000] init_memory_mapping: 0000000100000000-0000000220000000
[    0.000000] RAMDISK: 362df000 - 37fefbaf
[    0.000000] ACPI: RSDP 00000000000febf0 00024 (v02 DELL  )
[    0.000000] ACPI: XSDT 00000000000fce54 000B4 (v01 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: FACP 00000000000fcf7c 000F4 (v03 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: DSDT 00000000fff5e6f4 03BCC (v01   DELL    dt_ex 00001000 INTL 20050624)
[    0.000000] ACPI: FACS 00000000dfe0ac00 00040
[    0.000000] ACPI: SSDT 00000000fff623e1 000AC (v01   DELL    st_ex 00001000 INTL 20050624)
[    0.000000] ACPI: APIC 00000000000fd070 0009E (v01 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: BOOT 00000000000fd10e 00028 (v01 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: ASF! 00000000000fd136 00067 (v16 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: MCFG 00000000000fd19d 0003E (v01 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: HPET 00000000000fd1db 00038 (v01 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: TCPA 00000000000fd437 00032 (v01 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: SLIC 00000000000fd213 00176 (v01 DELL    B8K     00000015 ASL  00000061)
[    0.000000] ACPI: SSDT 00000000dfe0ac40 00175 (v01 DpgPmm  Cpu0Ist 00000011 INTL 20050624)
[    0.000000] ACPI: SSDT 00000000dfe0b049 00175 (v01 DpgPmm  Cpu1Ist 00000011 INTL 20050624)
[    0.000000] ACPI: SSDT 00000000dfe0b452 00175 (v01 DpgPmm  Cpu2Ist 00000011 INTL 20050624)
[    0.000000] ACPI: SSDT 00000000dfe0b85b 00175 (v01 DpgPmm  Cpu3Ist 00000011 INTL 20050624)
[    0.000000] ACPI: SSDT 00000000dfe0bc64 00175 (v01 DpgPmm  Cpu4Ist 00000011 INTL 20050624)
[    0.000000] ACPI: SSDT 00000000dfe0c06d 00175 (v01 DpgPmm  Cpu5Ist 00000011 INTL 20050624)
[    0.000000] ACPI: SSDT 00000000dfe0c476 00175 (v01 DpgPmm  Cpu6Ist 00000011 INTL 20050624)
[    0.000000] ACPI: SSDT 00000000dfe0c87f 00175 (v01 DpgPmm  Cpu7Ist 00000011 INTL 20050624)
[    0.000000] ACPI: SSDT 00000000dfe0cc88 00244 (v01 DpgPmm    CpuPm 00000010 INTL 20050624)
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at 0000000000000000-0000000220000000
[    0.000000] Bootmem setup node 0 0000000000000000-0000000220000000
[    0.000000]   NODE_DATA [0000000000007000 - 000000000001cfff]
[    0.000000]   bootmap [000000000001d000 -  0000000000060fff] pages 44
[    0.000000] (13 early reservations) ==> bootmem [0000000000 - 0220000000]
[    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
[    0.000000]   #1 [0001000000 - 00029a4630]    TEXT DATA BSS ==> [0001000000 - 00029a4630]
[    0.000000]   #2 [00362df000 - 0037fefbaf]          RAMDISK ==> [00362df000 - 0037fefbaf]
[    0.000000]   #3 [00029a5000 - 00029a51e0]              BRK ==> [00029a5000 - 00029a51e0]
[    0.000000]   #4 [00000fe720 - 0000100000]    BIOS reserved ==> [00000fe720 - 0000100000]
[    0.000000]   #5 [00000fe710 - 00000fe720]     MP-table mpf ==> [00000fe710 - 00000fe720]
[    0.000000]   #6 [000009ec00 - 00000f0000]    BIOS reserved ==> [000009ec00 - 00000f0000]
[    0.000000]   #7 [00000f03a4 - 00000fe710]    BIOS reserved ==> [00000f03a4 - 00000fe710]
[    0.000000]   #8 [00000f0000 - 00000f03a4]     MP-table mpc ==> [00000f0000 - 00000f03a4]
[    0.000000]   #9 [0000001000 - 0000003000]       TRAMPOLINE ==> [0000001000 - 0000003000]
[    0.000000]   #10 [0000003000 - 0000007000]      ACPI WAKEUP ==> [0000003000 - 0000007000]
[    0.000000]   #11 [0000100000 - 0000803000]          PGTABLE ==> [0000100000 - 0000803000]
[    0.000000]   #12 [00029a6000 - 00032ab000]          PGTABLE ==> [00029a6000 - 00032ab000]
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   0x00100000 -> 0x00220000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[3] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x0000009e
[    0.000000]     0: 0x00000100 -> 0x000dfe0a
[    0.000000]     0: 0x00100000 -> 0x00220000
[    0.000000] ACPI: PM-Timer IO Port: 0x808
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x04] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x02] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x06] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x05] lapic_id[0x01] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x06] lapic_id[0x05] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x07] lapic_id[0x03] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x08] lapic_id[0x07] enabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: IOAPIC (id[0x09] address[0xfec80000] gsi_base[24])
[    0.000000] IOAPIC[1]: apic_id 9, version 32, address 0xfec80000, GSI 24-47
[    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] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.000000] SMP: Allowing 8 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: 000000000009e000 - 00000000000f0000
[    0.000000] PM: Registered nosave memory: 00000000000f0000 - 0000000000100000
[    0.000000] PM: Registered nosave memory: 00000000dfe0a000 - 00000000dfe0b000
[    0.000000] PM: Registered nosave memory: 00000000dfe0b000 - 00000000dfe0c000
[    0.000000] PM: Registered nosave memory: 00000000dfe0c000 - 00000000dfe0f000
[    0.000000] PM: Registered nosave memory: 00000000dfe0f000 - 00000000dfe5c000
[    0.000000] PM: Registered nosave memory: 00000000dfe5c000 - 00000000dfe5d000
[    0.000000] PM: Registered nosave memory: 00000000dfe5d000 - 00000000dfe5e000
[    0.000000] PM: Registered nosave memory: 00000000dfe5e000 - 00000000dfe5f000
[    0.000000] PM: Registered nosave memory: 00000000dfe5f000 - 00000000f0000000
[    0.000000] PM: Registered nosave memory: 00000000f0000000 - 00000000fe000000
[    0.000000] PM: Registered nosave memory: 00000000fe000000 - 00000000ff000000
[    0.000000] PM: Registered nosave memory: 00000000ff000000 - 00000000ffb00000
[    0.000000] PM: Registered nosave memory: 00000000ffb00000 - 0000000100000000
[    0.000000] Allocating PCI resources starting at f0000000 (gap: f0000000:e000000)
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:8 nr_node_ids:1
[    0.000000] PERCPU: Embedded 480 pages/cpu @ffff88002f800000 s1933848 r8192 d24040 u2097152
[    0.000000] pcpu-alloc: s1933848 r8192 d24040 u2097152 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 2064190
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: ro root=/dev/mapper/perihelion-root  LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us console=tty0 console=ttyS0,115200,8N1 panic=30
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Memory: 8114888k/8912896k available (4472k kernel code, 526688k absent, 271320k reserved, 6814k data, 3440k init)
[    0.000000] SLUB: Genslabs=14, HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] RCU-based detection of stalled CPUs is enabled.
[    0.000000] NR_IRQS:4352 nr_irqs:880
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] console [ttyS0] enabled
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 6367 kB
[    0.000000]  per task-struct memory footprint: 2688 bytes
[    0.000000] ------------------------
[    0.000000] | Locking API testsuite:
[    0.000000] ----------------------------------------------------------------------------
[    0.000000]                                  | spin |wlock |rlock |mutex | wsem | rsem |
[    0.000000]   --------------------------------------------------------------------------
[    0.000000]                      A-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]                  A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]              A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]              A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]          A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]          A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]          A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]                     double unlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]                   initialize held:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]                  bad unlock order:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.000000]   --------------------------------------------------------------------------
[    0.000000]               recursive read-lock:             |  ok  |             |  ok  |
[    0.000000]            recursive read-lock #2:             |  ok  |             |  ok  |
[    0.000000]             mixed read-write-lock:             |  ok  |             |  ok  |
[    0.000000]             mixed write-read-lock:             |  ok  |             |  ok  |
[    0.000000]   --------------------------------------------------------------------------
[    0.000000]      hard-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
[    0.000000]      soft-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
[    0.000000]      hard-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
[    0.000000]      soft-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
[    0.000000]        sirq-safe-A => hirqs-on/12:  ok  |  ok  |  ok  |
[    0.000000]        sirq-safe-A => hirqs-on/21:  ok  |  ok  |  ok  |
[    0.000000]          hard-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
[    0.000000]          soft-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
[    0.000000]          hard-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
[    0.000000]          soft-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
[    0.000000]     hard-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
[    0.000000]     soft-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
[    0.000000]       hard-irq lock-inversion/123:  ok  |  ok  |  ok  |
[    0.000000]       soft-irq lock-inversion/123:  ok  |  ok  |  ok  |
[    0.000000]       hard-irq lock-inversion/132:  ok  |  ok  |  ok  |
[    0.000000]       soft-irq lock-inversion/132:  ok  |  ok  |  ok  |
[    0.000000]       hard-irq lock-inversion/213:  ok  |  ok  |  ok  |
[    0.000000]       soft-irq lock-inversion/213:  ok  |  ok  |  ok  |
[    0.000000]       hard-irq lock-inversion/231:  ok  |  ok  |  ok  |
[    0.000000]       soft-irq lock-inversion/231:  ok  |  ok  |  ok  |
[    0.000000]       hard-irq lock-inversion/312:  ok  |  ok  |  ok  |
[    0.000000]       soft-irq lock-inversion/312:  ok  |  ok  |  ok  |
[    0.000000]       hard-irq lock-inversion/321:  ok  |  ok  |  ok  |
[    0.000000]       soft-irq lock-inversion/321:  ok  |  ok  |  ok  |
[    0.000000]       hard-irq read-recursion/123:  ok  |
[    0.000000]       soft-irq read-recursion/123:  ok  |
[    0.000000]       hard-irq read-recursion/132:  ok  |
[    0.000000]       soft-irq read-recursion/132:  ok  |
[    0.000000]       hard-irq read-recursion/213:  ok  |
[    0.000000]       soft-irq read-recursion/213:  ok  |
[    0.000000]       hard-irq read-recursion/231:  ok  |
[    0.000000]       soft-irq read-recursion/231:  ok  |
[    0.000000]       hard-irq read-recursion/312:  ok  |
[    0.000000]       soft-irq read-recursion/312:  ok  |
[    0.000000]       hard-irq read-recursion/321:  ok  |
[    0.000000]       soft-irq read-recursion/321:  ok  |
[    0.000000] -------------------------------------------------------
[    0.000000] Good, all 218 testcases passed! |
[    0.000000] ---------------------------------
[    0.000000] allocated 83886080 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] ODEBUG: selftest passed
[    0.000000] Fast TSC calibration using PIT
[    0.000000] Detected 2992.805 MHz processor.
[    0.002053] Calibrating delay loop (skipped), value calculated using timer frequency.. 5985.61 BogoMIPS (lpj=2992805)
[    0.005509] Security Framework initialized
[    0.006024] SELinux:  Initializing.
[    0.015203] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.026118] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.030266] Mount-cache hash table entries: 256
[    0.037438] Initializing cgroup subsys ns
[    0.038050] Initializing cgroup subsys cpuacct
[    0.039044] Initializing cgroup subsys memory
[    0.041276] Initializing cgroup subsys devices
[    0.042052] Initializing cgroup subsys freezer
[    0.043025] Initializing cgroup subsys net_cls
[    0.044553] CPU: Physical Processor ID: 0
[    0.045012] CPU: Processor Core ID: 0
[    0.046023] mce: CPU supports 4 MCE banks
[    0.047037] CPU0: Thermal monitoring enabled (TM1)
[    0.048027] using mwait in idle threads.
[    0.049018] Performance Events: no PMU driver, software events only.
[    0.054367] ACPI: Core revision 20091214
[    0.292590] ftrace: converting mcount calls to 0f 1f 44 00 00
[    0.293016] ftrace: allocating 22131 entries in 87 pages
[    0.298438] Setting APIC routing to flat
[    0.300705] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.311890] CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 04
[    0.316420] lockdep: fixing up alternatives.
[    0.318216] Booting Node   0, Processors  #1
[    0.392093] lockdep: fixing up alternatives.
[    0.394122]  #2
[    0.468083] lockdep: fixing up alternatives.
[    0.470072]  #3
[    0.543856] lockdep: fixing up alternatives.
[    0.544201]  #4
[    0.618173] lockdep: fixing up alternatives.
[    0.620197]  #5
[    0.694052] lockdep: fixing up alternatives.
[    0.696045]  #6
[    0.770044] lockdep: fixing up alternatives.
[    0.772099]  #7 Ok.
[    0.845056] Brought up 8 CPUs
[    0.846011] Total of 8 processors activated (47879.47 BogoMIPS).
[    0.861677] regulator: core version 0.5
[    0.862171] Time:  7:06:37  Date: 01/28/10
[    0.864333] NET: Registered protocol family 16
[    0.869379] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.870057] ACPI: bus type pci registered
[    0.872712] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
[    0.873010] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820
[    0.881713] PCI: Using configuration type 1 for base access
[    0.930496] bio: create slab <bio-0> at 0
[    1.286144] ACPI: BIOS _OSI(Linux) query ignored
[    1.341229] ACPI: Interpreter enabled
[    1.342012] ACPI: (supports S0 S1 S3 S4 S5)
[    1.346920] ACPI: Using IOAPIC for interrupt routing
[    1.847920] ACPI Warning: Incorrect checksum in table [TCPA] - 00, should be 88 (20091214/tbutils-314)
[    1.860643] ACPI: No dock devices found.
[    1.887924] ACPI: PCI Root Bridge [PCI0] (0000:00)
[    1.889958] pci_root PNP0A03:00: ignoring host bridge windows from ACPI; boot with "pci=use_crs" to use them
[    1.941008] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    1.942201] pci 0000:00:02.0: PCI bridge to [bus 01-05]
[    1.945199] pci 0000:02:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    1.946321] pci 0000:02:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    1.947192] pci 0000:01:00.0: PCI bridge to [bus 02-04]
[    1.948271] pci 0000:02:00.0: PCI bridge to [bus 03-03]
[    1.949284] pci 0000:02:01.0: PCI bridge to [bus 04-04]
[    1.951298] pci 0000:01:00.3: PCI bridge to [bus 05-05]
[    1.952308] pci 0000:00:03.0: PCI bridge to [bus 06-06]
[    1.954175] pci 0000:07:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    1.955190] pci 0000:00:04.0: PCI bridge to [bus 07-07]
[    1.956296] pci 0000:00:05.0: PCI bridge to [bus 08-08]
[    1.958035] pci 0000:00:06.0: PCI bridge to [bus 09-09]
[    1.959275] pci 0000:00:07.0: PCI bridge to [bus 0a-0a]
[    1.960509] pci 0000:0b:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    1.962071] pci 0000:00:1c.0: PCI bridge to [bus 0b-0b]
[    1.964059] pci 0000:00:1e.0: PCI bridge to [bus 0c-0c] (subtractive decode)
[    8.393743] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 15)
[    8.404774] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 7 9 10 11 12 15)
[    8.416902] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 9 10 11 12 15)
[    8.429127] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 11 12 15) *0, disabled.
[    8.441464] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 *9 10 11 12 15)
[    8.452487] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 *10 11 12 15)
[    8.463498] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 *9 10 11 12 15)
[    8.474531] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 *10 11 12 15)
[    8.485937] vgaarb: device added: PCI:0000:07:00.0,decodes=io+mem,owns=io+mem,locks=none
[    8.494105] vgaarb: loaded
[    8.501013] SCSI subsystem initialized
[    8.512536] usbcore: registered new interface driver usbfs
[    8.518435] usbcore: registered new interface driver hub
[    8.524304] usbcore: registered new device driver usb
[    8.532269] PCI: Using ACPI for IRQ routing
[    8.541469] NetLabel: Initializing
[    8.545009] NetLabel:  domain hash size = 128
[    8.549009] NetLabel:  protocols = UNLABELED CIPSOv4
[    8.555181] NetLabel:  unlabeled traffic allowed by default
[    8.562860] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[    8.570032] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    8.575347] hpet0: 3 comparators, 64-bit 14.318180 MHz counter
[    8.587488] Switching to clocksource tsc
[    8.594653] kstop/0 used greatest stack depth: 6392 bytes left
[    9.042274] pnp: PnP ACPI init
[    9.045769] ACPI: bus type pnp registered
[    9.222956] pnp: PnP ACPI: found 10 devices
[    9.227832] ACPI: ACPI bus type pnp unregistered
[    9.233179] system 00:01: [io  0x0800-0x085f] has been reserved
[    9.239315] system 00:01: [io  0x0c00-0x0c7f] has been reserved
[    9.245436] system 00:01: [io  0x0860-0x08ff] has been reserved
[    9.261962] pci 0000:02:00.0: PCI bridge to [bus 03-03]
[    9.267372] pci 0000:02:00.0:   bridge window [io  disabled]
[    9.273227] pci 0000:02:00.0:   bridge window [mem disabled]
[    9.279070] pci 0000:02:00.0:   bridge window [mem pref disabled]
[    9.285356] pci 0000:02:01.0: PCI bridge to [bus 04-04]
[    9.290759] pci 0000:02:01.0:   bridge window [io  disabled]
[    9.296606] pci 0000:02:01.0:   bridge window [mem disabled]
[    9.302451] pci 0000:02:01.0:   bridge window [mem pref disabled]
[    9.308736] pci 0000:01:00.0: PCI bridge to [bus 02-04]
[    9.314141] pci 0000:01:00.0:   bridge window [io  disabled]
[    9.319988] pci 0000:01:00.0:   bridge window [mem disabled]
[    9.325832] pci 0000:01:00.0:   bridge window [mem pref disabled]
[    9.332116] pci 0000:01:00.3: PCI bridge to [bus 05-05]
[    9.337520] pci 0000:01:00.3:   bridge window [io  disabled]
[    9.346329] pci 0000:01:00.3:   bridge window [mem disabled]
[    9.352171] pci 0000:01:00.3:   bridge window [mem pref disabled]
[    9.358457] pci 0000:00:02.0: PCI bridge to [bus 01-05]
[    9.363863] pci 0000:00:02.0:   bridge window [io  disabled]
[    9.369714] pci 0000:00:02.0:   bridge window [mem 0xfcc00000-0xfccfffff]
[    9.376687] pci 0000:00:02.0:   bridge window [mem pref disabled]
[    9.382971] pci 0000:00:03.0: PCI bridge to [bus 06-06]
[    9.388373] pci 0000:00:03.0:   bridge window [io  disabled]
[    9.394219] pci 0000:00:03.0:   bridge window [mem 0xfca00000-0xfcafffff]
[    9.401205] pci 0000:00:03.0:   bridge window [mem pref disabled]
[    9.407491] pci 0000:00:04.0: PCI bridge to [bus 07-07]
[    9.412898] pci 0000:00:04.0:   bridge window [io  0xd000-0xdfff]
[    9.419178] pci 0000:00:04.0:   bridge window [mem 0xfcd00000-0xfcefffff]
[    9.426152] pci 0000:00:04.0:   bridge window [mem 0xf0000000-0xf7ffffff 64bit pref]
[    9.434205] pci 0000:00:05.0: PCI bridge to [bus 08-08]
[    9.439609] pci 0000:00:05.0:   bridge window [io  disabled]
[    9.445455] pci 0000:00:05.0:   bridge window [mem disabled]
[    9.451300] pci 0000:00:05.0:   bridge window [mem pref disabled]
[    9.457583] pci 0000:00:06.0: PCI bridge to [bus 09-09]
[    9.462987] pci 0000:00:06.0:   bridge window [io  disabled]
[    9.468833] pci 0000:00:06.0:   bridge window [mem disabled]
[    9.474671] pci 0000:00:06.0:   bridge window [mem pref disabled]
[    9.480957] pci 0000:00:07.0: PCI bridge to [bus 0a-0a]
[    9.486360] pci 0000:00:07.0:   bridge window [io  disabled]
[    9.492216] pci 0000:00:07.0:   bridge window [mem disabled]
[    9.498063] pci 0000:00:07.0:   bridge window [mem pref disabled]
[    9.504343] pci 0000:00:1c.0: PCI bridge to [bus 0b-0b]
[    9.509748] pci 0000:00:1c.0:   bridge window [io  disabled]
[    9.515595] pci 0000:00:1c.0:   bridge window [mem 0xfc900000-0xfc9fffff]
[    9.522567] pci 0000:00:1c.0:   bridge window [mem pref disabled]
[    9.528852] pci 0000:00:1e.0: PCI bridge to [bus 0c-0c]
[    9.534255] pci 0000:00:1e.0:   bridge window [io  disabled]
[    9.540105] pci 0000:00:1e.0:   bridge window [mem 0xfcb00000-0xfcbfffff]
[    9.547078] pci 0000:00:1e.0:   bridge window [mem pref disabled]
[    9.553485] pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.560405] pci 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.567320] pci 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.574239] pci 0000:02:01.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.581178] pci 0000:00:03.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.588088] pci 0000:00:04.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.595000] pci 0000:00:05.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.601911] pci 0000:00:06.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.608821] pci 0000:00:07.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.615735] pci 0000:00:1c.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    9.623157] NET: Registered protocol family 2
[    9.630068] IP route cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    9.647427] TCP established hash table entries: 524288 (order: 11, 8388608 bytes)
[    9.664138] TCP bind hash table entries: 65536 (order: 10, 4718592 bytes)
[    9.682082] TCP: Hash tables configured (established 524288 bind 65536)
[    9.688956] TCP reno registered
[    9.692787] UDP hash table entries: 4096 (order: 7, 655360 bytes)
[    9.700906] UDP-Lite hash table entries: 4096 (order: 7, 655360 bytes)
[    9.710920] NET: Registered protocol family 1
[    9.716565] pci 0000:00:1f.0: rerouting interrupts for [8086:2670]
[    9.724893] Trying to unpack rootfs image as initramfs...
[   11.285752] debug: unmapping init memory ffff8800362df000..ffff880037ff0000
[   11.610806] DMA-API: preallocated 32768 debug entries
[   11.616037] DMA-API: debugging enabled by kernel config
[   11.621449] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[   11.628063] Placing 64MB software IO TLB between ffff880020000000 - ffff880024000000
[   11.636087] software IO TLB at phys 0x20000000 - 0x24000000
[   11.642339] Simple Boot Flag at 0x7a set to 0x80
[   11.669993] audit: initializing netlink socket (disabled)
[   11.676120] type=2000 audit(1264662404.675:1): initialized
[   11.696539] Kprobe smoke test started
[   11.746565] Kprobe smoke test passed successfully
[   11.754077] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[   11.866855] VFS: Disk quotas dquot_6.5.2
[   11.872314] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[   11.888983] EXT4-fs: Unable to register as ext3 (-16)
[   11.906076] msgmni has been set to 15849
[   11.919711] cryptomgr_test used greatest stack depth: 5688 bytes left
[   11.921516] alg: No test for stdrng (krng)
[   11.923663] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[   11.923705] io scheduler noop registered
[   11.923711] io scheduler deadline registered
[   11.926688] io scheduler cfq registered (default)
[   11.951620] cryptomgr_test used greatest stack depth: 5624 bytes left
[   11.958399] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[   11.965128] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[   11.971929] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[   11.993172] pci-stub: invalid id string ""
[   12.002016] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[   12.010735] ACPI: Power Button [VBTN]
[   12.015812] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[   12.023515] ACPI: Power Button [PWRF]
[   12.563182] Non-volatile memory driver v1.3
[   12.567773] Linux agpgart interface v0.103
[   12.573763] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
ÿ[   12.825267] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[   13.076290] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[   13.085634] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[   13.092801] 00:08: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[   13.131535] brd: module loaded
[   13.150377] loop: module loaded
[   13.154533] input: Macintosh mouse button emulation as /devices/virtual/input/input2
[   13.165887] ahci 0000:00:1f.2: PCI INT C -> GSI 20 (level, low) -> IRQ 20
[   13.174090] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 6 ports 3 Gbps 0x1f impl SATA mode
[   13.182559] ahci 0000:00:1f.2: flags: 64bit ncq pm led slum part 
[   13.190424] scsi0 : ahci
[   13.198266] scsi1 : ahci
[   13.202644] scsi2 : ahci
[   13.207193] scsi3 : ahci
[   13.211581] scsi4 : ahci
[   13.216115] scsi5 : ahci
[   13.220145] ata1: SATA max UDMA/133 irq_stat 0x00400040, connection status changed irq 20
[   13.228615] ata2: SATA max UDMA/133 irq_stat 0x00400040, connection status changed irq 20
[   13.237088] ata3: SATA max UDMA/133 abar m1024@0xff970000 port 0xff970200 irq 20
[   13.244770] ata4: SATA max UDMA/133 abar m1024@0xff970000 port 0xff970280 irq 20
[   13.252462] ata5: SATA max UDMA/133 abar m1024@0xff970000 port 0xff970300 irq 20
[   13.260154] ata6: DUMMY
[   13.263731] ata_piix 0000:00:1f.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   13.272408] scsi6 : ata_piix
[   13.277027] scsi7 : ata_piix
[   13.281239] ata7: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14
[   13.288385] ata8: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15
[   13.297171] Fixed MDIO Bus: probed
[   13.301947] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.308964] ehci_hcd 0000:00:1d.7: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[   13.316507] ehci_hcd 0000:00:1d.7: EHCI Host Controller
[   13.324380] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
[   13.332534] ehci_hcd 0000:00:1d.7: debug port 1
[   13.341393] ehci_hcd 0000:00:1d.7: irq 21, io mem 0xff980800
[   13.356122] ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
[   13.363188] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   13.370160] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.377671] usb usb1: Product: EHCI Host Controller
[   13.382728] usb usb1: Manufacturer: Linux 2.6.33-rc5 ehci_hcd
[   13.388654] usb usb1: SerialNumber: 0000:00:1d.7
[   13.396151] hub 1-0:1.0: USB hub found
[   13.400331] hub 1-0:1.0: 8 ports detected
[   13.407070] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   13.413798] uhci_hcd: USB Universal Host Controller Interface driver
[   13.421709] uhci_hcd 0000:00:1d.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[   13.429129] uhci_hcd 0000:00:1d.0: UHCI Host Controller
[   13.435586] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
[   13.443502] uhci_hcd 0000:00:1d.0: irq 21, io base 0x0000ff80
[   13.450422] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[   13.457394] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.464903] usb usb2: Product: UHCI Host Controller
[   13.469966] usb usb2: Manufacturer: Linux 2.6.33-rc5 uhci_hcd
[   13.470941] ata7.00: ATAPI: SONY CD-RW/DVD-ROM CRX310EE, SDK3, max UDMA/33
[   13.482914] usb usb2: SerialNumber: 0000:00:1d.0
[   13.489741] hub 2-0:1.0: USB hub found
[   13.493996] hub 2-0:1.0: 2 ports detected
[   13.499831] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 22 (level, low) -> IRQ 22
[   13.502410] ata7.00: configured for UDMA/33
[   13.512265] uhci_hcd 0000:00:1d.1: UHCI Host Controller
[   13.518936] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
[   13.527047] uhci_hcd 0000:00:1d.1: irq 22, io base 0x0000ff60
[   13.534100] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[   13.541113] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.548630] usb usb3: Product: UHCI Host Controller
[   13.553693] usb usb3: Manufacturer: Linux 2.6.33-rc5 uhci_hcd
[   13.559616] usb usb3: SerialNumber: 0000:00:1d.1
[   13.566500] hub 3-0:1.0: USB hub found
[   13.570640] hub 3-0:1.0: 2 ports detected
[   13.576432] uhci_hcd 0000:00:1d.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[   13.583822] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[   13.587108] ata3: SATA link down (SStatus 0 SControl 300)
[   13.587161] ata5: SATA link down (SStatus 4 SControl 300)
[   13.587207] ata4: SATA link down (SStatus 0 SControl 300)
[   13.609902] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
[   13.617975] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000ff40
[   13.624905] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[   13.631868] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.639379] usb usb4: Product: UHCI Host Controller
[   13.644440] usb usb4: Manufacturer: Linux 2.6.33-rc5 uhci_hcd
[   13.650363] usb usb4: SerialNumber: 0000:00:1d.2
[   13.657693] hub 4-0:1.0: USB hub found
[   13.661870] hub 4-0:1.0: 2 ports detected
[   13.667605] uhci_hcd 0000:00:1d.3: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[   13.675008] uhci_hcd 0000:00:1d.3: UHCI Host Controller
[   13.681761] uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
[   13.689800] uhci_hcd 0000:00:1d.3: irq 23, io base 0x0000ff20
[   13.696746] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[   13.703712] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.711294] usb usb5: Product: UHCI Host Controller
[   13.716353] usb usb5: Manufacturer: Linux 2.6.33-rc5 uhci_hcd
[   13.722278] usb usb5: SerialNumber: 0000:00:1d.3
[   13.722611] usb 1-1: new high speed USB device using ehci_hcd and address 2
[   13.736258] hub 5-0:1.0: USB hub found
[   13.740419] hub 5-0:1.0: 2 ports detected
[   13.747415] PNP: No PS/2 controller found. Probing ports directly.
[   13.757468] serio: i8042 KBD port at 0x60,0x64 irq 1
[   13.762739] serio: i8042 AUX port at 0x60,0x64 irq 12
[   13.769699] mice: PS/2 mouse device common for all mice
[   13.778128] rtc_cmos 00:05: RTC can wake from S4
[   13.784109] rtc_cmos 00:05: rtc core: registered rtc_cmos as rtc0
[   13.790491] rtc0: alarms up to one day, 242 bytes nvram, hpet irqs
[   13.802928] device-mapper: uevent: version 1.0.3
[   13.810967] device-mapper: ioctl: 4.16.0-ioctl (2009-11-05) initialised: dm-devel@redhat.com
[   13.824820] cpuidle: using governor ladder
[   13.829100] cpuidle: using governor menu
[   13.839299] usb 1-1: New USB device found, idVendor=03f0, idProduct=5611
[   13.843346] usbcore: registered new interface driver hiddev
[   13.843767] usbcore: registered new interface driver usbhid
[   13.843770] usbhid: USB HID core driver
[   13.843824] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[   13.846719] CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
[   13.846722] nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
[   13.846724] sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
[   13.850876] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.851069] TCP cubic registered
[   13.851077] NET: Registered protocol family 17
[   13.853467] registered taskstats version 1
[   13.854964] kmemleak: Kernel memory leak detector initialized
[   13.854973] kmemleak: Automatic memory scanning thread started
[   13.856059] No TPM chip found, activating TPM-bypass!
[   13.862227]   Magic number: 10:876:117
[   13.928661] rtc_cmos 00:05: setting system clock to 2010-01-28 07:06:51 UTC (1264662411)
[   13.928681] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   13.928686] usb 1-1: Product: Photosmart C3100 series
[   13.928688] usb 1-1: Manufacturer: HP
[   13.928691] usb 1-1: SerialNumber: CN6B6C51NZ04KV
[   13.959768] Initalizing network drop monitor service
[   13.987119] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   13.993600] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   14.027546] ata2.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
[   14.028831] ata1.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
[   14.028838] ata1.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   14.038153] usb 1-4: new high speed USB device using ehci_hcd and address 3
[   14.053239] ata2.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   14.070802] ata1.00: configured for UDMA/133
[   14.088394] scsi 0:0:0:0: Direct-Access     ATA      ST31500341AS     CC1H PQ: 0 ANSI: 5
[   14.101262] sd 0:0:0:0: [sda] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[   14.102016] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   14.114834] ata2.00: configured for UDMA/133
[   14.116193] sd 0:0:0:0: [sda] Write Protect is off
[   14.116759] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   14.120723]  sda: sda1 sda2
[   14.141206] sd 0:0:0:0: [sda] Attached SCSI disk
[   14.148771] scsi 1:0:0:0: Direct-Access     ATA      ST31500341AS     CC1H PQ: 0 ANSI: 5
[   14.158456] usb 1-4: New USB device found, idVendor=058f, idProduct=6254
[   14.160551] sd 1:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[   14.161344] sd 1:0:0:0: Attached scsi generic sg1 type 0
[   14.162744] sd 1:0:0:0: [sdb] Write Protect is off
[   14.163688] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   14.165644] scsi 6:0:0:0: CD-ROM            SONY     CDRWDVD CRX310EE SDK3 PQ: 0 ANSI: 5
[   14.169153]  sdb:
[   14.203599]  sdb1
[   14.203706] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   14.206918] hub 1-4:1.0: USB hub found
[   14.207338] hub 1-4:1.0: 4 ports detected
[   14.221317]  sdb2
[   14.225373] sr0: scsi3-mmc drive: 0x/48x writer cd/rw xa/form2 cdda tray
[   14.231036] sd 1:0:0:0: [sdb] Attached SCSI disk
[   14.237103] Uniform CD-ROM driver Revision: 3.20
[   14.246417] sr 6:0:0:0: Attached scsi generic sg2 type 5
[   14.252771] debug: unmapping init memory ffffffff81b07000..ffffffff81e63000
[   14.260243] Write protecting the kernel read-only data: 10240k
[   14.266627] debug: unmapping init memory ffff880001463000..ffff880001600000
[   14.273923] debug: unmapping init memory ffff880001827000..ffff880001a00000
[   14.298106] mknod used greatest stack depth: 5392 bytes left
[   14.318984] mount used greatest stack depth: 4976 bytes left
[   14.339171] mount used greatest stack depth: 4752 bytes left
[   14.375257] usb 1-6: new high speed USB device using ehci_hcd and address 5
[   14.490494] dracut: dracut-002-13.4.git8f397a9b.fc12
dracut: dracut-002-13.4.git8f397a9b.fc12
[   14.507933] usb 1-6: New USB device found, idVendor=05ac, idProduct=1006
[   14.514828] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   14.522157] usb 1-6: Product: Keyboard Hub
[   14.526461] usb 1-6: Manufacturer: Apple, Inc.
[   14.531114] usb 1-6: SerialNumber: 000000000000
[   14.539311] hub 1-6:1.0: USB hub found
[   14.543842] hub 1-6:1.0: 3 ports detected
[   14.587982] udev: starting version 145
[   14.758178] usb 4-1: new low speed USB device using uhci_hcd and address 2
[   14.931185] usb 4-1: New USB device found, idVendor=046d, idProduct=c03d
[   14.938081] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   14.945393] usb 4-1: Product: USB-PS/2 Optical Mouse
[   14.950534] usb 4-1: Manufacturer: Logitech
[   14.981265] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0/input/input3
[   14.996766] generic-usb 0003:046D:C03D.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1d.2-1/input0
[   15.093753] usb 1-4.1: new low speed USB device using ehci_hcd and address 6
[   15.159458] async/0 used greatest stack depth: 4272 bytes left
[   15.166985] [drm] Initialized drm 1.1.0 20060810
[   15.211644] usb 1-4.1: New USB device found, idVendor=0764, idProduct=0501
[   15.218741] usb 1-4.1: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[   15.226363] usb 1-4.1: Product: UPS AE550
[   15.230540] async/8 used greatest stack depth: 4008 bytes left
[   15.230558] usb 1-4.1: Manufacturer: CPS
[   15.253310] async/6 used greatest stack depth: 3992 bytes left
[   15.293139] generic-usb 0003:0764:0501.0002: hiddev96,hidraw1: USB HID v1.10 Device [CPS UPS AE550] on usb-0000:00:1d.7-4.1/input0
[   15.384441] usb 1-4.2: new full speed USB device using ehci_hcd and address 7
[   15.426966] [drm] radeon defaulting to kernel modesetting.
[   15.432631] [drm] radeon kernel modesetting enabled.
[   15.438132] radeon 0000:07:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   15.455185] [drm] radeon: Initializing kernel modesetting.
[   15.464889] [drm] register mmio base: 0xFCDE0000
[   15.469683] [drm] register mmio size: 65536
[   15.474363] [drm] GPU reset succeed (RBBM_STATUS=0x00000140)
[   15.480579] [drm] Generation 2 PCI interface, using max accessible memory
[   15.482525] usb 1-4.2: New USB device found, idVendor=058f, idProduct=9254
[   15.482531] usb 1-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   15.482535] usb 1-4.2: Product: Generic USB Hub
[   15.482538] usb 1-4.2: Manufacturer: ALCOR
[   15.485162] hub 1-4.2:1.0: USB hub found
[   15.485662] hub 1-4.2:1.0: 4 ports detected
[   15.519525] [drm] radeon: VRAM 128M
[   15.523193] [drm] radeon: VRAM from 0x00000000 to 0x07FFFFFF
[   15.529033] [drm] radeon: GTT 512M
[   15.532615] [drm] radeon: GTT from 0x20000000 to 0x3FFFFFFF
[   15.539048] [drm] radeon: using MSI.
[   15.543214] [drm] radeon: irq initialized.
[   15.547639] mtrr: type mismatch for f0000000,8000000 old: write-back new: write-combining
[   15.556119] [drm] Detected VRAM RAM=128M, BAR=128M
[   15.561082] [drm] RAM width 64bits DDR
[   15.566448] [TTM] Zone  kernel: Available graphics memory: 4057444 kiB.
[   15.573237] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB.
[   15.580707] [drm] radeon: 128M of VRAM memory ready
[   15.585778] [drm] radeon: 512M of GTT memory ready.
[   15.591485] [drm] GART: num cpu pages 131072, num gpu pages 131072
[   15.598655] usb 1-4.3: new full speed USB device using ehci_hcd and address 8
[   15.600136] [drm] radeon: 1 quad pipes, 1 Z pipes initialized.
[   15.600321] [drm] PCIE GART of 512M enabled (table at 0x00040000).
[   15.601018] [drm] radeon: cp idle (0x10000C03)
[   15.601722] [drm] Loading R300 Microcode
[   15.602420] platform radeon_cp.0: firmware: requesting radeon/R300_cp.bin
[   15.642662] [drm] radeon: ring at 0x0000000020000000
[   15.651308] [drm] ring test succeeded in 0 usecs
[   15.661198] [drm] radeon: ib pool ready.
[   15.670020] [drm] ib test succeeded in 0 usecs
[   15.675885] [drm] DFP table revision: 4
[   15.681840] [drm] Default TV standard: NTSC
[   15.686240] [drm] 27.000000000 MHz TV ref clk
[   15.690899] [drm] Default TV standard: NTSC
[   15.695324] [drm] 27.000000000 MHz TV ref clk
[   15.700752] [drm] Radeon Display Connectors
[   15.705192] [drm] Connector 0:
[   15.708513] [drm]   DVI-I
[   15.711305] [drm]   HPD1
[   15.714008] [drm]   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
[   15.720222] [drm]   Encoders:
[   15.723434] [drm]     CRT1: INTERNAL_DAC1
[   15.723494] usb 1-4.3: New USB device found, idVendor=046d, idProduct=092e
[   15.723499] usb 1-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   15.723503] usb 1-4.3: Product: Camera
[   15.723505] usb 1-4.3: Manufacturer:         
[   15.750650] [drm]     DFP1: INTERNAL_TMDS1
[   15.754921] [drm] Connector 1:
[   15.758159] [drm]   S-video
[   15.761133] [drm]   Encoders:
[   15.764280] [drm]     TV1: INTERNAL_DAC2
[   15.802275] usb 1-4.4: new full speed USB device using ehci_hcd and address 9
[   15.897670] usb 1-4.4: New USB device found, idVendor=093a, idProduct=2620
[   15.904734] usb 1-4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   15.981543] usb 1-6.2: new low speed USB device using ehci_hcd and address 10
[   16.071956] usb 1-6.2: New USB device found, idVendor=05ac, idProduct=0220
[   16.079035] usb 1-6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   16.086626] usb 1-6.2: Product: Apple Keyboard
[   16.091240] usb 1-6.2: Manufacturer: Apple, Inc
[   16.104842] [drm] fb mappable at 0xF00C0000
[   16.109231] [drm] vram apper at 0xF0000000
[   16.111548] input: Apple, Inc Apple Keyboard as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.2/1-6.2:1.0/input/input4
[   16.114658] apple 0003:05AC:0220.0003: input,hidraw2: USB HID v1.11 Keyboard [Apple, Inc Apple Keyboard] on usb-0000:00:1d.7-6.2/input0
[   16.137041] [drm] size 9437184
[   16.140288] [drm] fb depth is 24
[   16.142457] input: Apple, Inc Apple Keyboard as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.2/1-6.2:1.1/input/input5
[   16.144642] apple 0003:05AC:0220.0004: input,hidraw3: USB HID v1.11 Device [Apple, Inc Apple Keyboard] on usb-0000:00:1d.7-6.2/input1
[   16.166912] [drm]    pitch is 8192
[   16.237970] Console: switching to colour frame buffer device 256x72
[   16.254545] fb0: radeondrmfb frame buffer device
[   16.259218] registered panic notifier
[   16.262982] [drm] Initialized radeon 2.0.0 20080528 for 0000:07:00.0 on minor 0
[   16.304799] modprobe used greatest stack depth: 3520 bytes left
[   16.408800] dracut: Starting plymouth daemon
dracut: Starting plymouth daemon
[   16.960209] Initializing USB Mass Storage driver...
[   16.967166] scsi8 : usb-storage 1-1:1.3
[   16.978028] usbcore: registered new interface driver usb-storage
[   16.985498] USB Mass Storage support registered.
G[   17.548517] dracut: Autoassembling MD Raid
dracut: Autoassembling MD Raid
[   17.759858] md: md0 stopped.
[   17.773474] md: bind<sdb2>
[   17.778203] md: bind<sda2>
[   17.802409] md: raid1 personality registered for level 1
[   17.824901] raid1: md0 is not clean -- starting background reconstruction
[   17.832467] raid1: raid set md0 active with 2 out of 2 mirrors
[   17.840349] md0: detected capacity change from 0 to 1499225456640
[   17.847917] dracut: mdadm: /dev/md0 has been started with 2 drives.
[   17.849228] md: resync of RAID array md0
[   17.849241] md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
[   17.849250] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync.
[   17.849270] md: using 128k window, over a total of 1464087360 blocks.
[   17.849285] md: resuming resync of md0 from checkpoint.
[   17.860798]  md0:dracut: mdadm: /dev/md0 has been started with 2 drives.
 unknown partition table
[   18.534223] dracut: Scanning devices md0  for LVM volume groups 
dracut: Scanning devices md0  for LVM volume groups 
[   18.654993] dracut: Reading all physical volumes. This may take a while...
[   18.662436] dracut: Found volume group "perihelion" using metadata type lvm2
dracut: Reading all physical volumes. This may take a while...
dracut: Found volume group "perihelion" using metadata type lvm2
[   19.048719] dracut: 3 logical volume(s) in volume group "perihelion" now active
dracut: 3 logical volume(s) in volume group "perihelion" now active
[   19.863939] EXT4-fs (dm-0): mounted filesystem with ordered data mode
[   19.954458] dracut: Mounted root filesystem /dev/mapper/perihelion-root
dracut: Mounted root filesystem /dev/mapper/perihelion-root
[   20.201613] dracut: Loading SELinux policy
dracut: Loading SELinux policy
[   21.997409] scsi 8:0:0:0: Direct-Access     HP       Photosmart C3180 1.00 PQ: 0 ANSI: 2
[   22.026999] sd 8:0:0:0: Attached scsi generic sg3 type 0
[   22.038248] sd 8:0:0:0: [sdc] Attached SCSI removable disk
[   33.681227] type=1403 audit(1264662431.317:2): policy loaded auid=4294967295 ses=4294967295
[   33.700862] load_policy used greatest stack depth: 3072 bytes left
[   34.194006] dracut: Switching root
dracut: Switching root
		Welcome to Fedora 
		Press 'I' to enter interactive startup.
Starting udev: G[  OK  ]
Setting hostname perihelion.bos.jonmasters.org:  [  OK  ]
Setting up Logical Volume Management:   3 logical volume(s) in volume group "perihelion" now active
[  OK  ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -a /dev/mapper/perihelion-root 
/dev/mapper/perihelion-root: clean, 828101/22405120 files, 36863454/89600000 blocks
[/sbin/fsck.ext4 (1) -- /boot] fsck.ext4 -a /dev/sda1 
[/sbin/fsck.ext4 (2) -- /boot1] fsck.ext4 -a /dev/sdb1 
/dev/sdb1: clean, 11/65536 files, 12635/262144 blocks
/dev/sda1: clean, 54/65536 files, 58714/262144 blocks
[/sbin/fsck.ext4 (1) -- /data] fsck.ext4 -a /dev/mapper/perihelion-data 
/dev/mapper/perihelion-data: clean, 1558379/65536000 files, 96448353/262144000 blocks
[  OK  ]
Remounting root filesystem in read-write mode:  [  OK  ]
Mounting local filesystems:  [  OK  ]
Enabling local filesystem quotas:  [  OK  ]
Enabling /etc/fstab swaps:  [  OK  ]
Entering non-interactive startup
Applying Intel CPU microcode update: FATAL: Module microcode not found.
ERROR: Module microcode does not exist in /proc/modules
Calling the system activity data collector (sadc): 
Starting monitoring for VG perihelion:   3 logical volume(s) in volume group "perihelion" monitored
[  OK  ]
Bringing up loopback interface:  [  OK  ]
Bringing up interface eth0:  [  OK  ]
Bringing up interface br0:  [  OK  ]
Starting auditd: [  OK  ]
Starting portreserve: [  OK  ]
Starting system logger: [  OK  ]
Enabling ondemand cpu frequency scaling: [  OK  ]
Starting irqbalance: [  OK  ]
Starting rpcbind: [  OK  ]
Starting NFS statd: [  OK  ]
Starting mdmonitor: [  OK  ]
Starting RPC idmapd: [  OK  ]
Starting system message bus: [  OK  ]
Starting Avahi daemon... [  OK  ]
Starting cups: [  OK  ]
Mounting other filesystems:  [  OK  ]
Starting acpi daemon: [  OK  ]
Starting HAL daemon: [  OK  ]
Starting PC/SC smart card daemon (pcscd): [  OK  ]
Loading autofs4: [  OK  ]
Starting automount: [  OK  ]
Starting NFS services:  exportfs: Warning: /mnt/remote does not exist
[  OK  ]
Starting NFS quotas: [  OK  ]
Starting NFS daemon: [  OK  ]
Starting NFS mountd: [  OK  ]
Starting snort: [FAILED]
Enabling Bluetooth devices:
Starting sshd: [  OK  ]
Starting ntpd: [  OK  ]
Starting vsftpd for vsftpd: [  OK  ]
Starting exim: [  OK  ]
Starting abrt daemon: [  OK  ]
Starting ksm: /etc/rc5.d/S84ksm: line 44: /sys/kernel/mm/ksm/max_kernel_pages: No such file or directory
[  OK  ]
Starting console mouse services: [  OK  ]
Starting ksmtuned: [  OK  ]
Starting crond: [  OK  ][  OK  ]
Starting atd: [  OK  ][  OK  ]
Registering binary handler for Windows applications: [  OK  ]
Starting smartd: [  OK  ]

Fedora release 12 (Constantine)
Kernel 2.6.33-rc5 on an x86_64 (/dev/ttyS0)

perihelion.bos.jonmasters.org login: [  205.843071] 
[  205.843073] =======================================================
[  205.843769] [ INFO: possible circular locking dependency detected ]
[  205.843769] 2.6.33-rc5 #3
[  205.843769] -------------------------------------------------------
[  205.843769] libvirtd/3058 is trying to acquire lock:
[  205.843769]  (s_active){++++.+}, at: [<ffffffff81171a56>] sysfs_addrm_finish+0x36/0x55
[  205.843769] 
[  205.843769] but task is already holding lock:
[  205.843769]  (rtnl_mutex){+.+.+.}, at: [<ffffffff813cedd9>] rtnl_lock+0x17/0x19
[  205.843769] 
[  205.843769] which lock already depends on the new lock.
[  205.843769] 
[  205.843769] 
[  205.843769] the existing dependency chain (in reverse order) is:
[  205.843769] 
[  205.843769] -> #4 (rtnl_mutex){+.+.+.}:
[  205.843769]        [<ffffffff8107ea94>] __lock_acquire+0xb84/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff8145504b>] __mutex_lock_common+0x4b/0x392
[  205.843769]        [<ffffffff81455456>] mutex_lock_nested+0x3e/0x43
[  205.843769]        [<ffffffff813cedd9>] rtnl_lock+0x17/0x19
[  205.843769]        [<ffffffff813d05c0>] linkwatch_event+0xe/0x2c
[  205.843769]        [<ffffffff8106713f>] worker_thread+0x266/0x35f
[  205.843769]        [<ffffffff8106b1d0>] kthread+0x9a/0xa2
[  205.843769]        [<ffffffff8100aaa4>] kernel_thread_helper+0x4/0x10
[  205.843769] 
[  205.843769] -> #3 ((linkwatch_work).work){+.+.+.}:
[  205.843769]        [<ffffffff8107ea94>] __lock_acquire+0xb84/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff81067136>] worker_thread+0x25d/0x35f
[  205.843769]        [<ffffffff8106b1d0>] kthread+0x9a/0xa2
[  205.843769]        [<ffffffff8100aaa4>] kernel_thread_helper+0x4/0x10
[  205.843769] 
[  205.843769] -> #2 (events){+.+.+.}:
[  205.843769]        [<ffffffff8107ea94>] __lock_acquire+0xb84/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff81067a8b>] flush_workqueue+0x63/0xb1
[  205.843769]        [<ffffffff81067aee>] flush_scheduled_work+0x15/0x17
[  205.843769]        [<ffffffff8138168b>] do_md_stop+0x2c0/0x508
[  205.843769]        [<ffffffff81383b94>] md_ioctl+0x92f/0xf49
[  205.843769]        [<ffffffff8121442d>] __blkdev_driver_ioctl+0x39/0xa3
[  205.843769]        [<ffffffff81214dc8>] blkdev_ioctl+0x67d/0x6b1
[  205.843769]        [<ffffffff8113ef34>] block_ioctl+0x37/0x3b
[  205.843769]        [<ffffffff81126294>] vfs_ioctl+0x32/0xa6
[  205.843769]        [<ffffffff81126814>] do_vfs_ioctl+0x490/0x4d6
[  205.843769]        [<ffffffff811268b0>] sys_ioctl+0x56/0x79
[  205.843769]        [<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
[  205.843769] 
[  205.843769] -> #1 (&new->reconfig_mutex){+.+.+.}:
[  205.843769]        [<ffffffff8107ea94>] __lock_acquire+0xb84/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff8145504b>] __mutex_lock_common+0x4b/0x392
[  205.843769]        [<ffffffff814553d0>] mutex_lock_interruptible_nested+0x3e/0x43
[  205.843769]        [<ffffffff8137bd62>] mddev_lock+0x17/0x19
[  205.843769]        [<ffffffff8137c039>] md_attr_show+0x32/0x5d
[  205.843769]        [<ffffffff811708dc>] sysfs_read_file+0xbd/0x17f
[  205.843769]        [<ffffffff8111983d>] vfs_read+0xab/0x108
[  205.843769]        [<ffffffff8111995a>] sys_read+0x4a/0x6e
[  205.843769]        [<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
[  205.843769] 
[  205.843769] -> #0 (s_active){++++.+}:
[  205.843769]        [<ffffffff8107e93e>] __lock_acquire+0xa2e/0xd3c
[  205.843769]        [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]        [<ffffffff81171463>] sysfs_deactivate+0x9a/0x103
[  205.843769]        [<ffffffff81171a56>] sysfs_addrm_finish+0x36/0x55
[  205.843769]        [<ffffffff81171aab>] remove_dir+0x36/0x3e
[  205.843769]        [<ffffffff81171b60>] sysfs_remove_dir+0x9d/0xbe
[  205.843769]        [<ffffffff812206c1>] kobject_del+0x16/0x37
[  205.843769]        [<ffffffff8122078a>] kobject_release+0xa8/0xf8
[  205.843769]        [<ffffffff8122165d>] kref_put+0x43/0x4d
[  205.843769]        [<ffffffff8122063c>] kobject_put+0x47/0x4b
[  205.843769]        [<ffffffffa02d5ef5>] br_sysfs_delbr+0x21/0x43 [bridge]
[  205.843769]        [<ffffffffa02d20e9>] del_br+0x5a/0x6f [bridge]
[  205.843769]        [<ffffffffa02d24b2>] br_del_bridge+0x59/0x67 [bridge]
[  205.843769]        [<ffffffffa02d3764>] br_ioctl_deviceless_stub+0x1fb/0x21b [bridge]
[  205.843769]        [<ffffffff813b32c4>] sock_ioctl+0x141/0x20d
[  205.843769]        [<ffffffff81126294>] vfs_ioctl+0x32/0xa6
[  205.843769]        [<ffffffff81126814>] do_vfs_ioctl+0x490/0x4d6
[  205.843769]        [<ffffffff811268b0>] sys_ioctl+0x56/0x79
[  205.843769]        [<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
[  205.843769] 
[  205.843769] other info that might help us debug this:
[  205.843769] 
[  205.843769] 2 locks held by libvirtd/3058:
[  205.843769]  #0:  (br_ioctl_mutex){+.+.+.}, at: [<ffffffff813b32a9>] sock_ioctl+0x126/0x20d
[  205.843769]  #1:  (rtnl_mutex){+.+.+.}, at: [<ffffffff813cedd9>] rtnl_lock+0x17/0x19
[  205.843769] 
[  205.843769] stack backtrace:
[  205.843769] Pid: 3058, comm: libvirtd Not tainted 2.6.33-rc5 #3
[  205.843769] Call Trace:
[  205.843769]  [<ffffffff8107dae0>] print_circular_bug+0xa8/0xb6
[  205.843769]  [<ffffffff8107e93e>] __lock_acquire+0xa2e/0xd3c
[  205.843769]  [<ffffffff81171a56>] ? sysfs_addrm_finish+0x36/0x55
[  205.843769]  [<ffffffff8107ed19>] lock_acquire+0xcd/0xf1
[  205.843769]  [<ffffffff81171a56>] ? sysfs_addrm_finish+0x36/0x55
[  205.843769]  [<ffffffff81171463>] sysfs_deactivate+0x9a/0x103
[  205.843769]  [<ffffffff81171a56>] ? sysfs_addrm_finish+0x36/0x55
[  205.843769]  [<ffffffff8107c028>] ? trace_hardirqs_off+0xd/0xf
[  206.367937]  [<ffffffff81454e6a>] ? __mutex_unlock_slowpath+0x120/0x132
[  206.367937]  [<ffffffff81171a56>] sysfs_addrm_finish+0x36/0x55
[  206.367937]  [<ffffffff81171aab>] remove_dir+0x36/0x3e
[  206.367937]  [<ffffffff81171b60>] sysfs_remove_dir+0x9d/0xbe
[  206.367937]  [<ffffffff812206c1>] kobject_del+0x16/0x37
[  206.367937]  [<ffffffff8122078a>] kobject_release+0xa8/0xf8
[  206.367937]  [<ffffffff812206e2>] ? kobject_release+0x0/0xf8
[  206.367937]  [<ffffffff8122165d>] kref_put+0x43/0x4d
[  206.367937]  [<ffffffff8122063c>] kobject_put+0x47/0x4b
[  206.367937]  [<ffffffff8105d218>] ? del_timer_sync+0x0/0xa6
[  206.367937]  [<ffffffffa02d5ef5>] br_sysfs_delbr+0x21/0x43 [bridge]
[  206.367937]  [<ffffffffa02d20e9>] del_br+0x5a/0x6f [bridge]
[  206.367937]  [<ffffffffa02d24b2>] br_del_bridge+0x59/0x67 [bridge]
[  206.367937]  [<ffffffffa02d3764>] br_ioctl_deviceless_stub+0x1fb/0x21b [bridge]
[  206.367937]  [<ffffffff813b32c4>] sock_ioctl+0x141/0x20d
[  206.367937]  [<ffffffff81126294>] vfs_ioctl+0x32/0xa6
[  206.367937]  [<ffffffff81126814>] do_vfs_ioctl+0x490/0x4d6
[  206.367937]  [<ffffffff811268b0>] sys_ioctl+0x56/0x79
[  206.367937]  [<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
[  206.482734] kobject: 'brif' (ffff880213a243b8): calling ktype release
[  206.492872] kobject: (ffff880213a243b8): dynamic_kobj_release
[  206.498841] kobject: 'brif': free name
[  206.527833] kobject: 'virbr0' (ffff8801cf3b0500): kobject_uevent_env
[  206.534360] kobject: 'virbr0' (ffff8801cf3b0500): fill_kobj_path: path = '/devices/virtual/net/virbr0'
[  206.551468] kobject: 'virbr0' (ffff8801cf3b0500): kobject_cleanup
[  206.557611] kobject: 'virbr0' (ffff8801cf3b0500): calling ktype release
[  206.564358] kobject: 'virbr0': free name
[  208.575408] kobject: 'tun' (ffffffffa044b510): kobject_add_internal: parent: 'module', set: 'module'
[  208.595562] kobject: 'holders' (ffff8801d352cf68): kobject_add_internal: parent: 'tun', set: '<NULL>'
[  208.604990] kobject: 'tun' (ffffffffa044b510): kobject_uevent_env
[  208.611296] kobject: 'tun' (ffffffffa044b510): fill_kobj_path: path = '/module/tun'
[  208.620119] kobject: 'notes' (ffff8801d352c660): kobject_add_internal: parent: 'tun', set: '<NULL>'
[  208.630343] tun: Universal TUN/TAP device driver, 1.6
[  208.635421] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[  208.641721] kobject: 'tun' (ffff8801cd319e08): kobject_add_internal: parent: 'misc', set: 'devices'
[  208.651194] kobject: 'tun' (ffff8801cd319e08): kobject_uevent_env
[  208.657386] kobject: 'tun' (ffff8801cd319e08): fill_kobj_path: path = '/devices/virtual/misc/tun'
[  208.671916] kobject: 'vnet0' (ffff880207df35e0): kobject_add_internal: parent: 'net', set: 'devices'
[  208.682667] kobject: 'vnet0' (ffff880207df35e0): kobject_uevent_env
[  208.689435] kobject: 'vnet0' (ffff880207df35e0): fill_kobj_path: path = '/devices/virtual/net/vnet0'
[  208.712572] device vnet0 entered promiscuous mode
[  208.717571] kobject: 'brport' (ffff8801cd378e88): kobject_add_internal: parent: 'vnet0', set: '<NULL>'
[  208.728149] kobject: 'brport' (ffff8801cd378e88): kobject_uevent_env
[  208.734561] kobject: 'brport' (ffff8801cd378e88): kobject_uevent_env: filter function caused the event to drop!
[  208.748356] br0: port 2(vnet0) entering forwarding state
[  209.576245] kobject: 'vnet1' (ffff8801cc9a0500): kobject_add_internal: parent: 'net', set: 'devices'
[  209.587167] kobject: 'vnet1' (ffff8801cc9a0500): kobject_uevent_env
[  209.593773] kobject: 'vnet1' (ffff8801cc9a0500): fill_kobj_path: path = '/devices/virtual/net/vnet1'
[  209.614211] device vnet1 entered promiscuous mode
[  209.619898] kobject: 'brport' (ffff8801cee35308): kobject_add_internal: parent: 'vnet1', set: '<NULL>'
[  209.631310] kobject: 'brport' (ffff8801cee35308): kobject_uevent_env
[  209.638303] kobject: 'brport' (ffff8801cee35308): kobject_uevent_env: filter function caused the event to drop!
[  209.654971] br0: port 3(vnet1) entering forwarding state
[  210.268995] SELinux: initialized (dev mqueue, type mqueue), uses transition SIDs
[  210.277526] kobject: 'pid_2' (ffff88020e222128): kobject_add_internal: parent: 'slab', set: 'slab'
[  210.288037] kobject: 'pid_2' (ffff88020e222128): kobject_uevent_env
[  210.294431] kobject: 'pid_2' (ffff88020e222128): fill_kobj_path: path = '/kernel/slab/pid_2'
[  210.304019] SELinux: initialized (dev proc, type proc), uses genfs_contexts
[  210.397532] SELinux: initialized (dev mqueue, type mqueue), uses transition SIDs
[  210.434435] lo: Disabled Privacy Extensions
[  210.443268] SELinux: initialized (dev proc, type proc), uses genfs_contexts
[  210.787652] kobject: 'lo' (ffff880207b725a0): kobject_cleanup
[  210.793444] kobject: 'lo' (ffff880207b725a0): calling ktype release
[  210.799783] kobject: 'lo': free name
[  218.966215] vnet0: no IPv6 routers present
[  220.336219] vnet1: no IPv6 routers present
[  238.799662] kobject: 'vnet2' (ffff8801ccba8500): kobject_add_internal: parent: 'net', set: 'devices'
[  238.811833] kobject: 'vnet2' (ffff8801ccba8500): kobject_uevent_env
[  238.818841] kobject: 'vnet2' (ffff8801ccba8500): fill_kobj_path: path = '/devices/virtual/net/vnet2'
[  238.841088] device vnet2 entered promiscuous mode
[  238.846209] kobject: 'brport' (ffff8801cf2d92d0): kobject_add_internal: parent: 'vnet2', set: '<NULL>'
[  238.856592] kobject: 'brport' (ffff8801cf2d92d0): kobject_uevent_env
[  238.863088] kobject: 'brport' (ffff8801cf2d92d0): kobject_uevent_env: filter function caused the event to drop!
[  238.878798] br0: port 4(vnet2) entering forwarding state
[  249.395339] vnet2: no IPv6 routers present
[  339.729225] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
[  339.730086] last sysfs file: /sys/devices/virtual/block/md0/md/sync_speed
[  339.730086] CPU 7 
[  339.730086] Pid: 3245, comm: qemu-kvm Not tainted 2.6.33-rc5 #3 0F9382/Precision WorkStation 490    
[  339.730086] RIP: 0010:[<ffffffff813e5f3e>]  [<ffffffff813e5f3e>] nf_ct_remove_expectations+0x49/0x5c
[  339.730086] RSP: 0018:ffff880030603c18  EFLAGS: 00010206
[  339.730086] RAX: ffff8801c2ea530b RBX: 009ab2000008d300 RCX: ffffffffa02925c1
[  339.730086] RDX: 000000000000006b RSI: ffff880030603be8 RDI: 009ab2000008d378
[  339.730086] RBP: ffff880030603c28 R08: 0000000000000002 R09: 0000000000000000
[  339.730086] R10: 0000000000000003 R11: ffff88019d28a268 R12: ffffffff829a0400
[  339.730086] R13: ffffffffa02925c1 R14: 0000000000000000 R15: ffff8801a18e4630
[  339.730086] FS:  00007fb6197ca780(0000) GS:ffff880030600000(0000) knlGS:0000000000000000
[  339.730086] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  339.730086] CR2: 00007f747a184178 CR3: 00000001badd8000 CR4: 00000000000026e0
[  339.730086] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  339.730086] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  339.730086] Process qemu-kvm (pid: 3245, threadinfo ffff8801b9370000, task ffff8801d53c48a0)
[  339.730086] Stack:
[  339.730086]  ffffffff81b045d0 ffffffff829a0400 ffff880030603c48 ffffffff813e3426
[  339.730086] <0> ffff8801a18e4600 ffff88019d28a250 ffff880030603c68 ffffffff813e10f8
[  339.730086] <0> ffff880030603c68 ffffffff81b045d0 ffff880030603c88 ffffffff813bc080
[  339.730086] Call Trace:
[  339.730086]  <IRQ> 
[  339.730086]  [<ffffffff813e3426>] destroy_conntrack+0x73/0x121
[  339.730086]  [<ffffffff813e10f8>] nf_conntrack_destroy+0x2c/0x33
[  339.730086]  [<ffffffff813bc080>] skb_release_head_state+0x77/0xb9
[  339.730086]  [<ffffffff813bbde2>] __kfree_skb+0x16/0x82
[  339.730086]  [<ffffffff813bbee7>] kfree_skb+0x6a/0x73
[  339.730086]  [<ffffffffa02925c1>] ip6_mc_input+0x214/0x221 [ipv6]
[  339.730086]  [<ffffffffa02925f5>] ip6_rcv_finish+0x27/0x2b [ipv6]
[  339.730086]  [<ffffffffa0292938>] ipv6_rcv+0x33f/0x37f [ipv6]
[  339.730086]  [<ffffffff813c416a>] netif_receive_skb+0x3b0/0x3da
[  339.730086]  [<ffffffffa02d2b6e>] br_handle_frame_finish+0x104/0x13c [bridge]
[  339.730086]  [<ffffffffa02d2d37>] br_handle_frame+0x191/0x1aa [bridge]
[  339.730086]  [<ffffffff813c40d6>] netif_receive_skb+0x31c/0x3da
[  339.730086]  [<ffffffff8106e6ee>] ? __run_hrtimer+0xec/0x11b
[  339.730086]  [<ffffffff813c4230>] process_backlog+0x9c/0xd8
[  339.730086]  [<ffffffff813c489b>] net_rx_action+0x7d/0x19c
[  339.730086]  [<ffffffff81055d08>] __do_softirq+0xf8/0x1cd
[  339.730086]  [<ffffffff8100ab9c>] call_softirq+0x1c/0x30
[  339.730086]  <EOI> 
[  339.730086]  [<ffffffff8100c38f>] ? do_softirq+0x4b/0xa3
[  339.730086]  [<ffffffff813c49e0>] netif_rx_ni+0x26/0x2b
[  339.730086]  [<ffffffffa0449d6d>] tun_chr_aio_write+0x3ce/0x429 [tun]
[  339.730086]  [<ffffffffa044999f>] ? tun_chr_aio_write+0x0/0x429 [tun]
[  339.730086]  [<ffffffff81118fd2>] do_sync_readv_writev+0xc1/0x100
[  339.730086]  [<ffffffff811e9ee1>] ? selinux_file_permission+0xa7/0xb3
[  339.730086]  [<ffffffff81118d36>] ? copy_from_user+0x2f/0x31
[  339.730086]  [<ffffffff811e02f5>] ? security_file_permission+0x16/0x18
[  339.730086]  [<ffffffff81119d1f>] do_readv_writev+0xa7/0x127
[  339.730086]  [<ffffffff8111a1d7>] ? rcu_read_unlock+0x21/0x23
[  339.730086]  [<ffffffff8111a2bd>] ? fget_light+0xe4/0xf2
[  339.730086]  [<ffffffff8111a230>] ? fget_light+0x57/0xf2
[  339.730086]  [<ffffffff81119de2>] vfs_writev+0x43/0x4e
[  339.730086]  [<ffffffff81119ed2>] sys_writev+0x4a/0x93
[  339.730086]  [<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
[  339.730086] Code: 38 0f b6 d2 48 01 d0 74 30 48 8b 58 28 eb 13 48 89 df e8 fc f8 ff ff 48 89 df e8 c8 f8 ff ff 4c 89 e3 48 85 db 74 12 48 8d 7b 78 <4c> 8b 23 e8 e2 73 c7 ff 85 c0 74 e8 eb d6 5b 41 5c c9 c3 55 48 
[  339.730086] RIP  [<ffffffff813e5f3e>] nf_ct_remove_expectations+0x49/0x5c
[  339.730086]  RSP <ffff880030603c18>
[  340.095082] ---[ end trace 7be6d51534d25d87 ]---
[  340.099728] Kernel panic - not syncing: Fatal exception in interrupt
[  340.106123] Pid: 3245, comm: qemu-kvm Tainted: G      D    2.6.33-rc5 #3
[  340.112853] Call Trace:
[  340.112860]  <IRQ>  [<ffffffff81453b1d>] panic+0x7a/0x142
[  340.112886]  [<ffffffff81458011>] oops_end+0xb7/0xc7
[  340.112898]  [<ffffffff8100d421>] die+0x5a/0x63
[  340.112909]  [<ffffffff81457bcc>] do_general_protection+0x12a/0x133
[  340.112922]  [<ffffffff81457100>] ? irq_return+0x0/0x10
[  340.112956]  [<ffffffffa02925c1>] ? ip6_mc_input+0x214/0x221 [ipv6]
[  340.112969]  [<ffffffff81457345>] general_protection+0x25/0x30
[  340.113002]  [<ffffffffa02925c1>] ? ip6_mc_input+0x214/0x221 [ipv6]

^ permalink raw reply

* Which tool to use?
From: Williams, Mitch A @ 2010-01-28  6:10 UTC (permalink / raw)
  To: netdev@vger.kernel.org, davem@davemloft.net, Stephen Hemminger

Which tool to use?

Just looking for a bit of direction before I go off and start coding...

Our SR-IOV capable parts (like everybody else's) include simple built-in
Layer 2 switch, to allow packets to be switched between the various VF 
devices.

We need the capability of configuring this switch from userspace. There
are a few features we'd like to control, like anti-spoofing, and
storm control, as well as being able to completely disable the internal
switch for external loopback.  Mostly, however, we want to be able to add
new MAC address filters to the switch.

This is actually a pressing need, for SR-IOV to be really usable in
a virtualized environment. In most use cases, along with VMs that are
assigned VF devices, there will be a bunch of VMs talking through the PF
device via a bridge.  We need to add the MAC addresses of these VMs to
the on-board switch, or other VMs using the VF devices won't be able to
talk to them - the packets will go out on the wire instead.

So, which tool do I modify to make this happen? Ethtool, or ip?  I can
think of convincing arguments for either, so I want to double-check with
the maintainers before I dive in.

Thanks,
Mitch

-------
If we knew what it was we were doing, it would not be called research,
would it?
                                   - Albert Einstein


^ permalink raw reply

* Re: [PATCH] net/irda: sh_sir: Add SuperH IrDA driver
From: Stephen Hemminger @ 2010-01-28  6:08 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: netdev, Samuel Ortiz, David S. Miller
In-Reply-To: <uiqam6emt.wl%morimoto.kuninori@renesas.com>

I am happy to see an IRDA driver again, especially one
that doesn't have the UGLY_MACROS that seem to be so
common in that code.

On Thu, 28 Jan 2010 13:24:10 +0900
Kuninori Morimoto <morimoto.kuninori@renesas.com> wrote:

> +struct sh_sir_self {
> +	void __iomem		*membase;
> +	unsigned int		 irq;
> +	struct clk		*clk;
> +
> +	struct net_device	*ndev;
> +
> +	struct net_device_stats	stats;

The network device has stats in netdev->stats now
so devices don't have to keep their own data structure.

Does the device support Fast IR mode?


-- 

^ permalink raw reply

* Re: [PATCH v5] rps: Receive Packet Steering
From: Stephen Hemminger @ 2010-01-28  6:04 UTC (permalink / raw)
  To: Tom Herbert; +Cc: davem, netdev
In-Reply-To: <alpine.DEB.1.00.1001141353140.19018@pokey.mtv.corp.google.com>

On Thu, 14 Jan 2010 13:56:23 -0800 (PST)
Tom Herbert <therbert@google.com> wrote:

> This patch implements software receive side packet steering (RPS).  RPS
> distributes the load of received packet processing across multiple CPUs.
> 
> Problem statement: Protocol processing done in the NAPI context for received
> packets is serialized per device queue and becomes a bottleneck under high
> packet load.  This substantially limits pps that can be achieved on a single
> queue NIC and provides no scaling with multiple cores.
> 
> This solution queues packets early on in the receive path on the backlog queues
> of other CPUs.   This allows protocol processing (e.g. IP and TCP) to be
> performed on packets in parallel.   For each device (or NAPI instance for
> a multi-queue device) a mask of CPUs is set to indicate the CPUs that can
> process packets for the device. A CPU is selected on a per packet basis by
> hashing contents of the packet header (the TCP or UDP 4-tuple) and using the
> result to index into the CPU mask.  The IPI mechanism is used to raise
> networking receive softirqs between CPUs.  This effectively emulates in
> software what a multi-queue NIC can provide, but is generic requiring no device
> support.
> 
> Many devices now provide a hash over the 4-tuple on a per packet basis
> (Toeplitz is popular).  This patch allow drivers to set the HW reported hash
> in an skb field, and that value in turn is used to index into the RPS maps.
> Using the HW generated hash can avoid cache misses on the packet when
> steering the packet to a remote CPU.
> 
> The CPU masks is set on a per device basis in the sysfs variable
> /sys/class/net/<device>/rps_cpus.  This is a set of canonical bit maps for
> each NAPI nstance of the device.  For example:
> 
> echo "0b 0b0 0b00 0b000" > /sys/class/net/eth0/rps_cpus
> 
> would set maps for four NAPI instances on eth0.
> 
> Generally, we have found this technique increases pps capabilities of a single
> queue device with good CPU utilization.  Optimal settings for the CPU mask
> seems to depend on architectures and cache hierarcy.  Below are some results
> running 500 instances of netperf TCP_RR test with 1 byte req. and resp.
> Results show cumulative transaction rate and system CPU utilization.
> 
> e1000e on 8 core Intel
>     Without RPS: 90K tps at 33% CPU
>     With RPS:    239K tps at 60% CPU
> 
> foredeth on 16 core AMD
>     Without RPS: 103K tps at 15% CPU
>     With RPS:    285K tps at 49% CPU
> 
> Caveats:
> - The benefits of this patch are dependent on architecture and cache hierarchy.
> Tuning the masks to get best performance is probably necessary.
> - This patch adds overhead in the path for processing a single packet.  In
> a lightly loaded server this overhead may eliminate the advantages of
> increased parallelism, and possibly cause some relative performance degradation.
> We have found that RPS masks that are cache aware (share same caches with
> the interrupting CPU) mitigate much of this.
> - The RPS masks can be changed dynamically, however whenever the mask is changed
> this introduces the possbility of generating out of order packets.  It's
> probably best not change the masks too frequently.
> 
> Signed-off-by: Tom Herbert <therbert@google.com>
> 

I started playing and looking more closely at this.
1. CPU and several of the other parameters like backlog should be unsigned
   to avoid possible problems
2. __netif_receive_skb() can be static so gcc can optimize better
3. Not sure if it works or not with devices like sky2 that can have
   two netdevice's sharing same NAPI instance because both ports have
   shared irq.



-- 

^ permalink raw reply

* Re: PROBLEM: reproducible crash KVM+nf_conntrack all recent 2.6 kernels
From: Jon Masters @ 2010-01-28  5:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, netfilter-devel
In-Reply-To: <1264657559.2793.103.camel@tonnant>

On Thu, 2010-01-28 at 00:46 -0500, Jon Masters wrote:

> A number of people seem to have reported this crash in various forms,
> but I have yet to see a solution, and can reproduce on 2.6.33-rc5 this
> evening so I know it's still present in the latest upstream kernels too.
> Userspace is Fedora 12, and this happens on both all recent F12 kernels
> (sporadic in 2.6.31 until recently, solidly reproducible on 2.6.32) and
> upstream 2.6.32, and 2.6.33-rc5 also - hard to find a "known good".

Now I can capture the panic()s, I'm rebuilding the 2.6.33-rc5 kernel
with some better debugging options to at least get some more data.

Jon.



^ permalink raw reply

* PROBLEM: reproducible crash KVM+nf_conntrack all recent 2.6 kernels
From: Jon Masters @ 2010-01-28  5:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, netfilter-devel

Folks,

A number of people seem to have reported this crash in various forms,
but I have yet to see a solution, and can reproduce on 2.6.33-rc5 this
evening so I know it's still present in the latest upstream kernels too.
Userspace is Fedora 12, and this happens on both all recent F12 kernels
(sporadic in 2.6.31 until recently, solidly reproducible on 2.6.32) and
upstream 2.6.32, and 2.6.33-rc5 also - hard to find a "known good".

The problem happens when using netfilter with KVM (problem does not
occur without the firewall loaded, for example) and will occur within a
few minutes of attempting to start or stop a guest that is connecting to
the network - the easiest way to reproduce so far is simply to start up
a bunch of Fedora guests and have them do a "yum update" cycle.

All of the crashes appear similar to the following (2.6.33-rc5):

general protection fault: 0000 [#1] SMP 
last sysfs file: /sys/kernel/mm/ksm/run
CPU 6 
Pid: 2982, comm: qemu-kvm Not tainted 2.6.33-rc5 #2 0F9382/Precision
WorkStation 490    
RIP: 0010:[<ffffffff813b4115>]  [<ffffffff813b4115>] destroy_conntrack
+0x82/0x114
RSP: 0018:ffff880028383c48  EFLAGS: 00010202
RAX: 0000000080000001 RBX: ffffffff81af33a0 RCX: 0000000000007530
RDX: dead000000200200 RSI: 0000000000000011 RDI: ffffffff81af33a0
RBP: ffff880028383c58 R08: ffff8802171b14d0 R09: 000000000000000a
R10: 00000040283957c0 R11: ffff8800283838a8 R12: ffffffff81ddbce0
R13: ffffffffa0281389 R14: 0000000000000000 R15: ffff88021140f430
FS:  00007fc17b7d2780(0000) GS:ffff880028380000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007fc12c038000 CR3: 00000001db1bb000 CR4: 00000000000026e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-kvm (pid: 2982, threadinfo ffff8801dab40000, task
ffff8801dab38000)
Stack:
 ffff88021140f400 ffff88021360e410 ffff880028383c68 ffffffff813b2016
<0> ffff880028383c88 ffffffff8138dbc3 ffff880028383c88 ffff88021140f400
<0> ffff880028383ca8 ffffffff8138d925 0000000300000000 ffff88021140f400
Call Trace:
 <IRQ> 
 [<ffffffff813b2016>] nf_conntrack_destroy+0x1b/0x1d
 [<ffffffff8138dbc3>] skb_release_head_state+0x77/0xb9
 [<ffffffff8138d925>] __kfree_skb+0x16/0x82
 [<ffffffff8138da2a>] kfree_skb+0x6a/0x73
 [<ffffffffa0281389>] ip6_mc_input+0x214/0x221 [ipv6]
 [<ffffffffa02813bd>] ip6_rcv_finish+0x27/0x2b [ipv6]
 [<ffffffffa02816c7>] ipv6_rcv+0x306/0x33f [ipv6]
 [<ffffffff813b2193>] ? nf_hook_slow+0x6a/0xcb
 [<ffffffff81395593>] ? netif_receive_skb+0x0/0x3c6
 [<ffffffff81395934>] netif_receive_skb+0x3a1/0x3c6
 [<ffffffffa02ebae6>] br_handle_frame_finish+0x104/0x13c [bridge]
 [<ffffffffa02ebcaf>] br_handle_frame+0x191/0x1aa [bridge]
 [<ffffffff813958a0>] netif_receive_skb+0x30d/0x3c6
 [<ffffffff813959e3>] process_backlog+0x8a/0xc3
 [<ffffffff81395fd8>] net_rx_action+0x78/0x17e
 [<ffffffff81052fda>] __do_softirq+0xe5/0x1a6
 [<ffffffff8100ab1c>] call_softirq+0x1c/0x30
 <EOI> 
 [<ffffffff8100c2b6>] ? do_softirq+0x46/0x83
 [<ffffffff81396104>] netif_rx_ni+0x26/0x2b
 [<ffffffffa0436d6e>] tun_chr_aio_write+0x3ce/0x429 [tun]
 [<ffffffffa04369a0>] ? tun_chr_aio_write+0x0/0x429 [tun]
 [<ffffffff81104b89>] do_sync_readv_writev+0xc1/0x100
 [<ffffffff811d0c2f>] ? selinux_file_permission+0xa7/0xb3
 [<ffffffff811048ed>] ? copy_from_user+0x2f/0x31
 [<ffffffff811c7149>] ? security_file_permission+0x16/0x18
 [<ffffffff811058d3>] do_readv_writev+0xa7/0x127
 [<ffffffff81066761>] ? unlock_timer+0x12/0x14
 [<ffffffff81066d18>] ? sys_timer_settime+0x258/0x2aa
 [<ffffffff81105996>] vfs_writev+0x43/0x4e
 [<ffffffff81105a86>] sys_writev+0x4a/0x93
 [<ffffffff81009c32>] system_call_fastpath+0x16/0x1b
Code: c7 00 cd dd 81 e8 67 f6 ff ff 48 89 df e8 90 28 00 00 f6 43 78 08
75 2a 48 8b 53 10 48 85 d2 75 04 0f 0b eb fe 48 8b 43 08 a8 01 <48> 89
02 75 04 48 89 50 08 48 b8 00 02 20 00 00 00 ad de 48 89 
RIP  [<ffffffff813b4115>] destroy_conntrack+0x82/0x114
 RSP <ffff880028383c48>
---[ end trace ee1619cd5f767f78 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Pid: 2982, comm: qemu-kvm Tainted: G      D    2.6.33-rc5 #2
Call Trace:
 <IRQ>  [<ffffffff81421fb5>] panic+0x7a/0x13d
 [<ffffffff81425569>] oops_end+0xb7/0xc7
 [<ffffffff8100d35d>] die+0x5a/0x63

Several people have suggested various sysctls. I note that my F12 box
has the following set by default now:

# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0

This does not fix the problem, although I am indeed using bridged
networking for the guest instances.

At this point, I've disabled loading the firewall modules on this box
since it's behind a firewall anyway and I need it to keep running more
than ten minutes at a time :) but I am obviously interested in helping
to track this down and fix it. I don't know the code in question and I
won't have time to poke much further until the weekend.

Jon.

^ permalink raw reply

* [PATCH] net/irda: sh_sir: Add SuperH IrDA driver
From: Kuninori Morimoto @ 2010-01-28  4:24 UTC (permalink / raw)
  To: netdev; +Cc: Samuel Ortiz, David S. Miller

This is very simple IrDA driver for SuperH.
This driver was tested by irdaping/ircp on SH7724 EcoVec24 board

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
---
 drivers/net/irda/Kconfig  |   10 +
 drivers/net/irda/Makefile |    1 +
 drivers/net/irda/sh_sir.c |  825 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 836 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/irda/sh_sir.c

diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index f763842..af10e97 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -64,6 +64,16 @@ endchoice
 
 comment "Dongle support"
 
+config SH_SIR
+	tristate "SuperH SIR on UART"
+	depends on IRDA && SUPERH && \
+		(CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7723 || \
+		 CPU_SUBTYPE_SH7724)
+	default n
+	help
+	  Say Y here if your want to enable SIR function on SuperH UART
+	  devices.
+
 config DONGLE
 	bool "Serial dongle support"
 	depends on IRTTY_SIR
diff --git a/drivers/net/irda/Makefile b/drivers/net/irda/Makefile
index d82e1e3..e030d47 100644
--- a/drivers/net/irda/Makefile
+++ b/drivers/net/irda/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_AU1000_FIR)	+= au1k_ir.o
 # SIR drivers
 obj-$(CONFIG_IRTTY_SIR)		+= irtty-sir.o	sir-dev.o
 obj-$(CONFIG_BFIN_SIR)		+= bfin_sir.o
+obj-$(CONFIG_SH_SIR)		+= sh_sir.o
 # dongle drivers for SIR drivers
 obj-$(CONFIG_ESI_DONGLE)	+= esi-sir.o
 obj-$(CONFIG_TEKRAM_DONGLE)	+= tekram-sir.o
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
new file mode 100644
index 0000000..a8e5880
--- /dev/null
+++ b/drivers/net/irda/sh_sir.c
@@ -0,0 +1,825 @@
+/*
+ * SuperH IrDA Driver
+ *
+ * Copyright (C) 2009 Renesas Solutions Corp.
+ * Kuninori Morimoto <morimoto.kuninori@renesas.com>
+ *
+ * Based on bfin_sir.c
+ * Copyright 2006-2009 Analog Devices Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <net/irda/wrapper.h>
+#include <net/irda/irda_device.h>
+#include <asm/clock.h>
+
+#define DRIVER_NAME "sh_sir"
+
+#define RX_PHASE	(1 << 0)
+#define TX_PHASE	(1 << 1)
+#define TX_COMP_PHASE	(1 << 2) /* tx complete */
+#define NONE_PHASE	(1 << 31)
+
+#define IRIF_RINTCLR	0x0016 /* DMA rx interrupt source clear */
+#define IRIF_TINTCLR	0x0018 /* DMA tx interrupt source clear */
+#define IRIF_SIR0	0x0020 /* IrDA-SIR10 control */
+#define IRIF_SIR1	0x0022 /* IrDA-SIR10 baudrate error correction */
+#define IRIF_SIR2	0x0024 /* IrDA-SIR10 baudrate count */
+#define IRIF_SIR3	0x0026 /* IrDA-SIR10 status */
+#define IRIF_SIR_FRM	0x0028 /* Hardware frame processing set */
+#define IRIF_SIR_EOF	0x002A /* EOF value */
+#define IRIF_SIR_FLG	0x002C /* Flag clear */
+#define IRIF_UART_STS2	0x002E /* UART status 2 */
+#define IRIF_UART0	0x0030 /* UART control */
+#define IRIF_UART1	0x0032 /* UART status */
+#define IRIF_UART2	0x0034 /* UART mode */
+#define IRIF_UART3	0x0036 /* UART transmit data */
+#define IRIF_UART4	0x0038 /* UART receive data */
+#define IRIF_UART5	0x003A /* UART interrupt mask */
+#define IRIF_UART6	0x003C /* UART baud rate error correction */
+#define IRIF_UART7	0x003E /* UART baud rate count set */
+#define IRIF_CRC0	0x0040 /* CRC engine control */
+#define IRIF_CRC1	0x0042 /* CRC engine input data */
+#define IRIF_CRC2	0x0044 /* CRC engine calculation */
+#define IRIF_CRC3	0x0046 /* CRC engine output data 1 */
+#define IRIF_CRC4	0x0048 /* CRC engine output data 2 */
+
+/* IRIF_SIR0 */
+#define IRTPW		(1 << 1) /* transmit pulse width select */
+#define IRERRC		(1 << 0) /* Clear receive pulse width error */
+
+/* IRIF_SIR3 */
+#define IRERR		(1 << 0) /* received pulse width Error */
+
+/* IRIF_SIR_FRM */
+#define EOFD		(1 << 9) /* EOF detection flag */
+#define FRER		(1 << 8) /* Frame Error bit */
+#define FRP		(1 << 0) /* Frame processing set */
+
+/* IRIF_UART_STS2 */
+#define IRSME		(1 << 6) /* Receive Sum     Error flag */
+#define IROVE		(1 << 5) /* Receive Overrun Error flag */
+#define IRFRE		(1 << 4) /* Receive Framing Error flag */
+#define IRPRE		(1 << 3) /* Receive Parity  Error flag */
+
+/* IRIF_UART0_*/
+#define TBEC		(1 << 2) /* Transmit Data Clear */
+#define RIE		(1 << 1) /* Receive Enable */
+#define TIE		(1 << 0) /* Transmit Enable */
+
+/* IRIF_UART1 */
+#define URSME		(1 << 6) /* Receive Sum Error Flag */
+#define UROVE		(1 << 5) /* Receive Overrun Error Flag */
+#define URFRE		(1 << 4) /* Receive Framing Error Flag */
+#define URPRE		(1 << 3) /* Receive Parity Error Flag */
+#define RBF		(1 << 2) /* Receive Buffer Full Flag */
+#define TSBE		(1 << 1) /* Transmit Shift Buffer Empty Flag */
+#define TBE		(1 << 0) /* Transmit Buffer Empty flag */
+#define TBCOMP		(TSBE | TBE)
+
+/* IRIF_UART5 */
+#define RSEIM		(1 << 6) /* Receive Sum Error Flag IRQ Mask */
+#define RBFIM		(1 << 2) /* Receive Buffer Full Flag IRQ Mask */
+#define TSBEIM		(1 << 1) /* Transmit Shift Buffer Empty Flag IRQ Mask */
+#define TBEIM		(1 << 0) /* Transmit Buffer Empty Flag IRQ Mask */
+#define RX_MASK		(RSEIM  | RBFIM)
+
+/* IRIF_CRC0 */
+#define CRC_RST		(1 << 15) /* CRC Engine Reset */
+#define CRC_CT_MASK	0x0FFF
+
+/************************************************************************
+
+
+			structure
+
+
+************************************************************************/
+struct sh_sir_self {
+	void __iomem		*membase;
+	unsigned int		 irq;
+	struct clk		*clk;
+
+	struct net_device	*ndev;
+
+	struct net_device_stats	stats;
+
+	struct irlap_cb		*irlap;
+	struct qos_info		qos;
+
+	iobuff_t		tx_buff;
+	iobuff_t		rx_buff;
+};
+
+/************************************************************************
+
+
+			common function
+
+
+************************************************************************/
+static void sh_sir_write(struct sh_sir_self *self, u32 offset, u16 data)
+{
+	iowrite16(data, self->membase + offset);
+}
+
+static u16 sh_sir_read(struct sh_sir_self *self, u32 offset)
+{
+	return ioread16(self->membase + offset);
+}
+
+static void sh_sir_update_bits(struct sh_sir_self *self, u32 offset,
+			       u16 mask, u16 data)
+{
+	u16 old, new;
+
+	old = sh_sir_read(self, offset);
+	new = (old & ~mask) | data;
+	if (old != new)
+		sh_sir_write(self, offset, new);
+}
+
+/************************************************************************
+
+
+			CRC function
+
+
+************************************************************************/
+static void sh_sir_crc_reset(struct sh_sir_self *self)
+{
+	sh_sir_write(self, IRIF_CRC0, CRC_RST);
+}
+
+static void sh_sir_crc_add(struct sh_sir_self *self, u8 data)
+{
+	sh_sir_write(self, IRIF_CRC1, (u16)data);
+}
+
+static u16 sh_sir_crc_cnt(struct sh_sir_self *self)
+{
+	return CRC_CT_MASK & sh_sir_read(self, IRIF_CRC0);
+}
+
+static u16 sh_sir_crc_out(struct sh_sir_self *self)
+{
+	return sh_sir_read(self, IRIF_CRC4);
+}
+
+static int sh_sir_crc_init(struct sh_sir_self *self)
+{
+	struct device *dev = &self->ndev->dev;
+	int ret = -EIO;
+	u16 val;
+
+	sh_sir_crc_reset(self);
+
+	sh_sir_crc_add(self, 0xCC);
+	sh_sir_crc_add(self, 0xF5);
+	sh_sir_crc_add(self, 0xF1);
+	sh_sir_crc_add(self, 0xA7);
+
+	val = sh_sir_crc_cnt(self);
+	if (4 != val) {
+		dev_err(dev, "CRC count error %x\n", val);
+		goto crc_init_out;
+	}
+
+	val = sh_sir_crc_out(self);
+	if (0x51DF != val) {
+		dev_err(dev, "CRC result error%x\n", val);
+		goto crc_init_out;
+	}
+
+	ret = 0;
+
+crc_init_out:
+
+	sh_sir_crc_reset(self);
+	return ret;
+}
+
+/************************************************************************
+
+
+			baud rate functions
+
+
+************************************************************************/
+#define SCLK_BASE 1843200 /* 1.8432MHz */
+
+static u32 sh_sir_find_sclk(struct clk *irda_clk)
+{
+	struct cpufreq_frequency_table *freq_table = irda_clk->freq_table;
+	struct clk *pclk = clk_get(NULL, "peripheral_clk");
+	u32 limit, min = 0xffffffff, tmp;
+	int i, index = 0;
+
+	limit = clk_get_rate(pclk);
+	clk_put(pclk);
+
+	/* IrDA can not set over peripheral_clk */
+	for (i = 0;
+	     freq_table[i].frequency != CPUFREQ_TABLE_END;
+	     i++) {
+		u32 freq = freq_table[i].frequency;
+
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+
+		/* IrDA should not over peripheral_clk */
+		if (freq > limit)
+			continue;
+
+		tmp = freq % SCLK_BASE;
+		if (tmp < min) {
+			min = tmp;
+			index = i;
+		}
+	}
+
+	return freq_table[index].frequency;
+}
+
+#define ERR_ROUNDING(a) ((a + 5000) / 10000)
+static int sh_sir_set_baudrate(struct sh_sir_self *self, u32 baudrate)
+{
+	struct clk *clk;
+	struct device *dev = &self->ndev->dev;
+	u32 rate;
+	u16 uabca, uabc;
+	u16 irbca, irbc;
+	u32 min, rerr, tmp;
+	int i;
+
+	/* Baud Rate Error Correction x 10000 */
+	u32 rate_err_array[] = {
+		0000, 0625, 1250, 1875,
+		2500, 3125, 3750, 4375,
+		5000, 5625, 6250, 6875,
+		7500, 8125, 8750, 9375,
+	};
+
+	/*
+	 * FIXME
+	 *
+	 * it support 9600 only now
+	 */
+	switch (baudrate) {
+	case 9600:
+		break;
+	default:
+		dev_err(dev, "un-supported baudrate %d\n", baudrate);
+		return -EIO;
+	}
+
+	clk = clk_get(NULL, "irda_clk");
+	if (!clk) {
+		dev_err(dev, "can not get irda_clk\n");
+		return -EIO;
+	}
+
+	clk_set_rate(clk, sh_sir_find_sclk(clk));
+	rate = clk_get_rate(clk);
+	clk_put(clk);
+
+	dev_dbg(dev, "selected sclk = %d\n", rate);
+
+	/*
+	 * CALCULATION
+	 *
+	 * 1843200 = system rate / (irbca + (irbc + 1))
+	 */
+
+	irbc = rate / SCLK_BASE;
+
+	tmp = rate - (SCLK_BASE * irbc);
+	tmp *= 10000;
+
+	rerr = tmp / SCLK_BASE;
+
+	min = 0xffffffff;
+	irbca = 0;
+	for (i = 0; i < ARRAY_SIZE(rate_err_array); i++) {
+		tmp = abs(rate_err_array[i] - rerr);
+		if (min > tmp) {
+			min = tmp;
+			irbca = i;
+		}
+	}
+
+	tmp = rate / (irbc + ERR_ROUNDING(rate_err_array[irbca]));
+	if ((SCLK_BASE / 100) < abs(tmp - SCLK_BASE))
+		dev_warn(dev, "IrDA freq error margin over %d\n", tmp);
+
+	dev_dbg(dev, "target = %d, result = %d, infrared = %d.%d\n",
+	       SCLK_BASE, tmp, irbc, rate_err_array[irbca]);
+
+	irbca = (irbca & 0xF) << 4;
+	irbc  = (irbc - 1) & 0xF;
+
+	if (!irbc) {
+		dev_err(dev, "sh_sir can not set 0 in IRIF_SIR2\n");
+		return -EIO;
+	}
+
+	sh_sir_write(self, IRIF_SIR0, IRTPW | IRERRC);
+	sh_sir_write(self, IRIF_SIR1, irbca);
+	sh_sir_write(self, IRIF_SIR2, irbc);
+
+	/*
+	 * CALCULATION
+	 *
+	 * BaudRate[bps] = system rate / (uabca + (uabc + 1) x 16)
+	 */
+
+	uabc = rate / baudrate;
+	uabc = (uabc / 16) - 1;
+	uabc = (uabc + 1) * 16;
+
+	tmp = rate - (uabc * baudrate);
+	tmp *= 10000;
+
+	rerr = tmp / baudrate;
+
+	min = 0xffffffff;
+	uabca = 0;
+	for (i = 0; i < ARRAY_SIZE(rate_err_array); i++) {
+		tmp = abs(rate_err_array[i] - rerr);
+		if (min > tmp) {
+			min = tmp;
+			uabca = i;
+		}
+	}
+
+	tmp = rate / (uabc + ERR_ROUNDING(rate_err_array[uabca]));
+	if ((baudrate / 100) < abs(tmp - baudrate))
+		dev_warn(dev, "UART freq error margin over %d\n", tmp);
+
+	dev_dbg(dev, "target = %d, result = %d, uart = %d.%d\n",
+	       baudrate, tmp,
+	       uabc, rate_err_array[uabca]);
+
+	uabca = (uabca & 0xF) << 4;
+	uabc  = (uabc / 16) - 1;
+
+	sh_sir_write(self, IRIF_UART6, uabca);
+	sh_sir_write(self, IRIF_UART7, uabc);
+
+	return 0;
+}
+
+/************************************************************************
+
+
+			iobuf function
+
+
+************************************************************************/
+static int __sh_sir_init_iobuf(iobuff_t *io, int size)
+{
+	io->head = kmalloc(size, GFP_KERNEL);
+	if (!io->head)
+		return -ENOMEM;
+
+	io->truesize	= size;
+	io->in_frame	= FALSE;
+	io->state	= OUTSIDE_FRAME;
+	io->data	= io->head;
+
+	return 0;
+}
+
+static void sh_sir_remove_iobuf(struct sh_sir_self *self)
+{
+	kfree(self->rx_buff.head);
+	kfree(self->tx_buff.head);
+
+	self->rx_buff.head = NULL;
+	self->tx_buff.head = NULL;
+}
+
+static int sh_sir_init_iobuf(struct sh_sir_self *self, int rxsize, int txsize)
+{
+	int err = -ENOMEM;
+
+	if (self->rx_buff.head ||
+	    self->tx_buff.head) {
+		dev_err(&self->ndev->dev, "iobuff has already existed.");
+		return err;
+	}
+
+	err = __sh_sir_init_iobuf(&self->rx_buff, rxsize);
+	if (err)
+		goto iobuf_err;
+
+	err = __sh_sir_init_iobuf(&self->tx_buff, txsize);
+
+iobuf_err:
+	if (err)
+		sh_sir_remove_iobuf(self);
+
+	return err;
+}
+
+/************************************************************************
+
+
+			status function
+
+
+************************************************************************/
+static void sh_sir_clear_all_err(struct sh_sir_self *self)
+{
+	/* Clear error flag for receive pulse width */
+	sh_sir_update_bits(self, IRIF_SIR0, IRERRC, IRERRC);
+
+	/* Clear frame / EOF error flag */
+	sh_sir_write(self, IRIF_SIR_FLG, 0xffff);
+
+	/* Clear all status error */
+	sh_sir_write(self, IRIF_UART_STS2, 0);
+}
+
+static void sh_sir_set_phase(struct sh_sir_self *self, int phase)
+{
+	u16 uart5 = 0;
+	u16 uart0 = 0;
+
+	switch (phase) {
+	case TX_PHASE:
+		uart5 = TBEIM;
+		uart0 = TBEC | TIE;
+		break;
+	case TX_COMP_PHASE:
+		uart5 = TSBEIM;
+		uart0 = TIE;
+		break;
+	case RX_PHASE:
+		uart5 = RX_MASK;
+		uart0 = RIE;
+		break;
+	default:
+		break;
+	}
+
+	sh_sir_write(self, IRIF_UART5, uart5);
+	sh_sir_write(self, IRIF_UART0, uart0);
+}
+
+static int sh_sir_is_which_phase(struct sh_sir_self *self)
+{
+	u16 val = sh_sir_read(self, IRIF_UART5);
+
+	if (val & TBEIM)
+		return TX_PHASE;
+
+	if (val & TSBEIM)
+		return TX_COMP_PHASE;
+
+	if (val & RX_MASK)
+		return RX_PHASE;
+
+	return NONE_PHASE;
+}
+
+static void sh_sir_tx(struct sh_sir_self *self, int phase)
+{
+	switch (phase) {
+	case TX_PHASE:
+		if (0 >= self->tx_buff.len) {
+			sh_sir_set_phase(self, TX_COMP_PHASE);
+		} else {
+			sh_sir_write(self, IRIF_UART3, self->tx_buff.data[0]);
+			self->tx_buff.len--;
+			self->tx_buff.data++;
+		}
+		break;
+	case TX_COMP_PHASE:
+		sh_sir_set_phase(self, RX_PHASE);
+		netif_wake_queue(self->ndev);
+		break;
+	default:
+		dev_err(&self->ndev->dev, "should not happen\n");
+		break;
+	}
+}
+
+static int sh_sir_read_data(struct sh_sir_self *self)
+{
+	u16 val;
+	int timeout = 1024;
+
+	while (timeout--) {
+		val = sh_sir_read(self, IRIF_UART1);
+
+		/* data get */
+		if (val & RBF) {
+			if (val & (URSME | UROVE | URFRE | URPRE))
+				break;
+
+			return (int)sh_sir_read(self, IRIF_UART4);
+		}
+
+		udelay(1);
+	}
+
+	dev_err(&self->ndev->dev, "UART1 %04x : STATUS %04x\n",
+		val, sh_sir_read(self, IRIF_UART_STS2));
+
+	/* read data register for clear error */
+	sh_sir_read(self, IRIF_UART4);
+
+	return -1;
+}
+
+static void sh_sir_rx(struct sh_sir_self *self)
+{
+	int timeout = 1024;
+	int data;
+
+	while (timeout--) {
+		data = sh_sir_read_data(self);
+		if (data < 0)
+			break;
+
+		async_unwrap_char(self->ndev, &self->stats,
+				  &self->rx_buff, (u8)data);
+		self->ndev->last_rx = jiffies;
+
+		if (EOFD & sh_sir_read(self, IRIF_SIR_FRM))
+			continue;
+
+		break;
+	}
+}
+
+static irqreturn_t sh_sir_irq(int irq, void *dev_id)
+{
+	struct sh_sir_self *self = dev_id;
+	struct device *dev = &self->ndev->dev;
+	int phase = sh_sir_is_which_phase(self);
+
+	switch (phase) {
+	case TX_COMP_PHASE:
+	case TX_PHASE:
+		sh_sir_tx(self, phase);
+		break;
+	case RX_PHASE:
+		if (sh_sir_read(self, IRIF_SIR3))
+			dev_err(dev, "rcv pulse width error occurred\n");
+
+		sh_sir_rx(self);
+		sh_sir_clear_all_err(self);
+		break;
+	default:
+		dev_err(dev, "unknown interrupt\n");
+	}
+
+	 return IRQ_HANDLED;
+}
+
+/************************************************************************
+
+
+			net_device_ops function
+
+
+************************************************************************/
+static int sh_sir_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
+{
+	struct sh_sir_self *self = netdev_priv(ndev);
+	int speed = irda_get_next_speed(skb);
+
+	if ((0 < speed) &&
+	    (9600 != speed)) {
+		dev_err(&ndev->dev, "support 9600 only (%d)\n", speed);
+		return -EIO;
+	}
+
+	netif_stop_queue(ndev);
+
+	self->tx_buff.data = self->tx_buff.head;
+	self->tx_buff.len = 0;
+	if (skb->len)
+		self->tx_buff.len = async_wrap_skb(skb, self->tx_buff.data,
+						   self->tx_buff.truesize);
+
+	sh_sir_set_phase(self, TX_PHASE);
+	dev_kfree_skb(skb);
+
+	return 0;
+}
+
+static int sh_sir_ioctl(struct net_device *ndev, struct ifreq *ifreq, int cmd)
+{
+	/*
+	 * FIXME
+	 *
+	 * This function is needed for irda framework.
+	 * But nothing to do now
+	 */
+	return 0;
+}
+
+static struct net_device_stats *sh_sir_stats(struct net_device *ndev)
+{
+	struct sh_sir_self *self = netdev_priv(ndev);
+
+	return &self->stats;
+}
+
+static int sh_sir_open(struct net_device *ndev)
+{
+	struct sh_sir_self *self = netdev_priv(ndev);
+	int err;
+
+	clk_enable(self->clk);
+	err = sh_sir_crc_init(self);
+	if (err)
+		goto open_err;
+
+	sh_sir_set_baudrate(self, 9600);
+
+	self->irlap = irlap_open(ndev, &self->qos, DRIVER_NAME);
+	if (!self->irlap)
+		goto open_err;
+
+	/*
+	 * Now enable the interrupt then start the queue
+	 */
+	sh_sir_update_bits(self, IRIF_SIR_FRM, FRP, FRP);
+	sh_sir_read(self, IRIF_UART1); /* flag clear */
+	sh_sir_read(self, IRIF_UART4); /* flag clear */
+	sh_sir_set_phase(self, RX_PHASE);
+
+	netif_start_queue(ndev);
+
+	dev_info(&self->ndev->dev, "opened\n");
+
+	return 0;
+
+open_err:
+	clk_disable(self->clk);
+
+	return err;
+}
+
+static int sh_sir_stop(struct net_device *ndev)
+{
+	struct sh_sir_self *self = netdev_priv(ndev);
+
+	/* Stop IrLAP */
+	if (self->irlap) {
+		irlap_close(self->irlap);
+		self->irlap = NULL;
+	}
+
+	netif_stop_queue(ndev);
+
+	dev_info(&ndev->dev, "stoped\n");
+
+	return 0;
+}
+
+static const struct net_device_ops sh_sir_ndo = {
+	.ndo_open		= sh_sir_open,
+	.ndo_stop		= sh_sir_stop,
+	.ndo_start_xmit		= sh_sir_hard_xmit,
+	.ndo_do_ioctl		= sh_sir_ioctl,
+	.ndo_get_stats		= sh_sir_stats,
+};
+
+/************************************************************************
+
+
+			platform_driver function
+
+
+************************************************************************/
+static int __devinit sh_sir_probe(struct platform_device *pdev)
+{
+	struct net_device *ndev;
+	struct sh_sir_self *self;
+	struct resource *res;
+	char clk_name[8];
+	void __iomem *base;
+	unsigned int irq;
+	int err = -ENOMEM;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	irq = platform_get_irq(pdev, 0);
+	if (!res || irq < 0) {
+		dev_err(&pdev->dev, "Not enough platform resources.\n");
+		goto exit;
+	}
+
+	ndev = alloc_irdadev(sizeof(*self));
+	if (!ndev)
+		goto exit;
+
+	base = ioremap_nocache(res->start, resource_size(res));
+	if (!base) {
+		err = -ENXIO;
+		dev_err(&pdev->dev, "Unable to ioremap.\n");
+		goto err_mem_1;
+	}
+
+	self = netdev_priv(ndev);
+	err = sh_sir_init_iobuf(self, IRDA_SKB_MAX_MTU, IRDA_SIR_MAX_FRAME);
+	if (err)
+		goto err_mem_2;
+
+	snprintf(clk_name, sizeof(clk_name), "irda%d", pdev->id);
+	self->clk = clk_get(&pdev->dev, clk_name);
+	if (IS_ERR(self->clk)) {
+		dev_err(&pdev->dev, "cannot get clock \"%s\"\n", clk_name);
+		goto err_mem_3;
+	}
+
+	irda_init_max_qos_capabilies(&self->qos);
+
+	ndev->netdev_ops	= &sh_sir_ndo;
+	ndev->irq		= irq;
+
+	self->membase			= base;
+	self->ndev			= ndev;
+	self->qos.baud_rate.bits	&= IR_9600; /* FIXME */
+	self->qos.min_turn_time.bits	= 1; /* 10 ms or more */
+
+	irda_qos_bits_to_value(&self->qos);
+
+	err = register_netdev(ndev);
+	if (err)
+		goto err_mem_4;
+
+	platform_set_drvdata(pdev, ndev);
+
+	if (request_irq(irq, sh_sir_irq, IRQF_DISABLED, "sh_sir", self)) {
+		dev_warn(&pdev->dev, "Unable to attach sh_sir interrupt\n");
+		goto err_mem_4;
+	}
+
+	dev_info(&pdev->dev, "SuperH IrDA probed\n");
+
+	goto exit;
+
+err_mem_4:
+	clk_put(self->clk);
+err_mem_3:
+	sh_sir_remove_iobuf(self);
+err_mem_2:
+	iounmap(self->membase);
+err_mem_1:
+	free_netdev(ndev);
+exit:
+	return err;
+}
+
+static int __devexit sh_sir_remove(struct platform_device *pdev)
+{
+	struct net_device *ndev = platform_get_drvdata(pdev);
+	struct sh_sir_self *self = netdev_priv(ndev);
+
+	if (!self)
+		return 0;
+
+	unregister_netdev(ndev);
+	clk_put(self->clk);
+	sh_sir_remove_iobuf(self);
+	iounmap(self->membase);
+	free_netdev(ndev);
+	platform_set_drvdata(pdev, NULL);
+
+	return 0;
+}
+
+static struct platform_driver sh_sir_driver = {
+	.probe   = sh_sir_probe,
+	.remove  = __devexit_p(sh_sir_remove),
+	.driver  = {
+		.name = DRIVER_NAME,
+	},
+};
+
+static int __init sh_sir_init(void)
+{
+	return platform_driver_register(&sh_sir_driver);
+}
+
+static void __exit sh_sir_exit(void)
+{
+	platform_driver_unregister(&sh_sir_driver);
+}
+
+module_init(sh_sir_init);
+module_exit(sh_sir_exit);
+
+MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");
+MODULE_DESCRIPTION("SuperH IrDA driver");
+MODULE_LICENSE("GPL");
-- 
1.6.3.3


^ permalink raw reply related

* [net-2.6 PATCH 2/2] ixgbe: if ixgbe_copy_dcb_cfg is going to fail learn about it early
From: Jeff Kirsher @ 2010-01-28  2:38 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, John Fastabend, PJ Waskiewicz, Jeff Kirsher
In-Reply-To: <20100128023717.19441.27328.stgit@localhost.localdomain>

From: John Fastabend <john.r.fastabend@intel.com>

Call ixgbe_copy_dcb_cfg() earlier in the ixgbe_dcbnl_set_all() so that
we can learn if this is going to fail as early as possible.  Previously,
ixgbe_down or ixgbe_close were being called before this check and the
IXGBE_RESETTING bit was being set and cleared.  Worse if this failed
the corresponding ixgbe_up/ndo_open would not called.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_dcb_nl.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index 383e799..dd4883f 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -341,6 +341,12 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
 	if (!adapter->dcb_set_bitmap)
 		return DCB_NO_HW_CHG;
 
+	ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg,
+				 adapter->ring_feature[RING_F_DCB].indices);
+
+	if (ret)
+		return DCB_NO_HW_CHG;
+
 	/*
 	 * Only take down the adapter if the configuration change
 	 * requires a reset.
@@ -359,14 +365,6 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
 		}
 	}
 
-	ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg,
-				 adapter->ring_feature[RING_F_DCB].indices);
-	if (ret) {
-		if (adapter->dcb_set_bitmap & BIT_RESETLINK)
-			clear_bit(__IXGBE_RESETTING, &adapter->state);
-		return DCB_NO_HW_CHG;
-	}
-
 	if (adapter->dcb_cfg.pfc_mode_enable) {
 		if ((adapter->hw.mac.type != ixgbe_mac_82598EB) &&
 			(adapter->hw.fc.current_mode != ixgbe_fc_pfc))


^ permalink raw reply related

* [net-2.6 PATCH 1/2] ixgbe: set the correct DCB bit for pg tx settings
From: Jeff Kirsher @ 2010-01-28  2:37 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, John Fastabend, PJ Waskiewicz, Jeff Kirsher

From: John Fastabend <john.r.fastabend@intel.com>

Set the correct bit BIT_PG_TX when tx PG settings are set.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_dcb_nl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index 56f37f6..383e799 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -223,7 +223,7 @@ static void ixgbe_dcbnl_set_pg_bwg_cfg_tx(struct net_device *netdev, int bwg_id,
 
 	if (adapter->temp_dcb_cfg.bw_percentage[0][bwg_id] !=
 	    adapter->dcb_cfg.bw_percentage[0][bwg_id]) {
-		adapter->dcb_set_bitmap |= BIT_PG_RX;
+		adapter->dcb_set_bitmap |= BIT_PG_TX;
 		adapter->dcb_set_bitmap |= BIT_RESETLINK;
 	}
 }


^ permalink raw reply related

* [net-2.6 PATCH] igbvf: fix issue w/ mapped_as_page being left set after unmap
From: Jeff Kirsher @ 2010-01-28  1:30 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Alexander Duyck, Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@intel.com>

This change fixes an issue in igbvf with mapped_as_page being left set
after a page is unmapped which results in buffers which are mapped via map
single being unmapped as page.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igbvf/netdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 297a5dd..2aa71a7 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -2117,6 +2117,7 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter,
 	/* set time_stamp *before* dma to help avoid a possible race */
 	buffer_info->time_stamp = jiffies;
 	buffer_info->next_to_watch = i;
+	buffer_info->mapped_as_page = false;
 	buffer_info->dma = pci_map_single(pdev, skb->data, len,
 					  PCI_DMA_TODEVICE);
 	if (pci_dma_mapping_error(pdev, buffer_info->dma))


^ permalink raw reply related

* Re: [Bugme-new] [Bug 15147] New: phylib: no re-negotiation after link partner abilities changed
From: Andrew Morton @ 2010-01-28  0:48 UTC (permalink / raw)
  To: netdev; +Cc: bugzilla-daemon, bugme-daemon, Haavard Skinnemoen, dannybaumann
In-Reply-To: <bug-15147-10286@http.bugzilla.kernel.org/>


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Tue, 26 Jan 2010 16:24:35 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=15147
> 
>            Summary: phylib: no re-negotiation after link partner abilities
>                     changed
>            Product: Drivers
>            Version: 2.5
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Network
>         AssignedTo: drivers_network@kernel-bugs.osdl.org
>         ReportedBy: dannybaumann@web.de
>         Regression: No
> 
> 
> E.g. with the macb driver, which uses phylib, there is no link anymore when the
> link partner changes its abilities. This is because no autonegotiation is done
> again on link changes and hence the LPA register is not updated.
> 
> Steps for reproduction:
> - Connect a 10/100 device to a 10/100 switch, configure switch port to 100Full
> - Enable interface, link will be present
> - Configure device to 10Full, link will be lost
> - Configure switch to 10Full
> 
> Result:
> Link should be present at that point, but isn't ... debug messages in
> genphy_read_status show that lpa is still at 0x4101 (100Full).
> 
> Note that all that is on an AT91SAM9G20 board (hence macb driver) with a
> Dawicom 9161 PHY connected to its Ethernet port, but AFAICT all phylib enabled
> drivers should suffer from this.
> 

>From the above it appears that this is a regression.

Can you tell us which kernel version(s) were OK and which are not?

Thanks.

^ permalink raw reply

* Re: Hang: 2.6.32.4 sky2/DMAR
From: David Miller @ 2010-01-27 23:54 UTC (permalink / raw)
  To: shemminger
  Cc: mbreuer, jarkao2, akpm, flyboy, linux-kernel, netdev, mchan,
	pcnet32, romieu, mcarlson
In-Reply-To: <20100127094531.53c85aa7@nehalam>

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 27 Jan 2010 09:45:31 -0800

> Setting it to 1 causes driver to never go through the dma_sync_single/memcpy
> path.  Perhaps the code for DMAR doesn't do dma_sync_single_for_cpu
> properly, or the value passed to sync_single_for_cpu doesn't account for
> all the overhead of padding and/or ether header.

For the millionth time...

DMAR does not implement any of the DMA SYNC operations, they are set
to NULL in the dma ops vector, and thus are NOPs.

^ permalink raw reply

* Re: [PATCH 3/3] sky2: Remove failure cases for sky2_rx_start
From: Mike McCormack @ 2010-01-27 22:30 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20100127091024.2ac97d81@nehalam>

2010/1/28 Stephen Hemminger <shemminger@vyatta.com>:
> On Thu, 28 Jan 2010 00:05:54 +0900
> Mike McCormack <mikem@ring3k.org> wrote:
>
>> sky2_rx_start() can no longer fail, so remove redundant code pathes.
>>
>> Signed-off-by: Mike McCormack <mikem@ring3k.org>
>
> This can't work right if MTU is increased. The buffers need to be reallocated
> in change_mtu(); and yes it could fail when getting the new buffers.

Thanks for the feedback.  I will rework the patches.

Mike

^ 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